Power data acquisition system

By setting up a power data acquisition gateway and a Modbus communication network in the power data server and sending attribute sets in segments, the problem of data volume limitation of the Modbus communication protocol is solved, enabling efficient and accurate acquisition and storage of power data, and improving the system's processing speed and data consistency.

CN115622238BActive Publication Date: 2026-05-05启东沃太新能源有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
启东沃太新能源有限公司
Filing Date
2022-10-09
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

The existing Modbus communication protocol has a limitation on the amount of data that can be requested at one time in power data acquisition, which leads to power data being acquired at different times, affecting the accuracy and consistency of the data.

Method used

By setting up a power data acquisition gateway in the power data server, the attribute set is sent in segments using the Modbus communication network to generate Modbus data frames, and the data acquisition is completed within a preset time. The data is stored in conjunction with the REDIS database and a caching device to ensure the synchronization and integrity of the data.

Benefits of technology

It enables the simultaneous acquisition of complete power system data in a short period of time, improving the accuracy and consistency of data acquisition and reducing processing latency and server load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115622238B_ABST
    Figure CN115622238B_ABST
Patent Text Reader

Abstract

This invention provides a power data acquisition system, comprising: multiple power systems, a power data server, and a Modbus communication network. Each power system has a corresponding power data acquisition gateway. The power data server stores several attributes corresponding to each power data acquisition gateway. Within a preset time period, the power data server sends these attributes to the power data acquisition gateway via multiple Modbus data frames. Upon receiving the Modbus data frames, the power data acquisition gateway sends the corresponding attribute values ​​back to the power data server. It is understood that since the multiple Modbus data frames are sent within the preset time, the power data acquisition gateway will also collect all the power data in a very short time. Therefore, it can be considered that the power data acquisition gateway collects the complete power data "simultaneously."
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power technology, and in particular to a power data acquisition system. Background Technology

[0002] In the operation of power systems (such as photovoltaics, energy storage, charging piles, and data centers), obtaining power data (such as current, voltage, temperature, and power) is highly valuable for the maintenance, monitoring, and future upgrades of the power system. Therefore, obtaining real-time power data from the power system (i.e., sending a command to the power system at preset intervals, and the power system acquiring the power data at the same time upon receiving the command, i.e., acquiring the current, voltage, temperature, and power at the same time, and then sending the power data out) has become a necessity.

[0003] Currently, the common approach is to set up multiple power data acquisition gateways in the power system and a power data server in the control center. The power data server and the multiple power data acquisition gateways can communicate with each other via the network. The data communication is based on the Modbus communication protocol. That is, the aforementioned data acquisition command is sent to the power data acquisition gateway using the Modbus communication protocol, and then the power data acquisition gateway returns the acquired power data using the Modbus communication protocol.

[0004] Due to the limitations of the Modbus protocol, only 124 registers of data can be requested at a time. If the limit is exceeded, an error status code will be returned. Since the amount of power data is usually quite large, the data acquisition command needs to be sent in segments. This may result in the acquired power data not being received at the same time or having large differences between time points, thus affecting subsequent use. Summary of the Invention

[0005] The purpose of this invention is to provide a power data acquisition system.

[0006] To achieve one of the aforementioned objectives, one embodiment of the present invention provides a power data acquisition system, comprising: multiple power systems, a power data server, and a Modbus communication network. Each power system has a corresponding power data acquisition gateway. The power data server stores a first attribute set corresponding to each power data acquisition gateway, the first attribute set containing several attributes. Each power data acquisition gateway is assigned a unique identifier. The power data server and the multiple power data acquisition gateways are communicatively connected to the Modbus communication network. The power data server continuously executes a first operation until a preset condition is met. The first operation specifically includes: sequentially executing a second operation on the multiple power data acquisition gateways. The second operation specifically includes: acquiring the first attribute set corresponding to the power data acquisition gateway, dividing the first attribute set into several second attribute sets, each second attribute set containing several attributes, arbitrarily... The intersection of two second attribute sets is empty, and the union of the plurality of second attribute sets is equal to the first attribute set. A corresponding first Modbus data frame is created for each second attribute set. The first Modbus data frame contains all attributes of the corresponding second attribute set. Several first Modbus data frames are sent to the power data acquisition gateway within a first preset time. The power data acquisition gateway is used to: when receiving a first Modbus data frame, obtain several attributes from the first Modbus data frame, obtain the attribute value corresponding to each attribute, generate a second Modbus data frame containing each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway, and send the second Modbus data frame to the power data server. The first operation also includes: when the second Modbus data frame is received at time Time1, storing the second Modbus data frame and the corresponding time Time1.

[0007] As a further improvement of one embodiment of the present invention, the first operation specifically includes: performing a second operation on a plurality of power data acquisition gateways in sequence, and then waiting for a second preset time.

[0008] As a further improvement of one embodiment of the present invention, the second preset time is 5ms.

[0009] As a further improvement of one embodiment of the present invention, the first operation further includes: after performing the second operation on all power data acquisition gateways, waiting for a third preset time; then grouping the received multiple second Modbus data frames, wherein the identifiers of the power data acquisition gateways in each group of second Modbus data frames are all the same, and the absolute value of the difference between the times Time1 corresponding to the second Modbus data frames in each group is less than a preset threshold; performing a third operation on each group: obtaining each attribute, the attribute value corresponding to each attribute, the identifier of the power data acquisition gateway, and the time Time2 generated based on all times Time1 from all second Modbus data frames, and storing the time Time2, each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway as a record.

[0010] As a further improvement of one embodiment of the present invention, it also includes: a database; the "storing the time Time2, each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway as a record" specifically includes: storing the time Time2, each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway as a record in the database.

[0011] As a further improvement to one embodiment of the present invention, the database is a REDIS database.

[0012] As a further improvement of one embodiment of the present invention, the "time Time2 generated based on all times Time1" specifically includes: time Time2 is the average value of all times Time1.

[0013] As a further improvement of one embodiment of the present invention, the number of attributes in each second attribute set is less than or equal to 124.

[0014] As a further improvement of one embodiment of the present invention, a cache device is provided on the power data server; the "storing the second Modbus data frame and the corresponding time Time1" specifically includes: storing the second Modbus data frame and the corresponding time Time1 in the cache device.

[0015] As a further improvement of one embodiment of the present invention, the cache device is memory.

[0016] Compared to existing technologies, the technical advantages of this invention are as follows: This invention provides a power data acquisition system, comprising: multiple power systems, a power data server, and a Modbus communication network. Each power system has a corresponding power data acquisition gateway. The power data server stores several attributes corresponding to each power data acquisition gateway. Within a preset time period, the power data server sends these attributes to the power data acquisition gateway via multiple Modbus data frames. Upon receiving the Modbus data frames, the power data acquisition gateway sends the corresponding attribute values ​​back to the power data server. It is understood that since several Modbus data frames are sent within the preset time, the power data acquisition gateway will also collect all the power data in a very short time. Therefore, it can be considered that the power data acquisition gateway collects the complete power data "simultaneously." Attached Figure Description

[0017] Figure 1 This is a structural diagram of the power data acquisition system in an embodiment of the present invention. Detailed Implementation

[0018] The present invention will now be described in detail with reference to the embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the scope of protection of the present invention.

[0019] The terms used herein, such as “above,” “over,” “below,” and “under,” indicating spatial relative position, are for illustrative purposes to describe the relationship of one unit or feature relative to another unit or feature as shown in the accompanying drawings. These terms may be intended to include different orientations of the device in use or operation other than those shown in the figures. For example, if the device in the figures is flipped, a unit described as being “below” or “under” another unit or feature would be “above” that unit or feature. Therefore, the exemplary term “below” can encompass both above and below orientations. The device may be oriented in other ways (rotated 90 degrees or otherwise) and the spatially related descriptive terms used herein will be interpreted accordingly.

[0020] This invention provides a power data acquisition system, such as... Figure 1 As shown, it includes:

[0021] Multiple power systems 1, power data servers 2, and Modbus communication network 4 are provided. In each power system 1, a power data acquisition gateway 11 is set up. The power data server 2 stores a first attribute set corresponding to each power data acquisition gateway 11. The first attribute set contains several attributes. Each power data acquisition gateway 11 is set with a unique identifier. The power data server 2 and the multiple power data acquisition gateways 11 are all communicatively connected to the Modbus communication network 4.

[0022] Here, the power data acquisition gateway 11 is equipped with multiple sensors that can detect power data of the power system 1 (e.g., multiple attribute values ​​of photovoltaics, multiple attribute values ​​of energy storage batteries, multiple attribute values ​​of charging piles, and multiple attribute values ​​of the computer room, etc.). The power data acquisition gateway 11 can also communicate with the power data server 2 based on the Modbus protocol, that is, the sensor can send the detected attribute values ​​to the power data server 2 through the Modbus protocol.

[0023] Here, in order to identify the power data acquisition gateway 11, each power data acquisition gateway 11 is assigned an identifier. For example, the address in the Modbus protocol is used to identify the power data acquisition gateway 11. In practice, each power system is assigned a name, which is used to identify the power data acquisition gateway 11.

[0024] Here, the basic elements of power data can be understood as a data pair: attribute --> attribute value. Therefore, for each power data acquisition gateway 11, the power data server 2 needs to store its corresponding multiple attributes. Thus, when it is necessary to obtain the power data of the power system corresponding to the power data acquisition gateway 11, it is only necessary to send several attributes (i.e., the first attribute set) in the first attribute set corresponding to the power data acquisition gateway 11 to the power data acquisition gateway 11. The power data acquisition gateway 11 will then obtain the attribute value corresponding to each attribute and return it to the power data server 2.

[0025] Modbus is a serial communication protocol that was published by Schneider Electric in 1979 for communication using programmable logic controllers.

[0026] The power data server 2 is used to continuously perform the first operation until the preset conditions are met. Here, when the power data server 2 is started, it will start to continuously perform the first operation, and then the preset conditions will be met when the power data server 2 is shut down.

[0027] The first operation specifically includes: sequentially performing the second operation on multiple power data acquisition gateways 11; the second operation specifically includes: obtaining the first attribute set corresponding to the power data acquisition gateway, dividing the first attribute set into several second attribute sets, each second attribute set containing several attributes, the intersection of any two second attribute sets being empty, the union of the several second attribute sets being equal to the first attribute set, creating a corresponding first Modbus data frame for each second attribute set, the first Modbus data frame containing all attributes of the corresponding second attribute set, and sending several first Modbus data frames to the power data acquisition gateway 11 within a first preset time. Here, when actually performing the first operation, the identifiers of multiple power data acquisition gateways 11 can be sorted to obtain a queue. The power data acquisition gateway 11 corresponding to the identifier at the head of the queue is obtained, and then the second operation is performed on that power data acquisition gateway 11. Then, the power data acquisition gateway 11 corresponding to the next identifier is obtained from the queue, and the second operation is performed on that power data acquisition gateway 11. This continues until the power data acquisition gateway 11 corresponding to the identifier at the tail of the queue is obtained, and the second operation is performed on that power data acquisition gateway 11.

[0028] In practice, the number of attributes in the first attribute set is usually very large. However, when sending a Modbus data frame, only 124 registers of data can be requested at once, which results in the need to send multiple Modbus data frames.

[0029] The power data acquisition gateway 11 is used to: when receiving a first Modbus data frame, obtain several attributes from the first Modbus data frame, obtain the attribute value corresponding to each attribute, generate a second Modbus data frame containing each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway 11, and send the second Modbus data frame to the power data server 2; when the power data acquisition gateway 11 receives the first Modbus data frame, obtain several attributes from the first Modbus data frame, then obtain the attribute value corresponding to the attribute from the power system 1, then generate several data pairs "attribute --> attribute value", and then send the several data pairs "attribute --> attribute value" and the identifier of the power data acquisition gateway 11 to the power data server 2;

[0030] The first operation also includes: when the second Modbus data frame is received at time 1, storing the second Modbus data frame and the corresponding time 1. In practice, the power data server 2 can be configured with two processes: one to perform the first task—to sequentially perform the second operation on multiple power data acquisition gateways 11; and the second process to perform the second task—to store the second Modbus data frame and the corresponding time 1 when it is received at time 1. In practice, the power data server 2 sends several first Modbus data frames to a power data acquisition gateway 11, and the Modbus communication network 4 takes time to transmit the data. Then, the power data acquisition gateway 11 generates the second Modbus data frame, which also takes time. Finally, the power data acquisition gateway 11 sends the second Modbus data frame to itself, which also takes time. Therefore, using a single process to perform these two tasks will cause that process to frequently be in a waiting state, which will greatly reduce the processing speed. Since the two processes are parallel, the processing speed can be greatly improved.

[0031] In this power data acquisition system, the power data server 2 will send several first Modbus data frames to the power data acquisition gateway 11 within a first preset time. When the power data acquisition gateway 11 receives the first Modbus data frames, it will acquire the power data. It can be understood that since several first Modbus data frames are sent within the first preset time, the power data acquisition gateway 11 will also collect all the power data in a very short time. Therefore, it can be considered that the power data acquisition gateway 11 collects the complete power data "simultaneously".

[0032] In this embodiment, the first operation specifically includes: performing the second operation on multiple power data acquisition gateways 11 in sequence, and then waiting for a second preset time.

[0033] In this embodiment, the second preset time is 5ms.

[0034] In this embodiment, the first operation further includes: after performing the second operation on all power data acquisition gateways 11, waiting for a third preset time; here, after performing the second operation on all power data acquisition gateways 11, it is necessary to wait for a period of time, during which time the second Modbus data frame sent by all power data acquisition gateways 11 can be received.

[0035] Next, the received multiple second Modbus data frames are grouped, with the identifier of the power data acquisition gateway 11 in each group being the same, and the absolute value of the difference between the corresponding times Time1 of the second Modbus data frames in each group being less than a preset threshold; a third operation is performed on each group: each attribute, the attribute value corresponding to each attribute, the identifier of the power data acquisition gateway 11, and the time Time2 generated based on all times Time1 are obtained from all second Modbus data frames, and the time Time2, each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway 11 are stored as a record.

[0036] Here, when the absolute value of the difference between the times Time1 corresponding to the two second Modbus data frames is less than the preset threshold, it can be considered that the two second Modbus data frames were acquired at the "same" time. Therefore, the two second Modbus data frames can be stored as a record.

[0037] In this embodiment, database 3; the phrase "storing time 2, each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway 11 as a record" specifically includes: storing time 2, each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway 11 as a record in database 3.

[0038] In this embodiment, database 3 is a REDIS (Remote Dictionary Server) database. REDIS is a key-value in-memory database with fast access speed and high security. For existing power data acquisition, it can effectively distinguish business types by key. On the other hand, due to the limitation of Modbus request message register length, Redis caching can cache all message data at the same point in time in real time, reducing the computational pressure on the server side, decoupling business and data, and facilitating future system expansion.

[0039] In this embodiment, the "time Time2 generated based on all times Time1" specifically includes: time Time2 is the average value of all times Time1.

[0040] In this embodiment, the number of attributes in each second attribute set is less than or equal to 124.

[0041] In this embodiment, a caching device is provided on the power data server 2; the "storing the second Modbus data frame and the corresponding time Time1" specifically includes: storing the second Modbus data frame and the corresponding time Time1 in the caching device.

[0042] In this embodiment, the cache device is memory.

[0043] It should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

[0044] The detailed descriptions listed above are merely specific descriptions of feasible embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. All equivalent embodiments or modifications made without departing from the spirit of the present invention should be included within the scope of protection of the present invention.

Claims

1. A power data acquisition system, characterized in that, include: Multiple power systems (1), power data servers (2) and Modbus communication network (4) are provided. In each power system (1), a power data acquisition gateway (11) is set up. The power data server (2) stores a first attribute set corresponding to each power data acquisition gateway (11). The first attribute set contains several attributes. Each power data acquisition gateway (11) is set with a unique identifier. The power data server (2) and multiple power data acquisition gateways (11) are all connected to the Modbus communication network (4). The power data server (2) is used to continuously perform the first operation until the preset conditions are met; The first operation specifically includes: sequentially performing the second operation on multiple power data acquisition gateways (11); the second operation specifically includes: obtaining the first attribute set corresponding to the power data acquisition gateway, dividing the first attribute set into several second attribute sets, each second attribute set containing several attributes, the intersection of any two second attribute sets being empty, the union of the several second attribute sets being equal to the first attribute set, creating a corresponding first Modbus data frame for each second attribute set, the first Modbus data frame containing all attributes of the corresponding second attribute set, and sending several first Modbus data frames to the power data acquisition gateway (11) within a first preset time. The power data acquisition gateway (11) is used to: when receiving the first Modbus data frame, obtain several attributes from the first Modbus data frame, obtain the attribute value corresponding to each attribute, generate a second Modbus data frame containing each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway (11), and send the second Modbus data frame to the power data server (2). The first operation also includes: when the second Modbus data frame is received at time 1, storing the second Modbus data frame and the corresponding time 1.

2. The power data acquisition system according to claim 1, characterized in that, The first operation specifically includes: The second operation is performed sequentially on multiple power data acquisition gateways (11), and then a second preset time is waited.

3. The power data acquisition system according to claim 2, characterized in that: The second preset time is 5ms.

4. The power data acquisition system according to claim 2 or 3, characterized in that, The first step also includes: After performing the second operation on all power data acquisition gateways (11), wait for a third preset time; then group the received multiple second Modbus data frames, the identifiers of the power data acquisition gateways (11) in each group are the same, and the absolute value of the difference between the time Time1 corresponding to the second Modbus data frames in each group is less than a preset threshold; perform the third operation on each group: obtain each attribute, the attribute value corresponding to each attribute, the identifier of the power data acquisition gateway (11), and the time Time2 generated based on all time Time1 from all second Modbus data frames, and store the time Time2, each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway (11) as a record.

5. The power data acquisition system according to claim 4, characterized in that, Also includes: Database (3); The phrase "storing the time Time2, each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway (11) as a record" specifically includes: The time of Time2, each attribute, the attribute value corresponding to each attribute, and the identifier of the power data acquisition gateway (11) are stored as a record in the database (3).

6. The power data acquisition system according to claim 5, characterized in that: The database (3) is a REDIS database.

7. The power data acquisition system according to claim 4, characterized in that, The "time 2 generated based on all times Time1" specifically includes: Time2 is the average of all times Time1.

8. The power data acquisition system according to claim 1, characterized in that: The number of attributes in each second attribute set is less than or equal to 124.

9. The power data acquisition system according to claim 1, characterized in that, A caching device is installed on the power data server (2); The "storing the second Modbus data frame and the corresponding time Time1" specifically includes: storing the second Modbus data frame and the corresponding time Time1 in the cache device.

10. The power data acquisition system according to claim 9, characterized in that, The cache device is memory.

Citation Information

Patent Citations

  • Data management system

    CN111885164A

  • Modbus data acquisition method applied to micro-grid industry

    CN112636473A