Industrial energy data acquisition system based on dual-computer hot standby data gateway
Through the dual-machine hot standby data gateway system, the priority preemption time slice rotation scheduling and protocol conversion technology is used to solve the problems of low efficiency and limitations of industrial energy data acquisition in the existing technology, and efficient and reliable data acquisition is achieved and transmission ensures system continuity and data integrity.
Patent Information
- Application Number
- CN202411281255.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Due to the limited interface resources of the microcontroller core and the large size, high power consumption and poor anti-interference performance of the industrial control machine, it is difficult to effectively collect data from industrial production equipment of diverse communication protocols and inconsistent manufacturer protocols, resulting in data acquisition. Inefficient and highly restrictive.
Adopt a data gateway system based on dual-machine hot standby, including data acquisition module, multi-task protocol conversion module, data upload module and data storage module. Through priority preemption of time slice rotation scheduling and protocol conversion technology, efficient collection of industrial energy data can be achieved. and transmit, and perform real-time data synchronization and backup through dual-machine hot standby model.
It improves energy data acquisition efficiency, avoids communication barriers that are incompatible with protocols, ensures system continuity and data integrity, and reduces the risk of single-point data failure.
Smart Images

Figure CN119182652A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data collection technology, and specifically relates to an industrial energy data collection system based on a dual-machine hot standby energy data gateway. Background Art
[0002] Most of the industrial energy is consumed in the production process. Collecting industrial energy data can better analyze the weak points of energy utilization, thereby optimizing the efficiency of industrial energy utilization. However, due to the diversity of communication protocols of industrial production equipment and the inconsistency of manufacturer protocols and communication interfaces, it is difficult to collect industrial energy data.
[0003] Although traditional gateways have achieved data collection, analysis and processing, they still have problems such as small data processing volume, low processing efficiency, and single processing structure. Currently, the commonly used industrial data acquisition gateways are mainly ordinary gateways with single-chip microcomputers as the core and industrial computers with industrial control boards and Windows systems. Ordinary gateways with single-chip microcomputers as the core have few interface resources, and the main problems are single data collection methods and insufficient data storage and transmission capabilities. Although industrial computers have sufficient performance, they are large in size, high in power consumption, and poor in anti-interference performance. These data gateways still have limitations when collecting data from industrial production equipment with diverse communication protocols and inconsistent manufacturer protocols and communication interfaces. Summary of the invention
[0004] In order to solve the above problems existing in the prior art, the present invention provides an industrial energy data acquisition system based on a dual-machine hot standby data gateway.
[0005] The purpose of the present invention can be achieved through the following technical solutions:
[0006] An industrial energy data acquisition system based on a dual-machine hot standby data gateway, comprising: a data acquisition module, a multi-task protocol conversion module, a data upload module, and a data storage module;
[0007] The data acquisition module is used to acquire industrial equipment energy data, obtain industrial energy data through data aggregation based on the industrial equipment energy data, and construct an industrial energy data set based on the industrial energy data;
[0008] The multi-task protocol conversion module is used to obtain industrial energy protocol conversion data according to the industrial energy data set through a multi-task protocol conversion model;
[0009] The data upload module is used to upload the industrial energy protocol conversion data to the cloud platform through a dual-machine hot standby model;
[0010] The data storage module is used to store and visualize the industrial energy protocol conversion data on the client through Ethernet.
[0011] Preferably, obtaining industrial energy protocol conversion data through a multi-task protocol conversion model according to the industrial energy data set specifically includes:
[0012] According to the industrial energy data, the industrial energy protocol parsing task is obtained by parsing the industrial energy data through the DL / T698.45 protocol;
[0013] The industrial energy protocol parsing task is split to obtain industrial energy protocol parsing subtasks, wherein the industrial energy protocol parsing subtask carries an industrial energy protocol parsing subtask status tag, and the industrial energy protocol parsing subtask status tag includes an industrial energy protocol parsing subtask waiting state tag and an industrial energy protocol parsing subtask ready state tag;
[0014] Based on the industrial UCOSIII operating system, the industrial energy protocol parsing subtask is scheduled by using priority preemptive time slice round-robin scheduling to obtain the industrial energy parallel task, and the industrial UCOSIII operating system is the UCOSIII operating system transplanted to the dual-machine hot standby data gateway chip;
[0015] Industrial energy protocol conversion data is obtained through protocol conversion according to the industrial energy parallel task, and the industrial energy protocol conversion data is a data protocol in HTTP protocol JSON data format.
[0016] Preferably, the priority preemption time slice round-robin scheduling rule is:
[0017] According to the industrial energy protocol parsing subtask, an industrial energy priority task is obtained by defining a priority. The industrial energy priority task carries a task priority tag, and the task priority tag includes a task high priority tag and a task low priority tag. The industrial energy priority task is scheduled according to the state priority judgment based on the priority tag.
[0018] Preferably, the specific steps of determining the status priority are:
[0019] Determine whether the industrial energy protocol parsing subtask status tag is the industrial energy protocol parsing subtask ready status tag;
[0020] If not, then repeatedly determining whether the industrial energy protocol parsing subtask status tag is the industrial energy protocol parsing subtask ready status tag;
[0021] If yes, then determine the task priority tag, and when the task priority tag is the task high priority tag, obtain CPU resources to immediately execute the industrial energy protocol parsing subtask;
[0022] When the task priority tag is the task low priority tag, waiting for the industrial energy protocol parsing subtask to be executed;
[0023] When the task priority labels are the same, the time slice length is set for the industrial energy priority task through the time slice round-robin scheduling mechanism to obtain the industrial energy priority task execution order, and the industrial energy protocol parsing subtask is executed according to the industrial energy priority task execution order.
[0024] Preferably, uploading the industrial energy protocol conversion data to the cloud platform through the dual-machine hot standby model specifically includes determining whether the dual-machine hot standby data gateway has established a connection with the cloud platform through a heartbeat mechanism. If so, uploading the industrial energy protocol conversion data to the cloud platform through the dual-machine hot standby model. The dual-machine hot standby model is a model for real-time data synchronization of the data of the main server and the data of the backup server.
[0025] Preferably, the heartbeat mechanism includes sending a heartbeat packet to the cloud platform according to the dual-machine hot standby data gateway, and the heartbeat packet is an empty packet with only a header.
[0026] Preferably, uploading the data converted according to the industrial energy protocol to the cloud platform through the dual-machine hot standby model specifically includes:
[0027] Uploading the industrial energy protocol conversion data to the cloud platform through the main server, determining whether the industrial energy protocol conversion data fails to be uploaded, and if the industrial energy protocol conversion data fails to be uploaded, re-uploading the industrial energy protocol conversion data to the cloud platform through a retransmission mechanism, and the industrial energy protocol conversion data carries an upload failure label;
[0028] Determine whether the industrial energy protocol conversion data carries the number of upload failure tags. When the number of upload failure tags is greater than or equal to 3, upload the industrial energy protocol conversion data to the cloud platform through the backup server.
[0029] Preferably, transmitting the industrial energy protocol conversion data to the client via Ethernet specifically includes visualizing the industrial energy protocol conversion data via Visual Studio and storing the industrial energy protocol conversion data via a server.
[0030] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the industrial energy data acquisition system based on a dual-machine hot standby data gateway is implemented.
[0031] A storage medium containing computer executable instructions, which are used to perform the above-mentioned industrial energy data collection based on dual-machine hot standby data gateway when executed by a computer processor.
[0032] The beneficial effects of the system of the present invention are:
[0033] (1) The task priority is defined by the priority preemption time slice round-robin scheduling method to obtain the execution order of the industrial energy priority tasks. The timely response of key tasks is ensured by priority preemption. At the same time, the CPU resources are fairly allocated among tasks of the same priority by using time slice round-robin scheduling, so that multiple tasks can be executed concurrently, thereby improving the efficiency of energy data collection.
[0034] (2) Through protocol conversion technology, devices from different manufacturers can communicate directly through protocol converters, avoiding communication barriers caused by protocol incompatibility and improving the limitations of traditional gateways in collecting data from industrial production equipment with diverse communication protocols;
[0035] (3) Through dual-machine hot standby technology, real-time data synchronization is performed between the primary server and the backup server. When the primary server fails or encounters unforeseen problems, the backup server can take over immediately to ensure system continuity and data integrity;
[0036] (4) By uploading the industrial energy protocol conversion data to the cloud platform and the local client, double backup of the industrial energy protocol conversion data is achieved, avoiding the risk of single point failure of data and improving data integrity and security. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0038] Figure 1 The present invention is a structural schematic diagram of an industrial energy consumption data acquisition system based on a dual-machine hot standby data gateway. DETAILED DESCRIPTION
[0039] The example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein: on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed to those skilled in the art. In addition, the described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure. The blocks shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices. The flowcharts shown in the accompanying drawings are only exemplary illustrations and do not necessarily include all the content and operations / steps, nor do they necessarily have to be executed in the order described. For example, some operations / steps may be decomposed, while some operations / steps may be combined or partially combined, so the actual execution order may change according to actual circumstances.
[0040] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.
[0041] See also Figure 1 , an industrial energy data acquisition system based on a dual-machine hot standby data gateway, comprising: a data acquisition module, a multi-task protocol conversion module, a data upload module, and a data storage module;
[0042] The data acquisition module is used to acquire industrial equipment energy data, obtain industrial energy data through data aggregation based on the industrial equipment energy data, and construct an industrial energy data set based on the industrial energy data;
[0043] The multi-task protocol conversion module is used to obtain industrial energy protocol conversion data according to the industrial energy data set through the multi-task protocol conversion model;
[0044] The data upload module is used to upload the industrial energy protocol conversion data to the cloud platform through a dual-machine hot standby model;
[0045] The data storage module is used to store and visualize the industrial energy protocol conversion data on the client through Ethernet.
[0046] In this embodiment, obtaining industrial energy protocol conversion data through a multi-task protocol conversion model according to the industrial energy data set specifically includes:
[0047] According to the industrial energy data, the industrial energy protocol parsing task is obtained by parsing the industrial energy data through the DL / T698.45 protocol;
[0048] The industrial energy protocol parsing task is split to obtain industrial energy protocol parsing subtasks; the industrial energy protocol parsing subtask carries an industrial energy protocol parsing subtask status tag, and the industrial energy protocol parsing subtask status tag includes an industrial energy protocol parsing subtask waiting state tag and an industrial energy protocol parsing subtask ready state tag;
[0049] Based on the industrial UCOSIII operating system, the industrial energy protocol parsing subtask is scheduled by using priority preemptive time slice round-robin scheduling to obtain an industrial energy parallel task;
[0050] According to the industrial energy parallel task, industrial energy protocol conversion data is obtained through protocol conversion, and the industrial energy protocol conversion data is a data protocol in HTTP protocol JSON data format;
[0051] Specifically, the request data frame DL / T 698.45 is a power information collection data transmission protocol;
[0052] Specifically, the industrial UCOSIII operating system is a UCOSIII operating system transplanted to a dual-machine hot standby data gateway chip;
[0053] In this embodiment, the industrial energy protocol parsing subtask is scheduled to obtain the industrial energy parallel task by using the priority preemption time slice round-robin scheduling according to the industrial UCOSIII operating system. The priority preemption time slice round-robin scheduling rule is:
[0054] According to the industrial energy protocol parsing subtask, an industrial energy priority task is obtained by defining a priority. The industrial energy priority task carries a task priority tag, and the task priority tag includes a task high priority tag and a task low priority tag. The industrial energy priority task is scheduled according to the state priority judgment based on the priority tag.
[0055] The specific steps of determining the status priority are as follows:
[0056] Determine whether the industrial energy protocol parsing subtask status tag is the industrial energy protocol parsing subtask ready status tag;
[0057] If not, then repeatedly determining whether the industrial energy protocol parsing subtask status tag is the industrial energy protocol parsing subtask ready status tag;
[0058] If yes, then determine the task priority tag, and when the task priority tag is the task high priority tag, obtain CPU resources to immediately execute the industrial energy protocol parsing subtask;
[0059] When the task priority tag is the task low priority tag, wait for the execution of the industrial energy protocol parsing subtask; after the high priority task is executed, execute the low priority task, the high priority task is the industrial energy protocol parsing subtask whose task priority tag is the task high priority tag, and the low priority task is the industrial energy protocol parsing subtask whose task priority tag is the task low priority tag;
[0060] When the task priority labels are the same, the time slice length is set for the industrial energy priority task through the time slice round-robin scheduling mechanism to obtain the industrial energy priority task execution order, and the industrial energy protocol parsing subtask is executed according to the industrial energy priority task execution order.
[0061] In this embodiment, uploading the industrial energy protocol conversion data to the cloud platform through the dual-machine hot standby model specifically includes determining whether the dual-machine hot standby data gateway is connected to the cloud platform through a heartbeat mechanism, and if so, uploading the industrial energy protocol conversion data to the cloud platform through the dual-machine hot standby model;
[0062] Specifically, the dual-machine hot standby model is a model for real-time data synchronization between the data of the primary server and the data of the backup server;
[0063] Specifically, the heartbeat mechanism includes sending a heartbeat packet to the cloud platform according to the dual-machine hot standby data gateway, and the heartbeat packet is an empty packet with only a header.
[0064] In this embodiment, uploading the industrial energy protocol conversion data to the cloud platform through the dual-machine hot standby model specifically includes:
[0065] Upload the industrial energy protocol conversion data to the cloud platform through the main server, and determine whether the industrial energy protocol conversion data fails to be uploaded. If the industrial energy protocol conversion data fails to be uploaded, then re-upload the industrial energy protocol conversion data to the cloud platform through a retransmission mechanism, and the industrial energy protocol conversion data carries an upload failure label;
[0066] Determine whether the industrial energy protocol conversion data carries the number of upload failure tags. When the number of upload failure tags is greater than or equal to 3, upload the industrial energy protocol conversion data to the cloud platform through the backup server.
[0067] In this embodiment, transmitting the industrial energy protocol conversion data to the client via Ethernet specifically includes realizing visualization of energy waveforms through Visual Studio, storing the industrial energy protocol conversion data through a server, and realizing the collection of industrial energy data.
[0068] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.
[0069] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0070] The program code included on the computer readable medium can be transmitted with any appropriate medium, including but not limited to wireless, electric wire, optical cable, RF, etc., or any suitable combination of the above. The computer program code for performing the operation of the present invention can be written in one or more programming languages or their combinations, and the programming language includes object-oriented programming languages-such as Java, Smalltalk, C++, and also includes conventional procedural programming languages-such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0071] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. An industrial energy data acquisition system based on a dual-machine hot standby data gateway, comprising a data acquisition module, a multi-task protocol conversion module, a data upload module, and a data storage module, characterized in that: The data acquisition module is used to acquire industrial equipment energy data, obtain industrial energy data through data aggregation based on the industrial equipment energy data, and construct an industrial energy data set based on the industrial energy data; The multi-task protocol conversion module is used to obtain industrial energy protocol conversion data according to the industrial energy data set through a multi-task protocol conversion model; The data upload module is used to upload the industrial energy protocol conversion data to the cloud platform through a dual-machine hot standby model; The data storage module is used to store and visualize the industrial energy protocol conversion data on the client through Ethernet.
2. The industrial energy data acquisition system based on dual-machine hot standby data gateway according to claim 1 is characterized in that: The obtaining of industrial energy protocol conversion data through a multi-task protocol conversion model according to the industrial energy data set specifically includes: According to the industrial energy data, the industrial energy protocol parsing task is obtained by parsing the industrial energy data through the DL / T698.45 protocol; The industrial energy protocol parsing task is split to obtain industrial energy protocol parsing subtasks, wherein the industrial energy protocol parsing subtask carries an industrial energy protocol parsing subtask status tag, and the industrial energy protocol parsing subtask status tag includes an industrial energy protocol parsing subtask waiting state tag and an industrial energy protocol parsing subtask ready state tag; Based on the industrial UCOSIII operating system, the industrial energy protocol parsing subtask is scheduled by using priority preemptive time slice round-robin scheduling to obtain the industrial energy parallel task, and the industrial UCOSIII operating system is the UCOSIII operating system transplanted to the dual-machine hot standby data gateway chip; Industrial energy protocol conversion data is obtained through protocol conversion according to the industrial energy parallel task, and the industrial energy protocol conversion data is a data protocol in HTTP protocol JSON data format.
3. The industrial energy data acquisition system based on dual-machine hot standby data gateway according to claim 2 is characterized in that: The priority preemption time slice round-robin scheduling rule is: According to the industrial energy protocol parsing subtask, an industrial energy priority task is obtained by defining a priority. The industrial energy priority task carries a task priority tag, and the task priority tag includes a task high priority tag and a task low priority tag. The industrial energy priority task is scheduled according to the state priority judgment based on the priority tag.
4. The industrial energy data acquisition system based on dual-machine hot standby data gateway according to claim 3 is characterized in that: The specific steps of determining the status priority are as follows: Determine whether the industrial energy protocol parsing subtask status tag is the industrial energy protocol parsing subtask ready status tag; If not, then repeatedly determining whether the industrial energy protocol parsing subtask status tag is the industrial energy protocol parsing subtask ready status tag; If yes, then determine the task priority tag, and when the task priority tag is the task high priority tag, obtain CPU resources to immediately execute the industrial energy protocol parsing subtask; When the task priority tag is the task low priority tag, waiting for the industrial energy protocol parsing subtask to be executed; When the task priority labels are the same, the time slice length is set for the industrial energy priority task through the time slice round-robin scheduling mechanism to obtain the industrial energy priority task execution order, and the industrial energy protocol parsing subtask is executed according to the industrial energy priority task execution order.
5. The industrial energy data acquisition system based on dual-machine hot standby data gateway according to claim 1 is characterized in that: Uploading the industrial energy protocol conversion data to the cloud platform through the dual-machine hot standby model specifically includes determining whether the dual-machine hot standby data gateway has established a connection with the cloud platform through a heartbeat mechanism. If so, uploading the industrial energy protocol conversion data to the cloud platform through the dual-machine hot standby model. The dual-machine hot standby model is a model for real-time data synchronization of the data of the main server and the data of the backup server.
6. The industrial energy data acquisition system based on dual-machine hot standby data gateway according to claim 5 is characterized in that: The heartbeat mechanism includes sending a heartbeat packet to the cloud platform according to the dual-machine hot standby data gateway, and the heartbeat packet is an empty packet with only a header.
7. The industrial energy data acquisition system based on dual-machine hot standby data gateway according to claim 5 is characterized in that: The data converted according to the industrial energy protocol is uploaded to the cloud platform through the dual-machine hot standby model, which specifically includes: Uploading the industrial energy protocol conversion data to the cloud platform through the main server, determining whether the industrial energy protocol conversion data fails to be uploaded, and if the industrial energy protocol conversion data fails to be uploaded, re-uploading the industrial energy protocol conversion data to the cloud platform through a retransmission mechanism, and the industrial energy protocol conversion data carries an upload failure label; Determine whether the industrial energy protocol conversion data carries the number of upload failure tags. When the number of upload failure tags is greater than or equal to 3, upload the industrial energy protocol conversion data to the cloud platform through the backup server.
8. The industrial energy data acquisition system based on dual-machine hot standby data gateway according to claim 1 is characterized in that: Transmitting the industrial energy protocol conversion data to a client via Ethernet specifically includes visualizing the industrial energy protocol conversion data via Visual Studio and storing the industrial energy protocol conversion data via a server.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the industrial energy data acquisition system based on the dual-machine hot standby data gateway as described in any one of claims 1-8 is implemented.
10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the industrial energy data acquisition system based on the dual-machine hot standby data gateway as described in any one of claims 1-8 when executed by a computer processor.
Citation Information
Patent Citations
Data transmission method of Internet of Things (IOT) gateway, first gateway, and double-unit hot standby system
CN108933692A
Energy gateway supporting multiple protocols
CN109274587A
Electric energy internet data processing method and system
CN115550151A
Energy data management method and system based on block chain gateway
CN116915810A
Integrated mobile gateway device used in wireless communication network
US20050094629A1
