CN117539916B - Data display method, device and storage medium - Google Patents

Data display method, device and storage medium Download PDF

Info

Publication number
CN117539916B
CN117539916B CN202410033089.5A CN202410033089A CN117539916B CN 117539916 B CN117539916 B CN 117539916B CN 202410033089 A CN202410033089 A CN 202410033089A CN 117539916 B CN117539916 B CN 117539916B
Authority
CN
China
Prior art keywords
target
point location
data
queue
data packet
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.)
Active
Application number
CN202410033089.5A
Other languages
Chinese (zh)
Other versions
CN117539916A (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.)
China ENFI Engineering Corp
China Nonferrous Metals Engineering Co Ltd
Original Assignee
China ENFI Engineering Corp
China Nonferrous Metals Engineering 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 China ENFI Engineering Corp, China Nonferrous Metals Engineering Co Ltd filed Critical China ENFI Engineering Corp
Priority to CN202410033089.5A priority Critical patent/CN117539916B/en
Publication of CN117539916A publication Critical patent/CN117539916A/en
Application granted granted Critical
Publication of CN117539916B publication Critical patent/CN117539916B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24561Intermediate data storage techniques for performance improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Abstract

The application discloses a data display method, a device and a storage medium, wherein the method comprises the following steps: acquiring data packets of each equipment object in real time based on an Internet of things platform, storing each data packet into a preset target message queue, and deleting each historical data packet acquired at the last acquisition moment; responding to a target point location set which is sent by each terminal device and is to be subjected to data display and contains a plurality of target point location identifiers, and configuring a target thread corresponding to each terminal device to a configuration diagram queue corresponding to the target point location set in the corresponding terminal device; and acquiring target data packets corresponding to the target point position sets from the target message queues in real time based on the target point position sets sent by the terminal equipment, and forwarding the target data packets to configuration diagram queues of the corresponding terminal equipment based on the target threads so as to display the target point position data in the target data packets based on the configuration diagram queues. The method and the device can realize accurate and reliable data display.

Description

Data display method, device and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data display method, apparatus, and storage medium.
Background
The development of intelligent factory is the new direction of intelligent industry development, and its characteristics include: the method is characterized by collecting and understanding external and self information, analyzing, judging and planning the self behavior according to the information, and combining the data visualization capability of the technologies such as signal processing, reasoning, prediction, simulation, multimedia technology and the like.
In the modern industrial field, it is important to display the data of each monitoring point of each device in the factory in real time, but the current data display method generally uses a third party database, namely, a field industrial network of the factory is directly connected with the third party database; when data display is performed each time, a reading operation needs to be performed every second from mass data of a database, latest data of monitoring points of corresponding equipment objects are obtained, and the reading operation is not well optimized, so that certain risks can be brought to stability of second-level data update, and the data display is not accurate and reliable enough.
Disclosure of Invention
In view of the above, the present invention provides a data display method, device and storage medium, which mainly aims to solve the problem that the data display is not accurate and reliable enough at present.
In order to solve the above problems, the present application provides a data display method, including:
acquiring data packets of all equipment objects in real time based on an Internet of things platform, storing all the data packets into a preset target message queue, and deleting all historical data packets acquired at the last acquisition moment, wherein the data packets contain a plurality of point location data of the equipment objects;
responding to a target point location set which is sent by each terminal device and is to be subjected to data display and contains a plurality of target point location identifiers, and configuring a target thread corresponding to each terminal device to a configuration diagram queue corresponding to the target point location set in the corresponding terminal device;
and acquiring target data packets corresponding to the target point position sets from the target message queues in real time based on the target point position sets sent by the terminal equipment, and forwarding the target data packets to configuration diagram queues of the corresponding terminal equipment based on the target threads so as to display the target point position data in the target data packets based on the configuration diagram queues.
Optionally, the internet of things platform acquires, in real time, a data packet of each device object, which specifically includes:
acquiring point location data of each monitoring point location of each equipment object in real time based on an Internet of things platform;
And based on the point location data, the point location identification of each monitoring point location and the equipment identification of the equipment object to which each monitoring point location belongs, packetizing the point location data to obtain a data packet which corresponds to each equipment object and contains a plurality of point location data.
Optionally, before configuring the target thread corresponding to each terminal device to the configuration diagram queue corresponding to the target point location set in the corresponding terminal device, the method further includes:
responding to a communication connection establishment request of the terminal equipment to establish a communication channel with the terminal equipment;
and allocating a corresponding target thread for the communication channel based on each thread in the thread pool so as to configure the corresponding target thread for the terminal equipment.
Optionally, the allocating, based on each thread in the thread pool, a corresponding target thread for the communication channel specifically includes:
judging whether a spare thread exists in the thread pool;
when the free threads exist, distributing corresponding target threads for the communication channels based on the free threads;
when no free threads exist, creating a plurality of new threads based on the number of threads in the thread pool, so as to allocate corresponding target threads for the communication channel based on each new thread.
Optionally, before acquiring, in real time, the target data packet corresponding to the target point location set from the target message queue, the method further includes:
and establishing communication connection with the target message queue in advance, so as to acquire a target data packet corresponding to the target point location set from the target message queue in real time based on the target point location set sent by each terminal device by utilizing the communication connection.
Optionally, the acquiring, in real time, the target data packet corresponding to the target point location set from the target message queue based on the target point location set sent by each terminal device, and forwarding, based on each target thread, each target data packet to a configuration map queue of a corresponding terminal device, includes:
determining a target equipment object to which each point position mark in a target point position set belongs based on the target point position set sent by each terminal equipment;
acquiring point location data corresponding to each point location identifier from data packets corresponding to each target equipment object in real time, and merging the point location data to acquire a target data packet corresponding to the target point location set;
and forwarding each target data packet to a configuration diagram queue of the corresponding terminal equipment based on each target thread.
Optionally, the data display method further includes:
receiving a graph cutting request sent by terminal equipment, wherein the graph cutting request comprises a current point location set; the current point location set comprises point location identifiers of a plurality of different monitoring points;
reconfiguring a target thread corresponding to the terminal equipment to a current configuration diagram queue corresponding to the current point location set in the terminal equipment;
and acquiring a target data packet corresponding to the current point position set from the target message queue in real time based on the current point position set in the graph cutting request, and forwarding the target data packet to a current configuration graph queue of corresponding terminal equipment based on a target thread, so that the current configuration graph queue displays each point bit data in the target data packet.
Optionally, before deleting each historical data packet acquired at the last acquisition time, the method further includes:
and storing each historical data packet, the acquisition time corresponding to each historical data packet and the equipment object corresponding to each historical data packet in a preset database in a correlated mode.
To solve the above problems, the present application provides a data display device, including:
The storage module is used for acquiring data packets of all equipment objects in real time based on the Internet of things platform, storing all the data packets into a preset target message queue, and deleting all the historical data packets acquired at the last acquisition moment, wherein the data packets contain a plurality of point location data of the equipment objects;
the configuration module is used for responding to a target point location set which is sent by each terminal device and is to be subjected to data display and comprises a plurality of target point location identifiers, and configuring a target thread corresponding to each terminal device to a configuration diagram queue corresponding to the target point location set in the corresponding terminal device;
the display module is used for acquiring target data packets corresponding to the target point position sets from the target message queues in real time based on the target point position sets sent by the terminal equipment, forwarding the target data packets to the configuration diagram queues of the corresponding terminal equipment based on the target threads, and displaying the target point position data in the target data packets based on the configuration diagram queues.
To solve the above-mentioned problems, the present application provides a storage medium storing a computer program which, when executed by a processor, implements the steps of the data presentation method of any one of the above.
According to the data display method, device, medium and equipment, the data packets of the equipment objects are obtained in real time, then the data packets are stored in the message queue, and the data packets in the message queue are updated in real time, so that the message queue only stores the data packets at the current obtaining moment, the corresponding target data packets can be directly obtained from the message queue subsequently and forwarded to the terminal equipment through the corresponding target routes, the problems of low reading speed and easiness in error caused by reading the data packets at the current obtaining moment from a mass database containing a plurality of obtaining moments are solved, and the data display is more accurate and reliable, and can be simultaneously forwarded to a plurality of terminals, so that the multi-mode display of the data is realized.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
Fig. 1 is a flowchart of a data display method according to an embodiment of the present application;
FIG. 2 is a flow chart of a data display method according to another embodiment of the present application;
fig. 3 is a block diagram of a data display device according to another embodiment of the present application.
Detailed Description
Various aspects and features of the present application are described herein with reference to the accompanying drawings.
It should be understood that various modifications may be made to the embodiments of the application herein. Therefore, the above description should not be taken as limiting, but merely as exemplification of the embodiments. Other modifications within the scope and spirit of this application will occur to those skilled in the art.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and, together with a general description of the application given above and the detailed description of the embodiments given below, serve to explain the principles of the application.
These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment, given as a non-limiting example, with reference to the accompanying drawings.
It is also to be understood that, although the present application has been described with reference to some specific examples, those skilled in the art can certainly realize many other equivalent forms of the present application.
The foregoing and other aspects, features, and advantages of the present application will become more apparent in light of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present application will be described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the application, which can be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application with unnecessary or excessive detail. Therefore, specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.
The specification may use the word "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments as per the application.
The embodiment of the application provides a data display method, which can be applied to electronic equipment such as a terminal and a server, and can specifically run in a dock or be deployed in a pod of k8s, as shown in fig. 1, and the method in the embodiment comprises the following steps:
Step S101, acquiring data packets of all equipment objects in real time based on an Internet of things platform, storing all the data packets into a preset target message queue, and deleting all historical data packets acquired at the last acquisition moment, wherein the data packets contain a plurality of point location data of the equipment objects;
in the specific implementation process, the IOT acquires real-time point location data of a distributed control system (namely a DCS system) through a data acquisition gateway, and then packetizes the point location data according to point location identifiers corresponding to the point location data and equipment identifiers of the equipment objects to which the point location data belong to obtain data packets corresponding to the equipment objects, so that the data packets can be pushed to a target message queue for storage, wherein the target message queue can be a Kafka message queue. The point location identifier may be a point location address (point location ID) or a point location name, etc., and the device identifier may also be a device address (device ID) or a device name, etc.
In this step, while storing the data packet in the Kafka target message queue, the historical data packet in the Kafka target message queue may be deleted, that is, the Kafka target message queue may store only the data packet at the current time.
In a specific implementation process, in order to backup the data packet, each historical data packet, an acquisition time corresponding to each historical data packet, and an equipment object corresponding to each historical data packet may be stored in a predetermined database in an associated manner, and then the historical data packet is deleted from the Kafka message queue.
Step S102, a target thread corresponding to each terminal device is configured to a configuration diagram queue corresponding to a target point position set in the corresponding terminal device in response to the target point position set which is sent by each terminal device and is to be subjected to data display and contains a plurality of target point position identifiers;
in the step, the target point location is the monitoring point location to be subjected to data display. That is, the terminal device or the client that needs to display the point location data may send the point location identifier of the monitoring point location/target point location to be displayed and the device identifier of the device object to which the monitoring point location/target point location to be displayed belongs to the middle server, so that the middle server may configure a corresponding target thread for the terminal device, and configure the target thread with the configuration diagram queue of the terminal. The point location identifier may be a point location address (point location ID) or a point location name, etc., and the device identifier may also be a device address (device ID) or a device name, etc.
In the implementation process, the plurality of terminal devices can simultaneously send the point location sets to be subjected to data display, and the middle platform service can simultaneously configure corresponding target threads for the terminal devices and configure the target threads to configuration diagram queues corresponding to the point location sets in the corresponding terminal devices, so that a foundation is laid for configuration diagram display of point location data of the plurality of subsequent terminal devices simultaneously.
Step S103, based on the target point location set sent by each terminal device, acquiring target data packets corresponding to the target point location set from the target message queue in real time, and forwarding each target data packet to a configuration diagram queue of a corresponding terminal device based on each target thread, so as to display each target point location data in the target data packet based on the configuration diagram queue.
In the implementation process, the middle station service can specifically acquire a plurality of point location data corresponding to each target point location set from the message queue according to each point location identifier in the target point location set, so as to construct and acquire a target data packet, that is, the plurality of target point location data contained in the target data packet corresponds to each target point location identifier in the target point location set one by one. After the target data packet is obtained, the target data packet can be sent to a configuration diagram queue of the corresponding terminal equipment through the target thread so as to display the data of each target point position in the target data packet, thereby completing the real-time display of the data.
According to the data display method, the data packets of the equipment objects are obtained in real time, then the data packets are stored in the message queue, the data packets in the message queue are updated in real time, therefore, the message queue only stores the data packets at the current obtaining time, the corresponding target data packets can be directly obtained from the message queue in the follow-up process, and are forwarded to the terminal equipment through the corresponding target route, and therefore the problems of low reading speed and easiness in error caused by reading the data packets at the current obtaining time from a mass database containing a plurality of obtaining times are solved, the data display is more accurate and reliable, and the data can be forwarded to a plurality of terminals at the same time, so that multi-mode display of the data is achieved.
Based on the foregoing embodiment, a further embodiment of the present application provides a data display method, in this embodiment, a specific acquiring process of a middle platform service when acquiring a data packet of each device object in real time based on an internet of things platform is as follows: acquiring point location data of each monitoring point location of each equipment object in real time based on an Internet of things platform; and based on the point location data, the point location identification of each monitoring point location and the equipment identification of the equipment object to which each monitoring point location belongs, packetizing the point location data to obtain a data packet which corresponds to each equipment object and contains a plurality of point location data. The point location identifier may be a point location address (point location ID) or a point location name, etc., and the device identifier may also be a device address (device ID) or a device name, etc. The internet of things platform can acquire real-time point location data of a distributed control system (namely a DCS system) through a data acquisition gateway, namely, point location data of all monitoring points of all equipment objects are acquired, and then the point location data of all the monitoring points are subjected to sub-packaging processing according to the point location address of each monitoring point and the equipment object to which the monitoring point location belongs, so that a data packet which corresponds to each equipment object and contains a plurality of point location data is acquired.
For example, there are a total of 3 device objects, device a, device B, and device C, respectively. Wherein, there are 2 monitoring points in equipment A, do respectively: point 1 and point 2. The equipment B has 2 monitoring points, which are respectively: point 3 and point 4. The device C has 3 monitoring points, which are respectively: point 5, point 6, and point 7. Therefore, the point data of the point 1, the point 2, the point 3, the point 4, the point 5, the point 6 and the point 7 can be obtained based on the internet of things platform at each obtaining time/collecting time, namely, the point data of each monitoring point is obtained in real time, and then the obtained 7 point data are subjected to the packetizing treatment according to the point address of the 7 points and the equipment address of the equipment object to which the 7 points belong, so that the point data 1' of the point 1 and the point data 2' of the point 2 are combined into a data packet corresponding to the equipment A, the point data 3' of the point 3 and the point data 4' of the point 4 are combined into a data packet corresponding to the equipment B, and the point data 5', the point data 6' of the point 5 and the point data 7' corresponding to the point 6 are combined into a data packet corresponding to the equipment C. In the implementation process of this embodiment, the acquisition time or the acquisition time may be set according to actual needs, for example, set to every second, every 2 seconds, etc.
Based on the above embodiment, another embodiment of the present application provides a data display method, in this embodiment, before configuring a target thread corresponding to the terminal device to a configuration diagram queue of the terminal device, a communication channel may be established in advance with the terminal device, and then a corresponding target thread is allocated to the communication channel, so as to lay a foundation for forwarding a data packet based on the target thread. The specific thread allocation process comprises the following steps: responding to a communication connection establishment request of the terminal equipment to establish a communication channel with the terminal equipment; and allocating a corresponding target thread for the communication channel based on each thread in the thread pool so as to configure the corresponding target thread for the terminal equipment. That is, the front-end (terminal device) configuration software may request to the intermediate service to establish a WebSocket connection handshake, that is, establish a long connection communication channel, and then the intermediate service may allocate a new thread from the WebSocket client thread pool to the long connection, so as to configure a corresponding target thread for the front-end (terminal device).
In this embodiment, in order to ensure that thread allocation is more reasonable and accurate, the same thread is prevented from being allocated to a plurality of communication channels at the same time, and when thread allocation is performed, threads can be allocated to the communication channels from the spare threads in the thread pool. That is, after the middle service establishes a communication channel with the terminal device, it may determine whether there are free threads in the thread pool; when the free threads exist, distributing corresponding target threads for the communication channels based on the free threads; when no free threads exist, creating a plurality of new threads based on the number of threads in the thread pool, so as to allocate corresponding target threads for the communication channel based on each new thread. By adopting the thread allocation scheme, the thread allocation can be more reasonable and accurate.
In this embodiment, before obtaining, in real time, a target data packet of each target device object from the target message queue, a middle station service may establish a communication connection with the target message queue in advance, so as to obtain, in real time, a target data packet corresponding to the target point location set from the target message queue by using the communication connection and based on a target point location set sent by each terminal device. In this embodiment, the middle platform service may use a multithreading technology to establish a communication connection with the target message queue Kafka, that is, subscribe to Kafak, so as to provide a guarantee for subsequent real-time acquisition of the data packet from the Kafka message queue.
In this embodiment, after the middle station service establishes a communication connection with the target message queue Kafka, the target data packet corresponding to the target point location set may be acquired from the target message queue in real time. Specifically, the acquisition process of the target data packet is as follows: the middle platform service determines a target equipment object to which each point mark in a target point position set belongs based on the target point position set sent by each terminal equipment; and then acquiring point location data corresponding to each point location identifier from the data packet corresponding to each target equipment object in real time, and merging the point location data to obtain a target data packet corresponding to the target point location set. After the target data packets are obtained, each target data packet can be forwarded to the configuration diagram queue of the corresponding terminal device based on each target thread.
That is, the middle station service unpacks the data packet corresponding to each target device object according to the target device object corresponding to each point bit identifier in the target set to obtain a point location data set corresponding to each target device, then filters the unpacked point location data set to obtain target point location data corresponding to the point location identifier, and finally aggregates and merges the target point location data to obtain the target data packet corresponding to the target point location set. For example, a certain device object a has a monitoring point 1 and a monitoring point 2, and a device object B has a monitoring point 3 and a monitoring point 4. The terminal equipment only needs to display the point position data of the monitoring point position 1 and the point position data of the monitoring point position 4. The terminal equipment combines the point location address of the monitoring point location 1 and the point location address of the monitoring point location 4 into a target point location set, and then sends the target point location set to the middle station service. When the middle station service obtains the data packet a of the equipment object A and the data packet B of the equipment object B from the Kafka message queue, unpacking processing can be respectively carried out on the two data packets to obtain a data set a 'and a data set B', and then the target point location data 1 'is obtained from the data set a' according to the point location identification of the monitoring point location 1. Similarly, the target point location data 4 'is obtained from the data set b' according to the point location identification of the monitoring point location 4. And then merging the target point location data 1 'and the target point location data 4', thereby obtaining a target data packet corresponding to the target set. The method lays a foundation for the subsequent terminal equipment to display the point position data of the monitoring point position 1 and the point position data of the monitoring point position 4 in a targeted manner.
In this embodiment, after a long connection is established between the middle server and the terminal device, the middle server may also receive a graph cutting request sent by the terminal device, where the graph cutting request includes a current point location set; the current point location set comprises point location identifiers of a plurality of different monitoring points; reconfiguring a target thread corresponding to the terminal equipment to a current configuration diagram queue corresponding to the current point location set in the terminal equipment; and acquiring a target data packet corresponding to the current point position set from the target message queue in real time based on the current point position set in the graph cutting request, and forwarding the target data packet to a current configuration graph queue of corresponding terminal equipment based on a target thread, so that the current configuration graph queue displays each point bit data in the target data packet.
After the terminal device sends the point location set including the target point locations for the first time, that is, the middle platform service pushes the target thread corresponding to the terminal device into the configuration diagram service topic of the corresponding ID (that is, the point location address) according to the point location set ID, thereby the middle platform service can push the real-time service data obtained from the message queue in seconds, that is, push the configuration diagram service of the corresponding device through the target thread, and display of the point location data is achieved. After the terminal equipment sends the point location address set again, the middle station service recognizes the point location address set as a graph cutting request, so that the middle station service can reenter a target thread corresponding to the terminal equipment into a new topic according to the point location set ID in the request, namely, the target thread is pushed to a configuration graph service topic with the point location address in the graph cutting request, and then data is pushed in the new topic in the next second, so that real-time switching among different configuration graph services is realized.
In the implementation process, in order to ensure that point location data display is performed on each configuration service graph of each terminal device stably and reliably, long connections in each configuration service topic queue can be scanned every second, and whether data suspension, graph cutting or data reissuing are needed or not is judged, and corresponding operations are executed. When the long connection state of the middle platform service and the terminal equipment is normal, the middle platform service can forward the target data packet to the configuration diagram queue topic of the corresponding terminal equipment in real time by utilizing the target thread.
In the application, the terminal equipment can receive the selection operation of the user for the point location identifiers to generate the corresponding configuration diagram queue topic based on the point location identifiers, and meanwhile, the terminal equipment also generates a point location set ID for the point location set formed by the point location identifiers, and the point location set ID is used as the identifier of the configuration diagram queue. That is, each terminal device may generate a configuration map queue topic based on the user's interaction. The configuration diagram queue topic can contain a plurality of target points to be subjected to data display of the same equipment object, can also generate a plurality of target points to be subjected to data display of different equipment objects, and can create a corresponding point location set ID for the configuration diagram queue according to the point location set after generating the configuration diagram queue, thereby laying a foundation for configuring corresponding threads for the configuration diagram queue based on the point location set ID.
According to the data display method, through the operations of filtering, aggregating and the like on the equipment and the measuring point data in the message protocol of the Internet of things, the target data packet required by the configuration diagram can be stably and real-timely converted and obtained, and the target data packet is pushed to the front end for display at the stable updating frequency of the second level, and concurrent access is supported. The method supports point position set filtering and rule configuration of cross-equipment, and performs second-level updating pushing on real-time data corresponding to the point position set; for different factories and industries, the method can be deployed and operated only by configuring basic equipment and point location information without customized development, so that the development cost of a downstream information system in the environment of an industrial network and an industrial Internet of things is reduced, the development period of a project is shortened, and a user can conveniently and rapidly monitor data in a configurable manner. For different configuration diagram display requirements, the method and the device can support online updating of the point position set, support drag operation of front-end software on page elements, and dynamically configure display effects.
Another embodiment of the present application provides a data display system to further explain the data display method in the above embodiment. The data display system in this embodiment includes: IOT platforms (i.e., internet of things), kafka message queues and middleware (which may also be referred to as a middleware service), databases, and head-end equipment clients, etc. In the process of data presentation, as shown in fig. 2, the specific procedure is as follows:
The IOT platform is used for acquiring real-time data of the DCS system through the data acquisition gateway, packetizing the data per second according to the equipment to obtain data packets corresponding to the equipment objects, and pushing the data packets to the Kafka message queue.
That is, the internet of things platform acquires the point location data of each monitoring point location of each equipment object in real time; and based on the point location data, the point location identification of each monitoring point location and the equipment identification of the equipment object to which each monitoring point location belongs, packetizing the point location data to obtain data packets which correspond to each equipment object and contain a plurality of point location data, and storing each data packet into a Kafka message queue.
Middleware, namely a middle-stage service, for establishing communication connection with the Kafka message queue in advance by using a multithreading technology;
the front-end configuration software is used for establishing a WebSocket connection handshake with the middleware request in advance, establishing a long connection communication channel and sending a target point location set to the middleware/middle station service based on the communication channel.
The middleware is also for: after the front end establishes the long connection, a corresponding target thread is allocated for the long connection from the Websocket client thread pool. And after receiving the target point location set sent by the front end, the middleware responds to the target point location set to push the target thread into the configuration diagram service topic corresponding to the point location set ID. Therefore, the middleware can acquire the target data packet corresponding to the target point position set from the Kafka message queue in real time according to the target point position set sent by the front end, and then push the target data packet to the front end configuration diagram service topic in real time based on the target thread corresponding to the front end so as to display the point position data in the target data packet.
The middleware acquires a target data packet corresponding to a target point location set from a Kafka message queue in real time according to the target point location set sent by the front end, and specifically comprises the following steps: determining a target equipment object to which each point position mark in a target point position set belongs based on the target point position set sent by each terminal equipment;
acquiring point location data corresponding to each point location identifier from data packets corresponding to each target equipment object in real time, and merging the point location data to acquire a target data packet corresponding to the target point location set; and forwarding each target data packet to a configuration diagram queue of the corresponding terminal equipment based on each target thread.
Then, the front end sends other point location set IDs again through the long connection, the point location set IDs are identified as graph cutting requests, the corresponding target threads are pushed into new topics corresponding to the new IDs, and then data are pushed in the new topics in the next second, so that real-time switching among different configuration graph services is realized.
In the method, the device and the measuring point data in the message protocol of the Internet of things are filtered, aggregated and the like, so that the target data packet required by the configuration diagram can be stably and real-timely converted and obtained, and the target data packet is pushed to the front end for display at a second-level stable updating frequency and supports concurrent access. The method supports point position set filtering and rule configuration of cross-equipment, and performs second-level updating pushing on real-time data corresponding to the point position set; for different factories and industries, the method can be deployed and operated only by configuring basic equipment and point location information without customized development, so that the development cost of a downstream information system in the environment of an industrial network and an industrial Internet of things is reduced, the development period of a project is shortened, and a user can conveniently and rapidly monitor data in a configurable manner. For different configuration diagram display requirements, the method and the device can support online updating of the point position set, support drag operation of front-end software on page elements, and dynamically configure display effects.
Based on the foregoing embodiments, a further embodiment of the present application provides a data display device, as shown in fig. 3, including:
the storage module 11 is configured to acquire, in real time, data packets of each device object based on the internet of things platform, store each data packet in a predetermined target message queue, and delete each historical data packet acquired at a previous acquisition time, where the data packet includes a plurality of point location data of the device object;
the configuration module 12 is configured to respond to a target point location set which is sent by each terminal device and is to be subjected to data display and contains a plurality of target point location identifiers, and configure a target thread corresponding to each terminal device to a configuration diagram queue corresponding to the target point location set in the corresponding terminal device;
and the display module 13 is configured to obtain, in real time, a target data packet corresponding to the target point location set from the target message queue based on the target point location set sent by each terminal device, and forward each target data packet to a configuration diagram queue of a corresponding terminal device based on each target thread, so as to display each target point location data in the target data packet based on the configuration diagram queue.
In a specific implementation process of this embodiment, the storage module is specifically configured to: acquiring point location data of each monitoring point location of each equipment object in real time based on an Internet of things platform;
And based on the point location data, the point location identification of each monitoring point location and the equipment identification of the equipment object to which each monitoring point location belongs, packetizing the point location data to obtain a data packet which corresponds to each equipment object and contains a plurality of point location data.
In a specific implementation process of this embodiment, the data display apparatus further includes a first establishing module and an allocating module, where the first establishing module is configured to: responding to a communication connection establishment request of the terminal equipment to establish a communication channel with the terminal equipment; the distribution module is used for: and allocating a corresponding target thread for the communication channel based on each thread in the thread pool so as to configure the corresponding target thread for the terminal equipment.
In a specific implementation process of this embodiment, the allocation module is specifically configured to: judging whether a spare thread exists in the thread pool; when the free threads exist, distributing corresponding target threads for the communication channels based on the free threads; when no free threads exist, creating a plurality of new threads based on the number of threads in the thread pool, so as to allocate corresponding target threads for the communication channel based on each new thread.
In a specific implementation process of this embodiment, the data display apparatus further includes a second building module, where the second building module is configured to: the communication connection is established with the target message queue in advance, and the display module is specifically configured to: and acquiring a target data packet corresponding to the target point position set from the target message queue in real time based on the target point position set sent by each terminal device by using the communication connection.
In a specific implementation process of this embodiment, the display module is specifically configured to: determining a target equipment object to which each point position mark in a target point position set belongs based on the target point position set sent by each terminal equipment; acquiring point location data corresponding to each point location identifier from data packets corresponding to each target equipment object in real time, and merging the point location data to acquire a target data packet corresponding to the target point location set; and forwarding each target data packet to a configuration diagram queue of the corresponding terminal equipment based on each target thread.
In a specific implementation process of this embodiment, the data display device further includes a cut-out display module, where the cut-out display module is configured to: receiving a graph cutting request sent by terminal equipment, wherein the graph cutting request comprises a current point location set; the current point location set comprises point location identifiers of a plurality of different monitoring points; reconfiguring a target thread corresponding to the terminal equipment to a current configuration diagram queue corresponding to the current point location set in the terminal equipment; and acquiring a target data packet corresponding to the current point position set from the target message queue in real time based on the current point position set in the graph cutting request, and forwarding the target data packet to a current configuration graph queue of corresponding terminal equipment based on a target thread, so that the current configuration graph queue displays each point bit data in the target data packet.
In a specific implementation process of this embodiment, the data display apparatus further includes: the data backup module is used for: before deleting each historical data packet acquired at the last acquisition time, each historical data packet, the acquisition time corresponding to each historical data packet and the equipment object corresponding to each historical data packet are stored in a preset database in a correlated mode.
According to the data display device in the embodiment, the data packets of the equipment objects are obtained in real time, then the data packets are stored in the message queue, and the data packets in the message queue are updated in real time, so that the message queue only stores the data packets at the current obtaining time, the corresponding target data packets can be directly obtained from the message queue, and are forwarded to the terminal equipment through the corresponding target lines, the problems of low reading speed and easiness in error caused by reading the data packets at the current obtaining time from a mass database containing a plurality of obtaining times are solved, the data display is more accurate and reliable, and the data can be simultaneously forwarded to a plurality of terminals, so that the multi-component display of the data is realized.
Another embodiment of the present application provides a storage medium storing a computer program which, when executed by a processor, performs the method steps of:
Firstly, acquiring data packets of all equipment objects in real time based on an Internet of things platform, storing all the data packets into a preset target message queue, and deleting all historical data packets acquired at the last acquisition moment, wherein the data packets contain a plurality of point location data of the equipment objects;
step two, responding to a target point location set which is sent by each terminal device and is to be subjected to data display and contains a plurality of target point location identifiers, and configuring a target thread corresponding to each terminal device to a configuration diagram queue corresponding to the target point location set in the corresponding terminal device;
and thirdly, acquiring target data packets corresponding to the target point position sets from the target message queues in real time based on the target point position sets sent by the terminal equipment, and forwarding the target data packets to configuration diagram queues of the corresponding terminal equipment based on the target threads so as to display the target point position data in the target data packets based on the configuration diagram queues.
The specific implementation process of the above method steps can refer to the embodiment of any data display method, and this embodiment is not repeated here.
According to the storage medium, the data packets of all equipment objects are obtained in real time, then all the data packets are stored in the message queue, and the data packets in the message queue are updated in real time, so that the message queue only stores the data packets at the current obtaining moment, corresponding target data packets can be directly obtained from the message queue, and are forwarded to all the terminal equipment through corresponding target routes, the problems that the reading speed is low and errors are prone to occur due to the fact that the data packets at the current obtaining moment are read from a mass database containing a plurality of obtaining moments are solved, the data display is more accurate and reliable, and the data can be forwarded to a plurality of terminals simultaneously, so that multi-mode display of the data is realized.
The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application, the scope of which is defined by the claims. Various modifications and equivalent arrangements may be made to the present application by those skilled in the art, which modifications and equivalents are also considered to be within the scope of the present application.

Claims (10)

1. A data presentation method, comprising:
acquiring data packets of all equipment objects in real time based on an Internet of things platform, storing all the data packets into a preset target message queue, and deleting all historical data packets acquired at the last acquisition moment, wherein the data packets contain a plurality of point location data of the equipment objects;
responding to a target point location set which is sent by each terminal device and is to be subjected to data display and contains a plurality of target point location identifiers, and configuring a target thread corresponding to each terminal device to a configuration diagram queue corresponding to the target point location set in the corresponding terminal device;
acquiring point location data corresponding to each point location identifier from the target message queue in real time based on each point location identifier in the target point location set sent by each terminal device to construct and acquire target data packets corresponding to each target point location set, and forwarding each target data packet to a configuration diagram queue of corresponding terminal device based on each target thread to display each target point location data in each target data packet based on the configuration diagram queue;
The method further comprises the steps of: reconfiguring a target thread to a current configuration diagram queue corresponding to a current point position set based on the current point position set in a diagram cutting request sent by terminal equipment;
and acquiring a target data packet corresponding to the current point position set from the target message queue in real time based on the current point position set in the graph cutting request, and forwarding the target data packet to a current configuration graph queue of corresponding terminal equipment based on a target thread, so that the current configuration graph queue displays each point bit data in the target data packet.
2. The method of claim 1, wherein the acquiring, in real time, the data packet of each device object based on the internet of things platform specifically comprises:
acquiring point location data of each monitoring point location of each equipment object in real time based on an Internet of things platform;
and based on the point location data, the point location identification of each monitoring point location and the equipment identification of the equipment object to which each monitoring point location belongs, packetizing the point location data to obtain a data packet which corresponds to each equipment object and contains a plurality of point location data.
3. The method of claim 1, wherein prior to configuring the target thread corresponding to each terminal device to the configuration map queue corresponding to the set of target points in the corresponding terminal device, the method further comprises:
Responding to a communication connection establishment request of the terminal equipment to establish a communication channel with the terminal equipment;
and allocating a corresponding target thread for the communication channel based on each thread in the thread pool so as to configure the corresponding target thread for the terminal equipment.
4. The method of claim 3, wherein the allocating a corresponding target thread for the communication channel based on each thread in the thread pool specifically comprises:
judging whether a spare thread exists in the thread pool;
when the free threads exist, distributing corresponding target threads for the communication channels based on the free threads;
when no free threads exist, creating a plurality of new threads based on the number of threads in the thread pool, so as to allocate corresponding target threads for the communication channel based on each new thread.
5. The method of claim 1, wherein prior to obtaining in real-time a target data packet corresponding to the set of target points from the target message queue, the method further comprises:
and establishing communication connection with the target message queue in advance, so as to acquire a target data packet corresponding to the target point location set from the target message queue in real time based on the target point location set sent by each terminal device by utilizing the communication connection.
6. The method of claim 1, wherein the obtaining, in real time, point location data corresponding to each point location identifier from the target message queue based on each point location identifier in the target point location set sent by each terminal device, so as to construct and obtain target data packets corresponding to each target point location set, and forwarding each target data packet to a configuration map queue of a corresponding terminal device based on each target thread, specifically includes:
determining a target equipment object to which each point position mark in a target point position set belongs based on the target point position set sent by each terminal equipment;
acquiring point location data corresponding to each point location identifier from data packets corresponding to each target equipment object in real time, and merging the point location data to acquire a target data packet corresponding to the target point location set;
and forwarding each target data packet to a configuration diagram queue of the corresponding terminal equipment based on each target thread.
7. The method of claim 1, wherein the target thread is reconfigured to a current configuration map queue corresponding to a current point location set based on the current point location set in the map cutting request sent by the terminal device; based on the current point location set in the graph cutting request, acquiring a target data packet corresponding to the current point location set from the target message queue in real time, and forwarding the target data packet to a current configuration graph queue of corresponding terminal equipment based on a target thread, so that the current configuration graph queue displays each point bit data in the target data packet, and the method specifically comprises the following steps:
Receiving a graph cutting request sent by terminal equipment, wherein the graph cutting request comprises a current point location set; the current point location set comprises point location identifiers of a plurality of different monitoring points;
reconfiguring a target thread corresponding to the terminal equipment to a current configuration diagram queue corresponding to the current point location set in the terminal equipment;
and acquiring a target data packet corresponding to the current point position set from the target message queue in real time based on the current point position set in the graph cutting request, and forwarding the target data packet to a current configuration graph queue of corresponding terminal equipment based on a target thread, so that the current configuration graph queue displays each point bit data in the target data packet.
8. The method of claim 1, wherein prior to deleting each historical packet acquired at a last acquisition time, the method further comprises:
and storing each historical data packet, the acquisition time corresponding to each historical data packet and the equipment object corresponding to each historical data packet in a preset database in a correlated mode.
9. A data presentation device, comprising:
the storage module is used for acquiring data packets of all equipment objects in real time based on the Internet of things platform, storing all the data packets into a preset target message queue, and deleting all the historical data packets acquired at the last acquisition moment, wherein the data packets contain a plurality of point location data of the equipment objects;
The configuration module is used for responding to a target point location set which is sent by each terminal device and is to be subjected to data display and comprises a plurality of target point location identifiers, and configuring a target thread corresponding to each terminal device to a configuration diagram queue corresponding to the target point location set in the corresponding terminal device;
the display module is used for acquiring point location data corresponding to each point location identifier from the target message queue in real time based on each point location identifier in the target point location set sent by each terminal device so as to construct and acquire target data packets corresponding to each target point location set, and forwarding each target data packet to a configuration diagram queue of the corresponding terminal device based on each target thread so as to display each target point location data in the target data packets based on the configuration diagram queue;
the data display device further comprises a cut-out display module, wherein the cut-out display module is used for:
reconfiguring a target thread to a current configuration diagram queue corresponding to a current point position set based on the current point position set in a diagram cutting request sent by terminal equipment;
and acquiring a target data packet corresponding to the current point position set from the target message queue in real time based on the current point position set in the graph cutting request, and forwarding the target data packet to a current configuration graph queue of corresponding terminal equipment based on a target thread, so that the current configuration graph queue displays each point bit data in the target data packet.
10. A storage medium storing a computer program which, when executed by a processor, implements the steps of the data presentation method of any one of the preceding claims 1-8.
CN202410033089.5A 2024-01-10 2024-01-10 Data display method, device and storage medium Active CN117539916B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410033089.5A CN117539916B (en) 2024-01-10 2024-01-10 Data display method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410033089.5A CN117539916B (en) 2024-01-10 2024-01-10 Data display method, device and storage medium

Publications (2)

Publication Number Publication Date
CN117539916A CN117539916A (en) 2024-02-09
CN117539916B true CN117539916B (en) 2024-04-09

Family

ID=89782738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410033089.5A Active CN117539916B (en) 2024-01-10 2024-01-10 Data display method, device and storage medium

Country Status (1)

Country Link
CN (1) CN117539916B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201738664A (en) * 2016-04-14 2017-11-01 Asml荷蘭公司 Mapping of patterns between design layout and patterning device
CN111708599A (en) * 2020-08-18 2020-09-25 江苏神彩科技股份有限公司 Configuration diagram display method, device, equipment and storage medium
CN116091653A (en) * 2023-01-13 2023-05-09 广州慧云网络科技有限公司 Configuration diagram generation method and device of operation and maintenance equipment, terminal equipment and storage medium
CN116701559A (en) * 2023-06-13 2023-09-05 浙江源创智控技术有限公司 Equipment monitoring method, device and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10795884B2 (en) * 2016-09-26 2020-10-06 Splunk Inc. Dynamic resource allocation for common storage query

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201738664A (en) * 2016-04-14 2017-11-01 Asml荷蘭公司 Mapping of patterns between design layout and patterning device
CN111708599A (en) * 2020-08-18 2020-09-25 江苏神彩科技股份有限公司 Configuration diagram display method, device, equipment and storage medium
CN116091653A (en) * 2023-01-13 2023-05-09 广州慧云网络科技有限公司 Configuration diagram generation method and device of operation and maintenance equipment, terminal equipment and storage medium
CN116701559A (en) * 2023-06-13 2023-09-05 浙江源创智控技术有限公司 Equipment monitoring method, device and server

Also Published As

Publication number Publication date
CN117539916A (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN110659109B (en) System and method for monitoring openstack virtual machine
CN103781055A (en) Data downloading method and associated device
CN110768914B (en) Decentralized Internet of things gateway system based on semantic scene instance migration
CN106790131B (en) Parameter modification method and device and distributed platform
CN103780714A (en) Method and apparatus for probing DNS server
CN107888666A (en) A kind of cross-region data-storage system and method for data synchronization and device
CN113014681A (en) Network card binding method and device of multi-network card server, electronic equipment and storage medium
CN110996372B (en) Message routing method, device and system and electronic equipment
CN105071965A (en) Management system of network equipment
CN117539916B (en) Data display method, device and storage medium
CN105429798A (en) Network configuration system for the internet of things
CN111092952A (en) Data interaction method and related product
CN111600929A (en) Transmission line detection method, route strategy generation method and proxy server
CN112714146A (en) Resource scheduling method, device, equipment and computer readable storage medium
CN108462657B (en) Method and equipment for acquiring resources and information of SDN (software defined network) of different operators
CN101448136A (en) Method for realizing video on-demand function and system thereof
CN115587860A (en) Service processing method, device, storage medium and electronic equipment
CN104022923A (en) Network interface device and system as well as network data accessing method
CN113918436A (en) Log processing method and device
CN114374614A (en) Network topology configuration method and device
CN104822140A (en) Data query method and network communication system
CN112804154A (en) Message processing method and device, electronic equipment and medium
CN110769462A (en) Network access control method and device
CN105337778A (en) Internet of Things event-driven service management system
CN109561170A (en) Address pool creation method, device, address pool management system and storage medium

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