Method for interrogating data of electric power Internet of Things equipment
By using a data bus publish/subscribe mechanism and non-relational database storage, combined with Flink and Kafka streaming processing, the problem of low data recall efficiency of power IoT devices was solved, and efficient processing of multiple data entries was achieved.
Patent Information
- Application Number
- CN202411212230.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2026-03-10
AI Technical Summary
The data retrieval process of power IoT devices is inefficient, especially when processing large amounts of multiple data, there is a lack of effective solutions. Existing technologies mainly rely on IEC104 or 61850 standards, which leads to low efficiency.
A data bus publish/subscribe mechanism is adopted. The master station publishes a call command containing the topic. The device generates response data based on the topic and replies to the data bus. The master station stores and aggregates the response data, using a non-relational database for storage and Flink and Kafka for streaming processing and aggregation.
It improves the efficiency of data retrieval for power IoT devices, is suitable for retrieval of large batches of multiple data, and achieves reliable data feedback and efficient processing.
Smart Images

Figure CN121644585A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for recalling data from power IoT devices, within the field of power system business data processing technology. Background Technology
[0002] The Internet of Things (IoT) in the power sector refers to the application of IoT in smart grids. Smart cities and smart grids both integrate IoT, AI, and big data technologies to effectively integrate infrastructure resources and power system infrastructure resources, thereby improving the informatization level of the power system, the intelligent efficiency of the distribution system, and the power supply capacity, and enhancing the utilization efficiency of existing power infrastructure. The data acquisition terminals in the power IoT are sensing layer devices that use sensing, capture, and measurement technologies such as RFID, sensors, and QR codes to collect real-time information from objects, such as electricity meters, water meters, gas meters, and various sensors. In distribution network systems, smart meters and various integrated terminals supporting IoT protocols are widely used.
[0003] One important business operation in power systems is the recall of frozen data. For example, some business data is frozen daily based on the previous day's data. The main station system needs to recall this frozen data, and if the recall fails, it needs to perform a data completion recall according to a strategy. Considering the scenarios where IoT devices are used, and according to the protocol between the IoT platform and IoT terminals, IoT devices are generally suitable for recalling single-point data and single data entries, but there is no good solution for processing batch data.
[0004] In some scenarios, it's necessary to retrieve configuration information from the station-side system. Current popular solutions primarily use IEC 104 or 61850 protocols for data transmission, but there's a lack of solutions using IoT protocols. While the master station is now supporting IoT device access in some scenarios, the amount of data transmitted according to IoT protocols is also increasing. For retrieving large volumes of multiple data entries, the current solution involves substations or devices uploading data to the master station using IEC 104 or 61850 protocols. The master station then stores the configuration in files, processes business data by data type in a database, and performs further processing on the master station. This process is relatively inefficient. Summary of the Invention
[0005] The purpose of this invention is to provide a method for recalling data from power IoT devices, so as to solve the problem of low efficiency in the current data recall process for power IoT devices.
[0006] To solve the above-mentioned technical problems, this invention provides a method for recalling data from power IoT devices, the method comprising the following steps:
[0007] 1) After receiving the call command, the master station sends the call command to the substation or device via the data bus. The sent call command contains the topic.
[0008] 2) The substation or device subscribes to the topic in the call command received through the data bus. The substation or device that subscribes to the topic will generate response data under the topic based on the information that can be reported and send the response data to the data bus.
[0009] 3) When the master station detects response data on the data bus, it stores and processes the response data on the data bus. The processing refers to aggregating the response data to achieve data recall.
[0010] Furthermore, when storing the response data on the data bus, the master station stores the response data in JSON format in a non-relational database.
[0011] Furthermore, in step 3), when aggregating the response data, the response data is aggregated according to the topic of the call command and the command ID until the determination end condition is met, and the aggregation result is stored.
[0012] Furthermore, the termination condition is either the expiration of the set time or the integrity of the recall data meets the requirements.
[0013] Furthermore, when storing the aggregation results, the request ID and device key are used as the effective composite primary key and stored in a non-relational database.
[0014] Furthermore, the method also includes verifying the integrity of the recall data.
[0015] Furthermore, integrity verification is implemented based on the basic business model of the main site's storage.
[0016] Furthermore, the method also includes streaming the response data on the data bus and transferring the valid data after streaming to the message bus or storing it directly in a non-relational database.
[0017] Furthermore, the recall commands include service data recall commands and configuration information recall commands. The response data of the service data recall command is the device's service data, and the response data of the configuration information recall command is the device's configuration information.
[0018] The beneficial effects of this invention are as follows: As an improved invention, this invention utilizes a data bus to achieve interaction of recall commands between the master station and devices according to a publish / subscribe mechanism. A recall command containing a topic is published through the data bus, and related devices subscribe to that topic. After subscribing, the devices send response data, which is the information they can report, back to the data bus. The master station stores and aggregates the response data on the data bus. Therefore, this invention, based on a data bus, uses a publish / subscribe mechanism to send recall commands to relevant devices, and the devices respond with relevant data according to the topic. This reliably achieves data recall. Furthermore, due to the published / subscribe mechanism, multiple data responses can be achieved based on a single recall command, greatly improving recall efficiency and making it suitable for recalling large volumes of multiple data points in the power IoT field. Attached Figure Description
[0019] Figure 1 This is an overall flowchart of the data recall method for power IoT devices of the present invention;
[0020] Figure 2 This is a flowchart of the data aggregation process in the data recall method for power IoT devices of the present invention. Detailed Implementation
[0021] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0022] The recall method of this invention is mainly divided into a master station side and a device side (or a sub-station side). First, after receiving a recall command, the master station side issues a recall command to the sub-station side or device side through the data bus. The issued recall command contains a topic. Then, the sub-station side or device side generates response data under that topic based on the topic in the recall command received through the data bus, and sends the response data to the data bus. When the master station side detects response data on the data bus, it stores and processes the response data on the data bus. The processing refers to aggregating the response data to achieve data recall. The implementation flow of this method is as follows: Figure 1 As shown below, a detailed explanation will follow.
[0023] The call commands received by the master station include service data call commands and configuration information call commands. The response data for the service data call command is the device's service data, and the response data for the configuration information call command is the device's configuration information. This method can call both the device's service data and its configuration information. The following explanation uses the device's service data call process as an example. This method mainly involves the user, the master station, and the sub-station (or device) side.
[0024] When a user has a request for data recall, the user can send a recall command to the master station through the user console. After receiving the recall command, the master station publishes the command through the data bus according to the publish / subscribe mechanism. When publishing the recall command, a corresponding topic is set according to the user's needs. In this way, the device side can subscribe to the topic through the data bus. If a device terminal has subscribed to the current topic, when it receives the publication of that topic on the IoT bus, the device terminal will generate response data under the designed response topic according to the information it can report and reply to the IoT bus. After receiving the response data, the master station stores and processes the response data. In this embodiment, the data recall of IoT devices is satisfied. The data bus used is an IoT bus. Other types of data buses can also be used in other implementations.
[0025] The main station stores and processes the response data as follows: Figure 2 As shown, the main station monitors the IoT bus. When it detects response data on the IoT bus, it stores the response data in JSON format in a non-relational database to ensure the normal storage of uncertain data in the response data. The call command and response data can be bound together by the request ID (here, the request ID is the command ID, and the command ID corresponds to a unique call command). The response data stored in the non-relational database is in the format shown in the JSON below. It includes essential basic information such as user information (tenantId), product identifier (productKey) (the product key is a unique identifier for the device category, used in conjunction with the device identifier deviceKey to identify a specific device for a specific product; the device key does not uniquely identify a single device), device identifier (deviceKey), request command ID (requestId), default timeout (timeoutInSeconds), send time (sendTime), response time (replyTime), send status (sendStatus), response status (replyStatus), send topic (topic), send parameters (params), response topic (replyTopic), and response parameters (replyPub). During data interaction, the response and command are in a one-to-many relationship, meaning multiple responses correspond to one call command.
[0026]
[0027] In addition to storing the response data, the main site also needs to aggregate the response data since there are multiple response data sets under a single call command. During data aggregation, the response data is aggregated based on the topic and ID of the call command until the process is complete. The aggregated results are then compiled into the call results and provided to the business applications. The aggregation process is as follows: Figure 2 As shown. The aggregation result is stored using the request ID and device key as a valid composite primary key. This storage can be designed according to the aggregation design process or the direct needs of the business. Whether the recall data (response data) can fully represent the true situation requires a verification step, such as verifying the completeness of the recall data. The judgment condition can be a comparison with the basic business model stored on the main site side. The data processing process combines the streaming processing component of the message bus, starting streaming processing from the bus. After processing, the valid data can be transferred to the message bus or directly entered into a non-relational database. This process can be implemented using Flink in conjunction with Kafka, enabling real-time data integration and grouping aggregation. Only the content of the streaming processing needs to be controlled to achieve this business content. Flink plus Kafka is a method of first performing streaming processing and then entering the non-relational database. Flink, as an open-source streaming processing component, is very suitable as an upstream or downstream component of the message bus for data processing or batch processing. Specifically, in the integration process, timestamps can be set to combine command IDs for aggregation. After aggregation, the data is entered into the database, directly obtaining the detailed information of the command. This is also a type of aggregation, performing aggregation before entering the database and storing the aggregation result in a non-relational database.
[0028] There are two methods for determining whether the call has ended: one is to determine the end after the default time has elapsed and then tally the call results; the other is to compare the call results with the basic model on the main site, and once the comparison is complete, the call is considered to be finished, and then the call results are tallied. The default time during the call process can be customized according to different call tasks.
[0029] This invention utilizes an IoT bus to enable the interaction of call commands between the master station and devices according to a publish / subscribe mechanism. A call command containing a topic is published through the IoT bus, and the relevant devices subscribe to the topic. After subscribing, the devices send the information they can report to the IoT bus to form response data for the topic. The master station stores and aggregates the response data on the IoT bus.
Claims
1. A method for calling and measuring data of an electric power IOT device, characterized in that, The method comprises the following steps: 1) the master station side issues a polling command to the slave station side or the device side through the data bus after receiving the polling command, and the polling command contains a topic; 2) the slave station side or the device side subscribes to the topic according to the topic in the polling command received through the data bus, and the slave station or the device subscribing to the topic generates response data under the topic from the information that can be reported and sends the response data to the data bus; 3) the master station side stores and processes the response data on the data bus when detecting that there is response data on the data bus, and the processing refers to aggregating the response data to realize polling of data. 2.The method of claim 1, wherein, When the master station side stores the response data on the data bus, the response data is stored in a non-relational database in a JSON format. 3.The method of claim 1, wherein, When aggregating the response data, the step 3) aggregates the response data according to the topic and the ID of the polling command until a determination end condition is met, and stores the aggregation result. 4.The method of claim 3, wherein, The determination end condition is that a set time is exhausted or the integrity of the polling data meets the requirement.
5. The method of claim 3, wherein the method further comprises: When storing the aggregation result, a request ID and a device key are used as an effective joint primary key to be stored in the non-relational database. 6.The method of claim 1, wherein, The method further comprises verifying the integrity of the polling data.
7. The power IoT device data polling method of claim 6, wherein, The integrity verification is realized according to a basic service model stored by the master station side. 8.The method of claim 1, wherein, The method further comprises stream processing the response data on the data bus, and transferring the effective data after the stream processing to a message bus or directly storing the effective data in a non-relational database. 9.The method of claim 1, wherein, The polling command comprises a business data polling command and a configuration information polling command, the response data of the business data polling command is business data of the device, and the response data of the configuration information polling command is device configuration information.