Summary of the invention
To the problem that exists in the above-mentioned prior art, the object of the present invention is to provide a kind of embedded type WEB to transfer and survey maintaining method and a kind of embedded type WEB accent survey maintenance system, it need not at client installation testing software, and the service end resource that takies is few.
For achieving the above object, the present invention adopts following technical scheme;
A kind of embedded type WEB is transferred and is surveyed maintaining method, comprises step:
Service end receives the WEB solicited message, reads corresponding web page template and/or script according to this WEB solicited message and sends to client;
Service end receives the first predetermined interaction protocol packet; This first predetermined interaction protocol packet resolved be packaged into first and transfer and send to service end monitoring main program after surveying the maintenance agreement packet; And receive that service end monitoring main program returns second transfer and survey the maintenance agreement packet, this second is transferred and surveys maintenance agreement packet and resolve and send to client after being packaged into the second predetermined interaction protocol packet.
A kind of embedded type WEB is transferred and is surveyed maintaining method, comprises step:
Client is sent the WEB solicited message to service end;
Web page template that client reception service end is returned and/or script also load the script after resolving; Script after the loading is created User Interface according to the web page template of correspondence; And through the User Interface input information, and send to service end after this input information is organized into the first predetermined interaction protocol packet;
Script after the loading receives the second predetermined interaction protocol packet that service end is sent, and corresponding interface is dynamically resolved and generated to this second predetermined interaction protocol packet.
A kind of embedded type WEB is transferred and is surveyed maintenance system, comprises the WEB service unit, the gateway unit that are arranged on service end:
Said WEB service unit receives the WEB solicited message from client browser; Call corresponding web page template and/or script according to this WEB solicited message and send to client browser; Reception is carried in the first predetermined interaction protocol packet of the script of client browser through the client browser transmission; This first predetermined interaction protocol packet is sent to said gateway unit; And receive the second predetermined interaction protocol packet that said gateway unit sends, this second predetermined interaction protocol packet is sent to client browser;
Said gateway unit; Be used to receive the first predetermined interaction protocol packet that said WEB service unit sends; This first predetermined interaction protocol packet resolved be packaged into first and transfer and send to service end monitoring main program after surveying the maintenance agreement packet; And receive second of service end monitoring main program feedback and transfer and survey the maintenance agreement packet, this second is transferred and survey maintenance agreement packet and resolve and send to said WEB service unit after being packaged into the second predetermined interaction protocol packet.
According to the invention described above scheme; It is through the script in the service end storage web page template and the logic of managing business, and when needs transferred survey to safeguard, client can get access to web page template and script from service end through general browser; Carry out alternately according to this script and service end; Client need not to install specific testing software, and in addition, service end is through unpacking to predetermined interaction protocol packet, accent survey maintenance agreement packet and assembling and realize monitoring the mutual of main program with service end; Transfer the service logic control of surveying all to control by the script that is carried in client browser; The resource of spent service end is few, has solved the embarrassment of embedded device service end scarcity of resources, has improved embedded type WEB greatly and has transferred the efficient of surveying maintenance.
Embodiment
Preferred embodiment below in conjunction with is wherein set forth the present invention program in detail.
Having illustrated among Fig. 1 is that embedded type WEB of the present invention is transferred the schematic flow sheet of surveying maintaining method embodiment, in the embodiment shown in fig. 1, is to be that example describes with the reciprocal process between service end and the client.As shown in Figure 1, embedded type WEB of the present invention transfers the survey maintaining method to comprise step:
Step S101: service end receives the WEB solicited message from client browser, from memory, reads corresponding web page template and script according to this WEB solicited message and sends to client browser, gets into step S102;
Step S102: client browser receives web page template and the script that service end is sent; Load the script after resolving; The script that is carried in client browser is created User Interface based on the web page template of correspondence; And receive input information, and should input information be organized into predetermined interaction protocol packet and (be called the first predetermined interaction protocol packet, so that distinguish mutually with the predetermined interaction protocol packet that service end sends to client through User Interface; Hereinafter identical) after send to service end, get into step S103;
Step S103: service end receives the script that is carried in client browser and is scheduled to the interaction protocol packet through first of client browser transmission; This first predetermined interaction protocol packet parsing is packaged into accent survey maintenance agreement packet (to be called first accent and to survey the maintenance agreement packet; Distinguish mutually so that survey the maintenance agreement packet with the accent that service end monitoring main program sends to service end; Hereinafter identical) after send to service end monitoring main program, get into step S104;
Step S104: the accent that service end reception service end monitoring main program returns is surveyed the maintenance agreement packet and (is called second and transfers survey maintenance agreement packet; So that transfer survey maintenance agreement packet to distinguish mutually with above-mentioned first; Hereinafter identical); This second accent survey maintenance agreement packet parsing is packaged into predetermined interaction protocol packet (is called the second predetermined interaction protocol packet; So that distinguish mutually, hereinafter identical with the above-mentioned first predetermined interaction protocol packet) after send to client browser, get into step S105;
Step S105: the script that is carried in client browser receives the second predetermined interaction protocol packet that service end is sent through client browser, this second predetermined interaction protocol packet is dynamically resolved generate corresponding interface.
Method in the aforesaid present embodiment; It is through the script in the service end storage web page template and the logic of managing business, and when needs transferred survey to safeguard, client can get access to web page template and script from service end through the general browser that is installed in client; Carry out alternately according to this script and service end; Client need not to install specific testing software, and in addition, service end is through unpacking to predetermined interaction protocol packet, accent survey maintenance agreement packet and assembling and realize monitoring the mutual of main program with service end; Transfer the service logic control of surveying all to control by the script that is carried in client browser; The resource of spent service end is few, has solved the embarrassment of embedded device service end scarcity of resources, has improved embedded type WEB greatly and has transferred the efficient of surveying maintenance.
Wherein, It is relevant with the interaction protocol that is adopted between service end and the client that the above-mentioned first predetermined interaction protocol packet, second is scheduled to the interaction protocol packet; Because communicate the different of the interaction protocol that adopted when mutual between service end and the client, the type of predetermined interaction protocol packet is also inequality accordingly, when concrete the realization; Can adopt XML (Extensible Markup Language; Extend markup language) agreement realizes alternately, and at this moment, the above-mentioned first predetermined interaction protocol packet, the second predetermined interaction protocol packet are the XML packet; In the explanation of following concrete example, be to be that the XML packet is that example describes with predetermined interaction protocol packet.
Similarly; Above-mentioned first transfers the concrete type of surveying maintenance agreement packet, the second accent survey maintenance agreement packet relevant with the agreement that manufacturer adopted of production service end, for different production manufacturer, when it adopts different protocol to realize service end; The corresponding type of surveying the maintenance agreement packet of transferring also can be distinguished to some extent; It for example can be CSP3 (CSP, Chip Scale Package, encapsulation) packet; In the explanation of following concrete example, surveying the maintenance agreement packet with this accent is that the CSP3 packet is that example describes.
A concrete accent is surveyed in the maintenance process therein, and concrete operating process and processing procedure thereof can be:
At first; (browser of client can be any browser to the browser of client through being installed in client; The type of the browser that uses is irrelevant with the present invention) import the address (for example IP address) of embedded device service end; So just be equivalent to send a solicited message to the embedded device service end; Also promptly set up one with the embedded device service end and be connected, client browser passes through communication protocol (for example http agreement) to embedded device service end requested webpage template and script;
After the embedded device service end receives the request that client browser sends over, from memory, read out corresponding web page template and script, and this web page template and script are sent to client browser according to this solicited message;
Client browser loads and resolves script after receiving the web page template and script that embedded device returns, and script is carried in the web page template dynamic creation User Interface of the script of client browser according to correspondence after loading;
The client logins through this User Interface input user profile;
After the script that is carried in client browser is organized into an XML packet with the user profile packing; Built-in engine through client browser sends to the embedded device service end; The built-in engine of the client browser here can be AJAX (Asynchronous JavaScript and XML; Asynchronous JavaScript and XML) engine, so that can show download progress accurately, and have friendly operation interface;
After the embedded device service end receives an XML packet; Send to the monitoring main program of embedded device service end with XML packet parsing and after being packaged into a CSP3 packet, handle by the monitoring main program of embedded device service end;
Subsequently, the embedded device service end receives the 2nd CSP3 packet that the monitoring main program returns, and sends to client browser with the parsing of the 2nd CSP3 packet and after being packaged into the 2nd XML packet;
After the script that is carried in client browser receives the 2nd XML packet through client browser, corresponding interface is dynamically resolved and generated to the 2nd XML packet.
Survey in the maintenance process at follow-up accent; And it is above-mentioned similar from sending an XML packet to the process that receives the 2nd XML packet and generate between the corresponding interface; The embedded device service end all is the XML packet that receives to be resolved and is packaged into send to the monitoring main program behind the CSP3 packet and handle; And resolve behind the CSP3 packet that receives monitoring main program feedback and be packaged into XML after return to the script that is installed in client browser, dynamically resolve and displaying interface by the script that is carried in client browser.
Wherein, when corresponding interface is dynamically resolved and generated to the script that is carried in client browser according to the 2nd XML packet that receives, can be to adopt local refresh technique to refresh; That is, can be only to upgrade several to need data updated, to the operation of a certain value; And other parts of the page remain unchanged; The system resource occupation rate when thereby the service end of greatly reducing and client are mutual has improved interactive efficiency, and the mode that concrete part is refreshed does not repeat them here.
Transfer the survey maintaining method according to the embedded type WEB of the invention described above; The present invention also provides a kind of embedded type WEB to transfer and surveys maintenance system; The structural representation of system embodiment of the present invention has been shown among Fig. 2; As shown in Figure 2, embedded type WEB of the present invention is transferred and is surveyed the memory that maintenance system includes the WEB service unit, gateway unit and storage web page template and the script that are arranged on service end, wherein:
This WEB service unit; Be used to receive WEB solicited message from client browser; From said memory, call corresponding web page template and script according to this WEB solicited message and send to client browser; Reception is carried in the XML packet of the script of client browser through the client browser transmission; The one XML packet is sent to said gateway unit, and receive the 2nd XML packet that said gateway unit sends, the 2nd XML packet is sent to client browser;
This gateway unit; Be used to receive the XML packet that said WEB service unit sends; The one XML packet resolved be packaged into first and transfer and send to service end monitoring main program after surveying the maintenance agreement packet; And receive second of service end monitoring main program feedback and transfer and survey the maintenance agreement packet, this second is transferred and survey maintenance agreement packet and resolve and send to said WEB service unit after being packaged into the 2nd XML packet.
System in the aforesaid present embodiment; It is through storing the script of the web page template and the logic of managing business in service end, when needs transfer survey to safeguard, can getting access to web page template and script from service end through the general browser that is installed in client; Carry out alternately according to this script and service end; Client need not to install specific testing software, and in addition, service end is through unpacking to XML packet, accent survey maintenance agreement packet and assembling and realize monitoring the mutual of main program with service end; Transfer the service logic control of surveying all to control by the script that is carried in client browser; The resource of spent service end is few, has solved the embarrassment of embedded device service end scarcity of resources, has improved embedded type WEB greatly and has transferred the efficient of surveying maintenance.
Wherein, Above-mentioned first transfers the concrete type of surveying maintenance agreement packet, the second accent survey maintenance agreement packet relevant with the agreement that manufacturer adopted of production service end, for different production manufacturer, when it adopts different protocol to realize service end; The corresponding type of surveying the maintenance agreement packet of transferring also can be distinguished to some extent; It for example can be CSP3 (CSP, Chip Scale Package, encapsulation) packet; In the explanation of following concrete example, surveying the maintenance agreement packet with this accent is that the CSP3 packet is that example describes.
A concrete accent is surveyed in the maintenance process therein, and concrete operating process and processing procedure thereof can be:
After the embedded device service end started, the WEB service unit was promptly monitored corresponding socket port along with the startup self-starting of embedded device service end after starting;
(browser of client can be any browser to the browser of client through being installed in client; The type of the browser that uses is irrelevant with the present invention) import the address (for example IP address) of embedded device service end; So just be equivalent to send a solicited message to the embedded device service end; Also promptly set up one with the embedded device service end and be connected, client browser passes through communication protocol (for example http agreement) to embedded device service end requested webpage template and script;
After the WEB service unit of embedded device service end receives the solicited message that client browser sends over; This solicited message is resolved; And take out corresponding web page template and script from memory read, and this web page template and script are sent to client browser according to this solicited message;
After client browser receives the web page template and script that the WEB service unit of embedded device returns; Script is resolved and loaded; Script is carried in the web page template dynamic creation User Interface of the script of client browser according to correspondence after loading;
The client logins through this User Interface input user profile;
After the script that is carried in client browser is organized into an XML packet with the user profile packing; Send to the WEB service unit of embedded device service end through the built-in engine of browser; The built-in engine of the client browser here can be the AJAX engine; So that can show download progress accurately, and has friendly operation interface;
After the WEB service unit of embedded device service end receives an XML packet, an XML packet is transmitted to gateway unit;
After gateway unit receives the XML packet that the WEB service unit forwards; Send to the monitoring main program of embedded device service end with XML packet parsing and after being packaged into a CSP3 packet, handle by the monitoring main program of embedded device service end;
Subsequently; The gateway unit of embedded device service end receives the 2nd CSP3 packet that the monitoring main program returns; Send to the WEB service unit with the parsing of the 2nd CSP3 packet and after being packaged into the 2nd XML packet, the 2nd XML packet is sent to client browser by the WEB service unit;
After the script that is carried in client browser receives the 2nd XML packet through client browser, corresponding interface is dynamically resolved and generated to the 2nd XML packet.
Survey in the maintenance process at follow-up accent; And it is above-mentioned similar from sending an XML packet to the process that receives the 2nd XML packet and generate between the corresponding interface; The embedded device service end all be by the WEB service unit realize with the script that is carried in client browser between communicate by letter; Communicate by the conversion between gateway unit realization XML packet and the CSP3 packet and with the monitoring main program, dynamically resolve and displaying interface by the script that is carried in client browser.
Wherein, when corresponding interface is dynamically resolved and generated to the script that is carried in client browser according to the 2nd XML packet that receives, can be to adopt local refresh technique to refresh; That is, can be only to upgrade several to need data updated, to the operation of a certain value; And other parts of the page remain unchanged; The system resource occupation rate when thereby the service end of greatly reducing and client are mutual has improved interactive efficiency, and the mode that concrete part is refreshed does not repeat them here.
The embedded type WEB of the invention described above is transferred and is surveyed maintenance system, is to carry out different functions and responsibility respectively by each unit, is realized with the mutual of the monitoring main program of embedded device service end and is realized the XML packet and transfer the fractionation and the assembling of surveying the maintenance agreement packet by gateway unit; Gateway unit specifically can be realized through certain software program; Realize the processing of service logic by script, realize and the information interaction of client browser that by the WEB service unit division of labor of variant unit is clear and definite; When developing; The initial stage of exploitation can develop synchronously, and don't can influence each other, and has improved the progress of project exploitation greatly.
In addition; Can also can also realize management according to above-mentioned gateway unit, when receiving the XML packet that the WEB service unit sends to user right; When it returns the 2nd XML packet; Gateway unit can become the 2nd XML packet to return to the WEB service unit according to the packing data that active user's claim will this current user has the right to check, to watch its data of having the right to watch, concrete implementation does not repeat them here the user who makes in client only.
Above-described embodiment of the present invention only is the detailed description to preferred embodiment of the present invention, does not constitute the qualification to protection range of the present invention.Any modification of within spirit of the present invention and principle, being done, be equal to replacement and improvement etc., all should be included within the claim protection range of the present invention.