Energy storage equipment multi-protocol compatibility data processing method and device and computer equipment

By defining the communication parameters of the device through the configuration file, automatically reading and generating the data structure, and selecting the appropriate communication channel to process the results, the device compatibility problem in the energy storage system is solved and the scalability and flexibility of the system are improved.

CN120676066APending Publication Date: 2025-09-19QUALTECH

Patent Information

Application Number
CN202510520440.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In the energy storage industry, energy management systems need to frequently adjust software configurations to adapt to differences in communication protocols between devices from different manufacturers, resulting in heavy development and maintenance workloads and limited system scalability and flexibility.

Method used

The communication link, RS485 serial port parameters, register address or CAN ID and other parameters of the device are defined through the configuration file to achieve device compatibility. After initialization, the system automatically reads the configuration file and generates the data structure, and selects the appropriate communication channel for data processing.

Benefits of technology

Compatibility with devices from different manufacturers can be achieved without modifying the software code, which improves the scalability and flexibility of the system and reduces the workload of development and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120676066A_ABST
    Figure CN120676066A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-protocol compatible data processing method and device for energy storage equipment and computer equipment. The method comprises the following steps: configuring a communication link of equipment, related parameters of an RS485 serial port, a register address or CAN ID related parameters to obtain a configuration file; after the energy storage equipment is initialized, acquiring a data processing request; reading a configuration file; analyzing the configuration file, and generating a data structure; processing the data structure according to the data processing request to obtain a processing result; and analyzing the processing result and selecting a corresponding communication channel so as to transmit the processing result through the communication channel. By implementing the method provided by the invention, the compatibility of different manufacturer devices can be realized through the configuration file without modifying the software.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data processing method, and more specifically to a method, device and computer equipment for processing multi-protocol compatible data of an energy storage device. Background Art

[0002] In the energy storage industry, energy management systems must effectively interact with a variety of devices from different manufacturers and brands. These devices may include battery energy storage systems, inverters, charging stations, and monitoring instruments, each of which may utilize different communication protocols and standards. To achieve unified management of these devices, energy management systems typically utilize multiple communication methods, the most common of which include TCP / IP, RS485, and CAN bus. These protocols support various standard communication protocols, such as ModbusTCP, ModbusRTU, and CAN 2.0, enabling energy management systems to connect and exchange data with devices from different manufacturers.

[0003] However, due to differences in communication implementations between devices from different manufacturers, energy management systems must handle customized implementations of various communication protocols. For example, devices from different manufacturers may use different register addresses and function codes in the Modbus protocol or different CAN IDs in the CAN bus protocol. Due to these differences, energy management systems must frequently modify and adjust software configurations to ensure compatibility and data accuracy. This process not only increases development and maintenance workloads but can also limit the system's scalability and flexibility. Therefore, how to efficiently adapt to diverse devices has become a pressing issue in the energy storage industry.

[0004] Therefore, it is necessary to design a new method to achieve compatibility of devices from different manufacturers through configuration files without modifying the software itself, so as to solve the technical problems such as the need for frequent adjustment of software configuration to ensure compatibility and data accuracy due to differences in communication protocols between devices from different manufacturers in the existing technology, thereby increasing the workload of development and maintenance, and limiting the scalability and flexibility of the system. Summary of the Invention

[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a method, device and computer equipment for processing multi-protocol compatibility data of energy storage equipment.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for processing multi-protocol compatibility data of energy storage devices, comprising:

[0007] Configure the device's communication link, RS485 serial port parameters, register address, or CAN ID parameters to obtain a configuration file.

[0008] After the energy storage device is initialized, a data processing request is obtained;

[0009] Read the configuration file;

[0010] Parsing the configuration file and generating a data structure;

[0011] Processing the data structure according to the data processing request to obtain a processing result;

[0012] The processing result is parsed and a corresponding communication channel is selected to transmit the processing result through the communication channel.

[0013] Its further technical solution is: the configuration file includes the device port number of the communication link, the Chinese name of the device, the device type, the device number, the device communication link, the device node, the device address, and the device protocol.

[0014] Its further technical solution is: the relevant parameters of the RS485 serial port include serial port number, baud rate, data bit, stop bit, parity check and flow control.

[0015] Its further technical solution is: the register address or CAN ID related parameters include: register address or CANID, Json data item reported by MQTT, register function code, data type, byte length, Chinese name, bit length, bit offset, unit, coefficient, numerical offset, read and write frequency, threshold, and description and remarks information.

[0016] A further technical solution is: parsing the configuration file and generating a data structure includes:

[0017] The configuration file is parsed using the RapidJson library, a corresponding data structure is generated according to the corresponding data structure, and the generated data structure is passed to the cache container.

[0018] A further technical solution is: processing the data structure according to the data processing request to obtain a processing result includes:

[0019] When the data processing request is a request to send data, the RapidJson library is used to parse the data structure, extract the device type and device number information, and combine the data structure according to the device type and the device number to obtain the processing result; when the data processing request is to report data, the RapidJson library is used to generate the reported Json data according to the data processing request, and a subscription topic is generated to obtain the processing result.

[0020] A further technical solution is that the parsing of the processing result and selecting a corresponding communication channel to transmit the processing result through the communication channel includes:

[0021] The communication link in the processing result is parsed, and a corresponding communication channel is selected according to the communication link, so as to transmit the processing result through the selected communication channel.

[0022] The present invention also provides a multi-protocol compatibility data processing device for energy storage equipment, comprising:

[0023] A configuration unit is used to configure the communication link of the device, relevant parameters of the RS485 serial port, register address or CANID related parameters to obtain a configuration file;

[0024] an acquisition unit, configured to acquire a data processing request after the energy storage device is initialized;

[0025] A reading unit, configured to read the configuration file;

[0026] A parsing unit, configured to parse the configuration file and generate a data structure;

[0027] a processing unit, configured to process the data structure according to the data processing request to obtain a processing result;

[0028] The transmission unit is used to analyze the processing result and select a corresponding communication channel to transmit the processing result through the communication channel.

[0029] A further technical solution is as follows: the parsing unit uses the RapidJson library to parse the configuration file, generates a corresponding data structure according to the corresponding data structure, and passes the generated data structure to the cache container.

[0030] The present invention also provides a computer device, characterized in that the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program.

[0031] The beneficial effects of the present invention compared to the prior art are as follows: the present invention defines communication protocol-related parameters such as the communication link, RS485 serial port parameters, register addresses or CAN IDs of various types of equipment through configuration files, so that the compatibility of the equipment depends only on the content of the configuration files, rather than hard coding. After the energy storage device is initialized, the system automatically reads the configuration file, parses the parameters therein and generates the corresponding data structure, processes it according to the data processing request, and finally selects the appropriate communication channel to transmit the processing results; in this way, a flexible configuration file system is designed to achieve compatibility of equipment from different manufacturers without modifying the software itself; the system can adapt to the differences in communication protocols of equipment from different manufacturers, reducing the need for frequent software adjustments due to device incompatibility, greatly improving the scalability and flexibility of the system, and reducing the workload of development and maintenance.

[0032] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 A schematic diagram of a flow chart of a method for processing multi-protocol compatibility data of an energy storage device provided in an embodiment of the present invention;

[0035] Figure 2 A schematic diagram of a communication link of a configuration device provided in an embodiment of the present invention;

[0036] Figure 3 A schematic diagram of relevant parameters of the RS485 serial port provided in an embodiment of the present invention;

[0037] Figure 4 A schematic diagram of register address or CAN ID related parameters provided in an embodiment of the present invention;

[0038] Figure 5 A schematic block diagram of a multi-protocol compatibility data processing device for energy storage equipment provided by an embodiment of the present invention;

[0039] Figure 6 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0041] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0042] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0043] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0044] See also Figure 1 , Figure 1 A schematic flow chart of a multi-protocol compatibility data processing method for energy storage devices provided in an embodiment of the present invention. The multi-protocol compatibility data processing method for energy storage devices is applied to a server, and solves the compatibility problems caused by differences in communication protocols of devices from different manufacturers by means of configuration files. The specific implementation method is: configuring the device's communication link, RS485 serial port parameters, register address or CAN ID and other key information through the configuration file without directly modifying the software code. After the device is initialized, the configuration file is read and parsed according to the data processing request, the corresponding data structure is generated, and the data is processed according to the request type. The processing results will be transmitted by selecting a suitable communication channel, thereby achieving compatibility of devices from different manufacturers, without the need to frequently adjust the software configuration, reducing the workload of development and maintenance, improving the scalability and flexibility of the system, and solving the compatibility and data accuracy problems caused by protocol differences between devices in the prior art.

[0045] Figure 1 FIG. 1 is a flow chart of a method for processing multi-protocol compatibility data of an energy storage device provided by an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110 to S160.

[0046] S110 , configuring the communication link of the device, relevant parameters of the RS485 serial port, register address or CAN ID related parameters to obtain a configuration file.

[0047] In this embodiment, the configuration file includes the device port number of the communication link, the Chinese name of the device, the device type, the device number, the device communication link, the device node, the device address, and the device protocol. Figure 2 As shown in Figure 1, the communication link configuration is the basis for data exchange between devices and systems. It contains detailed information on how the device communicates with the external environment or other devices, including the following:

[0048] Device Port Number (devicePort): This field defines the port number used by the device connection, such as the port number in a TCP connection or the port number of RS485, etc. It is the interface for the device to communicate with the network.

[0049] Device Chinese name (name): The name of the device, usually described in Chinese to help users understand the function or properties of the device.

[0050] Device type (type): A description of the device type, such as battery cluster, cluster, gateway, etc., used to identify the category of the device.

[0051] Device number (sort): The device number or identifier, used to uniquely identify different devices.

[0052] Device Link: The communication method between a device and an external system or other device. Common communication link types include RS485, TCP, CAN, etc. Flexible expansion is possible through different links.

[0053] Device Node: The specific node to which the device is connected, such as a serial port number, CAN channel number, or network card number. For TCP connections, the node may be the identifier of the network interface card.

[0054] Device Address: The address of a device, including the device's identification number or IP address, etc. It is a unique identifier for a device in a network or system, allowing other devices to find and communicate with the device.

[0055] Device Protocol: The protocol used by the device to communicate, such as Modbus or CAN. This determines the format and rules for data exchange between the device and other systems.

[0056] The relevant parameters of the RS485 serial port include serial port number, baud rate, data bits, stop bits, parity check and flow control. Figure 3 As shown, RS485 serial port configuration involves the basic parameter settings of serial communication, which ensure that the devices can exchange data correctly. The specific parameters are as follows:

[0057] Serial port number (channelNum): The serial port identifier on the device, usually a number, for example "1" represents serial port 1.

[0058] Baud rate: The data transmission rate, measured in bits per second (bps). For example, 9600 means a transmission rate of 9600 bits per second.

[0059] Data bits: The number of bits contained in each data character, usually 8 or 9 bits.

[0060] Stop bits (stopBits): The number of bits used to mark the end of a data packet during data transmission, commonly set to 1 or 2 bits.

[0061] Parity: Used to detect errors during data transmission. Common settings include no parity (0), even parity (1), or odd parity (2).

[0062] Flow Control: Flow control is a way to manage the flow of data between the sending and receiving devices. It can avoid data loss or overflow. Common settings are no flow control (0) or hardware flow control (such as RTS / CTS).

[0063] The register address or CANID related parameters include: register address or CANID, Json data item reported by MQTT, register function code, data type, byte length, Chinese name, bit length, bit offset, unit, coefficient, numerical offset, read and write frequency, threshold, description and remarks. Figure 4 As shown, the register address or CANID configuration is used to describe the device register or communication details of the CAN device, mainly including the following:

[0064] Register address or CANID (addressid): The unique address of a register or the unique identifier of a CAN device, used for identification and access between devices.

[0065] Json data item (code) reported by MQTT: This field describes the Json format item identifier of the reported data, which is usually used to identify the content of the transmitted data during data exchange.

[0066] Register function code (functionCode): A function code in the Modbus protocol that indicates the operations that a device can perform. For example, function code 03 indicates reading the contents of a holding register.

[0067] Data type (dataType): describes the type of data, such as unsigned integer (unsigned), signed integer (signed), etc., which affects the storage and processing of data.

[0068] Byte length (addrLen): The number of bytes of a register or data item, usually 2 bytes, 4 bytes, etc., indicating the actual size of the data.

[0069] Chinese name (name): Chinese description of the register or data item to help users understand the actual meaning of the data.

[0070] Bit length (bitLen): This field defines the number of bits of the data item, such as 16 bits, 32 bits, etc., which affects how the data is stored and read.

[0071] Bit offset (dataOffset): The offset of the data bit, usually used to specify the specific storage location of the data, especially in multi-byte data storage, the offset is crucial.

[0072] Unit: The unit of measurement of data, such as kilowatt-hour (kWh), temperature (℃), etc., which indicates the physical unit of the data.

[0073] Factor: A data conversion factor used to convert raw data to actual values. For example, a factor of 0.001 can convert raw data to a more accurate value.

[0074] Numeric offset (offset): used to adjust the offset of the value during data processing.

[0075] Read and write frequency (frequency): The read and write frequency of the device register, which specifies the time interval or trigger condition for data update.

[0076] Threshold: Used to describe the threshold of a device or data point, often used as a trigger condition for data alarms or control logic.

[0077] Action Quantifier: Describes the function, usage scenario, or other additional information of the register or data item.

[0078] Ultimately, based on the above parameters, a configuration file will be created containing each device and its associated configuration items. This file, which can be saved in XML, JSON, or other formats, serves as the basis for interaction between the device and the system. Each element in the configuration file provides the details necessary for smooth communication between the device and the system:

[0079] The detailed settings of the device communication link, RS485 serial port parameters and register address or CAN ID are the basis for device operation.

[0080] Configuration files ensure that devices can communicate through the correct ports, protocols, and settings, while guaranteeing data accuracy and reliability.

[0081] This configuration process ensures that devices can interact and process data smoothly based on the set communication links, serial port parameters, and register configurations.

[0082] S120: After the energy storage device is initialized, a data processing request is obtained.

[0083] In this embodiment, the data processing request includes a request to report data or a request to send data.

[0084] Specifically, after the energy storage device starts up and completes initialization, it enters a state where it waits for data processing requests. At this point, the system can receive requests from other modules or external systems, such as requests to report data or send data. These requests trigger the system's data processing flow.

[0085] Report data request: When the system receives a report data request, it means that the device needs to report the current data status or operation results to the upper-level system or device.

[0086] Sending data request: When the system receives a sending data request, it means that the upper system wants the device to perform certain operations (such as setting parameters or changing status) and send new instructions to the device.

[0087] S130: Read the configuration file.

[0088] In this embodiment, before processing a data request, the device needs to load the corresponding configuration information. These configuration files contain key information such as device communication parameters, communication link selection, and device register settings to ensure that the device can communicate and transmit data in the correct manner.

[0089] Configuration file contents: The configuration file includes the device type, device number, communication protocol (such as RS485, CAN, TCP, etc.), device register configuration, and communication link selection. The device needs to adjust its communication and data processing behavior based on these configurations.

[0090] Reading process: The device reads the configuration information through the configuration module and passes it to the next step of the system, ensuring that the system can understand the current device settings and requirements.

[0091] S140: Parse the configuration file and generate a data structure.

[0092] In this embodiment, the data result refers to data generated according to specific configuration information, such as device type, device number, communication protocol, communication link, etc.

[0093] Specifically, the configuration file is parsed using the RapidJson library, a corresponding data structure is generated according to the corresponding data structure, and the generated data structure is passed to the cache container.

[0094] Specifically, after reading the configuration files, the system will use the RapidJson library to parse them. The parsing process includes:

[0095] Parsing Json files: Configuration files are usually stored in Json format. The system uses the RapidJson library to parse Json data and convert it into a memory structure that the device can process.

[0096] Generate Data Structure: The parsed data is used to generate a data structure suitable for subsequent processing. This data structure is generated based on specific configuration information, such as device type, device number, communication protocol, and communication link. The parsed structure will include device configuration information, data flow, and communication requirements.

[0097] Pass to cache container: Once the data structures are generated, these data will be passed to the cache container for further processing.

[0098] S150: Process the data structure according to the data processing request to obtain a processing result.

[0099] In this embodiment, the processing result refers to a data structure generated or modified according to a data processing request (sending or reporting data), ready for subsequent transmission or processing.

[0100] Specifically, when the data processing request is a request to send data, the RapidJson library is used to parse the data structure, extract the device type and device number information, and combine the data structure according to the device type and the device number to obtain the processing result; when the data processing request is to report data, the RapidJson library is used according to the data processing request to generate the reported Json data, and generate a subscription topic to obtain the processing result.

[0101] In this embodiment, according to the received data processing request (data reporting request or data sending request), the system will perform corresponding processing on the previously generated data structure to obtain a processing result.

[0102] When the data processing request is a request to send data:

[0103] Use the RapidJson library to parse the previously generated data structure.

[0104] Extract information such as device type and device number from the parsed data structure. This information is very important for determining the target device and the operation to be performed.

[0105] Based on the device type and device number, the device module combines this information to generate a new data structure for distribution. This structure may be based on the Modbus or CAN communication protocol and adjusted according to the specific communication link.

[0106] After the data structure is prepared, it is passed to the communication controller for further processing.

[0107] When the data processing request is a request to report data:

[0108] Use the RapidJson library to convert the data structure into reported data in Json format.

[0109] Generate a subscription topic, which represents the content and target of the reported data.

[0110] The reported data in JSON format will contain basic information about the device, its operating status, and possible measurement data. After being processed, this data structure will be passed to the device module for final preparation.

[0111] S160: Analyze the processing result and select a corresponding communication channel to transmit the processing result through the communication channel.

[0112] In this embodiment, the communication link in the processing result is parsed, and a corresponding communication channel is selected according to the communication link, so as to transmit the processing result through the selected communication channel.

[0113] Once the processing results are generated, the system will further analyze the results and select an appropriate communication channel for data transmission. The selection of the communication link is based on the communication link information contained in the processing results.

[0114] Analyze the communication link in the processing results: The processing results will contain information about the communication link. The system needs to analyze this information to determine the data transmission path. Common communication links include RS485, CAN, TCP, etc.

[0115] Select the corresponding communication channel: Based on the parsed communication link information, the system will select a communication channel. Specifically:

[0116] CAN channel: If the communication link is CAN protocol, the system will select the appropriate CAN channel for data transmission.

[0117] RS485 serial port: If the communication link is RS485, the system will select the appropriate serial port for data transmission.

[0118] TCP connection: If the communication link is TCP protocol, the system will transmit data through the network.

[0119] Transmitting Data: Once the appropriate communication channel is selected, the system transmits the results of processing via that channel. This could be device configuration information, execution results, or data collection results. Through the selected channel, the data is transmitted to the target device or higher-level system for further processing.

[0120] The entire process begins with the device initializing and receiving a data processing request. It then reads the configuration file, parses it, and generates a data structure. It then parses the data and generates the corresponding results based on the processing request. Finally, the appropriate communication channel is selected based on the communication link to transmit the processing results, ensuring that the system can efficiently and accurately complete the data transmission or reporting tasks.

[0121] In this embodiment, the communication process of sending data is as follows: when the system starts, the initialization operation is first performed; the configuration module reads the configuration file, including RS485 configuration, device register configuration and device communication link configuration; the read configuration data is passed to the configuration module; the configuration module uses the RapidJson library to parse the Json file; according to the corresponding data structure, a new data structure is generated; the parsed data structure is passed to the cache container; the cache container receives the parsed data structure; as needed, the corresponding data service module is called for subsequent processing; the data service module uses the RapidJson library to parse the Json data; extracts information such as device type and device number; passes the parsed data to the device module; the device module combines the device type and device number into a sending data structure (such as Modbus or CAN communication link); the sending data structure is passed to the communication controller; the communication controller parses the communication link information in the sending data structure; selects the corresponding communication channel according to the communication link; decides to use the CAN channel, RS485 serial port or TCP connection according to the selected communication link; and transmits data according to the selected communication channel.

[0122] Through the above process, the entire process from configuration file reading to final communication transmission is ensured to be efficient and accurate.

[0123] The communication process of reporting data is as follows: when the system starts, initialization operation is performed; the configuration module reads the RS485 configuration, device register configuration and device communication link configuration; the configuration file data is passed to the configuration module; the configuration module uses the RapidJson library to parse the Json file; a new data structure is generated by combining the corresponding data structure; the parsed data structure is passed to the cache container; the cache container receives the parsed data structure; the corresponding data service module is called as needed; the data service module uses the RapidJson library to combine into Json data; a subscription topic is generated; the generated data structure is passed to the device module; the device module combines the reporting data structure, including the device type and device number; the reporting data structure is passed to the communication controller; the communication controller selects the Modbus or CAN communication protocol according to the communication link; the final reporting data structure is combined; the data is transmitted through the selected communication channel; data transmission is performed through the selected CAN channel (1 to 3), RS485 serial port (1 to 6) or TCP connection.

[0124] The above process ensures that the reported data is read from the configuration file to the final transmission process is efficient and accurate.

[0125] The purpose of the energy storage device multi-protocol compatibility analysis engine system is to achieve compatibility with external devices from different manufacturers through configuration files without modifying the software itself. The reasons and features are as follows:

[0126] In the past, related software usually used hard-coding to adapt to different devices;

[0127] External devices from different manufacturers use different communication methods, communication addresses, communication nodes, Modbus register addresses or CAN IDs, Modbus function codes, CAN bytes, data types, and other communication protocols;

[0128] After the protocol program is started, it reads the configuration file and loads the Modbus register address, CAN ID, Modbus function code, CAN byte and data type of the external device into the program's cache;

[0129] Within the protocol program, modules of devices from different manufacturers obtain parameters such as device type, communication mode, communication address, communication node, Modbus register address or CAN ID, Modbus function code, CAN byte and data type from the cache.

[0130] To address compatibility issues between devices from different manufacturers using Modbus or CAN protocols, the multi-protocol compatibility analysis engine system for energy storage equipment uses a zero-code modification solution, achieving compatibility between devices from different manufacturers through configuration files, enabling rapid response to customer needs for energy storage services.

[0131] The above-mentioned multi-protocol compatibility data processing method for energy storage devices defines communication protocol-related parameters such as the communication link, RS485 serial port parameters, register addresses, or CAN IDs for various types of devices through configuration files, so that the compatibility of the devices depends only on the contents of the configuration files, rather than hard coding. After the energy storage device is initialized, the system automatically reads the configuration file, parses the parameters therein, and generates the corresponding data structure. It processes the data according to the processing request and ultimately selects the appropriate communication channel to transmit the processing results. In this way, a flexible configuration file system is designed to achieve compatibility between devices from different manufacturers without modifying the software itself. The system can adapt to the differences in communication protocols between devices from different manufacturers, reducing the need for frequent software adjustments due to device incompatibility, greatly improving the scalability and flexibility of the system, and reducing the workload of development and maintenance.

[0132] Figure 5 FIG is a schematic block diagram of a multi-protocol compatibility data processing device 300 for energy storage devices provided by an embodiment of the present invention. Figure 5 As shown, corresponding to the above energy storage device multi-protocol compatibility data processing method, the present invention also provides an energy storage device multi-protocol compatibility data processing device 300. The energy storage device multi-protocol compatibility data processing device 300 includes a unit for executing the above energy storage device multi-protocol compatibility data processing method, and the device can be configured in a server. Specifically, please refer to Figure 5 The energy storage device multi-protocol compatibility data processing device 300 includes a configuration unit 301, an acquisition unit 302, a reading unit 303, a parsing unit 304, a processing unit 305 and a transmission unit 306.

[0133] The configuration unit 301 is used to configure the device's communication link, relevant parameters of the RS485 serial port, register address or CAN ID related parameters to obtain a configuration file; the acquisition unit 302 is used to obtain a data processing request after the energy storage device is initialized; the reading unit 303 is used to read the configuration file; the parsing unit 304 is used to parse the configuration file and generate a data structure; the processing unit 305 is used to process the data structure according to the data processing request to obtain a processing result; the transmission unit 306 is used to parse the processing result and select a corresponding communication channel to transmit the processing result through the communication channel.

[0134] In one embodiment, the parsing unit 304 uses the RapidJson library to parse the configuration file, generates a corresponding data structure according to the corresponding data structure, and passes the generated data structure to the cache container.

[0135] In one embodiment, the processing unit 305 is used to, when the data processing request is a data sending request, use the RapidJson library to parse the data structure, extract the device type and device number information, and combine the data structure according to the device type and the device number to obtain a processing result; when the data processing request is to report data, use the RapidJson library to generate reported Json data according to the data processing request, and generate a subscription topic to obtain a processing result.

[0136] In one embodiment, the transmission unit 306 is configured to parse the communication link in the processing result and select a corresponding communication channel according to the communication link, so as to transmit the processing result through the selected communication channel.

[0137] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned energy storage device multi-protocol compatibility data processing device 300 and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and brevity of the description, it will not be repeated here.

[0138] The energy storage device multi-protocol compatibility data processing device 300 can be implemented in the form of a computer program. The computer program can be used in Figure 6 Runs on the computer equipment shown.

[0139] See also Figure 6 , Figure 6 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers.

[0140] See Figure 6 The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0141] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, which, when executed, can enable the processor 502 to execute a method for processing multi-protocol compatibility data of an energy storage device.

[0142] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.

[0143] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for processing multi-protocol compatibility data of an energy storage device.

[0144] The network interface 505 is used to communicate with other devices through the network. Figure 6 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0145] The processor 502 is configured to execute a computer program 5032 stored in the memory to implement the following steps:

[0146] The device's communication link, RS485 serial port parameters, register address, or CAN ID parameters are configured to obtain a configuration file; after the energy storage device is initialized, a data processing request is obtained; the configuration file is read; the configuration file is parsed and a data structure is generated; the data structure is processed according to the data processing request to obtain a processing result; the processing result is parsed and a corresponding communication channel is selected to transmit the processing result through the communication channel.

[0147] The configuration file includes the device port number of the communication link, the Chinese name of the device, the device type, the device number, the device communication link, the device node, the device address, and the device protocol.

[0148] The relevant parameters of the RS485 serial port include serial port number, baud rate, data bits, stop bits, parity check and flow control.

[0149] The register address or CAN ID related parameters include: register address or CAN ID, Json data item reported by MQTT, register function code, data type, byte length, Chinese name, bit length, bit offset, unit, coefficient, numerical offset, read and write frequency, threshold, and description and remarks.

[0150] In one embodiment, when the processor 502 implements the step of parsing the configuration file and generating a data structure, it specifically implements the following steps:

[0151] The configuration file is parsed using the RapidJson library, a corresponding data structure is generated according to the corresponding data structure, and the generated data structure is passed to the cache container.

[0152] In one embodiment, when the processor 502 implements the step of processing the data structure according to the data processing request to obtain a processing result, the processor 502 specifically implements the following steps:

[0153] When the data processing request is a request to send data, the RapidJson library is used to parse the data structure, extract the device type and device number information, and combine the data structure according to the device type and the device number to obtain the processing result; when the data processing request is to report data, the RapidJson library is used to generate the reported Json data according to the data processing request, and a subscription topic is generated to obtain the processing result.

[0154] In one embodiment, when implementing the step of parsing the processing result and selecting a corresponding communication channel to transmit the processing result through the communication channel, the processor 502 specifically implements the following steps:

[0155] The communication link in the processing result is parsed, and a corresponding communication channel is selected according to the communication link, so as to transmit the processing result through the selected communication channel.

[0156] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU) 305. The processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0157] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program includes program instructions, which can be stored in a storage medium that is computer-readable. The program instructions are executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.

[0158] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps:

[0159] The device's communication link, RS485 serial port parameters, register address, or CAN ID parameters are configured to obtain a configuration file; after the energy storage device is initialized, a data processing request is obtained; the configuration file is read; the configuration file is parsed and a data structure is generated; the data structure is processed according to the data processing request to obtain a processing result; the processing result is parsed and a corresponding communication channel is selected to transmit the processing result through the communication channel.

[0160] The configuration file includes the device port number of the communication link, the Chinese name of the device, the device type, the device number, the device communication link, the device node, the device address, and the device protocol.

[0161] The relevant parameters of the RS485 serial port include serial port number, baud rate, data bits, stop bits, parity check and flow control.

[0162] The register address or CAN ID related parameters include: register address or CAN ID, Json data item reported by MQTT, register function code, data type, byte length, Chinese name, bit length, bit offset, unit, coefficient, numerical offset, read and write frequency, threshold, and description and remarks.

[0163] In one embodiment, when the processor executes the computer program to implement the step of parsing the configuration file and generating a data structure, the processor specifically implements the following steps:

[0164] The configuration file is parsed using the RapidJson library, a corresponding data structure is generated according to the corresponding data structure, and the generated data structure is passed to the cache container.

[0165] In one embodiment, when the processor executes the computer program to implement the step of processing the data structure according to the data processing request to obtain a processing result, the processor specifically implements the following steps:

[0166] When the data processing request is a request to send data, the RapidJson library is used to parse the data structure, extract the device type and device number information, and combine the data structure according to the device type and the device number to obtain the processing result; when the data processing request is to report data, the RapidJson library is used to generate the reported Json data according to the data processing request, and a subscription topic is generated to obtain the processing result.

[0167] In one embodiment, when the processor executes the computer program to implement the step of parsing the processing result and selecting a corresponding communication channel to transmit the processing result through the communication channel, the processor specifically implements the following steps:

[0168] The communication link in the processing result is parsed, and a corresponding communication channel is selected according to the communication link, so as to transmit the processing result through the selected communication channel.

[0169] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.

[0170] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0171] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.

[0172] The steps in the method of the embodiment of the present invention may be adjusted in order, combined, or deleted as needed. The units in the apparatus of the embodiment of the present invention may be combined, divided, or deleted as needed. In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit 305, each unit may exist physically separately, or two or more units may be integrated into a single unit.

[0173] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present invention.

[0174] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A method for processing multi-protocol compatibility data of energy storage equipment, characterized in that: include: Configure the device's communication link, RS485 serial port parameters, register address, or CAN ID parameters to obtain a configuration file. After the energy storage device is initialized, a data processing request is obtained; Read the configuration file; Parsing the configuration file and generating a data structure; Processing the data structure according to the data processing request to obtain a processing result; The processing result is parsed and a corresponding communication channel is selected to transmit the processing result through the communication channel.

2. The method for processing multi-protocol compatibility data of energy storage equipment according to claim 1, characterized in that: The configuration file includes the device port number of the communication link, the Chinese name of the device, the device type, the device number, the device communication link, the device node, the device address, and the device protocol.

3. The method for processing multi-protocol compatibility data of energy storage equipment according to claim 1, characterized in that: The relevant parameters of the RS485 serial port include serial port number, baud rate, data bits, stop bits, parity check and flow control.

4. The method for processing multi-protocol compatibility data of energy storage equipment according to claim 1, characterized in that: The register address or CAN ID related parameters include: register address or CAN ID, Json data item reported by MQTT, register function code, data type, byte length, Chinese name, bit length, bit offset, unit, coefficient, numerical offset, read and write frequency, threshold, and description and remarks.

5. The method for processing multi-protocol compatibility data of energy storage equipment according to claim 1, characterized in that: The step of parsing the configuration file and generating a data structure includes: The configuration file is parsed using the RapidJson library, a corresponding data structure is generated according to the corresponding data structure, and the generated data structure is passed to the cache container.

6. The method for processing multi-protocol compatibility data of energy storage equipment according to claim 1, characterized in that: The processing of the data structure according to the data processing request to obtain a processing result includes: When the data processing request is a request to send data, the RapidJson library is used to parse the data structure, extract the device type and device number information, and combine the data structure according to the device type and the device number to obtain the processing result; when the data processing request is to report data, the RapidJson library is used to generate the reported Json data according to the data processing request, and a subscription topic is generated to obtain the processing result.

7. The method for processing multi-protocol compatibility data of energy storage equipment according to claim 1, characterized in that: The parsing the processing result and selecting a corresponding communication channel to transmit the processing result through the communication channel includes: The communication link in the processing result is parsed, and a corresponding communication channel is selected according to the communication link, so as to transmit the processing result through the selected communication channel.

8. A multi-protocol compatibility data processing device for energy storage equipment, characterized in that: include: A configuration unit is used to configure the communication link of the device, relevant parameters of the RS485 serial port, register address or CAN ID related parameters to obtain a configuration file; an acquisition unit, configured to acquire a data processing request after the energy storage device is initialized; A reading unit, configured to read the configuration file; A parsing unit, configured to parse the configuration file and generate a data structure; a processing unit, configured to process the data structure according to the data processing request to obtain a processing result; The transmission unit is used to analyze the processing result and select a corresponding communication channel to transmit the processing result through the communication channel.

9. The method for processing multi-protocol compatibility data of energy storage equipment according to claim 8, characterized in that: The parsing unit parses the configuration file using the RapidJson library, generates a corresponding data structure according to the corresponding data structure, and passes the generated data structure to the cache container.

10. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

Citation Information

Patent Citations

  • Equipment multi-protocol analysis method based on industrial Internet of Things gateway

    CN112261061A

  • Power carrier embedded equipment management method and system based on configuration file

    CN114185616A

  • Multi-channel protocol adaptation processing method, system and device

    CN114745448A

  • Energy storage data processing method and device and electronic equipment

    CN118474214A

  • General thermal power plant machine room DCS equipment data transmission method, equipment, medium and product

    CN119232748A

Cited By

  • Control method and device of energy storage equipment, energy storage equipment and energy storage system

    CN122292689A