[go: up one dir, main page]

CN108667861A - By browser to the method, system and server of device real-time monitoring - Google Patents

By browser to the method, system and server of device real-time monitoring Download PDF

Info

Publication number
CN108667861A
CN108667861A CN201710191764.7A CN201710191764A CN108667861A CN 108667861 A CN108667861 A CN 108667861A CN 201710191764 A CN201710191764 A CN 201710191764A CN 108667861 A CN108667861 A CN 108667861A
Authority
CN
China
Prior art keywords
station terminal
terminal equipment
client
browser
sent
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
CN201710191764.7A
Other languages
Chinese (zh)
Other versions
CN108667861B (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.)
BYD Co Ltd
Original Assignee
BYD 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 BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN201710191764.7A priority Critical patent/CN108667861B/en
Publication of CN108667861A publication Critical patent/CN108667861A/en
Application granted granted Critical
Publication of CN108667861B publication Critical patent/CN108667861B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of by browser to the method for device real-time monitoring, system and WebSocket servers.Wherein method includes:The foundation of WebSocket servers is connect with the first of station terminal equipment, and receives the status information that station terminal equipment is sent by the first connection;Foundation is connect with the second of client browser, and the status information of station terminal equipment is sent to client browser by the second connection, so that client browser initializes the content of target monitoring webpage according to status information;When the state of station terminal equipment changes, the state change information that station terminal equipment is sent is received;State change information is pushed into client, so that the browser of client updates the status information of equipment on target monitoring webpage according to state change information.Veritably realize the full-duplex communication between webpage and server as a result, and when finding to have new data with regard to active push to client browser, reduce the load of server.

Description

By browser to the method, system and server of device real-time monitoring
Technical field
The present invention relates to network data technical field more particularly to it is a kind of by browser to the side of device real-time monitoring Method, system and WebSocket servers.
Background technology
Currently, most of websites are all poll (polling) to realize instant messaging, used technology.Poll is Specific time interval (1 second such as every), sending out HTTP request to server by browser, (expansible Hyper text transfer is asked Ask), browser of the newest data to client is then returned to by server.
But instant messaging is realized by traditional HTTP request patterns, browser can be made to need constantly Request is sent out to server, however, traditional Http response contain a large amount of redundancy, it is still, wherein included to have May be the value of a very little with data, and the data that most times get, it may be with last content one Sample can occupy many broadbands in this way, waste the resource of many servers, if there is many clients are sent out using browser Poll, then the load of server is very heavy, it is slack-off to the response of client, to influence the experience effect of client.
Invention content
The purpose of the present invention is intended to solve above-mentioned one of technical problem at least to a certain extent.
For this purpose, first purpose of the present invention is to propose a kind of method by browser to device real-time monitoring.It should Method veritably realizes the full-duplex communication between webpage and server, greatly improves work efficiency;With traditional poll Mode is compared, and WebSocket is for the data very little used of communicating with each other, and WebSocket servers are finding there is new data When with regard to active push to client browser, greatly reduce the load of server.
Second object of the present invention is to propose a kind of system by browser to device real-time monitoring.
Third object of the present invention is to propose a kind of WebSocket servers.
In order to achieve the above objectives, first aspect present invention embodiment propose by browser to the side of device real-time monitoring Method, including:The foundation of WebSocket servers is connect with the first of station terminal equipment, and receives institute by first connection State the status information of station terminal equipment transmission;The WebSocket servers foundation is connect with the second of client browser, And the status information of the station terminal equipment is sent to by the client browser by second connection, so that described Client browser initializes the content of target monitoring webpage according to the status information;When the station terminal equipment State when changing, the WebSocket servers receive the state change information that the station terminal equipment is sent;Institute It states WebSocket servers and the state change information is pushed into client, so that the browser of the client is according to institute State change information is stated, the status information of equipment on the target monitoring webpage is updated.
It is according to the ... of the embodiment of the present invention by browser to the method for device real-time monitoring, taken by using WebSocket The design for device progress equipment and user client communication management of being engaged in, veritably realizes the full-duplex communication between webpage and server, It greatly improves work efficiency;Compared with traditional polling mode, WebSocket for the data very little used of communicating with each other, And WebSocket servers find have new data when with regard to active push to client browser, greatly reduce server The phenomenon that loading, browser is avoided constantly to access server, reduces the added burden of server.
In order to achieve the above objectives, second aspect of the present invention embodiment propose by browser to device real-time monitoring system System, including:Client browser, WebSocket servers and station terminal equipment, wherein the station terminal equipment is used for First is established with the WebSocket servers to connect, and is connected the state of the station terminal equipment by described first Information is sent to the WebSocket servers, and when the state of terminal device changes AT STATION, by state change information It is sent to the WebSocket servers;The client browser, for establishing second with the WebSocket servers Connection, and the shape for the station terminal equipment that the WebSocket servers are sent is received by second connection State information, and the content of target monitoring webpage is initialized according to the status information;The WebSocket servers, For the state change information to be pushed to client, so that the browser of the client is believed according to the state change Breath, updates the status information of equipment on the target monitoring webpage.
It is according to the ... of the embodiment of the present invention by browser to the system of device real-time monitoring, can be serviced by WebSocket Device foundation is connect with the first of station terminal equipment, and receives the status information that station terminal equipment is sent by the first connection, And establish and connect with the second of client browser, and the status information of station terminal equipment is sent to by visitor by the second connection Family end browser works as station so that client browser initializes the content of target monitoring webpage according to status information When the state of terminal device changes, WebSocket servers receive the state change information that station terminal equipment is sent, most Afterwards, state change information is pushed into client, so that the browser of client updates target monitoring according to state change information Status information of equipment on webpage.The design of equipment and user client communication management is carried out by using WebSocket servers, The full-duplex communication between webpage and server is veritably realized, is greatly improved work efficiency;With traditional polling mode Compare, WebSocket for the data very little used of communicating with each other, and WebSocket servers when finding to have new data just Active push greatly reduces the load of server to client browser, and browser is avoided constantly to access showing for server As reducing the added burden of server.
In order to achieve the above objectives, the WebSocket servers that third aspect present invention embodiment proposes, including:Shell, place Manage device, memory, circuit board and power circuit, wherein the circuit board is placed in the space interior that the shell surrounds, described Processor and the memory are arranged on the circuit board;The power circuit, for being the WebSocket servers Each circuit or device power supply;The memory is for storing executable program code;The processor described in reading by depositing The executable program code stored in reservoir runs program corresponding with the executable program code, following for executing Step:Foundation is connect with the first of station terminal equipment, and is received the station terminal equipment by first connection and sent Status information;Foundation is connect with the second of client browser, and is connected the station terminal equipment by described second Status information be sent to the client browser so that the client browser according to the status information to target supervise The content of control webpage is initialized;When the state of the station terminal equipment changes, receives the station terminal and set The state change information that preparation is sent;The state change information is pushed into client, so that the browser root of the client According to the state change information, the status information of equipment on the target monitoring webpage is updated.
WebSocket servers according to the ... of the embodiment of the present invention carry out equipment and visitor by using WebSocket servers The design of family end communication management, veritably realizes the full-duplex communication between webpage and server, substantially increases work effect Rate;Compared with traditional polling mode, WebSocket is for the data very little used of communicating with each other, and WebSocket servers Active push is greatly reduced to the load of server, avoid browser not to client browser when finding to have new data The phenomenon that accessing server disconnectedly reduces the added burden of server.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partly become from the following description Obviously, or practice through the invention is recognized.
Description of the drawings
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, wherein
Fig. 1 is the flow chart according to an embodiment of the invention by browser to the method for device real-time monitoring;
Fig. 2 is the structural representation according to an embodiment of the invention by browser to the system of device real-time monitoring Figure;
Fig. 3 be it is according to an embodiment of the invention by browser to each equipment in the system of device real-time monitoring it Between data interaction schematic diagram;
Fig. 4 is the interactive examples according to an embodiment of the invention by browser to the system of device real-time monitoring Figure;
Fig. 5 is the structural schematic diagram of WebSocket servers according to an embodiment of the invention.
Specific implementation mode
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to for explaining the present invention, and is not considered as limiting the invention.
Currently, most of websites are all poll (polling) to realize instant messaging, used technology.Poll is Specific time interval (1 second such as every), HTTP request are sent out to server by browser, are then returned most by server Browser of the new data to client.
It is currently possible to be realized by the AJAX modes in Comet (based on " server push " of HTTP long connections) technology The effect of poll.But although this technology can reach full-duplex communication, still need to be sent out by the browser of client Request.However, this mode for needing browser to send out request to server, can occupy many broadbands, waste very much The resource of server, if there is many clients send out poll using browser, then the load of server is very heavy, to the sound of client It answers slack-off, influences the experience effect of client.
For this purpose, being carried to solve technical problems, the present invention such as the load of increase server, the added burden of increase server Gone out it is a kind of by browser to the method for device real-time monitoring, system and WebSocket servers.Specifically, join below It examines attached drawing and describes the method, system and WebSocket according to the ... of the embodiment of the present invention by browser to device real-time monitoring Server.
Fig. 1 is the flow chart according to an embodiment of the invention by browser to the method for device real-time monitoring.It needs It is noted that the embodiment of the present invention can be to the application scenarios of the method for device real-time monitoring by browser:In automatic selling In ticket-checking system, station computer needs to monitor each station terminal equipment in real time, and operator is by work station or holds eventually The working condition of each station terminal equipment is checked at end using browser, once encounter alarm equipment fault or ticketing Information change situation etc. needs WebSocket servers that state updating information is pushed to browser at the first time, with convenient to operate Member can recognize the present case of each station terminal equipment by browser in time.
As shown in Figure 1, should may include to the method for device real-time monitoring by browser:
The foundation of S110, WebSocket server is connect with the first of station terminal equipment, and receives vehicle by the first connection The status information that terminal device of standing is sent.
Wherein, in an embodiment of the present invention, which can include but is not limited to:Automatic selling in station Ticket terminal, station ticket checking terminal, ticket self-inquiry terminal etc..
It should be noted that the present invention is to realize the full duplex real-time communication between browser and server, in visitor Except the corresponding server of family end browser, a WebSocket server has also been built, has been mainly responsible for from server wants client The browser PUSH message at end.
Specifically, after terminal device booting powers on AT STATION, station terminal equipment can be carried out to WebSocket servers Registration request reports the title of oneself, to establish the first connection between WebSocket servers and station terminal equipment.Tool For body, in one embodiment of the invention, WebSocket servers are established and the first reality connecting of station terminal equipment Existing process can be as follows:WebSocket servers receive the first registration request that station terminal equipment is sent, wherein the first registration Include the first identifier information of station terminal equipment in request, and according to the first identifier information in the first registration request, examines Whether station terminal equipment is legitimate device, if so, the first communication link is distributed for station terminal equipment, with foundation and station First connection of terminal device.Wherein, which can be title or ID of station terminal equipment etc..
More specifically, WebSocket servers receive station terminal equipment transmission the first registration request when, can root According to the first identifier information of station terminal equipment in first registration request, relevant information in database is inquired, to examine station The legitimacy of terminal device, for example, can determine whether that the first identifier information whether there is in the database, if so, can determine that The station terminal equipment is legitimate device, otherwise judges the station terminal for illegality equipment.If verification station terminal equipment is The legitimate device being configured, WebSocket servers can be then that the station terminal equipment distributes a communication link, simultaneously will The ID of the communication link issues the station terminal equipment, so that station terminal equipment is subsequently through ID realizations and WebSocket The data of server communicate.
After the first connection between WebSocket servers and station terminal equipment is successfully established, station terminal is set It is standby the status information of itself to be sent to WebSocket servers by first connection.WebSocket servers are receiving After the status information sent to each station terminal equipment, current online client browser can be checked, and currently exist to each The client browser of line sends the successful message of station terminal facility registration.Wherein, in an embodiment of the present invention, the shape State information can be in station terminal equipment more than ticket ticket situation, station terminal equipment whether work normally, whether failure, whether Situations such as in the presence of alarm.
The foundation of S120, WebSocket server is connect with the second of client browser, and is connected station by second The status information of terminal device is sent to client browser so that client browser according to status information to target monitoring net The content of page is initialized.
It is appreciated that user can check the working condition of each station terminal equipment by client browser.First, User needs to input the network address of corresponding Web server by client browser, to load the login page of the network address.It Afterwards, user inputs the information such as account and password in login page, and Web server is submitted to be verified.Web server is receiving When logging request (including information such as account and passwords) input by user, can from database query-relevant data, to sentence Whether the disconnected user is validated user, if so, returning to target monitoring webpage to the client browser.
Client browser starts the ports the WebSocket prison in browser after loading the target monitoring webpage It listens, and registration request is sent to WebSocket servers, to establish between WebSocket servers and client browser Connection.
Specifically, in one embodiment of the invention, WebSocket servers establish the with client browser The realization process of two connections can be as follows:WebSocket servers receive the second registration request that client browser is sent, In, comprising the user account information for target monitoring webpage in the second registration request, the second registration request is Client browse What device was sent after loading target monitoring webpage, when the startup ports WebSocket, and according to the use in the second registration request Family account information examines the legitimacy of client browser, if client browser is legal, is distributed for client browser Second communication link is connect with establishing with the second of client browser.
More specifically, client browser after loading target monitoring webpage, starts WebSocket port snoops, And it is sent to the second registration request to WebSocket servers, the use of the client browser is carried in second registration request Family account information.WebSocket servers can first carry out legitimacy inspection, and closing when receiving second registration request When method is verified successfully, a communication link is distributed for the client browser, and the ID of the communication link is returned into the visitor Family end browser.
After the second connection between WebSocket servers and client browser is successfully established, WebSocket clothes The status information of storage each station terminal equipment in the database can be sent to client browser by business device.Client browse Device after receiving these status informations, can initialized target web page monitored web page contents.
S130, when the state of station terminal equipment changes, WebSocket servers receive station terminal equipment hair The state change information sent.
Specifically, when the state of station terminal equipment changes, station terminal equipment can be connected by first should State change information is sent to WebSocket servers.
State change information is pushed to client by S140, WebSocket server so that the browser of client according to State change information updates the status information of equipment on target monitoring webpage.
Specifically, WebSocket servers can be examined after the state change information for receiving the transmission of station terminal equipment Survey it is current it is online have which client, the state change information is then pushed to all current online clients.Client End can update the target monitoring when receiving the state change information according to equipment identification information in the state change information The status information of equipment of corresponding station terminal equipment on webpage.Client is without active inquiry station terminal equipment as a result, State change, but by WebSocket server active push state change informations, so that client browser receives the shape After state change information, the relevant information automatically updated above webpage is realized.
In order to improve the availability and feasibility of the present invention, further, in one embodiment of the invention, After the foundation of WebSocket servers is connect with the second of client browser, the method further includes:Receive Client browse The device status inquiries order that device is sent, wherein the second mark comprising target station terminal device in device status inquiries order Know information;According to the second identifier information in device status inquiries order, establish between target station terminal device and client Incidence relation.Wherein, in an embodiment of the present invention, state change information is pushed to client by WebSocket servers, Including:WebSocket servers are sent to corresponding client according to incidence relation, by the state change information of station terminal equipment End.
Specifically, after the foundation of WebSocket servers is connect with the second of client browser, client browser It can may include multiple target stations terminal device in the order to WebSocket server sending device status inquiry commands Second identifier information.WebSocket servers find corresponding target station terminal device, and will according to second identifier information These target station terminal devices are associated with the client.In this way, when the state of terminal device changes AT STATION, it should Oneself state change information can be sent to WebSocket services by the changed station terminal equipment of state by the first connection Device.WebSocket servers find out visitor corresponding with the changed station terminal equipment of the state according to above-mentioned incidence relation Family end, and by the state change information of the changed station terminal equipment of the state, it is sent to the client, so that the client End is updated the relevant device status information in target monitoring webpage according to the state change information.
It is appreciated that whether client browser can have data incoming by the ports WebSocket to monitor, if so, then The data packet is parsed, and according to the content of data packet, updates the status information of equipment on target monitoring webpage.
It is according to the ... of the embodiment of the present invention by browser to the method for device real-time monitoring, can be serviced by WebSocket Device foundation is connect with the first of station terminal equipment, and receives the status information that station terminal equipment is sent by the first connection, And establish and connect with the second of client browser, and the status information of station terminal equipment is sent to by visitor by the second connection Family end browser works as station so that client browser initializes the content of target monitoring webpage according to status information When the state of terminal device changes, WebSocket servers receive the state change information that station terminal equipment is sent, most Afterwards, state change information is pushed into client, so that the browser of client updates target monitoring according to state change information Status information of equipment on webpage.The design of equipment and user client communication management is carried out by using WebSocket servers, The full-duplex communication between webpage and server is veritably realized, is greatly improved work efficiency;With traditional polling mode Compare, WebSocket for the data very little used of communicating with each other, and WebSocket servers when finding to have new data just Active push greatly reduces the load of server to client browser, and browser is avoided constantly to access showing for server As reducing the added burden of server.
In order to realize above-described embodiment, the invention also provides a kind of by browser to the system of device real-time monitoring.
Fig. 2 is the structural representation according to an embodiment of the invention by browser to the system of device real-time monitoring Figure.As shown in Fig. 2, should may include to the system of device real-time monitoring by browser:Client browser 100, WebSocket servers 200 and station terminal equipment 300.
Specifically, station terminal equipment 300 is connect for establishing first with WebSocket servers 200, and passes through first The status information of station terminal equipment 300 is sent to WebSocket servers 200 by connection, and terminal device 300 AT STATION When state changes, state change information is sent to WebSocket servers 200.
Specifically, in one embodiment of the invention, WebSocket servers 200 are established and station terminal equipment The specific implementation process of 300 the first connection can be as follows:Receive the first registration request that station terminal equipment 300 is sent, wherein Include the first identifier information of station terminal equipment 300 in first registration request, and according to the first mark in the first registration request Know information, examine whether station terminal equipment 300 is legitimate device, and when terminal device 300 is legitimate device AT STATION, is Station terminal equipment 300 distributes the first communication link, is connect with the first of station terminal equipment 300 with establishing.
Client browser 100 is connect for establishing second with WebSocket servers 200, and is connect by second The status information for station terminal equipment 300 that WebSocket servers 200 are sent is received, and according to status information to target The content of web page monitored is initialized.
Specifically, in one embodiment of the invention, WebSocket servers 200 are established and client browser The specific implementation process of 100 the second connection can be as follows:Receive the second registration request that client browser 100 is sent, wherein Comprising the user account information for target monitoring webpage in second registration request, the second registration request is client browser 100 after loading target monitoring webpage, starts and send when the ports WebSocket;According to the use in the second registration request Family account information examines the legitimacy of client browser 100;It is client browser when client browser 100 is legal 100 the second communication links of distribution, are connect with establishing with the second of client browser 100.
WebSocket servers 200 are used to state change information pushing to client, so that the browser root of client According to state change information, the status information of equipment on target monitoring webpage is updated.
In order to improve the availability and feasibility of the present invention, further, in one embodiment of the invention, WebSocket servers 200 are additionally operable to:After being connect with the second of client browser 100, client browser is received The 100 device status inquiries orders sent, wherein the second mark comprising target station terminal device in device status inquiries order Know information, and according to the second identifier information in device status inquiries order, establish target station terminal device and client it Between incidence relation.Wherein, in an embodiment of the present invention, WebSocket servers 200 are specifically used for:According to incidence relation, The state change information of station terminal equipment 300 is sent to corresponding client.
It is according to the ... of the embodiment of the present invention by browser to the system of device real-time monitoring, can be serviced by WebSocket Device foundation is connect with the first of station terminal equipment, and receives the status information that station terminal equipment is sent by the first connection, And establish and connect with the second of client browser, and the status information of station terminal equipment is sent to by visitor by the second connection Family end browser works as station so that client browser initializes the content of target monitoring webpage according to status information When the state of terminal device changes, WebSocket servers receive the state change information that station terminal equipment is sent, most Afterwards, state change information is pushed into client, so that the browser of client updates target monitoring according to state change information Status information of equipment on webpage.The design of equipment and user client communication management is carried out by using WebSocket servers, The full-duplex communication between webpage and server is veritably realized, is greatly improved work efficiency;With traditional polling mode Compare, WebSocket for the data very little used of communicating with each other, and WebSocket servers when finding to have new data just Active push greatly reduces the load of server to client browser, and browser is avoided constantly to access showing for server As reducing the added burden of server.
In order to enable those skilled in the art can clearly understand the present invention, below in conjunction with Fig. 3 and Fig. 4 into Row further describes.
For example, as shown in figure 3, for the number by browser between each equipment in the system of device real-time monitoring According to interaction schematic diagram.Wherein, client browser 100 can send network address to ask the corresponding mesh of the network address to Web server 10 Web page monitored is marked, so that user carries out condition monitoring by the target monitoring webpage to station terminal equipment.Client browse Device 100 is both needed to send registration request to WebSocket servers 200 with station terminal equipment 300, so that WebSocket takes Business device 200 is established second with client browser 100 and is connect, and establishing first with station terminal equipment 300 connect.WebSocket Server 200 receives the state change information that station terminal equipment 300 is sent by first connection, and will by the second connection The state change information is pushed to client browser 100.Wherein, Web server can also send state to station terminal equipment Querying command, and the data of station terminal return are received, and the data of the return are written in database.
Fig. 4 is the interactive examples according to an embodiment of the invention by browser to the system of device real-time monitoring Figure.As shown in figure 4, user can send out web access requests, Web server by client browser 100 to Web server 10 10 send target monitoring webpage to client browser 100 according to the request.User can be by client browser 100 in mesh The working condition of current station terminal device 300 (such as ticketing terminal, ticket checking terminal) is seen in mark web page monitored.When station end When the state of end equipment 300 changes, client browser 100 will not active inquiry these state changes, but by 200 active push state change information of WebSocket servers is to client browser 100.Client browser 100 is receiving To after these state change informations, the relevant information above automatically updated target monitoring webpage.Control flow may include as Lower step:
First, all station terminal equipment 300 is registered after booting powers on to WebSocket servers 200 It asks (S41).WebSocket servers 200 can be that the station is whole when receiving the access request of the station terminal equipment 300 End equipment 300 distributes a communication link (S42), and maintains the first of the station terminal equipment 300 to connect, while by the communication The ID of link is mass-sended to all online station terminal equipment 300 and client browser 100.In this way, station terminal equipment 300 The status information of itself can be sent to WebSocket servers 200 (S43) by first connection.
User can send out web access requests (S44), Web server by client browser 100 to Web server 10 10 send target monitoring webpage to client browser 100 (S45) according to the request.Client browser 100 is in load mesh After marking web page monitored, application for registration (S46) is carried out to WebSocket servers 200.WebSocket servers 200 can root It is that client browser 100 distributes a communication link according to the application for registration, is connected with the second of client browser 100 with establishing It connects (S47).When the state of station terminal equipment 300 changes, station terminal equipment 300 can by first connect to WebSocket servers 200 send state change information (S48), and WebSocket servers 200 are connected by second by the shape State change information is pushed to client browser 100 (S49), so that client browser 100 is according to the state change information, more Relevant information (S410) in fresh target web page monitored.
In order to realize above-described embodiment, the invention also provides a kind of WebSocket servers.
Fig. 5 is the structural schematic diagram of WebSocket servers according to an embodiment of the invention.As shown in figure 5, should WebSocket servers may include:Shell 51, processor 52, memory 53, circuit board 54 and power circuit 55, wherein electricity Road plate 54 is placed in the space interior that shell 51 surrounds, and processor 52 and memory 53 are arranged on circuit board 54;Power circuit 55, for being each circuit or the device power supply of WebSocket servers;Memory 53 is for storing executable program code; Processor 52 runs journey corresponding with executable program code by reading the executable program code stored in memory 53 Sequence, for executing following steps:
S510 ', foundation are connect with the first of station terminal equipment, and are received station terminal equipment by the first connection and sent Status information.
S520 ', foundation are connect with the second of client browser, and are connected the state of station terminal equipment by second Information is sent to client browser, so that client browser carries out just the content of target monitoring webpage according to status information Beginningization.
S530 ' receives the state change letter that station terminal equipment is sent when the state of station terminal equipment changes Breath.
State change information is pushed to client by S540 ', so that the browser of client is according to state change information, Update the status information of equipment on target monitoring webpage.
In the description of the present invention, it is to be understood that, term " first ", " second " are used for description purposes only, and cannot It is interpreted as indicating or implies relative importance or implicitly indicate the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In the description of the present invention, " multiple " It is meant that at least two, such as two, three etc., unless otherwise specifically defined.
In the present invention unless specifically defined or limited otherwise, term " installation ", " connected ", " connection ", " fixation " etc. Term shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or integral;Can be that machinery connects It connects, can also be electrical connection;It can be directly connected, can also can be indirectly connected through an intermediary in two elements The interaction relationship of the connection in portion or two elements, unless otherwise restricted clearly.For those of ordinary skill in the art For, the specific meanings of the above terms in the present invention can be understood according to specific conditions.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiments or example.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discuss suitable Sequence, include according to involved function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (system of such as computer based system including processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicating, propagating or passing Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wiring Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can be for example by carrying out optical scanner to paper or other media, then into edlin, interpretation or when necessary with it His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the present invention can be realized with hardware, software, firmware or combination thereof.Above-mentioned In embodiment, software that multiple steps or method can in memory and by suitable instruction execution system be executed with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit application-specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that realize all or part of step that above-described embodiment method carries Suddenly it is that relevant hardware can be instructed to complete by program, the program can be stored in a kind of computer-readable storage medium In matter, which includes the steps that one or a combination set of embodiment of the method when being executed.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, it can also That each unit physically exists alone, can also two or more units be integrated in a module.Above-mentioned integrated mould The form that hardware had both may be used in block is realized, can also be realized in the form of software function module.The integrated module is such as Fruit is realized in the form of software function module and when sold or used as an independent product, can also be stored in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above The embodiment of the present invention is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as the limit to the present invention System, those skilled in the art can be changed above-described embodiment, change, replace and become within the scope of the invention Type.

Claims (10)

1. it is a kind of by browser to the method for device real-time monitoring, which is characterized in that include the following steps:
The foundation of WebSocket servers is connect with the first of station terminal equipment, and receives the vehicle by first connection The status information that terminal device of standing is sent;
The WebSocket servers foundation is connect with the second of client browser, and will be described by second connection The status information of station terminal equipment is sent to the client browser, so that the client browser is according to the state Information initializes the content of target monitoring webpage;
When the state of the station terminal equipment changes, the WebSocket servers receive the station terminal and set The state change information that preparation is sent;
The state change information is pushed to client by the WebSocket servers, so that the browser of the client According to the state change information, the status information of equipment on the target monitoring webpage is updated.
2. the method as described in claim 1, which is characterized in that the WebSocket servers are established and station terminal equipment First connection, including:
Receive the first registration request that the station terminal equipment is sent, wherein include the vehicle in first registration request It stands the first identifier information of terminal device;
According to the first identifier information in first registration request, examine whether the station terminal equipment is legitimate device;
If so, the first communication link is distributed for the station terminal equipment, to establish first with the station terminal equipment Connection.
3. the method as described in claim 1, which is characterized in that the WebSocket servers are established and client browser Second connection, including:
Receive the second registration request that the client browser is sent, wherein comprising for institute in second registration request The user account information of target monitoring webpage is stated, second registration request is that the client browser is loading the target It is sent after web page monitored, when the startup ports WebSocket;
According to the user account information in second registration request, the legitimacy of the client browser is examined;
If the client browser is legal, the second communication link is distributed for the client browser, with foundation and institute State the second connection of client browser.
4. the method as described in claim 1, which is characterized in that in WebSocket servers foundation and Client browse After second connection of device, the method further includes:
Receive the device status inquiries order that the client browser is sent, wherein wrapped in the device status inquiries order The second identifier information of the terminal device of station containing target;
According to the second identifier information in the device status inquiries order, target station terminal device and the visitor are established Incidence relation between the end of family;
Wherein, the state change information is pushed to client by the WebSocket servers, including:
The WebSocket servers send the state change information of the station terminal equipment according to the incidence relation To corresponding client.
5. it is a kind of by browser to the system of device real-time monitoring, which is characterized in that including:Client browser, WebSocket servers and station terminal equipment, wherein
The station terminal equipment is connect for establishing first with the WebSocket servers, and is connected by described first The status information of the station terminal equipment is sent to the WebSocket servers, and the state of terminal device AT STATION When changing, state change information is sent to the WebSocket servers;
The client browser is connect for establishing second with the WebSocket servers, and is connected by described second The status information for the station terminal equipment that the WebSocket servers are sent is received, and is believed according to the state Breath initializes the content of target monitoring webpage;
The WebSocket servers, for the state change information to be pushed to client, so that the client is clear Device is look at according to the state change information, updates the status information of equipment on the target monitoring webpage.
6. system as claimed in claim 5, which is characterized in that the WebSocket servers are specifically used for:Receive the vehicle The first registration request that terminal device of standing is sent, wherein in first registration request comprising the station terminal equipment the One identification information, and according to the first identifier information in first registration request, examine the station terminal equipment whether be Legitimate device, and when the station terminal equipment is legitimate device, the first communication link is distributed for the station terminal equipment Road is connect with establishing with the first of the station terminal equipment.
7. system as claimed in claim 5, which is characterized in that the WebSocket servers are specifically used for:
Receive the second registration request that the client browser is sent, wherein comprising for institute in second registration request The user account information of target monitoring webpage is stated, second registration request is that the client browser is loading the target It is sent after web page monitored, when the startup ports WebSocket;
According to the user account information in second registration request, the legitimacy of the client browser is examined;
When the client browser is legal, for the client browser distribute the second communication link, with establish with it is described Second connection of client browser.
8. system as claimed in claim 5, which is characterized in that the WebSocket servers are additionally operable to:With the client After holding the second connection of browser, the device status inquiries order that the client browser is sent is received, wherein described to set Include the second identifier information of target station terminal device in standby status inquiry command, and according to the device status inquiries order In second identifier information, establish the incidence relation between target station terminal device and the client.
9. system as claimed in claim 8, which is characterized in that the WebSocket servers are specifically used for:According to the pass The state change information of the station terminal equipment is sent to corresponding client by connection relationship.
10. a kind of WebSocket servers, which is characterized in that including:Shell, processor, memory, circuit board and power supply electricity Road, wherein the circuit board is placed in the space interior that the shell surrounds, and the processor and the memory are arranged in institute It states on circuit board;The power circuit, for being each circuit or the device power supply of the WebSocket servers;It is described to deposit Reservoir is for storing executable program code;The processor is by reading the executable program code stored in the memory Program corresponding with the executable program code is run, for executing following steps:
Foundation is connect with the first of station terminal equipment, and receives what the station terminal equipment was sent by first connection Status information;
Foundation is connect with the second of client browser, and is believed the state of the station terminal equipment by second connection Breath be sent to the client browser so that the client browser according to the status information to target monitoring webpage Content is initialized;
When the state of the station terminal equipment changes, the state change letter that the station terminal equipment is sent is received Breath;
The state change information is pushed into client, so that the browser of the client is believed according to the state change Breath, updates the status information of equipment on the target monitoring webpage.
CN201710191764.7A 2017-03-28 2017-03-28 Method, system and server for monitoring equipment in real time through browser Active CN108667861B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710191764.7A CN108667861B (en) 2017-03-28 2017-03-28 Method, system and server for monitoring equipment in real time through browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710191764.7A CN108667861B (en) 2017-03-28 2017-03-28 Method, system and server for monitoring equipment in real time through browser

Publications (2)

Publication Number Publication Date
CN108667861A true CN108667861A (en) 2018-10-16
CN108667861B CN108667861B (en) 2020-08-07

Family

ID=63785630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710191764.7A Active CN108667861B (en) 2017-03-28 2017-03-28 Method, system and server for monitoring equipment in real time through browser

Country Status (1)

Country Link
CN (1) CN108667861B (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109462544A (en) * 2018-11-16 2019-03-12 贵阳朗玛信息技术股份有限公司 The method and device of instant messaging, instant communicating system, readable storage medium storing program for executing
CN109905477A (en) * 2019-02-28 2019-06-18 厦门中控智慧信息技术有限公司 A kind of method and apparatus of data-pushing
CN110278258A (en) * 2019-06-14 2019-09-24 郑州阿帕斯科技有限公司 A kind of method and apparatus that dynamic web page accelerates
CN110392112A (en) * 2019-07-24 2019-10-29 视联动力信息技术股份有限公司 A kind of information interacting method, system and device
WO2020113432A1 (en) * 2018-12-04 2020-06-11 比特大陆科技有限公司 Method and device for transmitting list information
CN111600955A (en) * 2020-05-18 2020-08-28 山东汇贸电子口岸有限公司 Websocket-based foreground processing method and system
CN111785000A (en) * 2020-07-24 2020-10-16 上海英恒电子有限公司 Vehicle state data uploading method and device, electronic equipment and storage medium
CN112492044A (en) * 2020-12-09 2021-03-12 恒生电子股份有限公司 Cache data sharing method and device, equipment and computer readable storage medium
CN112511603A (en) * 2020-11-17 2021-03-16 中信银行股份有限公司 Data port updating method and device, electronic equipment and readable storage medium
CN112532699A (en) * 2020-11-17 2021-03-19 中信银行股份有限公司 Data port updating method and device, electronic equipment and readable storage medium
CN112639642A (en) * 2019-07-25 2021-04-09 东芝三菱电机产业系统株式会社 SCADA network HMI server device
CN112733051A (en) * 2020-12-09 2021-04-30 新华智云科技有限公司 Websocket-based information push management system and method
CN113132477A (en) * 2021-04-16 2021-07-16 易斌 Real-time transmission interaction method and system for browser terminal and equipment
CN113901374A (en) * 2021-10-20 2022-01-07 中国联合网络通信集团有限公司 Webpage refreshing method and device, electronic equipment and storage medium
CN114080593A (en) * 2020-06-01 2022-02-22 东芝三菱电机产业系统株式会社 SCADA web HMI system and HMI client
CN114363427A (en) * 2021-12-24 2022-04-15 北京鼎普科技股份有限公司 A method for real-time acquisition of host device information based on browser
CN114491335A (en) * 2021-12-27 2022-05-13 东软集团股份有限公司 Data acquisition method and device, storage medium and electronic equipment
CN114619462A (en) * 2022-02-21 2022-06-14 达而观信息科技(上海)有限公司 Remote desktop control method based on robot flow automation
CN115277730A (en) * 2022-07-18 2022-11-01 南京轨道交通系统工程有限公司 Automatic station switching system and method for intelligent station based on message publishing and subscribing
CN115589438A (en) * 2022-09-28 2023-01-10 北京世纪康华电气科技有限公司 Method and system for communication between terminal equipment and generator set controller

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333128A (en) * 2011-10-31 2012-01-25 河南省电力公司计量中心 Active transmission method for real-time Web data
CN103336780A (en) * 2013-05-30 2013-10-02 苏州畅达软件研发有限公司 Real-time monitoring system for equipment information
KR20140028888A (en) * 2012-08-31 2014-03-10 노규호 Real-time monitoring system of garbage collection using html5-websoket and method thereof
CN103634384A (en) * 2013-11-21 2014-03-12 山东康威通信技术股份有限公司 Method for monitoring terminal equipment on browser in real time based on Flash technology
CN103716371A (en) * 2013-10-31 2014-04-09 国家电网公司 Web real-time data active pushing method
CN105450479A (en) * 2016-01-04 2016-03-30 山东超越数控电子有限公司 Method and apparatus for monitoring module
CN105991698A (en) * 2015-02-06 2016-10-05 中科云网科技集团股份有限公司 Method, system and device for mobile terminal remotely managing intelligent router file

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333128A (en) * 2011-10-31 2012-01-25 河南省电力公司计量中心 Active transmission method for real-time Web data
KR20140028888A (en) * 2012-08-31 2014-03-10 노규호 Real-time monitoring system of garbage collection using html5-websoket and method thereof
CN103336780A (en) * 2013-05-30 2013-10-02 苏州畅达软件研发有限公司 Real-time monitoring system for equipment information
CN103716371A (en) * 2013-10-31 2014-04-09 国家电网公司 Web real-time data active pushing method
CN103634384A (en) * 2013-11-21 2014-03-12 山东康威通信技术股份有限公司 Method for monitoring terminal equipment on browser in real time based on Flash technology
CN105991698A (en) * 2015-02-06 2016-10-05 中科云网科技集团股份有限公司 Method, system and device for mobile terminal remotely managing intelligent router file
CN105450479A (en) * 2016-01-04 2016-03-30 山东超越数控电子有限公司 Method and apparatus for monitoring module

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109462544A (en) * 2018-11-16 2019-03-12 贵阳朗玛信息技术股份有限公司 The method and device of instant messaging, instant communicating system, readable storage medium storing program for executing
WO2020113432A1 (en) * 2018-12-04 2020-06-11 比特大陆科技有限公司 Method and device for transmitting list information
US11838349B2 (en) 2018-12-04 2023-12-05 Hong Kong Sunstar Technology Co., Limited Method and device for transmitting list information
CN113228596B (en) * 2018-12-04 2024-04-02 香港星辰科技有限公司 Method and device for transmitting list information
EP3962023B1 (en) * 2018-12-04 2024-10-30 Hong Kong Sunstar Technology Co., Limited Method and device for transmitting list information
CN113228596A (en) * 2018-12-04 2021-08-06 区块链联合香港有限公司 Method and device for transmitting list information
CN109905477A (en) * 2019-02-28 2019-06-18 厦门中控智慧信息技术有限公司 A kind of method and apparatus of data-pushing
CN110278258A (en) * 2019-06-14 2019-09-24 郑州阿帕斯科技有限公司 A kind of method and apparatus that dynamic web page accelerates
CN110392112A (en) * 2019-07-24 2019-10-29 视联动力信息技术股份有限公司 A kind of information interacting method, system and device
CN112639642A (en) * 2019-07-25 2021-04-09 东芝三菱电机产业系统株式会社 SCADA network HMI server device
CN111600955A (en) * 2020-05-18 2020-08-28 山东汇贸电子口岸有限公司 Websocket-based foreground processing method and system
CN111600955B (en) * 2020-05-18 2023-03-28 山东汇贸电子口岸有限公司 Websocket-based foreground processing method and system
CN114080593A (en) * 2020-06-01 2022-02-22 东芝三菱电机产业系统株式会社 SCADA web HMI system and HMI client
CN111785000A (en) * 2020-07-24 2020-10-16 上海英恒电子有限公司 Vehicle state data uploading method and device, electronic equipment and storage medium
CN112532699A (en) * 2020-11-17 2021-03-19 中信银行股份有限公司 Data port updating method and device, electronic equipment and readable storage medium
CN112511603A (en) * 2020-11-17 2021-03-16 中信银行股份有限公司 Data port updating method and device, electronic equipment and readable storage medium
CN112511603B (en) * 2020-11-17 2022-10-25 中信银行股份有限公司 Data port updating method and device, electronic equipment and readable storage medium
CN112532699B (en) * 2020-11-17 2022-10-25 中信银行股份有限公司 Data port updating method and device, electronic equipment and readable storage medium
CN112733051A (en) * 2020-12-09 2021-04-30 新华智云科技有限公司 Websocket-based information push management system and method
CN112492044A (en) * 2020-12-09 2021-03-12 恒生电子股份有限公司 Cache data sharing method and device, equipment and computer readable storage medium
CN113132477A (en) * 2021-04-16 2021-07-16 易斌 Real-time transmission interaction method and system for browser terminal and equipment
CN113132477B (en) * 2021-04-16 2023-09-19 成都易明半导体有限公司 Real-time transmission interaction method and system for browser terminal and equipment
CN113901374A (en) * 2021-10-20 2022-01-07 中国联合网络通信集团有限公司 Webpage refreshing method and device, electronic equipment and storage medium
CN114363427A (en) * 2021-12-24 2022-04-15 北京鼎普科技股份有限公司 A method for real-time acquisition of host device information based on browser
CN114491335A (en) * 2021-12-27 2022-05-13 东软集团股份有限公司 Data acquisition method and device, storage medium and electronic equipment
CN114619462A (en) * 2022-02-21 2022-06-14 达而观信息科技(上海)有限公司 Remote desktop control method based on robot flow automation
CN115277730A (en) * 2022-07-18 2022-11-01 南京轨道交通系统工程有限公司 Automatic station switching system and method for intelligent station based on message publishing and subscribing
CN115589438A (en) * 2022-09-28 2023-01-10 北京世纪康华电气科技有限公司 Method and system for communication between terminal equipment and generator set controller

Also Published As

Publication number Publication date
CN108667861B (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN108667861A (en) By browser to the method, system and server of device real-time monitoring
CN111355780B (en) Internet of things monitoring management method and system based on block chain
CN106528432B (en) Construction method and device of test scene data, and buried point test method
CN111861140B (en) Service processing method and device, storage medium and electronic device
CN104980289B (en) Information push method, device and system
CN101626369B (en) Method, device and system for single sign-on
CN107645561A (en) A kind of preview picture method of cloud mobile phone
CN108702389A (en) For being remotely controlled IOT(Internet of Things)The framework of equipment
CN112333290A (en) Data access control method, device, storage medium and content distribution network system
CN102404308A (en) Content printing system, print relay system, and control method
CN109819033A (en) A kind of resource file loading method and system
CN107392264A (en) Eletronic data management system and eletronic data management method
CN109495530A (en) A kind of real time traffic data transmission method, transmitting device and Transmission system
CN101155079B (en) Method, device and system for monitoring instant communication server
CN106021085B (en) Performance test method and device and data server
CN104142975A (en) Microblog information promotion method, device and system
CN101155147A (en) Method and apparatus for distributing monitoring data of instant communication server
CN111833036B (en) Method, apparatus, device and computer readable medium for judging repeat transaction
CN106874371A (en) A kind of data processing method and device
CN107274222A (en) Advertisement placement method and device
CN103716230A (en) Message sending method, device and server
US20140380438A1 (en) Method for integrating management of posted articles and terminal for the same
CN110298178A (en) Credible policy learning method and device, credible and secure management platform
CN108011870A (en) A kind of remote software online upgrading information automatic identification management method
CN107730380B (en) Method, system and server for processing joint account

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant