A control method, system, medium and device of a multi-protocol micro-grid device

CN122993260APending Publication Date: 2026-10-27GUANGZHOU RUINITUO ENERGY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611101292.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0003]然而,这类方法在多设备接入时缺少统一的信息模型,导致不同协议设备的原始数据格式各异,无法形成统一的设备状态快照,进而使得控制决策无法准确生成;同时,由于缺乏按实时性需求对数据进行分级处理的调度机制,紧急状态数据与控制反馈数据在传输过程中易被常规遥测数据阻塞,进一步加剧了控制决策的延迟风险;另外,控制指令在下发后缺少闭环确认机制,无法得知设备是否真正执行了指令

Benefits of technology

[0016]与现有技术相比,本发明的一种多协议微电网设备的控制方法的有益效果如下:通过为微电网设备构建设备接入模型并对不同工业通信协议建立协议适配器,能够根据目标设备的设备接入模型确定对应的适配器,以将不同协议设备的原始数据转换为统一的信息对象,避免原始数据格式差异导致无法准确生成控制决策;同时基于预设优先级调度策略将信息对象写入分级信息流,使得紧急状态数据与控制反馈数据能够优先被调度以更新状态快照,避免被常规遥测数据阻塞,保障了控制决策的实时性和准确性;还通过反馈结果实现对设备控制的闭环确认。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122993260A_ABST
    Figure CN122993260A_ABST
Patent Text Reader

Abstract

The application discloses a kind of control method, system, medium and equipment of multi-protocol microgrid equipment, method includes: to microgrid equipment constructs equipment access model, establishes protocol adapter to industrial communication protocol;In response to target equipment generates original data, according to the equipment access model of target equipment, determine the adapter for converting original data into information object, and write information object into hierarchical information flow, update the historical information object that target equipment has cached as information object read from hierarchical information flow, update state snapshot based on information object;According to state snapshot, determine the protocol adapter corresponding to the device to be controlled, and obtain control protocol instruction based on the protocol adapter corresponding to the device to be controlled;Receive the feedback result after the device to be controlled executes control protocol instruction, determine control result according to feedback result. It can accurately and timely generate control decision, and also can close loop confirmation to equipment control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microgrid control technology, and in particular to a control method, system, medium, and device for a multi-protocol microgrid. Background Technology

[0002] Microgrid operation requires coordinated control among power generation equipment, energy storage equipment, load equipment, charging equipment, grid-connected / off-grid switching equipment, and protection equipment. The microgrid controller needs to receive field status, determine operating conditions, calculate control commands, and distribute them to devices using different industrial communication protocols within milliseconds. A common practice in existing projects is to configure separate acquisition channels for different industrial communication protocols, and then aggregate data through protocol conversion, point-to-point mapping, or host computer polling to achieve basic device data access.

[0003] However, these methods lack a unified information model when multiple devices are connected, resulting in different raw data formats for devices with different protocols, making it impossible to form a unified device status snapshot, which in turn makes it impossible to generate accurate control decisions. At the same time, due to the lack of a scheduling mechanism to process data in a hierarchical manner according to real-time requirements, emergency state data and control feedback data are easily blocked by regular telemetry data during transmission, further exacerbating the risk of delay in control decisions. In addition, there is no closed-loop confirmation mechanism after the control command is issued, so it is impossible to know whether the device has actually executed the command.

[0004] Therefore, existing control methods for multi-protocol microgrid devices suffer from the problem of failing to accurately and timely generate control decisions and lacking closed-loop confirmation of control commands. Summary of the Invention

[0005] To overcome the shortcomings of the prior art, the present invention aims to provide a control method, system, medium, and device for multi-protocol microgrid devices. This method can convert the raw data of devices with different protocols into a unified information object, and write the information object into a hierarchical information stream for differentiated scheduling through a preset priority scheduling strategy. This ensures that high real-time data participates in state snapshot updates first, thereby generating control decisions accurately and timely. It can also confirm whether the device actually executes the control command.

[0006] This invention is implemented according to the following scheme: A control method for a multi-protocol microgrid device is provided, including: Build a device access model for microgrid equipment and establish a protocol adapter for industrial communication protocols; In response to the target device generating raw data, a target adapter for converting the raw data into a target information object is determined according to the device access model of the target device. The target information object is written into a hierarchical information stream based on a preset priority scheduling strategy. The historical information object cached by the target device is updated to the target information object read from the hierarchical information stream. The status snapshot is updated based on the target information object. In response to a timed control request or a control request triggered by the state snapshot, the protocol adapter corresponding to the device to be controlled is determined according to the state snapshot, and based on the protocol adapter corresponding to the device to be controlled, a control protocol instruction to be sent to the device to be controlled is obtained. The system receives feedback results after the device under control executes the control protocol command, and determines a control result based on the feedback results to indicate whether the device under control was successfully controlled.

[0007] Optionally, a device access model is constructed for microgrid devices, including: Obtain the device type and protocol type of the microgrid equipment; Generate device identifiers for the microgrid devices; Generate point identifiers for multiple data points of the microgrid device, and configure refresh levels and quality bits for representing data status for each data point; Based on the device type, protocol type, device identifier, point identifiers of multiple data points, refresh level, and quality bit, a device access model for the microgrid device is constructed.

[0008] Optionally, the target adapter converts the raw data into a target information object, including: The original data is parsed to obtain the original point values; Based on the device access model of the target device, the original point values ​​are sequentially subjected to unit conversion, data type conversion, multiplier processing, enumeration value standardization, quality bit assignment, and timestamp binding to obtain the target information object.

[0009] Optionally, writing the target information object into a hierarchical information stream based on a preset priority scheduling strategy includes: Based on the priority and real-time requirements of the target information object, the target information stream is determined from multiple hierarchical information streams with transmission order; the multiple hierarchical information streams include real-time event stream, fast telemetry stream, control feedback stream, alarm stream, regular telemetry stream and configuration management stream in sequence. Write the target information object into the target information stream.

[0010] Optionally, updating the cached historical information object of the target device to the target information object, and updating the state snapshot based on the target information object, includes: Once the target information object is scheduled and read from the target information stream, the historical information object already cached by the target device is replaced with the target information object; The state snapshot is updated based on the target information object and the remaining information objects in the multiple hierarchical information streams. The state snapshot is used to record the latest state of all microgrid devices.

[0011] Optionally, the protocol adapter corresponding to the device to be controlled is determined based on the state snapshot, and control protocol instructions to be sent to the device to be controlled are obtained based on the protocol adapter corresponding to the device to be controlled, including: The current operating mode is determined based on the aforementioned status snapshot; Based on the current operating mode, determine the device to be controlled, the corresponding protocol adapter for the device to be controlled, and the control data; Based on the protocol adapter corresponding to the device to be controlled, the control data is converted into the control protocol command to be sent to the device to be controlled.

[0012] Optionally, based on the feedback result, a control result is determined to indicate whether the controlled device was successfully controlled, including: When the feedback time of the feedback result is within a preset time and the feedback result meets the preset error, the control result is that the device to be controlled has been successfully controlled. When the feedback time of the feedback result is not within the preset time, and / or the feedback result does not meet the preset error, the control result is that the device to be controlled has not been successfully controlled.

[0013] A control system for a multi-protocol microgrid device is also provided, and the control method for the multi-protocol microgrid device described above includes: The module is used to build device access models for microgrid devices and establish protocol adapters for industrial communication protocols; The data conversion module, in response to the raw data generated by the target device, determines the target adapter for converting the raw data into target information objects according to the device access model of the target device, writes the target information objects into a hierarchical information stream based on a preset priority scheduling strategy, updates the cached historical information objects of the target device to the target information objects read from the hierarchical information stream, and updates the status snapshot based on the target information objects. The control module is used for: In response to a timed control request or a control request triggered by the state snapshot, the protocol adapter corresponding to the device to be controlled is determined according to the state snapshot, and based on the protocol adapter corresponding to the device to be controlled, a control protocol instruction to be sent to the device to be controlled is obtained. The system receives feedback results after the device under control executes the control protocol command, and determines a control result based on the feedback results to indicate whether the device under control was successfully controlled.

[0014] A computer-readable storage medium is also provided, which is a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed, implements the control method for a multi-protocol microgrid device.

[0015] A computer device is also provided, including a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the control method of the multi-protocol microgrid device.

[0016] Compared with existing technologies, the beneficial effects of the control method for multi-protocol microgrid devices of the present invention are as follows: By constructing a device access model for the microgrid devices and establishing protocol adapters for different industrial communication protocols, the corresponding adapter can be determined according to the device access model of the target device, so as to convert the original data of devices with different protocols into a unified information object, avoiding the inability to accurately generate control decisions due to differences in the original data format; at the same time, the information object is written into the hierarchical information stream based on a preset priority scheduling strategy, so that emergency state data and control feedback data can be prioritized for scheduling to update the state snapshot, avoiding being blocked by conventional telemetry data, and ensuring the real-time performance and accuracy of control decisions; and the feedback results also realize closed-loop confirmation of device control. Attached Figure Description

[0017] Figure 1 This is a flowchart of the control method of the present invention. Detailed Implementation

[0018] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0019] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.

[0020] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. In the description of this application, it should be understood that the terms "first," "second," "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0021] See Figure 1 As shown, a control method for a multi-protocol microgrid device according to the present invention includes: S1: Construct a device access model for microgrid devices and establish a protocol adapter for industrial communication protocols; wherein, the device access model is used to describe the inherent attributes of microgrid devices. This invention establishes a device access model as a digital profile for each device to achieve standardized metadata definition in multi-protocol device management. In subsequent management, the device characteristics of microgrid devices can be automatically identified according to the device access model; the protocol adapter is used for low-level communication details such as connection maintenance, message parsing and assembly, and anomaly detection of industrial communication protocols, and does not participate in subsequent control calculations, so as to achieve isolation of protocol differences and hardware shielding in multi-protocol device management.

[0022] In one embodiment of the present invention, constructing a device access model for a microgrid device includes: obtaining the device type and protocol type of the microgrid device; generating a device identifier for the microgrid device; generating point identifiers for multiple data points of the microgrid device, configuring refresh levels and quality bits for representing data status for the multiple data points; and constructing a device access model for the microgrid device based on the device type, protocol type, device identifier, point identifiers of multiple data points, refresh levels, and quality bits.

[0023] In one embodiment of the present invention, the industrial communication protocol includes: the Modbus RTU protocol based on RS485 serial port, one of the most common protocols in microgrids, used for meters, energy storage PCS, photovoltaic inverters, temperature controllers, and PLCs; the Modbus TCP protocol, the Ethernet version of Modbus, suitable for high-speed communication within a local area network and a commonly used protocol for cloud-edge controllers; the CAN Bus protocol, commonly used for communication within battery clusters and BMS, with fast response and strong anti-interference capabilities; the CANopen protocol, a standardized CAN bus protocol, commonly used in energy storage and motor control; the Profibus protocol, commonly used in European equipment, diesel engines, PLCs, and factory equipment; the IEC 61850 protocol, a power plant-level protocol suitable for large microgrids, distribution substations, and virtual power plants; the IEC 60870-5-104 protocol, a commonly used protocol for power grid dispatching, used for accessing the State Grid, distribution network platform, or dispatch master station; the DNP3 protocol, commonly used in the North American energy industry and SCADA scenarios; and the DL / T protocol, a Chinese metering protocol. The 645 protocol is widely used in domestic projects for electricity meters and metering terminals; the SunSpec protocol is an international standard for photovoltaic inverters, usually based on Modbus; the Battery CAN Protocol is a proprietary CAN protocol of battery manufacturers, commonly used in BMS or battery cluster communication of manufacturers such as CATL, BYD, and Huawei; the OCPP 1.6 protocol is a common charging pile protocol used for charging piles to connect to cloud platforms; the OCPP 2.0.1 protocol is a new generation charging pile protocol that supports smart charging, V2G, and more comprehensive device management; the BACnet protocol is commonly used in buildings such as shopping malls and office buildings, as well as HVAC air conditioning systems; and the MQTT protocol is one of the most common protocols for cloud-edge-device remote monitoring, used for controllers to upload data to the cloud platform, receive policies, and synchronize status.

[0024] In one embodiment of the present invention, establishing a protocol adapter for an industrial communication protocol includes: When the industrial communication protocol is Modbus RTU, a protocol adapter is built for Modbus RTU to obtain a Modbus RTU adapter. The RS485 serial port connection is maintained through the Modbus RTU adapter. The Modbus RTU adapter supports station address management, function code grouping, register contiguous area merging, batch reading, write confirmation, exception code identification, and timeout retry. It is used for the access of devices such as electricity meters, energy storage PCS, photovoltaic inverters, temperature controllers, and PLCs. When the industrial communication protocol is Modbus TCP, a protocol adapter is built for Modbus TCP to obtain a Modbus TCP adapter. The Modbus TCP adapter is used to maintain Ethernet connections, TCP sessions, concurrent connection pools, batch read and write acknowledgments, and is used for high-speed data acquisition within the local area network and data interaction between cloud-edge controllers and field devices. When the industrial communication protocol is CAN Bus, CANopen, or Battery CAN Protocol, a protocol adapter is constructed for the industrial communication protocol to obtain a first general adapter. The first general adapter is used to maintain message ID, periodic frames, event frames, object dictionary, vendor-specific frames, byte parsing rules, scaling factor, and verification rules to convert high-frequency data from battery clusters, BMS, PCS, motor controllers, or diesel engine controllers. When the industrial communication protocol is Profibus, a protocol adapter is built for Profibus to obtain the Profibus adapter. The Profibus adapter is used to maintain master-slave relationships, device addresses, periodic data, diagnostic data and PLC interaction variables for access of diesel engines, PLCs, factory equipment and European manufacturer equipment. When the industrial communication protocol is IEC 61850, a protocol adapter is constructed for IEC 61850 to obtain the IEC 61850 adapter. The IEC 61850 adapter is used to maintain MMS model node mapping, dataset subscription, report reception, GOOSE publish / subscribe, SV sample value reception, control object distribution, and quality bit resolution, thereby mapping logical nodes, data objects, and data attributes to a unified point identifier. When the industrial communication protocol is IEC 60870-5-104 or DNP3, a protocol adapter is constructed for the industrial communication protocol to obtain a second general adapter. The second general adapter is used to maintain the telemetry, telesignaling, remote control, remote adjustment, event sequence recording, general call, time stamping and control confirmation processes, which are used for data interaction between the microgrid controller and the dispatch master station, distribution network platform or SCADA system. When the industrial communication protocol is DL / T 645, a protocol adapter is built for DL / T 645 to obtain the DL / T645 adapter. The DL / T 645 adapter is used to maintain the meter address, data identifier, energy, demand, frozen data, rate data and meter reading confirmation process, so as to realize the data mapping of domestic meters and metering terminals. When the industrial communication protocol is SunSpec, a protocol adapter is constructed for SunSpec to obtain the SunSpec adapter. The SunSpec adapter is used to maintain the inverter, energy storage and meter model number, model length, standard point, multiplier and status enumeration on the Modbus bearer, so as to realize the conversion of the international standard point of new energy equipment such as photovoltaic inverters. When the industrial communication protocol is OCPP 1.6 or OCPP 2.0.1, a protocol adapter is constructed for the industrial communication protocol to obtain a third general adapter. The third general adapter is used to maintain the charging pile connection status, charging session, alarm status, metering value, remote start / stop, intelligent charging power limit, charging profile, transaction status and V2G related status, so as to separate charging business data from microgrid power control data. When the industrial communication protocol is BACnet, a protocol adapter is built for BACnet to obtain a BACnet adapter; the BACnet adapter is used to maintain building and HVAC equipment objects, attributes, services, subscriptions and alarm events for access to air conditioning systems and controllable building loads in shopping malls, office buildings, commercial buildings; When the industrial communication protocol is MQTT, a protocol adapter is built for MQTT to obtain an MQTT adapter. The MQTT adapter is used to maintain cloud-edge-device topics, publish / subscribe, QoS levels, retained messages, message acknowledgments, disconnection reconnection, and data quality identifiers, which are used to upload data to the cloud platform, receive control policies, or realize the synchronization of remote monitoring status.

[0025] The process of establishing protocol adapters described in this invention is not performed only when a new device is connected. Instead, for the 15 mainstream industrial communication protocols in the microgrid field, corresponding protocol adapters are pre-built and registered as plug-ins in the adapter plug-in library of the microgrid controller's operating environment. When the industrial communication protocol corresponding to the newly connected microgrid device is one of the 15 industrial communication protocols, the corresponding protocol adapter can be directly called from the adapter plug-in library for subsequent operations. This avoids the need to temporarily develop or dynamically establish protocol adapters every time a new microgrid device is connected, thus avoiding system overhead, development complexity, and device connection delay.

[0026] In this invention, the first universal adapter, the second universal adapter, and the third universal adapter can simultaneously match at least two industrial communication protocols. For the CAN Bus protocol, CANopen protocol, and BatteryCAN Protocol applicable to the first universal adapter, all use CAN frames as the basic transmission unit. The three can share the underlying processes such as bus listening, message ID filtering, byte parsing, verification, and periodic frame processing. Different protocols can be distinguished simply by loading their respective object dictionaries or vendor-specific frame parsing rules at the upper layer. For the IEC 60870-5-104 protocol and DNP3 protocol applicable to the second universal adapter, both are oriented towards power grid dispatching data such as telemetry, remote signaling, remote control, remote adjustment, and event sequence recording. They can share the common processes such as dispatching master station interaction, timestamp processing, control confirmation, and event caching. For the OCPP 1.6 protocol and OCPP 2.0.1 protocol applicable to the third universal adapter, both are oriented towards business scenarios such as charging pile connection status, transaction status, metering values, and remote control. They can share the common processes such as charging session management, message confirmation, and power limit processing.

[0027] Based on the fact that the above-mentioned protocols share common processing links in the underlying transmission mechanism, object model, or business semantics, this invention constructs universal adapters for these three types of protocol groups. These universal adapters, while sharing the underlying connection, caching, acknowledgment, and quality identification logic, load independent parsing rules, field mapping rules, and framing rules for different protocols. Furthermore, the use of universal protocol adapters in this invention does not confuse different protocols. It can reuse common processing logic while ensuring the independence of each protocol, thereby significantly reducing code redundancy and improving the development efficiency and operational stability of protocol adapters.

[0028] In one embodiment of the present invention, the specific purpose of different protocol adapters is not determined solely by the protocol name, but rather by the communication capabilities of the matched protocol, the device's service attributes, and the control loop requirements. When establishing protocol adapters for different purposes, it is first necessary to determine the bearer method of each protocol, such as RS485, CAN, Ethernet, etc., and the message interaction method, such as request-response, publish-subscribe, event reporting, etc. Then, it is determined which type of device the protocol adapter is connected to belongs to among power generation, energy storage, charging, metering, building auxiliary, scheduling interaction, or cloud-edge synchronization. Subsequently, according to the device type and control requirements, parameters such as point mapping, unit conversion, quality bits, refresh level, control permissions, confirmation method, and readback method are configured to form adapter plug-ins for specific purposes.

[0029] Each protocol adapter is ultimately registered to the microgrid controller's operating environment as a plug-in. When a new communication protocol needs to be added, developers only need to implement functions such as connection management, parsing, framing, quality bit generation, point mapping, and unified information object conversion according to the standard interface, without making any modifications to the control calculation layer. This plug-in mechanism enables the invention to have good scalability and flexibly adapt to the continuous access of new devices and protocols in the microgrid field.

[0030] S2: In response to the target device generating raw data, determine the target adapter for converting the raw data into target information objects according to the device access model of the target device, write the target information objects into the hierarchical information stream based on the preset priority scheduling strategy, update the historical information objects cached by the target device to the target information objects read from the hierarchical information stream, and update the status snapshot based on the target information objects. In one embodiment of the present invention, in response to the target device generating raw data, a target adapter for converting the raw data into a target information object is determined according to the device access model of the target device. This includes: when the target device first connects to the microgrid and generates raw data, the microgrid controller reads the metadata recorded in the device access model of the target device, such as protocol type, physical channel, device type, point list, data direction, refresh level, and control authority, and then automatically selects an adapter instance from the adapter plugin library that matches the above-mentioned protocol stack, transmission link, and service object, thereby completing the determination and binding of the protocol adapter.

[0031] When a single microgrid device has multiple data channels such as fieldbus data, business session data, or cloud message data, this invention can bind multiple corresponding protocol adapters respectively, and associate these adapters with multiple data points of the device through device identifiers and point identifiers, thereby realizing multi-protocol parallel access for complex devices.

[0032] In one embodiment of the present invention, the target adapter converts the raw data into a target information object, including: parsing the raw data to obtain the raw point value; and according to the device access model of the target device, performing unit conversion, data type conversion, multiplier processing, enumeration value standardization, quality bit assignment, and timestamp binding on the raw point value in sequence to obtain the target information object.

[0033] This invention, through the cooperation of a device access model and a protocol adapter, can uniformly convert raw data from heterogeneous devices from different manufacturers and with different protocols into standardized information objects, thereby providing a consistent data foundation for subsequent hierarchical scheduling, status snapshot updates, and control loops, and enabling plug-and-play and efficient management of multi-protocol devices.

[0034] In one embodiment of the present invention, writing a target information object into a hierarchical information stream based on a preset priority scheduling strategy includes: determining a target information stream from multiple hierarchical information streams with a transmission order according to the priority and real-time requirements of the target information object; the multiple hierarchical information streams include a real-time event stream, a fast telemetry stream, a control feedback stream, an alarm stream, a regular telemetry stream, and a configuration management stream ordered in sequence; and writing the target information object into the target information stream.

[0035] The real-time event stream carries information objects that require immediate processing, such as GOOSE events, abnormal SV key sample values, sudden changes in switch positions, grid anomalies, protection actions, PCS fast interlocking, and BMS critical alarms. The fast telemetry stream carries information objects involved in fast control calculations, such as PCS power, battery voltage and current, SOC, inverter power, grid voltage and frequency, and key power quality indicators. The control feedback stream carries information objects related to the receipt and execution of control commands, readback values, and failure reasons. The alarm stream carries information objects related to equipment alarms, communication alarms, over-limit alarms, and abnormal operating status. The conventional telemetry stream carries information objects related to low real-time data, such as environmental quantities, general meter data, equipment temperature, cumulative power consumption, and daily statistics. The configuration management stream carries information objects related to equipment parameters, point-to-meter synchronization, protocol configuration, charging pile session configuration, and operation and maintenance data.

[0036] In one embodiment of the present invention, for multiple information objects in the same hierarchical information flow, when the information flow becomes congested, expired low-priority telemetry objects in the information flow are compressed or discarded first, and only the latest status of each data point is retained to avoid expired data blocking the queue. At the same time, the throughput, average latency, maximum latency, number of timeouts and queue depth of each protocol adapter are recorded, and the acquisition plan and resource allocation are dynamically adjusted accordingly, thereby improving the utilization efficiency and stability of the overall communication link while ensuring that high real-time data is processed first.

[0037] This invention utilizes a hierarchical information flow structure. The real-time event flow, carrying information objects that directly impact system security, should receive the communication window first. The fast telemetry flow, carrying information objects that directly participate in millisecond- or hundred-millisecond-level control calculations, should receive the communication window next, as excessive delays will cause control commands to be generated based on expired states. The control feedback flow, carrying information objects used to determine whether issued commands have been received, executed, and read back, is crucial for whether closed-loop control continues, is retried, or canceled; therefore, it should receive the communication window next. The alarm flow carries information objects including device alarms. Communication alarms, limit-crossing alarms, and abnormal operating status, while not directly involved in rapid control, need to be promptly notified to maintenance personnel. The communication window should be obtained after control feedback and before regular telemetry. Regular telemetry flows are mostly used for trend statistics, operation display, and non-critical monitoring, allowing for larger delays. Configuration management flows mainly involve parameter synchronization and maintenance data, having the least impact on real-time control. Therefore, when microgrid controller communication resources are limited or links are congested, communication resources are allocated to each of the multiple hierarchical information flows through sequencing, prioritizing safety events, rapid control inputs, and control closed-loop feedback.

[0038] In one embodiment of the present invention, updating the cached historical information object of the target device to the target information object and updating the state snapshot based on the target information object includes: replacing the cached historical information object of the target device with the target information object after the target information object is scheduled to be read from the target information stream; updating the state snapshot according to the target information object and the remaining information objects in multiple hierarchical information streams, wherein the state snapshot is used to record the latest state of all microgrid devices so as to achieve rapid decision-making through the state snapshot.

[0039] In one embodiment of the present invention, after replacing the cached historical information object of the target device with the target information object, the historical change sequence of the corresponding data point of the target device (the data point corresponding to the historical information object) is updated based on the historical information object, so as to perform trend analysis, fault tracing and control effect evaluation of the microgrid through the historical change sequence.

[0040] S3: In response to a timed control request or a control request triggered by a state snapshot, determine the protocol adapter corresponding to the device to be controlled based on the state snapshot, and obtain the control protocol command to be sent to the device to be controlled based on the protocol adapter corresponding to the device to be controlled. In one embodiment of the present invention, the protocol adapter corresponding to the device to be controlled is determined based on the state snapshot, and a control protocol instruction to be sent to the device to be controlled is obtained based on the protocol adapter corresponding to the device to be controlled, including: determining the current operating mode based on the state snapshot; determining the device to be controlled, the protocol adapter corresponding to the device to be controlled, and control data based on the current operating mode; and converting the control data into a control protocol instruction to be sent to the device to be controlled based on the protocol adapter corresponding to the device to be controlled.

[0041] In one embodiment of the present invention, the control data includes the data points to be controlled by the device under control, control values, control types, priorities, timeout periods, number of retries, interlock conditions, and readback points. Before converting the control data into control protocol instructions, the control data needs to be security verified. The security verification of the control data includes checking whether the control value exceeds the device's safety constraints, whether the interlock conditions are met, and whether the current operating mode allows the execution of the control data. After passing the security verification, the protocol adapter converts the data into protocol instructions and issues them.

[0042] S4: Receive feedback results after the controlled device executes the control protocol command, and determine the control result to indicate whether the controlled device was successfully controlled based on the feedback results, including: when the feedback time of the feedback result is within a preset time and the feedback result meets the preset error, the control result is that the controlled device was successfully controlled; when the feedback time of the feedback result is not within the preset time and / or the feedback result does not meet the preset error, the control result is that the controlled device was not successfully controlled.

[0043] This invention, through the cooperation of the aforementioned safety verification machine and closed-loop feedback, can effectively avoid erroneous control, ensure the legality and executability of control protocol commands, and at the same time, by recording parameters such as priority, timeout time and number of retries in the control data, realize the reliable issuance and execution tracking of control protocol commands, significantly improving the security and traceability of microgrid control of equipment.

[0044] The present invention provides a control system for a multi-protocol microgrid device, which applies the aforementioned control method for a multi-protocol microgrid device, characterized in that it includes: The module is used to build device access models for microgrid devices and establish protocol adapters for industrial communication protocols; The data conversion module responds to the raw data generated by the target device, determines the target adapter for converting the raw data into target information objects based on the device access model of the target device, writes the target information objects into the hierarchical information stream based on the preset priority scheduling strategy, updates the cached historical information objects of the target device to the target information objects read from the hierarchical information stream, and updates the status snapshot based on the target information objects. The control module is used for: In response to a timed control request or a control request triggered by a state snapshot, the protocol adapter corresponding to the device to be controlled is determined based on the state snapshot, and control protocol instructions are obtained and sent to the device to be controlled based on the protocol adapter corresponding to the device to be controlled. Receive feedback results after the device under control executes the control protocol command, and determine the control result to indicate whether the device under control was successfully controlled based on the feedback results.

[0045] This invention discloses a computer-readable storage medium storing a computer program thereon, which, when executed, implements a control method for the multi-protocol microgrid device.

[0046] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).

[0047] The computer device of the present invention includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the control method of the above-mentioned multi-protocol microgrid device.

[0048] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0049] The memory can be used to store the computer programs or modules. The processor implements various functions of the control method for the multi-protocol microgrid device by running or executing the computer programs or modules stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, SmartMediaCard (SMC), Secure Digital (SD) card, FlashCard, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0050] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A control method for a multi-protocol microgrid device, characterized in that, include: Build a device access model for microgrid equipment and establish a protocol adapter for industrial communication protocols; In response to the target device generating raw data, a target adapter for converting the raw data into a target information object is determined according to the device access model of the target device. The target information object is written into a hierarchical information stream based on a preset priority scheduling strategy. The historical information object cached by the target device is updated to the target information object read from the hierarchical information stream. The status snapshot is updated based on the target information object. In response to a timed control request or a control request triggered by the state snapshot, the protocol adapter corresponding to the device to be controlled is determined according to the state snapshot, and based on the protocol adapter corresponding to the device to be controlled, a control protocol instruction to be sent to the device to be controlled is obtained. The system receives feedback results after the device under control executes the control protocol command, and determines a control result based on the feedback results to indicate whether the device under control was successfully controlled.

2. The control method for a multi-protocol microgrid device according to claim 1, characterized in that, Constructing a device access model for microgrid devices, including: Obtain the device type and protocol type of the microgrid equipment; Generate device identifiers for the microgrid devices; Generate point identifiers for multiple data points of the microgrid device, and configure refresh levels and quality bits for representing data status for each data point; Based on the device type, protocol type, device identifier, point identifiers of multiple data points, refresh level, and quality bit, a device access model for the microgrid device is constructed.

3. The control method for a multi-protocol microgrid device according to claim 1, characterized in that, The target adapter converts the raw data into a target information object, including: The original data is parsed to obtain the original point values; Based on the device access model of the target device, the original point values ​​are sequentially subjected to unit conversion, data type conversion, multiplier processing, enumeration value standardization, quality bit assignment, and timestamp binding to obtain the target information object.

4. The control method for a multi-protocol microgrid device according to claim 1, characterized in that, Writing the target information object into a hierarchical information stream based on a preset priority scheduling strategy includes: Based on the priority and real-time requirements of the target information object, the target information stream is determined from multiple hierarchical information streams with transmission order; the multiple hierarchical information streams include real-time event stream, fast telemetry stream, control feedback stream, alarm stream, regular telemetry stream and configuration management stream in sequence. Write the target information object into the target information stream.

5. The control method for a multi-protocol microgrid device according to claim 4, characterized in that, Updating the cached historical information object of the target device to the target information object, and updating the state snapshot based on the target information object, includes: Once the target information object is scheduled and read from the target information stream, the historical information object already cached by the target device is replaced with the target information object; The state snapshot is updated based on the target information object and the remaining information objects in the multiple hierarchical information streams. The state snapshot is used to record the latest state of all microgrid devices.

6. The control method for a multi-protocol microgrid device according to claim 1, characterized in that, Based on the state snapshot, the protocol adapter corresponding to the device to be controlled is determined, and based on the protocol adapter corresponding to the device to be controlled, control protocol instructions to be sent to the device to be controlled are obtained, including: The current operating mode is determined based on the aforementioned status snapshot; Based on the current operating mode, determine the device to be controlled, the corresponding protocol adapter for the device to be controlled, and the control data; Based on the protocol adapter corresponding to the device to be controlled, the control data is converted into the control protocol command to be sent to the device to be controlled.

7. The control method for a multi-protocol microgrid device according to claim 1, characterized in that, Based on the feedback result, a control result is determined to indicate whether the control of the device under control was successful, including: When the feedback time of the feedback result is within a preset time and the feedback result meets the preset error, the control result is that the device to be controlled has been successfully controlled. When the feedback time of the feedback result is not within the preset time, and / or the feedback result does not meet the preset error, the control result is that the device to be controlled has not been successfully controlled.

8. A control system for a multi-protocol microgrid device, employing the control method for a multi-protocol microgrid device as described in any one of claims 1-7, characterized in that, include: The module is used to build device access models for microgrid devices and establish protocol adapters for industrial communication protocols; The data conversion module, in response to the raw data generated by the target device, determines the target adapter for converting the raw data into target information objects according to the device access model of the target device, writes the target information objects into a hierarchical information stream based on a preset priority scheduling strategy, updates the cached historical information objects of the target device to the target information objects read from the hierarchical information stream, and updates the status snapshot based on the target information objects. The control module is used for: In response to a timed control request or a control request triggered by the state snapshot, the protocol adapter corresponding to the device to be controlled is determined according to the state snapshot, and based on the protocol adapter corresponding to the device to be controlled, a control protocol instruction to be sent to the device to be controlled is obtained. The system receives feedback results after the device under control executes the control protocol command, and determines a control result based on the feedback results to indicate whether the device under control was successfully controlled.

9. A computer-readable storage medium, characterized in that, It is a computer-readable storage medium on which a computer program is stored, which, when executed, implements a control method for a multi-protocol microgrid device as described in any one of claims 1-7.

10. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set, or instruction set, the at least one instruction, at least one program, code set, or instruction set being loaded and executed by the processor to implement a control method for a multi-protocol microgrid device as described in any one of claims 1 to 7.