[go: up one dir, main page]

CN201726425U - Embedded network server - Google Patents

Embedded network server Download PDF

Info

Publication number
CN201726425U
CN201726425U CN2010201523530U CN201020152353U CN201726425U CN 201726425 U CN201726425 U CN 201726425U CN 2010201523530 U CN2010201523530 U CN 2010201523530U CN 201020152353 U CN201020152353 U CN 201020152353U CN 201726425 U CN201726425 U CN 201726425U
Authority
CN
China
Prior art keywords
module
client
data
request
page interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2010201523530U
Other languages
Chinese (zh)
Inventor
王真星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Polytechnic University
Original Assignee
Shanghai Polytechnic University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Polytechnic University filed Critical Shanghai Polytechnic University
Priority to CN2010201523530U priority Critical patent/CN201726425U/en
Application granted granted Critical
Publication of CN201726425U publication Critical patent/CN201726425U/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

本实用新型涉及一种嵌入式网络服务器,包含循环连接的以下模块:与外部客户端双向连接的页面接口模块;用于侦听和接受客户端请求的循环监听模块;用于解析客户端请求的数据解析模块。由于数据解析模块还与家庭网关中的业务逻辑模块连接向其传递请求命令,并发送返回的请求结果数据的协议头信息至页面接口模块,由页面接口模块输出至客户端的网络页面显示,有效地实现处理来自客户端的请求信息,并返回请求结果;由于使用单任务的服务器,通过建立请求列表来处理多路连接请求,只为CGI程序创建新的进程,在最大程度上节省了系统资源,同时还通过自动生成目录、自动解压文件,使该嵌入式网络服务器具有很高的请求处理速度和效率。

Figure 201020152353

The utility model relates to an embedded network server, which comprises the following modules of cyclic connection: a page interface module bidirectionally connected with an external client; a cyclic monitoring module for listening to and accepting client requests; Data analysis module. Because the data parsing module is also connected with the business logic module in the home gateway to transmit the request command to it, and sends the protocol header information of the returned request result data to the page interface module, which is output to the network page display of the client by the page interface module, effectively Realize the processing of request information from the client and return the request result; due to the use of a single-task server, the multi-channel connection request is processed by establishing a request list, and only a new process is created for the CGI program, which saves system resources to the greatest extent and at the same time Also by automatically generating directories and automatically decompressing files, the embedded network server has high request processing speed and efficiency.

Figure 201020152353

Description

Embedded web server
Technical field
The utility model relates to a kind of embedded web server, particularly a kind of embedded web server that is used for home gateway.
Background technology
Home gateway is the nucleus equipment of intelligent domestic system, by the household internal network is connected with external network (INTERNET, PSTN, GPRS), realizes the information mutual communication between the networks such as system information collection, logical process, information output, interlock control.Make the user can pass through the Long-distance Control of communicating terminals realizations such as computer, PDA, mobile phone, landline telephone to home automation device, the user can also pass through modes such as browser, mail, multimedia message, phone, receives the multimedia messagess such as audio-visual picture, language and characters of the real-time or historical domestic safety monitoring of inquiry.
Embedded web server in the home gateway plays the effect that receives client-requested, analysis request, response request, returns request results to client.Yet existing embedded web server for each connects independent establishment process, comes multichain to connect the request of processing by duplicating self process when connection request arrives; Its generation to the dynamic network page is by using server script, as JSP, and ASP etc., it needs the webserver to have the operation support module of these scripts.Yet be subjected to the resource limit of embedded system, above-mentioned data handling procedure can influence the processing speed and the efficient of whole embedded web server.
The utility model content
The purpose of this utility model provides a kind of embedded web server, can provide home gateway and external network friendly mutual Webpage, can fast and effeciently receive the solicited message of processing from client, and return request results.
In order to achieve the above object, the technical solution of the utility model provides a kind of embedded web server, it is characterized in that, comprising that circulation connects with lower module:
With the two-way page interface module that is connected of external client;
Be used to intercept and accept the circulation monitoring module of client-requested;
Be used to resolve the data resolution module of client-requested.
Above-mentioned embedded web server also by being arranged in the home gateway, is connected with the business logic modules of home gateway.
Above-mentioned data resolution module also is connected to it with business logic modules in the above-mentioned home gateway and transmits the client-requested order, and sends the request results data returned to page interface module.
Above-mentioned data resolution module sends different http header data by page interface module to client also according to client-requested that parses and the data type difference of being returned by business logic modules.
Above-mentioned business logic modules also is connected with the database module of above-mentioned home gateway, above-mentioned database module is carried out retrieval, the accessing operation of data record.
Above-mentioned business logic modules also is connected with the control logic module of above-mentioned home gateway, is used to drive corresponding apparatus and reaches the state that client requires.
Above-mentioned page interface module comprises the list receiver module, program is returned module, is used for carrying out two-way transfer of data with client; Above-mentioned list receiver module is monitored module with above-mentioned circulation and is connected; Said procedure returns module and is connected with above-mentioned data resolution module.
Above-mentioned page interface module also comprises the input checking module, and it is connected with above-mentioned list receiver module, above-mentioned circulation monitoring module respectively, is used to check that client is submitted to the request msg of list receiver module.
The embedded web server that the utility model provides, compared with prior art, its advantage is: the utility model is monitored module, data resolution module owing to be provided with page interface module, the circulation that connects that circulate, and is used to intercept and accept client-requested and parsing successively; Data resolution module also is connected to its transfer request command with business logic modules in the home gateway, and the protocol header information that sends the request results data return is to page interface module, the Webpage that is exported to client by page interface module shows, realize handling solicited message effectively, and return request results from client;
The utility model is owing to use the Boa server of single task at embedded web server, handle multichannel HTTP connection request by setting up the HTTP request list, only create new process for cgi script, saved system resource to the full extent, it makes this embedded web server have very high HTTP request processing speed and efficient also by generating catalogue, automatic decompressing files automatically simultaneously.
Description of drawings
Fig. 1 is the syndeton schematic diagram of embedded web server of the present utility model and home gateway;
Fig. 2 is the general structure schematic diagram of embedded web server of the present utility model.
Embodiment
Below in conjunction with description of drawings embodiment of the present utility model.
See also shown in Figure 1ly, the embedded web server 10 that the utility model provides is arranged in the home gateway, is connected with business logic modules 20.This business logic modules 20 also is connected with control logic module 40 with database module 30 respectively.
Wherein the webserver 10 is used for resolving http request and the order that client is sent, and submits to business logic modules 20; By the configuration detection data in 20 pairs of data library modules 30 of business logic modules, log record etc. retrieve, operation such as access, and execution command sent to control assembly; Control assembly is responsible for driving the state of corresponding apparatus to customer requirement; The data of business logic modules 20 being returned via the webserver 10 are submitted to the user with the form of XML again.
See also shown in Figure 2ly, embedded web server 10 comprises page interface module 11, the circulation that circulation connects and monitors module 12, data resolution module 13, is used to intercept and accept client-requested successively and resolves; Data resolution module 13 also is connected to its transfer request command with business logic modules 20 in the home gateway, and the protocol header information that sends the request results data of returning is exported to the Webpage demonstration of client to page interface module 11 by page interface module 11.
The embedded web server 10 that uses in the utility model is Boa servers, it is the http server of a single task, handle multichannel HTTP connection request by setting up the HTTP request list, it is the new process of CGI (CGI) program creation only simultaneously, saved system resource to the full extent, it also has functions such as automatic generation catalogue, automatic decompressing files simultaneously, makes this embedded web server 10 have very high HTTP request processing speed and efficient.
The initial work that module 12 is used for the webserver is monitored in circulation, comprises Boa is configured, and promptly by set up a Boa server directory under/etc catalogue, the main configuration file of Boa is put in the inside, makes it can support the execution of cgi script; When the cgi script request, it is its establishment process that module 12 is monitored in circulation, and will ask output.The groundwork process that module 12 is monitored in circulation is as follows: the creation environment variable, TCP stream mode SOCKET descriptor is intercepted in foundation, be converted into clog-free socket, and bind 80 ports and monitor connection request, enter circulation afterwards and intercept the client-requested of wait from page interface module 11.
Data resolution module 13 is used to analyze client-requested, is about to solicited message and resolves to method, URL target, optional Query Information and form information etc.Data resolution module 13 cooperates with business logic modules 20, according to the difference of the requesting method that parses, makes different responses: if requesting method is HEAD, then directly return response header to page interface module 11; If requesting method is GET, then when returning response header, the URL file destination of client-requested is read from server directory, and sent to page interface module 11; If requesting method is POST, then the form information that the client is sended over sends corresponding C GI program to, carries out cgi script as the parameter of CGI, and execution result is sent to page interface module 11.
Data resolution module 13 also according to the client-requested that parses and the data type difference returned by business logic modules 20 (under HTML type, plain text, JPG image, GIF image, the server directory All Files list information etc.), sends different http header data (filename, size, date etc.) by page interface module 11 to client.
Page interface module 11 is one section program that operate on the webserver 10, and the cgi script with Html page interface on the client browser is provided.Because in HTML, list is the means of topmost transmission information, is applicable to any browser, so the work of cgi script comprises the reception form data, carries out data processing, generates the new page according to result at last and returns to client browser.
Page interface module 11 comprises list receiver module, input checking module, program and returns module.Form data generally is to submit to server with the POST method, is obtained by the cgi script of list receiver module, and interface data and internal data correspondence are carried out next step processing.Cgi script obtains data from the page and just distinguishes according to the element name element name/value.The application and development of the webserver 10 generally all can be come interface and programmed logic disengaging, allows page interface module 11 to a certain degree changing the interface down, as changing the attribute of interface text, sets up multi-language version etc., and need not to change programmed logic.A lot of elements are arranged in the list, comprise the input text frame, radio box, the multiselect frame, button, or the like, the mutual of information can be provided.
The data that the input checking module is just submitted to the user on user interface are checked.It at present generally is the mode that adopts the javascript script.When submitting data to, the onSubmit method of form object will be called, and just can import in this method and check.Inspection commonly used whether have must, maximum/little length, whether character, whether numeral, email address, IP address whether correctly, whether mate a regular expression etc.
Program return module be adopt note among the HTML<!-xxx--〉come mark.Need be in html template being each list element and other any places that needs routine processes, according to certain rule, is exactly that the list element is capable as the next line of note, sets up its comment token.Cgi script just can be judged the table unit prime information and handles according to comment token.Program reads template file line by line, checks to have or not comment token, if any, then next line need be handled, and composes for the list element and goes up data, just can return the page of band data at last and give the browser of client.
Although content of the present utility model has been done detailed introduction by above preferred embodiment, will be appreciated that above-mentioned description should not be considered to restriction of the present utility model.After those skilled in the art have read foregoing, for multiple modification of the present utility model with to substitute all will be conspicuous.Therefore, protection range of the present utility model should be limited to the appended claims.

Claims (8)

1.一种嵌入式网络服务器,其特征在于,包含循环连接的以下模块:1. an embedded network server, is characterized in that, comprises the following modules of loop connection: 与外部客户端双向连接的页面接口模块(11);A page interface module (11) bidirectionally connected to an external client; 用于侦听和接受客户端请求的循环监听模块(12);A loop monitoring module (12) for listening to and accepting client requests; 用于解析客户端请求的数据解析模块(13)。A data parsing module (13) for parsing client requests. 2.如权利要求1所述的嵌入式网络服务器,其特征在于,还通过设置在家庭网关中,与家庭网关的业务逻辑模块(20)连接。2. The embedded network server according to claim 1, characterized in that, it is also connected with the business logic module (20) of the home gateway by being arranged in the home gateway. 3.如权利要求2所述的嵌入式网络服务器,其特征在于,所述数据解析模块(13)还与所述家庭网关中的业务逻辑模块(20)连接向其传递客户端请求命令,并发送返回的请求结果数据至页面接口模块(11)。3. the embedded network server as claimed in claim 2, is characterized in that, described data parsing module (13) is also connected with the service logic module (20) in the described home gateway and transmits client request order to it, and Send the returned request result data to the page interface module (11). 4.如权利要求3所述的嵌入式网络服务器,其特征在于,所述数据解析模块(13)还根据解析出的客户端请求、并由业务逻辑模块(20)返回的数据类型不同,通过页面接口模块(11)向客户端发送不同的HTTP协议头数据。4. the embedded network server as claimed in claim 3, is characterized in that, described data parsing module (13) also requests according to the client that parses out and the data type that is returned by business logic module (20) is different, by The page interface module (11) sends different HTTP protocol header data to the client. 5.如权利要求2所述的嵌入式网络服务器,其特征在于,所述业务逻辑模块(20)还与所述家庭网关的数据库模块(30)连接,对所述数据库模块(30)进行数据记录的检索、存取操作。5. the embedded network server as claimed in claim 2 is characterized in that, described service logic module (20) is also connected with the database module (30) of described home gateway, carries out data to described database module (30). Record retrieval, access operations. 6.如权利要求2所述的嵌入式网络服务器,其特征在于,所述业务逻辑模块(20)还与所述家庭网关的控制逻辑模块(40)连接,用于驱动相应的设备达到客户端要求的状态。6. The embedded network server according to claim 2, characterized in that, the service logic module (20) is also connected with the control logic module (40) of the home gateway for driving corresponding equipment to reach the client requested status. 7.如权利要求1所述的嵌入式网络服务器,其特征在于,所述页面接口模块(11)包含表单接收模块、程序返回模块,用来与客户端进行双向的数据传输;所述表单接收模块与所述循环监听模块(12)连接;所述程序返回模块与所述数据解析模块(13)连接。7. The embedded web server as claimed in claim 1, wherein the page interface module (11) includes a form receiving module and a program return module, which are used to carry out two-way data transmission with the client; the form receiving The module is connected with the loop monitoring module (12); the program return module is connected with the data analysis module (13). 8.如权利要求7所述的嵌入式网络服务器,其特征在于,所述页面接口模块(11)还包含输入检查模块,其分别与所述表单接收模块、所述循环监听模块(12)连接,用于检查客户端提交到表单接收模块的请求数据。8. embedded web server as claimed in claim 7, is characterized in that, described page interface module (11) also comprises input checking module, and it is connected with described form receiving module, described loop monitoring module (12) respectively , which is used to check the request data submitted by the client to the form receiving module.
CN2010201523530U 2010-04-08 2010-04-08 Embedded network server Expired - Fee Related CN201726425U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010201523530U CN201726425U (en) 2010-04-08 2010-04-08 Embedded network server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010201523530U CN201726425U (en) 2010-04-08 2010-04-08 Embedded network server

Publications (1)

Publication Number Publication Date
CN201726425U true CN201726425U (en) 2011-01-26

Family

ID=43494778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010201523530U Expired - Fee Related CN201726425U (en) 2010-04-08 2010-04-08 Embedded network server

Country Status (1)

Country Link
CN (1) CN201726425U (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559475A (en) * 2016-09-28 2017-04-05 浙江大学宁波理工学院 A kind of Programmable Embedded web server
US20170337374A1 (en) * 2016-05-23 2017-11-23 Wistron Corporation Protecting method and system for malicious code, and monitor apparatus
CN107624241A (en) * 2015-04-09 2018-01-23 迈思肯系统公司 Embedded web server
CN108123953A (en) * 2017-12-26 2018-06-05 天津天地人和企业管理咨询有限公司 CGI technology is in the application process of smart home monitoring field
CN115103040A (en) * 2022-07-01 2022-09-23 厦门汉印电子技术有限公司 Client, industrial control equipment, control method and device thereof, and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107624241A (en) * 2015-04-09 2018-01-23 迈思肯系统公司 Embedded web server
CN107624241B (en) * 2015-04-09 2021-01-12 欧姆龙株式会社 Method, system, and computer-readable storage medium for embedded web server
US20170337374A1 (en) * 2016-05-23 2017-11-23 Wistron Corporation Protecting method and system for malicious code, and monitor apparatus
US10922406B2 (en) * 2016-05-23 2021-02-16 Wistron Corporation Protecting method and system for malicious code, and monitor apparatus
CN106559475A (en) * 2016-09-28 2017-04-05 浙江大学宁波理工学院 A kind of Programmable Embedded web server
CN108123953A (en) * 2017-12-26 2018-06-05 天津天地人和企业管理咨询有限公司 CGI technology is in the application process of smart home monitoring field
CN115103040A (en) * 2022-07-01 2022-09-23 厦门汉印电子技术有限公司 Client, industrial control equipment, control method and device thereof, and storage medium

Similar Documents

Publication Publication Date Title
US9213832B2 (en) Dynamically scanning a web application through use of web traffic information
CN106776313A (en) A kind of method of analog service, device and centralized management platform
CN201726425U (en) Embedded network server
CN109145201B (en) Information management method, device, equipment and storage medium based on block chain
CN102272747A (en) Method and apparatus for managing state information of remote user interface
US8341238B2 (en) Methods and systems for multiple-device session synchronization
WO2011075993A1 (en) Really simple syndication (rss) subscription method, device and system
CN104618412A (en) Page skipping method and device
CN110855766A (en) Method and device for accessing Web resources and proxy server
CN106484611A (en) Fuzz testing method and apparatus based on automation protocol adaptation
CN107818268A (en) The access control method and server of big data platform
CN111711533B (en) Fault diagnosis method, fault diagnosis device, electronic device and storage medium
CN101707627B (en) Method and device for presenting page information
CN112261111A (en) Method and system for realizing cross-domain access of browser in application program
CN103686242A (en) Video playing method and system
CN106850572B (en) Access method and device for target resource
CN111831513B (en) Log query method, device, electronic equipment and storage medium
CN103955501A (en) Webpage two-way collaborative browsing method
CN103902534A (en) Method and device for triggering local operations through webpage program
CN107517247B (en) System and method for converting socket interface into http interface applied to financial industry
US8230002B2 (en) Method and system for automatic setup in web-based applications
CN102999424A (en) Parallel remote automated testing method
CN116150513A (en) Data processing method, device, electronic equipment and computer readable storage medium
JP5732732B2 (en) Authentication server device, program, and method
CN105099829A (en) Electronic resource service availability automatic monitoring method based on HTTP (Hyper Text Transfer Protocol) protocol

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110126

Termination date: 20110408