Abstract: The embedded equipment and the Internet union will be representing the embedded technical true future. In the article the embedded network intelligent control system unifies the embedded operating system and the Internet network, first has given based on the Web server’s embedded network intelligent control system’s architecture; Then, has designed the software system, and has given between the embedded network intelligent control terminal and the Web server the exchange of information message format, proposed dispatches server’s parameter computational method and the load dispatch algorithm; Finally, gives the experimental result and the conclusion.
Key word: Embedded operating system; Web server; Dispatch algorithm
1 introduction
Along with Internet technology development, information electrical appliances’ popularization application as well as EOS (Embedded Operating System) the microminiaturization and the specialization, EOS starts from the sole weak function to develop to the high specialized strong function direction. Take based on Internet as the symbol embedded system, is occupying the rapidly expand the stage. At present the majority embedded systems also isolate outside Internet, but along with the Internet development as well as the Internet technology and the information electrical appliances, unions and so on industrial control technology is day by day close, the embedded equipment and the Internet union will be representing the embedded technical true future.
This article studies the embedded network intelligent terminal control system, by the micro processing system directly the way which connects with the ethernet, organically unifies the embedded operating system and the Internet network. The following from the embedded network intelligent control system’s architecture, the software system two parts will carry on the elaboration.
2 embedded network intelligent control system’s architecture
The embedded network intelligent control system’s application environment and network topology as shown in Figure 1. Shown in Figure 1 topology by the embedded network intelligent terminal, the dispatcher server, Web server group [2], the Internet main engine is composed. The embedded network intelligent terminal uses uCLinux operating system [1], this terminal is direct and the ethernet is connected, data transfer to Internet WAN’s Web server. Dispatches the server in this system the load dispatch function, is not overweight as for the Web server’s in some server load. The Web server group collects the embedded network intelligent terminal system’s data, replies the WAN main engine’s visit. In WAN’s main engine may the direct access Web server gain the embedded network intelligent terminal data, has the specific jurisdiction main engine and may visit the embedded network intelligent terminal directly.

Figure 1 system application environment and network topology
The embedded network intelligent terminal by the microprocessor, the exterior connection, the network information processing, the level switch, the expanded memory unit and so on several parts is composed, embedded network intelligent terminal’s hardware architecture as shown in Figure 2.

Figure 2 embedded network intelligent terminal hardware architecture
3 software systems
3.1 embedded network intelligent terminal software architecture
Environment this article which according to shown in Figure 1 selected the uClinux operating system to develop the platform as the software system, Figure 3 has demonstrated software system’s overall skeleton. The software system divides into two parts: Controlled object software part and embedded network intelligent terminal software part.
How does the controlled object software part involve the sensor to collect the controlled object the signal, how to actuate the controlled object and the peripheral device, how to transmit the signal to the embedded network intelligent control terminal.
Does the embedded network intelligent terminal software part involve to the essence revision, operating system’s transplant, the file processing, the graphical user interface design, duty processing, how increases the application procedure to uClinux in as well as between the embedded network intelligent control terminal and the Web server the information exchange.

Figure 3 software system’s overall skeleton
between 3.2 embedded network intelligent control terminal and Web server information exchange
The Web server is the long-distance equipment derives the information the important means that it may through the public gateway connection (CGI) form permission revision plant parameter, thus carries on long-distance monitors [2]. The Web server already became the long-distance management, specially these do not have (embedded intelligent terminal which the tradition user interface for example this article designs) equipment standard. The Web browser may carry on the correspondence with the long-distance equipment, and demonstrates the corresponding data. In shown in Figure 1 in the analysis situs environment the Web server, the client and the embedded network intelligent terminal use hypertext agreement [3](HTTP) and the network programming realizes the information exchange and the long-distance management.
HTTP is one kind based on the ASCII agreement. HTTP uses the standard synchronization above the TCP/IP agreement to request/the reply pattern, client/server structure [4]. When the client proposes the request to the HTTP server, needs to transmit a HTTP request message, this text’s form as shown in Figure 4.

Figure 4 HTTP request message form
Figure 4 demonstrated that the HTTP request message by the request line, may choose the masthead, to be possible to choose the newspaper literary journal body field to be composed. A request line of establishment afterward moved stage. May choose the masthead to point out client request agreement, as well as server before reply must understand client’s information.
The HTTP request message contains the very few some information, but may inform the server through these information it “ability and by chance”. Similarly the HTTP reply also uses the similar structure, no longer elaborated in here.
3.3 network data submission
When realizes the embedded network intelligent terminal application procedure network data submission (Figure 3 in software level application procedure), the embedded network intelligent terminal and between the WAN Web server’s network service selects the customer/server pattern method, namely under the uCLinux operating system environment carries on the network programming. Realizes the network programming (intelligence transmission) including the following five unit processes: Foundation sleeve joint character: Transfers socket (); Binding sleeve joint character: Transfers bind (); Foundation connection: Transfers connect (); Monitor connection: Transfers listen (); Establishment connection: Transfers accept ().
3.4 dispatch server’s dispatch algorithm
Influence shown in Figure 1 the embedded network intelligent control system reliable key aspect dispatches server’s network performance, carries on the parameter computation and the mapping and the load localization is reasonably promotes the network performance the key.
3.4.1 parameter computations and mapping
The CPU use factor can reflect directly server’s performance, the following gives in the linux operating system to gain the CPU use factor process, in the linux operating system through reads the /proc/stat document, in this document the record has sys, user, nice and the idle variable. Calculates when the CPU use factor, so long as two times reads these variables, then use formula:
Total_1=user_1 nice_1 sys_1 idel_1;
Total_2=user_2 nice_2 sys_1 idel_2;
IntCpuRate=(int)(((float)((user_2 sys_2 nice_2)-(user_1 sys_1 nice_1))/(float)(total_2-total_1))*100);
And total_1 is the parameter sum total which first time reads, total_2 is the parameter sum total which second time reads.
Regarding other parameters, for example the buffer size, may through transfer the linux operating system’s system function ioct1() to gain.
After gain correspondence parameter, will correspond again the parameter maps in the load localization algorithm, mainly uses the algorithm in the parameter switching process is dynamic valve value algorithm [5]. This algorithm’s mathematical model is as follows:

In the above equation B is the system connection buffer space capacity, Qi(t) is the ith Web server’s queue size, Q(t) is the current system total queue size, T(t) is no longer connects the conversation the valve value parameter, Alpha for adjustment factor. The above formula may know, the dynamic valve value algorithm basis system mode dynamic alignment control valve value, valve value’s size and in the current system the idle resources are proportional, when some Web server buffer space surpasses the valve value, will block this Web server, no longer gives this Web server assignment load.
3.4.2 load localization strategy
Obtains the parameter according to front, transmits these parameters dispatches the server. Dispatches the server to choose the appropriate server through use weighting rotation dispatch algorithm [5], soon the load locates to the concrete Web server on. The localization strategy’s algorithm description is as follows:
The supposition has a group of Web server expression is S = {S0, S1,…, Sn-1}, W(Si) expressed that Web the server Si weight, the variable i expressed previous time chooses the Web server, variable cw expressed the current dispatch’s weight, max(S) indicates gathers in S all Web server’s biggest weight, gcd(S) indicates gathers in S all Web server weight greatest common divisor. The variable i and cw by the initialization is zero at first. The algorithm description is as follows:
while (true) {
if (i == 0) {
cw = cw - gcd(S);
if (cw <= 0) {
cw = max(S);
if (cw == 0)
return NULL;
}
} else i = (i 1) mod n;
if (W(Si) >= cw)
return Si; }
4 experiment environment and result
Tests the topology to use the most Jan system which as shown in Figure 1. The embedded network intelligent terminal uses inserts the uClinux operating system, and increases the corresponding network service procedure in the uClinux operating system. Dispatches the server to use Linux9.0 and realizes 3.3 dispatch algorithms as the operating system. The Web server group, the Internet main engine is the common form. Figure 5 is the data packet situation which gains using the Ethereal network protocol analyzer, this graph Ming dynasty printed books article design’s system and uses the algorithm is effective.

Figure 5 gain data packet
5 concluding remark
The experiment indicated this article proposed the system structure, the load computation method and the dispatch algorithm have realized the embedded network intelligent control terminal remote control. Through used the weighting rotation dispatch algorithm and the dynamic valve value algorithm has solved the system load scheduling problem, enabled the system to have the good network performance and the high practical application value. This system’s realization to further carry on the embedded network remote control system service the research to build a good network platform.
Reference
[1] Li Jing, Zhang Wei is new. under uClinux real-time task’s one kind realizes the method [J]. micro computer information, 2005(1):129-130
[2] Wang Dong shore, Fang Binxing, cloud dawn spring. Based on Web management network monitor technology design and solid [J]. Computer project, 2002(10),2003-2004
[3] J. Gettys J. Mogul Hypertext Transfer Protocol — HTTP/1.1[S] RFC2068
[4] M.tim jones embedded system TCP/IP application layer agreement [M]. Beijing: Electronics industry publishing house, 2003.91-96.
[5] Hahme E L, Choudhury A K. Dynamic queue length threshold for mulitiple loss priorities. IEEE/ACM Trans Networking[J],2002,10(3):368-380