CN101442515A - Remote control method based on browser - Google Patents

Remote control method based on browser Download PDF

Info

Publication number
CN101442515A
CN101442515A CNA2007100774110A CN200710077411A CN101442515A CN 101442515 A CN101442515 A CN 101442515A CN A2007100774110 A CNA2007100774110 A CN A2007100774110A CN 200710077411 A CN200710077411 A CN 200710077411A CN 101442515 A CN101442515 A CN 101442515A
Authority
CN
China
Prior art keywords
server
browser
client
command
data
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.)
Granted
Application number
CNA2007100774110A
Other languages
Chinese (zh)
Other versions
CN101442515B (en
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.)
Shenzhen Clou Electronics Co Ltd
Original Assignee
Shenzhen Clou Electronics Co Ltd
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 Shenzhen Clou Electronics Co Ltd filed Critical Shenzhen Clou Electronics Co Ltd
Priority to CN2007100774110A priority Critical patent/CN101442515B/en
Publication of CN101442515A publication Critical patent/CN101442515A/en
Application granted granted Critical
Publication of CN101442515B publication Critical patent/CN101442515B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention is suitable for the field of remote equipment control and provides a browser-based remote control method. The method comprises the following steps: a server receives an operating command which is transmitted by a browser of a client, and the operating command generates an Ajax object in Java Script; the server receives the operating command and then transmits the operating command to remote equipment; the server organizes command execution results returned by the remote equipment into an execution result object, and returns the object to the client in JSON format; and the client analyzes the returned result by means of page layout and displays the returned result. The invention implements, combines and uses the up-to-date technology in the field of web development such as Ajax and JSON, and provides a novel method for developing a real-time control system or a data monitoring system on web. The method is simple and effective, can greatly simplify the program flow, reduce server burden and network flow load, and well improve operation experience of customers and the interface display effect.

Description

A kind of long-range control method based on browser
Technical field
The present invention relates to remote equipment control field, relate in particular to a kind of long-range control method based on browser.
Background technology
When developing remote equipment operation or real-time data acquisition system, adopt C/S (client/server) mechanical development software mostly in the past.C/S is a kind of pattern of programming: client adds server.Client is directly set up network with server and is connected, and sends order to server, receives return results and also shows.And software development now is gradually to B/S (browser/server) structural evolution.The software systems of B/S structure have reduced the trouble in the client install software.
But in the software of B/S structure, especially asynchronous, operation for a long time is difficult to carry out the synchronous of server end executing state and client display interface.The software systems of B/S structure are based on stateless and disconnected, and the executing state of server end order can't be pushed to client and show.The data obtained of server end continuous acquisition also can't continue to be pushed to client in addition.Method that can only be by refreshing the page in the time of this is again to the server end request msg, and regenerates display page.A problem of doing like this is that the page furbishing flicker is more frequent, and will keep page current state also relatively more difficult.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of long-range control method based on browser, is intended to mention request of data on the backstage to server by using synchronous or asynchronous request technology, and the complete operation order perhaps obtains the data that server returns continuously.
The invention process is achieved in that a kind of long-range control method based on browser, and described method comprises the steps: that server receives the operational order of sending from the browser of client, and described operational order generates an Ajax object in JavaScript; Server is dealt into distant place equipment with order after receiving operational order; And server execution result that distant place equipment is returned is organized into an execution result object, with the JSON form this object turned back to client.
The invention process also provides a kind of asynchronous remote control method based on browser, it is characterized in that, after described method comprises the steps: that server receives command request, generates command object, and puts into pending command queue; Regularly detect whether order is arranged in the pending formation, if any just taking out execution one by one, being finished generates result object to execution result, puts into the data result object queue that is finished; Server receives the Ajax query object of client, and the result for retrieval object queue if in this formation result object is arranged, is then taken out object, sends to client by the JSON form.
The embodiment of the invention has been used in combination Ajax, and the state-of-the-art technology of web development fields such as JSON is for real-time control system or the data monitoring system of developing the web pattern provides new development approach.This method is simply effective, and the flow process of greatly simplifying procedures reduces the server burden, reduces network traffic load, and improves client's operating experience and interface display effect well.
Description of drawings
Configuration diagram when Fig. 1 shows the embodiment of the invention based on synch command of the execution of browsing neat long-range control method;
Fig. 2 shows the embodiment of the invention is carried out the asynchronous command refresh data based on the timing of browsing neat long-range control method configuration diagram;
Fig. 3 shows the embodiment of the invention based on the execution of the browsing neat long-range control method configuration diagram during asynchronous command in batches.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Before the embodiment of the invention was set forth, the notion related to the embodiment of the invention was introduced:
JavaScript:Javascript is exactly a kind of being embedded in the webpage Html code, can be at a kind of programming language that is used to develop dynamic web page of browser client operation.
XmlHttpRequest: the customer end A cticeX object that can in JavaScript, create, use this object to initiate request to server, obtain data.
Ajax: be the abbreviation of Asynchronous JavaScript and XML (asynchronous JavaScript and XML), be meant a kind of webpage development technology that interaction network page is used of creating, wherein mainly used the xmlHttpRequest object.
XML: the abbreviation that is eXtensible Markup Language (extending mark language).XML is a kind of simple storage language, uses a series of simple mark data of description.Be exactly a kind of form of data of description structure in simple terms.
JSON: be that JavaScript Object Notation (the primary object of JavaScript) is a kind of data interchange format of lightweight.It is based on JavaScript Programming Language.JSON adopts the text formatting that is totally independent of language.JSON and XML are similar, also are a kind of forms of data of description structure, but more simple and convenient than XML when using in JavaScript.
Configuration diagram when Fig. 1 shows the embodiment of the invention based on the execution synch command of browsing neat long-range control method, it is existing that details are as follows:
The operator mentions an operational order on browsing device net page, generate an Ajax object among the JavaScript, initiates a synchronization request to server, can attach command parameter.The execution wait prompting that the back shows that on current web page an order is being carried out is sent in request.
After server receives command request, from request msg, extract command parameter, by communication channel order is sent to distant place equipment then.
Distant place equipment fill order is returned execution result and is given server.
Server is organized into an execution result object with execution result, wherein comprises command execution results, the time of implementation, carry out the miscue information of failure etc., and with the JSON form this object is turned back to client then.
Customer end A jax object detection is finished to server and returns, and at first closes the dialog box that display command is being carried out, and calls the data that a JavaScript call back function is resolved the JSON form that returns then, and the command execution results object is reduced.Run succeeded according to the execution result display command.Perhaps display command is carried out failure and miscue information.
Fig. 2 shows the configuration diagram of the embodiment of the invention based on the timing execution asynchronous command refresh data of browsing neat long-range control method, and existing details are as follows:
In the JavaScript script, create a timer, regularly call the Ajax object is initiated asynchronous request from the inquiry real time data to server.
After server receives command request, distant place equipment is carried out real time data call survey together.If the equipment self-timing is uploaded real time data in server memory, also can from the server memory data, take out latest data and return.
Server turns back to client with the data acquisition system object with the JSON form.
Customer end A jax object detection is finished to server and returns, and calls the data that a JavaScript call back function is resolved the JSON form that returns.If the data query success then refreshes the data field on the interface.
Fig. 3 shows the embodiment of the invention based on the execution of the browsing neat long-range control method configuration diagram during asynchronous command in batches, and existing details are as follows:
The operator mentions an operational order on browser page, generate an Ajax object among the JavaScript, initiates an asynchronous request to server, and this operational order can be attached command parameter.This page can be closed after transmission finished.
After server receives operational order, from request msg, extract command parameter, generate command object then, and put into pending command queue.
The command scheduling executive program of server detects regularly whether order is arranged in the pending formation, if any just taking out execution one by one.The execution result (portability data) that is finished generates result object, puts into the data result object queue that is finished.
Another of client shows the webpage timing asynchronous call Ajax object of asynchronous command execution result, and to the formation of server retrieves result object, if in this formation result object is arranged, then server takes out object, returns to client by the JSON form.
Customer end A jax object detection is returned to server, has judged whether return data from the return data of JSON form.If any, then command execution results is written in the webpage one by one, can play sound simultaneously, prompting operators such as demonstration animation have asynchronous command to be finished.
The browser that the embodiment of the invention adopted refers to the IE6 browser, but is not limited at other browsers (as firefox), and part JavaScript script may be different when realizing in other browsers.
The present invention has been used in combination Ajax, and the state-of-the-art technology of web development fields such as JSON is for exploitation real-time control system or data monitoring system on web provide new development approach.This method is simply effective, and the flow process of greatly simplifying procedures reduces the server burden, reduces network traffic load, and improves client's operating experience and interface display effect well.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1, a kind of long-range control method based on browser is characterized in that, described method comprises the steps:
Server receives the operational order of sending from the browser of client, and described operational order generates an Ajax object in JavaScript;
Server is dealt into distant place equipment with order after receiving operational order; And
The execution result that server returns distant place equipment is organized into an execution result object, with the JSON form this object is turned back to client.
2, the method for claim 1 is characterized in that, described method further comprises: browser sends the wait prompting that the back shows that on browser an order is being carried out in operational order.
3, the method for claim 1 is characterized in that, described method further comprises: customer end A jax object is resolved the data of the JSON form that returns after detecting server and returning, with the reduction of command execution results object and show on browser.
4, the method for claim 1 is characterized in that, described method further comprises: regularly calling the Ajax object initiates operational order to server.
5, the method for claim 1 is characterized in that, described method further comprises: the equipment self-timing is uploaded real time data in server memory the time in the distance, takes out latest data and return from the server memory data.
6, the method for claim 1 is characterized in that, subsidiary command parameter in the described operational order.
7, a kind of long-range control method based on browser is characterized in that, described method comprises the steps:
After server receives operational order, generate command object, and put into pending command queue;
Server detects regularly whether order is arranged in the pending formation, and if any just taking out execution one by one, being finished generates result object to execution result, puts into the data result object queue that is finished;
Receive the Ajax object of client, the result for retrieval object queue if in this formation result object is arranged, is then taken out object, sends to client by the JSON form.
8, method as claimed in claim 7 is characterized in that, described method further comprises:
Customer end A jax object detection is returned to server, has judged whether return data from the return data of JSON form, if any, then command execution results is reduced one by one and on browser, show.
9, method as claimed in claim 7 is characterized in that, subsidiary command parameter in the described operational order.
CN2007100774110A 2007-11-22 2007-11-22 Remote control method based on browser Expired - Fee Related CN101442515B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007100774110A CN101442515B (en) 2007-11-22 2007-11-22 Remote control method based on browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007100774110A CN101442515B (en) 2007-11-22 2007-11-22 Remote control method based on browser

Publications (2)

Publication Number Publication Date
CN101442515A true CN101442515A (en) 2009-05-27
CN101442515B CN101442515B (en) 2011-09-07

Family

ID=40726759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007100774110A Expired - Fee Related CN101442515B (en) 2007-11-22 2007-11-22 Remote control method based on browser

Country Status (1)

Country Link
CN (1) CN101442515B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917286A (en) * 2010-07-30 2010-12-15 上海普元信息技术股份有限公司 Web performance analysis system and method for realizing cross-browser in internet application system
CN102279884A (en) * 2011-08-05 2011-12-14 中国工商银行股份有限公司 Data acquiring and displaying method, system and Web server based on Web pages
CN102426549A (en) * 2011-09-08 2012-04-25 新一站保险代理有限公司 Efficient Web form validation method and framework thereof
CN102523309A (en) * 2009-07-31 2012-06-27 同方威视技术股份有限公司 Method and equipment for responding request of client side and acquiring and returning real-time data
CN102820980A (en) * 2011-06-08 2012-12-12 中兴通讯股份有限公司 Equipment and method for order distribution
CN104135536A (en) * 2014-08-15 2014-11-05 浪潮电子信息产业股份有限公司 Data interaction method of Web management system based on Json data protocols
CN106293714A (en) * 2016-07-29 2017-01-04 四川天邑康和通信股份有限公司 A kind of method of improvement ajax performance based on data Layer
CN106506565A (en) * 2017-01-04 2017-03-15 上海上讯信息技术股份有限公司 A kind of remote command executes method and apparatus
CN108647015A (en) * 2018-05-08 2018-10-12 深圳市智汇牛科技有限公司 A kind of man-machine interactive system framework in automatic kitchen field
CN109032583A (en) * 2018-07-25 2018-12-18 北京小米移动软件有限公司 Data interactive method and device
CN110175055A (en) * 2019-05-07 2019-08-27 成都交大光芒科技股份有限公司 A kind of call method of browser and fingerprint instrument based on service

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2348408B1 (en) 2009-12-22 2018-04-25 EchoStar Technologies L.L.C. Method and system for communicating between computing devices

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW436709B (en) * 1997-11-17 2001-05-28 Ibm Method and apparatus for interacting with hardware devices remotely
CN1474558A (en) * 2002-08-19 2004-02-11 乐金电子(天津)电器有限公司 Household network system
CN100437579C (en) * 2005-12-20 2008-11-26 腾讯科技(深圳)有限公司 Method for realizing AJAX webpage

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523309A (en) * 2009-07-31 2012-06-27 同方威视技术股份有限公司 Method and equipment for responding request of client side and acquiring and returning real-time data
CN101917286A (en) * 2010-07-30 2010-12-15 上海普元信息技术股份有限公司 Web performance analysis system and method for realizing cross-browser in internet application system
CN102820980A (en) * 2011-06-08 2012-12-12 中兴通讯股份有限公司 Equipment and method for order distribution
CN102279884B (en) * 2011-08-05 2015-04-01 中国工商银行股份有限公司 Data acquiring and displaying method, system and Web server based on Web pages
CN102279884A (en) * 2011-08-05 2011-12-14 中国工商银行股份有限公司 Data acquiring and displaying method, system and Web server based on Web pages
CN102426549A (en) * 2011-09-08 2012-04-25 新一站保险代理有限公司 Efficient Web form validation method and framework thereof
CN102426549B (en) * 2011-09-08 2013-06-26 新一站保险代理有限公司 Efficient Web form validation method and framework thereof
CN104135536A (en) * 2014-08-15 2014-11-05 浪潮电子信息产业股份有限公司 Data interaction method of Web management system based on Json data protocols
CN106293714A (en) * 2016-07-29 2017-01-04 四川天邑康和通信股份有限公司 A kind of method of improvement ajax performance based on data Layer
CN106293714B (en) * 2016-07-29 2020-01-14 四川天邑康和通信股份有限公司 Data layer-based method for improving ajax performance
CN106506565A (en) * 2017-01-04 2017-03-15 上海上讯信息技术股份有限公司 A kind of remote command executes method and apparatus
CN108647015A (en) * 2018-05-08 2018-10-12 深圳市智汇牛科技有限公司 A kind of man-machine interactive system framework in automatic kitchen field
CN109032583A (en) * 2018-07-25 2018-12-18 北京小米移动软件有限公司 Data interactive method and device
CN110175055A (en) * 2019-05-07 2019-08-27 成都交大光芒科技股份有限公司 A kind of call method of browser and fingerprint instrument based on service
CN110175055B (en) * 2019-05-07 2022-02-18 成都交大光芒科技股份有限公司 Service-based browser and fingerprint instrument calling method

Also Published As

Publication number Publication date
CN101442515B (en) 2011-09-07

Similar Documents

Publication Publication Date Title
CN101442515B (en) Remote control method based on browser
US10754917B2 (en) Method and system for displaying customized webpage on double webview
US20210058406A1 (en) Method of achieving synchronization management of account information of WEB interface in multi-system DAS
US20100100823A1 (en) Method and apparatus for generating a web-based user interface
CN102799654B (en) A kind of online method for previewing of the document for intelligent terminal, system and intelligent terminal
CN104778211A (en) Method, client, server and system for refreshing partial page modules
CN103338247A (en) Power system remote image retrieval method based on Web service mode
CN103631578B (en) Method for exhibiting data in a kind of distribution automation system
JP2012043140A (en) Web page browsing system and relay server
CN106293965A (en) The method of the hardware resource of hardware resource access system and access electronic installation thereof
CN108897510A (en) Large screen shows that the control system, method and large screen of information show information system
CN103440151A (en) Method and apparatus for dynamically loading Web page
CN103577568A (en) Cross-platform mobile safety comprehensive information aggregation system and method adopting same
CN104808920A (en) Focal point control method and focal point control device
CN109684571A (en) A kind of collecting method and device, storage medium
CN106850717A (en) A kind of method of the monitoring industrial data collection gateway real time data based on webpage
CN101159739B (en) Subtitling display process and communication system and related equipment
CN102819553A (en) Method and device for page interaction
CN103530736A (en) Construction method of distributed tide computing system graphics platform based on WEB-SVG
CN102497422A (en) Live web casting method and live web casting system
CN104978207A (en) Method for uploading file, browser and system
CN103870280B (en) Webpage seamless combining processing method based on FLEX and JSP
CN102523271B (en) Terminal and communication method and system thereof
CN104834594A (en) Method and apparatus for testing web system
CN109309874B (en) Focus updating method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
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: 20110907

Termination date: 20131122