CN111427703A - Industrial data real-time display method and system - Google Patents
Industrial data real-time display method and system Download PDFInfo
- Publication number
- CN111427703A CN111427703A CN202010171552.4A CN202010171552A CN111427703A CN 111427703 A CN111427703 A CN 111427703A CN 202010171552 A CN202010171552 A CN 202010171552A CN 111427703 A CN111427703 A CN 111427703A
- Authority
- CN
- China
- Prior art keywords
- industrial data
- data
- client
- subscription
- server
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000012544 monitoring process Methods 0.000 claims abstract description 22
- 230000008859 change Effects 0.000 claims abstract description 16
- 238000013507 mapping Methods 0.000 claims description 29
- 238000012795 verification Methods 0.000 claims description 24
- 238000013524 data verification Methods 0.000 claims description 7
- 239000002699 waste material Substances 0.000 abstract description 3
- 238000004891 communication Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/547—Remote procedure calls [RPC]; Web services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/549—Remote execution
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a method and a system for displaying industrial data in real time, which comprises the following steps: a data configuration step: configuring industrial data needing to be displayed in real time; page viewing step: viewing an industrial data real-time display page; an address acquisition step: enabling the client to acquire a subscription address; a service connection step: enabling a client to be connected with a Websocket service; a data subscription step: enabling a client to subscribe Websocket industrial data service; data receiving and displaying: and enabling the client to receive and display the industrial data sent by the server. The invention solves the problems of server resource waste and untimely industrial data display caused by the regular polling of the industrial data by the server side in a mode of monitoring the change of the industrial data.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a method and a system for displaying industrial data in real time. In particular to a method for displaying industrial data in real time based on Websocket.
Background
WebSocket is a protocol for full duplex communication over a single TCP connection. The WebSocket communication protocol was specified by the IETF as standard RFC 6455 in 2011 and is supplemented by RFC 7936. The WebSocket API is also standardized by W3C.
WebSocket enables data exchange between the client and the server to be simpler, and allows the server to actively push data to the client. In the WebSocket API, the browser and the server only need to complete one handshake, and persistent connection can be directly established between the browser and the server, and bidirectional data transmission is carried out.
Many websites use polling to implement push technology. Polling is the HTTP request by the browser to the server at a specific time interval (e.g., every 1 second), and then the server returns the most recent data to the client's browser. This conventional model brings with it obvious disadvantages that the browser needs to send requests to the server continuously, however, HTTP requests may contain a long header, where the really valid data may be only a small part, which obviously wastes much resources such as bandwidth.
The effect of polling with the newer technology is Comet. This technique, while capable of two-way communication, still requires repeated requests. Also in Comet, the long links that are commonly used consume server resources.
In this case, the HTM L5 defines the WebSocket protocol, which can better save server resources and bandwidth and enable communication in more real time.
Patent document CN105407180A discloses a message pushing method and device for a server, the message pushing method including: receiving a Websocket connection request of a client, and establishing Websocket connection with the client at a server according to the Websocket connection request; the server side sends page messages based on Websocket connection; the Websocket connection established at the server end is integrated with the message middleware.
Patent document CN103067292A discloses a load balancing method and device based on WebSocket transmission, so as to save network resources and improve distribution efficiency. The method comprises the following steps: receiving a first WebSocket request initiated by a client through a short link; and redirecting the client to a server in a server cluster according to a load balancing strategy so that the client initiates a second WebSocket request to establish a link with the redirected server.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a method and a system for displaying industrial data in real time.
The invention provides a real-time industrial data display method, which comprises the following steps:
a data configuration step: configuring industrial data needing to be displayed in real time;
page viewing step: viewing an industrial data real-time display page;
an address acquisition step: enabling the client to acquire a subscription address;
a service connection step: enabling a client to be connected with a Websocket service;
a data subscription step: enabling a client to subscribe Websocket industrial data service;
data receiving and displaying: and enabling the client to receive and display the industrial data sent by the server.
Preferably, the data configuring step:
and configuring the industrial data needing to be displayed in real time through the application page.
Preferably, the address obtaining step includes:
acquiring industrial data to be displayed on a page, extracting an industrial data ID (identity) and establishing a mapping relation of the page;
sending the industrial data ID to a server;
enabling the server to obtain the ID of the current login user;
enabling the server side to obtain the industrial data ID and then carry out data authority verification, and reserving the industrial data ID which passes the data verification;
generating a subscription address, associating and marking the subscription address with the verified industrial data ID and the current login user ID as subscription, and storing the subscription address into the distributed cache service;
enabling the server to return the subscription address to the client;
the industrial data ID refers to a unique identifier defined for each industrial data.
Preferably, the service connecting step includes:
enabling the client to initiate Websocket connection to the server;
after receiving the Websocket connection, the server redirects the server to the cluster service according to a load balancing strategy;
the cluster service checks whether the client logs in or not, and connection is refused if the client does not log in;
and establishing the Websocket connection by the client side passing the verification.
Preferably, the data subscribing step includes:
enabling the client to subscribe through the acquired subscription address;
after receiving the Websocket subscription, the server redirects a subscription request to the distributed cluster service according to a load balancing strategy;
the cluster service checks whether the client has the following 3 conditions: the user logs in, the subscription address state is not subscribed, and the current login user ID is consistent with the current subscription user ID: rejecting the subscription request for clients that do not satisfy the condition; the client side which passes the verification receives the subscription;
the server side modifies the subscription address state stored in the distributed cache service into a subscribed state, and records the mapping relation between the ID of the subscribed user and the subscription address;
monitoring the change of industrial data subscribed by a user, and entering a data receiving and displaying step to continue executing if the change is detected; otherwise, the monitoring is continued.
Preferably, the data receiving and presenting step comprises:
when monitoring that the industrial data changes, the server side sends the industrial data to the client side through the mapping relation between the industrial data ID and the subscription address;
and when the client receives the industrial data, updating the page industrial data through the established mapping relation.
The industrial data real-time display system provided by the invention can be realized through the steps and flows of the industrial data real-time display method provided by the invention. The method for displaying the industrial data in real time can be understood as a preferred example of the industrial data real-time displaying system by those skilled in the art.
The invention provides an industrial data real-time display system, which comprises:
a data configuration module: configuring industrial data needing to be displayed in real time;
a page viewing module: viewing an industrial data real-time display page;
an address acquisition module: enabling the client to acquire a subscription address;
a service connection module: enabling a client to be connected with a Websocket service;
a data subscription module: enabling a client to subscribe Websocket industrial data service;
the data receiving and displaying module: and enabling the client to receive and display the industrial data sent by the server.
Preferably, the data configuration module:
configuring industrial data needing to be displayed in real time through an application page;
the address acquisition module includes:
acquiring industrial data to be displayed on a page, extracting an industrial data ID (identity) and establishing a mapping relation of the page;
sending the industrial data ID to a server;
enabling the server to obtain the ID of the current login user;
enabling the server side to obtain the industrial data ID and then carry out data authority verification, and reserving the industrial data ID which passes the data verification;
generating a subscription address, associating the subscription address with the verified industrial data ID and the current login user ID, marking the subscription address as an unsubscribed address, and storing the unsubscribed address in the distributed cache service;
enabling the server to return the subscription address to the client;
the industrial data ID refers to a unique identifier defined for each industrial data.
Preferably, the service connection module includes:
enabling the client to initiate Websocket connection to the server;
after receiving the Websocket connection, the server redirects the server to the cluster service according to a load balancing strategy;
the cluster service checks whether the client logs in or not, and connection is refused if the client does not log in;
and establishing the Websocket connection by the client side passing the verification.
Preferably, the data subscription module includes:
enabling the client to subscribe through the acquired subscription address;
after receiving the Websocket subscription, the server redirects a subscription request to the distributed cluster service according to a load balancing strategy;
the cluster service checks whether the client has the following 3 conditions: the user logs in, the subscription address state is not subscribed, and the current login user ID is consistent with the current subscription user ID: rejecting the subscription request for clients that do not satisfy the condition; the client side which passes the verification receives the subscription;
the server side modifies the subscription address state stored in the distributed cache service into a subscribed state, and records the mapping relation between the ID of the subscribed user and the subscription address;
monitoring the change of industrial data subscribed by a user, and calling a data receiving and displaying module if the change is detected; otherwise, continuing monitoring;
the data receiving and displaying module comprises:
when monitoring that the industrial data changes, the server side sends the industrial data to the client side through the mapping relation between the industrial data ID and the subscription address;
and when the client receives the industrial data, updating the page industrial data through the established mapping relation.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention solves the problem that a plurality of addresses need to be subscribed when a plurality of industrial data are checked simultaneously by adopting a mode that the client side acquires the subscribed addresses.
2. The invention realizes high availability of service under the condition of high concurrency and single service failure by adopting a mode of redirecting to the cluster service by adopting a load balancing strategy.
3. The invention solves the problems of user data range authority verification and prevention of the subscription address from being used maliciously for multiple times by adopting a Websocket connection and subscription verification mode.
4. The invention solves the problems of server resource waste and untimely industrial data display caused by the regular polling of the industrial data by the server side in a mode of monitoring the change of the industrial data.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
fig. 1 is a schematic flow diagram of a method for displaying industrial data in real time based on Websocket provided by the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
The invention provides a real-time industrial data display method, which comprises the following steps:
a data configuration step: configuring industrial data needing to be displayed in real time;
page viewing step: viewing an industrial data real-time display page;
an address acquisition step: enabling the client to acquire a subscription address;
a service connection step: enabling a client to be connected with a Websocket service;
a data subscription step: enabling a client to subscribe Websocket industrial data service;
data receiving and displaying: and enabling the client to receive and display the industrial data sent by the server.
Specifically, the data configuration step:
and configuring the industrial data needing to be displayed in real time through the application page.
Specifically, the address obtaining step includes:
acquiring industrial data to be displayed on a page, extracting an industrial data ID (identity) and establishing a mapping relation of the page;
sending the industrial data ID to a server;
enabling the server to obtain the ID of the current login user;
enabling the server side to obtain the industrial data ID and then carry out data authority verification, and reserving the industrial data ID which passes the data verification;
generating a subscription address, associating the subscription address with the verified industrial data ID and the current login user ID, marking the subscription address as an unsubscribed address, and storing the unsubscribed address in the distributed cache service;
enabling the server to return the subscription address to the client;
the industrial data ID refers to a unique identifier defined for each industrial data.
Specifically, the service connection step includes:
enabling the client to initiate Websocket connection to the server;
after receiving the Websocket connection, the server redirects the server to the cluster service according to a load balancing strategy;
the cluster service checks whether the client logs in or not, and connection is refused if the client does not log in;
and establishing the Websocket connection by the client side passing the verification.
Specifically, the data subscribing step includes:
enabling the client to subscribe through the acquired subscription address;
after receiving the Websocket subscription, the server redirects a subscription request to the distributed cluster service according to a load balancing strategy;
the cluster service checks whether the client has the following 3 conditions: the user logs in, the subscription address state is not subscribed, and the current login user ID is consistent with the current subscription user ID: rejecting the subscription request for clients that do not satisfy the condition; the client side which passes the verification receives the subscription;
the server side modifies the subscription address state stored in the distributed cache service into a subscribed state, and records the mapping relation between the ID of the subscribed user and the subscription address;
monitoring the change of industrial data subscribed by a user, and entering a data receiving and displaying step to continue executing if the change is detected; otherwise, the monitoring is continued.
Specifically, the data receiving and displaying step includes:
when monitoring that the industrial data changes, the server side sends the industrial data to the client side through the mapping relation between the industrial data ID and the subscription address;
and when the client receives the industrial data, updating the page industrial data through the established mapping relation.
The industrial data real-time display system provided by the invention can be realized through the steps and flows of the industrial data real-time display method provided by the invention. The method for displaying the industrial data in real time can be understood as a preferred example of the industrial data real-time displaying system by those skilled in the art.
The invention provides an industrial data real-time display system, which comprises:
a data configuration module: configuring industrial data needing to be displayed in real time;
a page viewing module: viewing an industrial data real-time display page;
an address acquisition module: enabling the client to acquire a subscription address;
a service connection module: enabling a client to be connected with a Websocket service;
a data subscription module: enabling a client to subscribe Websocket industrial data service;
the data receiving and displaying module: and enabling the client to receive and display the industrial data sent by the server.
Specifically, the data configuration module:
configuring industrial data needing to be displayed in real time through an application page;
the address acquisition module includes:
acquiring industrial data to be displayed on a page, extracting an industrial data ID (identity) and establishing a mapping relation of the page;
sending the industrial data ID to a server;
enabling the server to obtain the ID of the current login user;
enabling the server side to obtain the industrial data ID and then carry out data authority verification, and reserving the industrial data ID which passes the data verification;
generating a subscription address, associating the subscription address with the verified industrial data ID and the current login user ID, marking the subscription address as an unsubscribed address, and storing the unsubscribed address in the distributed cache service;
enabling the server to return the subscription address to the client;
the industrial data ID refers to a unique identifier defined for each industrial data.
Specifically, the service connection module includes:
enabling the client to initiate Websocket connection to the server;
after receiving the Websocket connection, the server redirects the server to the cluster service according to a load balancing strategy;
the cluster service checks whether the client logs in or not, and connection is refused if the client does not log in;
and establishing the Websocket connection by the client side passing the verification.
Specifically, the data subscription module includes:
enabling the client to subscribe through the acquired subscription address;
after receiving the Websocket subscription, the server redirects a subscription request to the distributed cluster service according to a load balancing strategy;
the cluster service checks whether the client has the following 3 conditions: the user logs in, the subscription address state is not subscribed, and the current login user ID is consistent with the current subscription user ID: rejecting the subscription request for clients that do not satisfy the condition; the client side which passes the verification receives the subscription;
the server side modifies the subscription address state stored in the distributed cache service into a subscribed state, and records the mapping relation between the ID of the subscribed user and the subscription address;
monitoring the change of industrial data subscribed by a user, and calling a data receiving and displaying module if the change is detected; otherwise, continuing monitoring;
the data receiving and displaying module comprises:
when monitoring that the industrial data changes, the server side sends the industrial data to the client side through the mapping relation between the industrial data ID and the subscription address;
and when the client receives the industrial data, updating the page industrial data through the established mapping relation.
The present invention will be described more specifically below with reference to preferred examples.
Preferred example 1:
a method for displaying industrial data in real time based on Websocket can display industrial data in real time through Websocket in application. The method comprises the following steps:
when Websoket connection is carried out, the server side can redirect to cluster service according to a load balancing strategy;
when the Websocket subscribes industrial real-time data, user authority verification is carried out to ensure data security;
recording the mapping relation between the user and the industrial real-time data in the Websocket server, providing an industrial real-time value as required, and reducing resource consumption of the server and the client.
As shown in fig. 1, the specific process is as follows:
step 1: configuring industrial data requiring real-time presentation
And configuring the industrial data needing to be displayed in real time by the user through the application page.
Step 2: real-time display page for viewing industrial data
And step 3: client obtains subscription address (display page using code obtained through restful api interface)
(1) The industrial data needing to be displayed on the page are obtained, an industrial data ID (a unique identifier defined for each industrial data in the system, for example, the water inlet temperature of a certain factory is an industrial data, the unique identifier is defined to be 1 in the system, and the industrial data ID is 1) is extracted, and the mapping relation of the page is established.
(2) And sending the industrial data ID to the server.
(3) The server acquires the ID of the current login user.
(3) And the server performs authority verification after acquiring the industrial data ID and retains the industrial data ID passing the data verification.
(4) And generating a subscription address, associating the subscription address with the verified industrial data ID and the current login user ID, marking the subscription address as an unsubscribed address, and storing the subscribed address in the distributed cache service.
(5) And the server returns the subscription address to the client.
And 4, step 4: client-connected Websocket service
(1) The client initiates a Websocket connection to the server.
(2) Load balancing (L load Balance) means that the load balancing is distributed to a plurality of operation units for execution, such as a Web server, an FTP server, an enterprise key application server and other key task servers, so as to jointly complete work tasks.
(3) The cluster service checks whether the client logs in or not, and connection is refused if the client does not log in. The cluster service check means that the server side has a service for checking whether the client side logs in, and the service uses the cluster service. A cluster service refers to a deployment of multiple services.
(4) And establishing the Websocket connection by the client side passing the verification.
And 5: client subscription Websocket industrial data service
(1) And the client subscribes through the subscription address acquired in the step 3.
(2) And after the server receives the Websocket subscription, the server redirects the subscription request to the distributed cluster service according to the load balancing strategy in the step 4.
(3) The cluster service checks whether the client has the following 3 conditions: the user logs in, the subscription address state is not subscribed, and the current login user ID is consistent with the current subscription user ID. The subscription request is denied to users that do not satisfy the condition.
(4) And the client which passes the verification receives the subscription.
(5) And the server side changes the state of the subscription address stored in the distributed cache service into the subscribed state, and records the mapping relation between the ID of the subscription user and the subscription address.
(6) Monitoring the change of the industrial data subscribed by the user, and entering the step 6 to continue executing when the change is monitored.
Step 6: the client receives and displays the industrial data sent by the server
(1) And when monitoring that the industrial data changes, the server side sends the industrial data to the client side through the mapping relation between the industrial data ID and the subscription address.
(2) And when the client receives the industrial data, updating the page industrial data through the mapping relation established in the step 3.
In the description of the present application, it is to be understood that the terms "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience in describing the present application and simplifying the description, but do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present application.
Those skilled in the art will appreciate that, in addition to implementing the systems, apparatus, and various modules thereof provided by the present invention in purely computer readable program code, the same procedures can be implemented entirely by logically programming method steps such that the systems, apparatus, and various modules thereof are provided in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system, the device and the modules thereof provided by the present invention can be considered as a hardware component, and the modules included in the system, the device and the modules thereof for implementing various programs can also be considered as structures in the hardware component; modules for performing various functions may also be considered to be both software programs for performing the methods and structures within hardware components.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.
Claims (10)
1. A real-time industrial data display method is characterized by comprising the following steps:
a data configuration step: configuring industrial data needing to be displayed in real time;
page viewing step: viewing an industrial data real-time display page;
an address acquisition step: enabling the client to acquire a subscription address;
a service connection step: enabling a client to be connected with a Websocket service;
a data subscription step: enabling a client to subscribe Websocket industrial data service;
data receiving and displaying: and enabling the client to receive and display the industrial data sent by the server.
2. The industrial data real-time display method according to claim 1, wherein the data configuration step comprises:
and configuring the industrial data needing to be displayed in real time through the application page.
3. The industrial data real-time display method according to claim 1, wherein the address acquisition step comprises:
acquiring industrial data to be displayed on a page, extracting an industrial data ID (identity) and establishing a mapping relation of the page;
sending the industrial data ID to a server;
enabling the server to obtain the ID of the current login user;
enabling the server side to obtain the industrial data ID and then carry out data authority verification, and reserving the industrial data ID which passes the data verification;
generating a subscription address, associating and marking the subscription address with the verified industrial data ID and the current login user ID as subscription, and storing the subscription address into the distributed cache service;
enabling the server to return the subscription address to the client;
the industrial data ID refers to a unique identifier defined for each industrial data.
4. The industrial data real-time display method according to claim 1, wherein the service connection step comprises:
enabling the client to initiate Websocket connection to the server;
after receiving the Websocket connection, the server redirects the server to the cluster service according to a load balancing strategy;
the cluster service checks whether the client logs in or not, and connection is refused if the client does not log in;
and establishing the Websocket connection by the client side passing the verification.
5. The industrial data real-time display method according to claim 3, wherein the data subscribing step comprises:
enabling the client to subscribe through the acquired subscription address;
after receiving the Websocket subscription, the server redirects a subscription request to the distributed cluster service according to a load balancing strategy;
the cluster service checks whether the client has the following 3 conditions: the user logs in, the subscription address state is not subscribed, and the current login user ID is consistent with the current subscription user ID: rejecting the subscription request for clients that do not satisfy the condition; the client side which passes the verification receives the subscription;
the server side modifies the subscription address state stored in the distributed cache service into a subscribed state, and records the mapping relation between the ID of the subscribed user and the subscription address;
monitoring the change of industrial data subscribed by a user, and entering a data receiving and displaying step to continue executing if the change is detected; otherwise, the monitoring is continued.
6. The method for displaying industrial data in real time as claimed in claim 3, wherein the step of receiving and displaying the industrial data comprises:
when monitoring that the industrial data changes, the server side sends the industrial data to the client side through the mapping relation between the industrial data ID and the subscription address;
and when the client receives the industrial data, updating the page industrial data through the established mapping relation.
7. An industrial data real-time presentation system, comprising:
a data configuration module: configuring industrial data needing to be displayed in real time;
a page viewing module: viewing an industrial data real-time display page;
an address acquisition module: enabling the client to acquire a subscription address;
a service connection module: enabling a client to be connected with a Websocket service;
a data subscription module: enabling a client to subscribe Websocket industrial data service;
the data receiving and displaying module: and enabling the client to receive and display the industrial data sent by the server.
8. The industrial data real-time presentation system of claim 7, wherein the data configuration module:
configuring industrial data needing to be displayed in real time through an application page;
the address acquisition module includes:
acquiring industrial data to be displayed on a page, extracting an industrial data ID (identity) and establishing a mapping relation of the page;
sending the industrial data ID to a server;
enabling the server to obtain the ID of the current login user;
enabling the server side to obtain the industrial data ID and then carry out data authority verification, and reserving the industrial data ID which passes the data verification;
generating a subscription address, associating and marking the subscription address with the verified industrial data ID and the current login user ID as subscription, and storing the subscription address into the distributed cache service;
enabling the server to return the subscription address to the client;
the industrial data ID refers to a unique identifier defined for each industrial data.
9. The industrial data real-time presentation system of claim 7, wherein the service connection module comprises:
enabling the client to initiate Websocket connection to the server;
after receiving the Websocket connection, the server redirects the server to the cluster service according to a load balancing strategy;
the cluster service checks whether the client logs in or not, and connection is refused if the client does not log in;
and establishing the Websocket connection by the client side passing the verification.
10. The industrial data real-time presentation system of claim 8, wherein the data subscription module comprises:
enabling the client to subscribe through the acquired subscription address;
after receiving the Websocket subscription, the server redirects a subscription request to the distributed cluster service according to a load balancing strategy;
the cluster service checks whether the client has the following 3 conditions: the user logs in, the subscription address state is not subscribed, and the current login user ID is consistent with the current subscription user ID: rejecting the subscription request for clients that do not satisfy the condition; the client side which passes the verification receives the subscription;
the server side modifies the subscription address state stored in the distributed cache service into a subscribed state, and records the mapping relation between the ID of the subscribed user and the subscription address;
monitoring the change of industrial data subscribed by a user, and calling a data receiving and displaying module if the change is detected; otherwise, continuing monitoring;
the data receiving and displaying module comprises:
when monitoring that the industrial data changes, the server side sends the industrial data to the client side through the mapping relation between the industrial data ID and the subscription address;
and when the client receives the industrial data, updating the page industrial data through the established mapping relation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010171552.4A CN111427703A (en) | 2020-03-12 | 2020-03-12 | Industrial data real-time display method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010171552.4A CN111427703A (en) | 2020-03-12 | 2020-03-12 | Industrial data real-time display method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111427703A true CN111427703A (en) | 2020-07-17 |
Family
ID=71546520
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010171552.4A Pending CN111427703A (en) | 2020-03-12 | 2020-03-12 | Industrial data real-time display method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111427703A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113391979A (en) * | 2021-06-21 | 2021-09-14 | 中国农业银行股份有限公司 | Processing method, equipment and system for monitoring data display and storage medium |
CN115766840A (en) * | 2022-10-27 | 2023-03-07 | 浩云科技股份有限公司 | Service data transmission method and device based on single websocket link channel |
CN116233233A (en) * | 2023-03-13 | 2023-06-06 | 霞智科技有限公司 | Development method and system for background pushing based on ws protocol |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100091965A1 (en) * | 2007-12-13 | 2010-04-15 | Huawei Technologies Co., Ltd. | Service subscription method, system and server |
CN101938525A (en) * | 2010-10-09 | 2011-01-05 | 安和创新科技(北京)有限公司 | Subscribed/pushed cache mechanism based system and method for wireless enterprise application |
CN102904962A (en) * | 2012-10-23 | 2013-01-30 | 深圳市汇智集信息科技有限公司 | Message pushing system and message pushing method thereof |
CN103036970A (en) * | 2012-12-11 | 2013-04-10 | 北京奇虎科技有限公司 | Method and system for page frame content subscription |
CN104539583A (en) * | 2014-12-05 | 2015-04-22 | 浙江浙大中控信息技术有限公司 | Real-time database subscription system and method |
WO2015090239A1 (en) * | 2013-12-20 | 2015-06-25 | 华为技术有限公司 | Device, method and system for user state notification |
CN104917795A (en) * | 2014-03-13 | 2015-09-16 | 腾讯科技(深圳)有限公司 | Subscription information alert method and device |
CN105407180A (en) * | 2015-12-29 | 2016-03-16 | 曙光信息产业(北京)有限公司 | Server message pushing method and device |
CN106850745A (en) * | 2016-12-23 | 2017-06-13 | 北京五八信息技术有限公司 | A kind of real-time synchronization method and device |
CN107085580A (en) * | 2016-02-16 | 2017-08-22 | 阿里巴巴集团控股有限公司 | The method and client of client displayed page |
-
2020
- 2020-03-12 CN CN202010171552.4A patent/CN111427703A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100091965A1 (en) * | 2007-12-13 | 2010-04-15 | Huawei Technologies Co., Ltd. | Service subscription method, system and server |
CN101938525A (en) * | 2010-10-09 | 2011-01-05 | 安和创新科技(北京)有限公司 | Subscribed/pushed cache mechanism based system and method for wireless enterprise application |
CN102904962A (en) * | 2012-10-23 | 2013-01-30 | 深圳市汇智集信息科技有限公司 | Message pushing system and message pushing method thereof |
CN103036970A (en) * | 2012-12-11 | 2013-04-10 | 北京奇虎科技有限公司 | Method and system for page frame content subscription |
WO2015090239A1 (en) * | 2013-12-20 | 2015-06-25 | 华为技术有限公司 | Device, method and system for user state notification |
CN104917795A (en) * | 2014-03-13 | 2015-09-16 | 腾讯科技(深圳)有限公司 | Subscription information alert method and device |
CN104539583A (en) * | 2014-12-05 | 2015-04-22 | 浙江浙大中控信息技术有限公司 | Real-time database subscription system and method |
CN105407180A (en) * | 2015-12-29 | 2016-03-16 | 曙光信息产业(北京)有限公司 | Server message pushing method and device |
CN107085580A (en) * | 2016-02-16 | 2017-08-22 | 阿里巴巴集团控股有限公司 | The method and client of client displayed page |
CN106850745A (en) * | 2016-12-23 | 2017-06-13 | 北京五八信息技术有限公司 | A kind of real-time synchronization method and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113391979A (en) * | 2021-06-21 | 2021-09-14 | 中国农业银行股份有限公司 | Processing method, equipment and system for monitoring data display and storage medium |
CN115766840A (en) * | 2022-10-27 | 2023-03-07 | 浩云科技股份有限公司 | Service data transmission method and device based on single websocket link channel |
CN116233233A (en) * | 2023-03-13 | 2023-06-06 | 霞智科技有限公司 | Development method and system for background pushing based on ws protocol |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108737467B (en) | Server log viewing method, device and system | |
CN105337961B (en) | The method and server communicated with client | |
US20140280859A1 (en) | Sharing control system and method for network resources download information | |
JP2005539298A (en) | Method and system for remotely and dynamically configuring a server | |
EP3028437B1 (en) | Messaging api over http protocol to establish context for data exchange | |
CN112187903B (en) | Message pushing method and device and message service system | |
CN102904903B (en) | Communication system and communication means | |
CN111427703A (en) | Industrial data real-time display method and system | |
CN104601702B (en) | Cluster remote procedure calling (PRC) method and system | |
CN114024972B (en) | Long connection communication method, system, device, equipment and storage medium | |
US12169530B2 (en) | Token-based authentication for a proxy web scraping service | |
CN106254377A (en) | Support soft load-balancing method and the system of the connection of magnanimity length | |
CN104796406A (en) | Method and device for identifying application | |
CN114268667B (en) | Data forwarding method, device, computer equipment and storage medium | |
CN104010001A (en) | Method and system for carrying out connection communication on same networking requests in mobile terminal | |
CN112261111A (en) | Method and system for realizing cross-domain access of browser in application program | |
CN113765774B (en) | Method, device, electronic equipment and medium for synchronizing messages in real time | |
US20150149629A1 (en) | User online state querying method and apparatus | |
KR101857020B1 (en) | Apparatas and method for managing service of providing server in a terminal | |
US20060168079A1 (en) | System and method for automatically connecting a client computer to a server | |
CN111193778A (en) | Method, device, equipment and medium for WEB service load balancing | |
CN103618665A (en) | Method for pushing messages to client | |
CN111641664B (en) | Crawler equipment service request method, device and system and storage medium | |
JP2014026480A (en) | Output comparison method for plural information systems | |
CN111711675A (en) | Solution for concurrent message transmission in local area network |
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 |