CN103716371A - Web real-time data active pushing method - Google Patents

Web real-time data active pushing method Download PDF

Info

Publication number
CN103716371A
CN103716371A CN201310529356.XA CN201310529356A CN103716371A CN 103716371 A CN103716371 A CN 103716371A CN 201310529356 A CN201310529356 A CN 201310529356A CN 103716371 A CN103716371 A CN 103716371A
Authority
CN
China
Prior art keywords
server
flex control
flex
real time
time 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.)
Pending
Application number
CN201310529356.XA
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.)
STATE GRID METERING CENTER
State Grid Corp of China SGCC
State Grid Zhejiang Electric Power Co Ltd
China Electric Power Research Institute Co Ltd CEPRI
Original Assignee
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
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 State Grid Corp of China SGCC, China Electric Power Research Institute Co Ltd CEPRI filed Critical State Grid Corp of China SGCC
Priority to CN201310529356.XA priority Critical patent/CN103716371A/en
Publication of CN103716371A publication Critical patent/CN103716371A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a Web real-time data active pushing method. The method comprises the steps that (1) a client browser sends a request of page monitoring to a server; (2) the client browser loads a Flex control; (3) the Flex control starts a Socket communication port to wait for connection; (4) the Flex control is connected with the server, and tells that the Flex control is ready; (5) the server registers the Flex control into a notification list of the server; and (6) the server actively sends new data to the Flex control in the notification list, and the Flex control feeds back the information to the client browser. According to the invention, when the server data are updated, the latest data can be pushed to the Flex control of the client browser through Socket in real time; the timeliness of the data of the client browser is strengthened; and pressure of the server and a network can be reduced.

Description

A kind of Web real time data active push method
Technical field
The invention belongs to data-pushing technology, specifically relate to a kind of Web real time data active push method.
Background technology
At present, in electric-power metering business production scheduling platform, need to be in client browser operating state and the related data of monitoring equipment, and due to the importance of work, these data demands represent in real time.In this case, the pattern that adopts traditional browser regularly to ask is just undesirable.As follows alternately between typical server and client browser:
(1), client browser proposes a request;
(2), the server request of receiving client browser, carry out analyzing and processing;
(3) result that, server is processed operation returns to client browser.
A common server need to provide service to a plurality of clients, therefore, concerning server, also needs to consider how effectively to process the request of a plurality of clients.
B/S system (browser and server structure) generally adopts http protocol, and the data of server end can initiatively not send to the browser of client while occurring to upgrade, and needs client to go on one's own initiative to ask to obtain new data.Common solution is that client browser regularly sends request to upgrade to server, but this mode may cause regular hour error.In electric-power metering business production scheduling platform, equipment sends on server by its state information in real time, server sends to the status information of equipment of acquisition on browser after receiving the timing request of client browser, because the requirement of real-time in electric-power metering business production scheduling platform is higher, therefore this method is improper.In addition, when server has Data Update, client browser still can not send the request of obtaining data, has so just increased the weight of the burden of server and Internet Transmission.
Summary of the invention
For the deficiencies in the prior art, the invention provides a kind of Web real time data active push method, for using at electric-power metering business production scheduling platform, the Data Update of server can active push arrive browser, can strengthen the real-time of client browser data.
With respect to B/S framework, in C/S system, be easy to when server data changes, new data be delivered to client by Socket mode.The present invention imitates C/S structure by load Flex control on client browser in B/S structure, making browser and service end set up Socket is connected, Flex control on browser connects the Web page on client browser as intermediate layer to carry out Socket with server end and communicates by letter, Flex control on client browser and server can send data mutually, control mutually and call, thereby realize server active " pushing away ", sending the more object of new data.
The object of the invention is to adopt following technical proposals to realize
A Web real time data active push method, its improvements are, described method comprises:
(1), client browser is monitored the page to server request;
(2), client browser loads Flex control;
(3) it is to be connected that, Flex control is opened Socket PORT COM etc.;
(4), Flex control connection server, inform that self is ready;
(5), server is registered to Flex control in the notice list of server;
(6), server by new data initiatively send to notice list Flex control, Flex control feeds back to information on client browser.
Preferably, described step (1) comprises that browser monitors the page by http protocol to server calls, and server returns to browser by the monitoring page.
Preferably, described step (2) comprises that load the monitoring page after the monitoring page that client browser reception server returns loads Flex control simultaneously.
Preferably, described step (3) comprises the Socket PORT COM of Flex control bundle client rs PC.
Preferably, described step (4) Flex control is informed self numbering of the ready Flex of comprising control, the IP address of current place PC, the port of wait.
Preferably, described step (4) is carried out once at set intervals.
Preferably, in the notice list of described step (5) server, comprise a plurality of Flex controls.
Preferably, described step (6) comprises that server data does not upgrade, and Flex control continues waiting for server data to be upgraded.
Preferably, described step (6) comprises
(a), server is according to the information of informing of Flex control, finds the IP address of Flex control and the port of wait;
(b), server initiatively initiates Socket and connects, if new data is sent to after successful connection on corresponding Flex control;
(c), transmission disconnects after finishing, and continues waiting for server data and upgrade.
Further, described step (b) comprises
If connect unsuccessfully, and attempt repeatedly connecting rear failure, this Flex control is deleted from notice list, continue waiting for server data and upgrade.
Compared with the prior art, beneficial effect of the present invention is:
1, the present invention can be pushed to latest data in real time the Flex control of client browser when server data occurs to upgrade by Socket, has strengthened the real-time of client browser data, has reduced the pressure of server and network.
2, the present invention adopts Flex control can support multiple browser.
3, the present invention is regularly informed with server and is detected and to be connected two kinds of technique guarantee data and can not fail to report and report more by Flex control, and the data that are suitable for very much electric-power metering business production scheduling platform transmit in real time.
4, the data variation of server of the present invention can active push arrive browser, has improved real-time;
5, server of the present invention adopts short connection with the communication of Flex control, reduces development difficulty;
6, the present invention is regularly informed with server and is detected and to be connected two kinds of technique guarantee data and can not fail to report and report more by Flex.
Accompanying drawing explanation
Fig. 1 is the structure chart of a kind of Web real time data active push method provided by the invention.
Fig. 2 is the flow chart of a kind of Web real time data active push method provided by the invention.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in further detail.
As shown in Figure 1, the present invention includes 3 parts: equipment, server and client side's browser.
Thereby by load Flex control on client browser, in B/S system, make browser and server set up Socket to be connected, so just can utilize Flex control to connect the Web page on client browser and server as intermediate layer and bring in and carry out Socket and communicate by letter;
Flex control on client browser and server can send data mutually, control mutually and call, thereby realizing the more object of new data of server active push.
Therefore when equipment sends to its state information on server in real time, server just initiatively sends to the state information of acquisition on client browser.In addition, client browser also can be by Flex control initiatively to server request information.
Socket, conventionally also referred to as " socket ", for describing IP address and port, is the handle of a communication chain.Application program is conventionally sent and is asked or reply network request to network by " socket ".
As shown in Figure 2, workflow concrete steps of the present invention are as described below:
(1), client browser is monitored the page to server request;
Browser is monitored the page by http protocol to server calls, and server returns to browser by the monitoring page;
(2), client browser loads Flex control;
The monitoring page returning in browser receiving step (1) also loads, and Flex control is also loaded simultaneously;
(3) it is to be connected that, Flex control is opened Socket port etc.;
After Flex control loads successfully, certain Socket PORT COM of binding client rs PC, the connection of waiting for server.
(4), Flex control connection server, inform that self is ready;
Flex control after step (3) completes, connection server, notification server self is ready, can reception server propelling data.The content of informing comprises the numbering of this Flex control, IP address of current place PC, the port of wait etc.This step can be carried out once at set intervals, is equivalent to this Flex of notification server control still online.
(5), server is registered to Flex control in the notice list of server;
Server is received informing after information of Flex control transmission, the information of informing is put in the notice list of server; In notice list, safeguard a plurality of Flex control information, when server has Data Update, will notify one by one these Flex controls;
(6), server by new data initiatively send to notice list Flex control, Flex control feeds back to information on client browser;
When server data occurs to upgrade, server initiatively sends to new data on each Flex control of notice list, is specially:
(a), first server, according to the information of informing of Flex control, finds the IP address of Flex control and the port of wait;
(b), server initiatively initiates Socket and connects, if new data is sent on corresponding Flex control after successful connection, then disconnects, then continue waiting for server data and upgrade;
If connect unsuccessfully, attempt repeatedly connecting, if still connect unsuccessfully, this Flex control is deleted from notice list, then continue server data and upgrade.
When server data does not upgrade, continue waiting for server data and upgrade.
Embodiment
Adopt the large screen system of electric-power metering business production scheduling dispatching platforms shown in accompanying drawing 2 to adopt being pushed on scheduling large-screen of data active in real time that real time data active push method is produced measuring equipment to show.
For the large screen system of electric-power metering business production scheduling dispatching platforms, client browser calls the monitoring page by http protocol to server request, and server returns to browser by the monitoring page.Client browser receives the monitoring page and loads, and Flex control is loaded simultaneously.After Flex control loads successfully, the Socket PORT COM of binding client rs PC, connection server, notification server can receive the data of propelling movement, server is put into the information of informing in the notice list of server, in notice list, has safeguarded a plurality of Flex control information.When having new metering creation data, server can send to Flex control in real time by the data after upgrading, and Flex control feeds back to information on client browser and shows in real time on scheduling large-size screen monitors.
Finally should be noted that: above embodiment is only in order to illustrate that technical scheme of the present invention is not intended to limit, although the present invention is had been described in detail with reference to above-described embodiment, those of ordinary skill in the field are to be understood that: still can modify or be equal to replacement the specific embodiment of the present invention, and do not depart from any modification of spirit and scope of the invention or be equal to replacement, it all should be encompassed in the middle of claim scope of the present invention.

Claims (10)

1. a Web real time data active push method, is characterized in that, described method comprises:
(1), client browser is monitored the page to server request;
(2), client browser loads Flex control;
(3) it is to be connected that, Flex control is opened Socket PORT COM etc.;
(4), Flex control connection server, inform that self is ready;
(5), server is registered to Flex control in the notice list of server;
(6), server by new data initiatively send to notice list Flex control, Flex control feeds back to information on client browser.
2. a kind of Web real time data active push method as claimed in claim 1, is characterized in that, described step (1) comprises that browser monitors the page by http protocol to server calls, and server returns to browser by the monitoring page.
3. a kind of Web real time data active push method as claimed in claim 1, is characterized in that, described step (2) comprises that load the monitoring page after the monitoring page that client browser reception server returns loads Flex control simultaneously.
4. a kind of Web real time data active push method as claimed in claim 1, is characterized in that, described step (3) comprises the Socket PORT COM of Flex control bundle client rs PC.
5. a kind of Web real time data active push method as claimed in claim 1, is characterized in that, described step (4) Flex control informs self numbering of the ready Flex of comprising control, the IP address of current place PC, the port of wait.
6. a kind of Web real time data active push method as claimed in claim 1, is characterized in that, described step (4) is carried out once at set intervals.
7. a kind of Web real time data active push method as claimed in claim 1, is characterized in that, in the notice list of described step (5) server, comprises a plurality of Flex controls.
8. a kind of Web real time data active push method as claimed in claim 1, is characterized in that, described step (6) comprises that server data does not upgrade, and Flex control continues waiting for server data to be upgraded.
9. a kind of Web real time data active push method as claimed in claim 1, is characterized in that, described step (6) comprises
(a), server is according to the information of informing of Flex control, finds the IP address of Flex control and the port of wait;
(b), server initiatively initiates Socket and connects, if new data is sent to after successful connection on corresponding Flex control;
(c), transmission disconnects after finishing, and continues waiting for server data and upgrade.
10. a kind of Web real time data active push method as claimed in claim 9, is characterized in that, described step (b) comprises
If connect unsuccessfully, and attempt repeatedly connecting rear failure, this Flex control is deleted from notice list, continue waiting for server data and upgrade.
CN201310529356.XA 2013-10-31 2013-10-31 Web real-time data active pushing method Pending CN103716371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310529356.XA CN103716371A (en) 2013-10-31 2013-10-31 Web real-time data active pushing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310529356.XA CN103716371A (en) 2013-10-31 2013-10-31 Web real-time data active pushing method

Publications (1)

Publication Number Publication Date
CN103716371A true CN103716371A (en) 2014-04-09

Family

ID=50408943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310529356.XA Pending CN103716371A (en) 2013-10-31 2013-10-31 Web real-time data active pushing method

Country Status (1)

Country Link
CN (1) CN103716371A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245615A (en) * 2015-10-27 2016-01-13 航天恒星科技有限公司 System task real-time monitoring method and system
CN105610605A (en) * 2015-12-18 2016-05-25 成都广达新网科技股份有限公司 Message reverse push method, network management system alarm method and state update method
CN106936808A (en) * 2015-12-31 2017-07-07 中兴通讯股份有限公司 HTTP flow-medium transmission methods and device
CN108243210A (en) * 2016-12-23 2018-07-03 北京神州泰岳软件股份有限公司 A kind of information-pushing method and Information Push Server
CN108667861A (en) * 2017-03-28 2018-10-16 比亚迪股份有限公司 By browser to the method, system and server of device real-time monitoring
CN109040296A (en) * 2018-08-30 2018-12-18 上海艾融软件股份有限公司 A kind of data push method and system based on long connection
CN112311835A (en) * 2019-08-02 2021-02-02 杭州海康威视数字技术股份有限公司 Security check analysis data transmission method and system, security check analyzer and client device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101694660A (en) * 2009-06-01 2010-04-14 高维海 Instantaneous website system and method for combining website with instantaneous communication platform
CN101902411A (en) * 2009-06-01 2010-12-01 高维海 Real-time website system and method for combining website and real-time communication platform
CN102333128A (en) * 2011-10-31 2012-01-25 河南省电力公司计量中心 Active transmission method for real-time Web data
CN102843389A (en) * 2011-06-21 2012-12-26 国承斌 WEB system and method based on event driven

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101694660A (en) * 2009-06-01 2010-04-14 高维海 Instantaneous website system and method for combining website with instantaneous communication platform
CN101902411A (en) * 2009-06-01 2010-12-01 高维海 Real-time website system and method for combining website and real-time communication platform
CN102843389A (en) * 2011-06-21 2012-12-26 国承斌 WEB system and method based on event driven
CN102333128A (en) * 2011-10-31 2012-01-25 河南省电力公司计量中心 Active transmission method for real-time Web data

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245615A (en) * 2015-10-27 2016-01-13 航天恒星科技有限公司 System task real-time monitoring method and system
CN105610605A (en) * 2015-12-18 2016-05-25 成都广达新网科技股份有限公司 Message reverse push method, network management system alarm method and state update method
CN105610605B (en) * 2015-12-18 2019-04-23 成都广达新网科技股份有限公司 A kind of method that message reversely pushes, network management system alarm and state update
CN106936808A (en) * 2015-12-31 2017-07-07 中兴通讯股份有限公司 HTTP flow-medium transmission methods and device
CN106936808B (en) * 2015-12-31 2021-01-26 中兴通讯股份有限公司 HTTP streaming media transmission method and device
CN108243210A (en) * 2016-12-23 2018-07-03 北京神州泰岳软件股份有限公司 A kind of information-pushing method and Information Push Server
CN108667861A (en) * 2017-03-28 2018-10-16 比亚迪股份有限公司 By browser to the method, system and server of device real-time monitoring
CN108667861B (en) * 2017-03-28 2020-08-07 比亚迪股份有限公司 Method, system and server for monitoring equipment in real time through browser
CN109040296A (en) * 2018-08-30 2018-12-18 上海艾融软件股份有限公司 A kind of data push method and system based on long connection
CN109040296B (en) * 2018-08-30 2021-04-06 上海艾融软件股份有限公司 Data pushing method and system based on long connection
CN112311835A (en) * 2019-08-02 2021-02-02 杭州海康威视数字技术股份有限公司 Security check analysis data transmission method and system, security check analyzer and client device

Similar Documents

Publication Publication Date Title
CN102333128B (en) Active transmission method for real-time Web data
CN103716371A (en) Web real-time data active pushing method
CN102209047B (en) Instant messaging system and method for realizing information sharing
CN101252602B (en) System and method for downloading and distributing files
CN105847139A (en) Data transmission method, apparatus and system
CN101635728A (en) Method and system for data synchronization in content distribution network
WO2015078341A1 (en) Method and device for remotely updating application program
CN102595208A (en) Cloud terminal control networking video image processing streaming media service system and method
CN102238108A (en) Off-line message transmission method
CN101448004A (en) Method, server and system based on instant messaging for releasing user state
CN102571920A (en) Online customer service implementation method and online customer service system
CN103607423A (en) Distributed broadcast system based on WebSocket protocol
CN107508916B (en) Server link management method for intelligent robot
CN110278114A (en) A kind of method of the remote software upgrading of logistics retrospect equipment
CN103973718A (en) Operation and maintenance message pushing method based on android mobile platform
CN103037483A (en) Network server and method for connecting same and application server
CN116319732A (en) Message queue centralized configuration management system and method based on RabbitMQ
CN101599921A (en) A kind of enterprise instant communication system and document transmission method thereof
CN103533064A (en) Method for upgrading server program without interrupting network user online state
CN103685398A (en) Communication connection establishment method and communication system
CN113783961B (en) Remote terminal management method, device, computer equipment and storage medium
CN102420783B (en) Method and system for transmitting information to control terminal by server
CN102209049B (en) Instant messaging system and method for user information processing
CN104243473B (en) A kind of method and device of data transmission
CN108173890A (en) Automatic software updating and method for pushing based on domestic CPU and operating system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: CHINA ELECTRIC POWER RESEARCH INSTITUTE STATE GRID

Free format text: FORMER OWNER: CHINA ELECTRIC POWER RESEARCH INSTITUTE

Effective date: 20150112

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20150112

Address after: 100031 Xicheng District West Chang'an Avenue, No. 86, Beijing

Applicant after: State Grid Corporation of China

Applicant after: China Electric Power Research Institute

Applicant after: State Grid Metering Center

Applicant after: State Grid Zhejiang Electric Power Company

Address before: 100031 Xicheng District West Chang'an Avenue, No. 86, Beijing

Applicant before: State Grid Corporation of China

Applicant before: China Electric Power Research Institute

RJ01 Rejection of invention patent application after publication

Application publication date: 20140409

RJ01 Rejection of invention patent application after publication