Method and system for automatically matching inverter communication protocol

By realizing automatic matching of inverter communication protocols in the BMS software of the home energy storage battery system, the problem of time-consuming and labor-consuming matching of inverter protocols in the prior art is solved, and the user experience and system integration efficiency are improved.

CN119482791APending Publication Date: 2025-02-18GUANGDONG MIC POWER NEW ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411335223.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, home energy storage battery systems need to be manually configured when matching inverter communication protocols, resulting in time-consuming and labor-consuming, poor user experience, and increasing the cost of system integration.

Method used

By collecting and integrating inverter communication protocols in the battery's BMS software, setting up keywords for distinguishing different protocols, and implementing an automatic matching process, including inverter sending data frames regularly, battery parsing and responding until the match is successful.

Benefits of technology

The protocol configuration process between the battery and the inverter is simplified, the complexity and time consumption of manual configuration is reduced, the convenience of the system is improved and the user experience is improved, and the overall cost of system integration is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119482791A_ABST
    Figure CN119482791A_ABST
Patent Text Reader

Abstract

The invention provides a method and a system for automatically matching inverter communication protocols, and relates to the field of communication, the method comprises the following steps: collecting and integrating the inverter communication protocols into BMS software of a battery, and setting keywords for distinguishing different protocols; writing an inverter communication protocol and keywords into BMS software of the battery; the inverter regularly sends specific data frames to the battery to initialize communication, and after the battery receives the data frames, response data frames containing keywords are generated according to the keywords in the protocol library and sent back to the inverter; the inverter analyzes keywords in the returned data frame, and compares the keywords with keywords in an internal protocol library to confirm protocol matching; if matching succeeds, protocol automatic configuration is carried out; and if the primary matching fails, the battery sends different keywords in sequence for retry until the matching is successful or all keywords are tried, so that the protocol configuration process between the battery and the inverter is simplified, and the complexity and time consumption of manual configuration are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to a method and system for automatically matching inverter communication protocols. Background Art

[0002] At present, household energy storage batteries need to convert the battery's DC power into AC power in actual applications, which requires the use of an inverter. When the battery communicates with the inverter, the inverter protocol needs to be matched. Due to the wide variety of inverters, there are also many protocols. The current way to match the protocol is to connect the computer to the battery, write the protocol to be matched into the battery through the host computer, and then connect the battery to the inverter.

[0003] The application scenario of home storage requires many batteries to be connected in parallel to increase the capacity of the system. If the inverter using the default protocol is not used, the protocol needs to be changed one by one through the host computer and the battery. This is time-consuming and labor-intensive, and makes it extremely inconvenient for customers to use and increases customer costs. Summary of the invention

[0004] In view of this, the present invention proposes a method and system for automatically matching inverter communication protocols, which simplifies the protocol configuration process between the battery and the inverter, reduces the complexity and time consumption of manual configuration, improves the system's ease of use and customer experience, and reduces the overall cost of system integration.

[0005] The present invention is implemented by the following technical solutions:

[0006] In a first aspect, the present invention provides a method for automatically matching an inverter communication protocol, the method comprising the following steps:

[0007] Collect and integrate inverter communication protocols into the battery's BMS (battery management system) software, and set keywords to distinguish different protocols;

[0008] Write the inverter communication protocol and keywords into the battery's BMS software;

[0009] The inverter periodically sends specific data frames to the battery to initialize communication. After receiving the data frames, the battery generates a response data frame containing keywords according to the keywords in the protocol library and sends it back to the inverter;

[0010] The inverter parses the keywords in the returned data frame and compares them with the keywords in the internal protocol library to confirm protocol matching;

[0011] If the match is successful, the protocol is automatically configured; if the initial match fails, the battery sends different keywords in sequence to retry until the match is successful or all keywords have been tried.

[0012] As a further solution of the present invention, when setting keywords for distinguishing different protocols, a protocol parsing module is constructed to integrate the inverter communication protocol into the BMS of the battery, and the protocol features are learned and updated in real time; when constructing the protocol parsing module, it includes data acquisition and preprocessing, wherein; communication data frames from different inverters are collected, including communication data under normal working and abnormal conditions, and key fields in the data frames are extracted, standardized, and features are extracted from the data frames, including byte distribution of the data frames, protocol field values, and communication frequency features.

[0013] As a further solution of the present invention, the keyword includes one or more bytes, wherein each byte is used to represent a specific protocol parameter.

[0014] As a further solution of the present invention, the setting of the keyword includes defining Byte5 and Byte6 as keywords in CAN ID: 0x359.

[0015] As a further solution of the present invention, when the inverter communication protocol and keywords are written into the BMS software of the battery, it also includes introducing blockchain, selecting Ethereum as the blockchain platform, and using Ethereum to be suitable for smart contracts and decentralized applications. The data structure of the block is designed, including a block header and a block body, wherein the block body contains protocol update data, keyword information and a timestamp.

[0016] As a further solution of the present invention, when implementing the protocol update and keyword writing, the following steps are included:

[0017] Generate blocks. Every time a protocol is updated or a keyword is written, a new block is generated. The block includes the hash value of the updated content, the operation time, and the operator information.

[0018] Broadcast transactions, broadcast the generated blocks to all nodes through the blockchain network for verification and consensus;

[0019] After the block record is confirmed, the block is added to the blockchain and the data is updated on all nodes.

[0020] As a further solution of the present invention, the data frame sent by the battery in response to the data frame is 0x359, and 0x359 includes a keyword byte for indicating the communication protocol supported by the battery.

[0021] As a further solution of the present invention, the data frame sent by the inverter to the battery every 1 second is 0x305: 00-00-00-00-00-00-00-00, which is used to start the protocol matching process.

[0022] As a further solution of the present invention, if the initial matching fails during the protocol matching process, the battery sends different keywords in a preset order to retry.

[0023] As a further solution of the present invention, the communication mode includes but is not limited to CAN, 485, 232 and IIC, and the battery and inverter support multiple communication interfaces.

[0024] As a further solution of the present invention, the inverter periodically sends specific data frames to the battery to initialize communication. When designing the data frame, the data frame structure is defined and the format of the data frame is determined, including the header, payload and check bit; each data frame contains instructions and data types; when the inverter sends periodically, a timer is set, and a timer is set in the inverter to send the initialization data frame at the set time interval.

[0025] As a further solution of the present invention, when the battery receives a data frame, a receiving module is implemented in the battery's BMS to monitor the arrival of the data frame in real time. The received data frame is parsed; when keyword matching and response generation are performed, the battery queries the protocol library according to the keyword in the received data frame, and generates a response data frame containing the keyword according to the query result.

[0026] As a further solution of the present invention, the BMS software of the battery is used to automatically write the successfully matched protocol into the system and update the protocol configuration.

[0027] As a further solution of the present invention, if all preset keywords are tried but still fail to match, the system prompts that the inverter protocol is not in the BMS protocol library and adds the protocol to the protocol library.

[0028] As a further solution of the present invention, when the keywords are matched, the inverter stores a protocol library inside, which contains all recognizable keywords. The extracted keywords are compared with the keywords in the protocol library to confirm whether the extracted keywords exist in the protocol library to determine whether the protocol matches. When responding, if the match is successful, the corresponding operation or response is performed, including sending a confirmation frame or processing a specific instruction; if the match fails, an error is recorded and an error response can be sent.

[0029] In a second aspect, the present invention also includes a system for automatically matching inverter communication protocols, the system comprising:

[0030] Inverter communication protocol library, used to store inverter communication protocols and keywords;

[0031] Battery-side BMS software is used to integrate the inverter communication protocol library and perform protocol matching based on protocol keywords;

[0032] The inverter side is used to send specific data frames and parse keywords in the returned data frames for protocol matching;

[0033] Automatic matching module, used for automatic matching and configuration of communication protocols between batteries and inverters.

[0034] As a further solution of the present invention, the battery-side BMS software is also used to automatically write the matching protocol into the BMS system of the battery.

[0035] The present invention also includes a computer device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the method of automatically matching the inverter communication protocol.

[0036] The present invention also includes a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method of automatically matching the inverter communication protocol.

[0037] Compared with the prior art, the method and system for automatically matching inverter communication protocols provided by the present invention have the following beneficial effects:

[0038] 1. Improved system compatibility and simplified configuration process. The present invention can achieve automatic compatibility between inverters and batteries of different brands and models through a method and system for automatically matching inverter communication protocols. The system can automatically identify and match protocols based on received data frames, reducing the complexity of manual configuration and improving system compatibility. Traditional protocol matching usually requires complex manual configuration and debugging. The method and system for automatically matching inverter communication protocols of the present invention significantly simplify the configuration process, reduce human errors and operation time, and improve work efficiency by automatically identifying and matching inverter communication protocols.

[0039] 2. Improved communication stability, and realized automatic debugging and correction of protocols. The present invention can adjust communication strategies and keyword configurations in real time through dynamic optimization modules and intelligent matching, adapt to different communication environments, improve communication stability and reliability, and reduce the occurrence of communication failures. During the protocol matching process, if the initial match fails, the system will automatically try different keywords to retry. This function ensures that the system can automatically debug and correct when faced with protocol mismatch problems, thereby improving the matching success rate.

[0040] 3. Support multiple communication interfaces and improve matching efficiency. The present invention supports multiple communication interfaces, such as CAN, 485, 232 and IIC. The wide range of interface support capabilities enables the system to adapt to different hardware devices, improving the scope of application of the system. By optimizing the keyword configuration and sequence, efficient protocol matching can be completed in a shorter time, improving the overall matching efficiency.

[0041] 4. Real-time feedback and adjustment are achieved, reducing manual intervention. The present invention can provide real-time feedback on the matching situation during the communication process, and adjust the communication strategy according to the feedback, and can dynamically respond to changes in the communication process, thereby improving the accuracy of matching. It also reduces the reliance on manual intervention through automatic matching and optimization processes, reduces the difficulty of operation, and reduces the requirements for technical personnel, making it suitable for large-scale application and deployment.

[0042] 5. Improved user experience and support for multi-protocol expansion. Since the system of the present invention can automatically complete protocol matching and optimization, users do not need to perform cumbersome configuration and adjustment during use, thereby improving the overall user experience and satisfaction. Through the regular update and dynamic adjustment function of the protocol library module, the system can adapt to the development of new communication protocols and technologies, ensuring that the system can continue to support new protocol expansions in the future, and improving the long-term availability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A flowchart of a method for automatically matching inverter communication protocols according to an embodiment of the present invention;

[0044] Figure 2 A flow chart of implementing protocol update and keyword writing in a method for automatically matching inverter communication protocols according to an embodiment of the present invention;

[0045] Figure 3 The present invention is a flowchart of the automatic matching protocol in the method of automatically matching inverter communication protocol according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0047] Since the application scenario of home storage requires many batteries to be connected in parallel to increase the capacity of the system, if the inverter is not of the default protocol, the protocol needs to be changed one by one through the host computer and the battery, which is time-consuming and labor-intensive, and makes the customer's use extremely inconvenient and increases the customer's cost. The present invention provides a method and system for automatically matching inverter communication protocols, which simplifies the protocol configuration process between the battery and the inverter through the establishment of an inverter communication protocol library and the process of automatically matching protocols, reduces the complexity and time consumption of manual configuration, improves the convenience of system use and customer experience, and reduces the overall cost of system integration.

[0048] The technical solution of the present invention is further described below in conjunction with specific embodiments:

[0049] See also Figure 1 and Figure 3 As shown, an embodiment of the present invention provides a method for automatically matching inverter communication protocols. When the method automatically matches inverter communication protocols, the method specifically includes the following steps:

[0050] Step S10: collect and integrate inverter communication protocols into the battery's BMS (battery management system) software, and set keywords for distinguishing different protocols.

[0051] In step S10 of this embodiment, when setting keywords for distinguishing different protocols, a dynamic protocol parsing mechanism based on artificial intelligence is introduced to build a protocol parsing module that integrates the inverter communication protocol into the BMS of the battery, and learns and updates the protocol features in real time. Among them, when building the protocol parsing module, it includes data acquisition and preprocessing, wherein communication data frames from different inverters are collected, including communication data under normal working and abnormal conditions, and key fields in the data frames are extracted, standardized, and features are extracted from the data frames, including byte distribution of the data frames, protocol field values, and communication frequency features.

[0052] Based on the K-means clustering model, the K-means clustering model is trained with the labeled communication data to identify and classify different protocol features, generate keywords based on the features, verify the accuracy of the model on the test data, and tune it based on the test results. By receiving new communication data in real time, the trained clustering model is continuously updated using incremental learning, and the protocol library in the BMS is automatically updated based on the keywords and protocol features output by the model, and the trained K-means clustering model is integrated into the BMS software, and the real-time processing of communication data and protocol matching in step S10 are performed, and the protocol parsing module is deployed and monitored in real time to ensure its stable operation and processing of all communication requests.

[0053] In this embodiment, the keyword includes one or more bytes, wherein each byte is used to represent a specific protocol parameter, and the setting of the keyword includes defining Byte5 and Byte6 as keywords in CAN ID: 0x359.

[0054] Step S20: writing the inverter communication protocol and keywords into the BMS software of the battery.

[0055] In step S20 of the present embodiment, when the inverter communication protocol and keywords are written into the BMS software of the battery, blockchain is also introduced, Ethereum is selected as the blockchain platform, and Ethereum is suitable for smart contracts and decentralized applications. The data structure of the block is designed, including a block header and a block body, wherein the block body contains protocol update data, keyword information and a timestamp.

[0056] See also Figure 2 As shown, when implementing protocol update and keyword writing, the following steps are included:

[0057] Step S201: Generate a block. Each time the protocol is updated or a keyword is written, a new block is generated. The block includes the hash value of the updated content, the operation time, and the operator information.

[0058] Step S202: Broadcast the transaction and broadcast the generated block to all nodes through the blockchain network for verification and consensus.

[0059] Step S203: Block record, after confirmation, the block is added to the blockchain and the data is updated on all nodes. Each node on the blockchain saves complete records to ensure data consistency.

[0060] In this embodiment, the blockchain is also integrated with the BMS system, which involves API interfaces and data synchronization. The API interface of the blockchain is integrated in the BMS system to communicate with the blockchain network. The API interface will be used to query data in the blockchain and submit transaction requests; when the BMS system updates the protocol or writes keywords, it submits the data to the blockchain and synchronizes the updated data in the system.

[0061] In this embodiment, the data frame sent by the battery in response to the data frame is 0x359, and 0x359 contains a keyword byte used to indicate the communication protocol supported by the battery. The data frame sent by the inverter to the battery every 1 second is 0x305: 00-00-00-00-00-00-00-00, which is used to start the protocol matching process. If the initial match fails during the protocol matching process, the battery sends different keywords in a preset order to retry. Among them, the communication method includes but is not limited to CAN, 485, 232 and IIC, and the battery and inverter support multiple communication interfaces.

[0062] For example, in a battery manufacturing company, in order to ensure the security and consistency of the inverter communication protocol and keyword updates, the company chose Ethereum as the blockchain platform. Every time the protocol is updated, the company's system generates a block containing the protocol version number, update content and timestamp. The block is broadcast through the Ethereum network and verified and agreed upon by the nodes in the network. Once the block is confirmed and added to the blockchain, the company's BMS system will automatically read the latest protocol information from the blockchain and update the system configuration.

[0063] At the same time, in order to ensure the transparency and traceability of operations, the enterprise's system records all protocol update operations in the blockchain to form a complete operation log. This not only improves data security, but also simplifies the audit and traceability process, ensuring the reliability and consistency of protocol updates.

[0064] Step S30: The inverter periodically sends a specific data frame to the battery to initialize communication. After receiving the data frame, the battery generates a response data frame containing the keyword according to the keyword in the protocol library and sends it back to the inverter.

[0065] In step S30 of this embodiment, when designing the data frame, first, define the data frame structure and determine the format of the data frame, including the header, payload (keyword) and check bit, etc. Each data frame should contain instructions and data types. When the inverter sends regularly, set the timer, set the timer in the inverter, and send the initialization data frame at a certain time interval (for example, every second, every minute). Then determine the content of the data frame, and select specific keywords or instructions as the content of the data frame, such as "INIT", "STATUS", etc. When the battery receives the data frame, implement the receiving module in the BMS of the battery to monitor the arrival of the data frame in real time. Parse the received data frame and verify its integrity. Finally, when performing keyword matching and response generation, the battery queries the protocol library according to the keywords in the received data frame, and generates a response data frame containing the keyword according to the query result. For example, if "INIT" is received, "INIT_ACK" is returned. Send a response data frame, and send the generated response data frame back to the inverter using the same communication protocol.

[0066] In this embodiment, the BMS software of the battery is used to automatically write the successfully matched protocol into the system and update the protocol configuration.

[0067] For example, assuming that the inverter sends an "INIT" data frame every 10 seconds, after receiving it, the battery finds the corresponding response "INIT_ACK" of "INIT" through the protocol library and sends it back to the inverter.

[0068] The whole process is as follows:

[0069] The inverter sends: "INIT" data frame every 10 seconds.

[0070] Battery receiving: The battery successfully receives the data frame and parses it.

[0071] Keyword matching: Search for the keyword "INIT" according to the protocol library and generate an "INIT_ACK" response.

[0072] Battery sends: The battery sends the "INIT_ACK" data frame back to the inverter to complete the initialization communication.

[0073] Step S40: The inverter parses the keywords in the returned data frame and compares them with the keywords in the internal protocol library to confirm protocol matching.

[0074] In this step, when receiving data frames, a data receiving module is implemented in the inverter to monitor and receive data frames from the battery in real time. When parsing data frames, after receiving the data frames, the structure is parsed, including the header, payload and check bit. The integrity of the data frame is verified and keywords are extracted from the payload. When matching keywords, the inverter has a protocol library stored inside, which contains all recognizable keywords. The extracted keywords are compared with the keywords in the protocol library to confirm whether the extracted keywords exist in the protocol library to determine whether the protocol matches. When processing responses, if the match is successful, the corresponding operation or response is performed, including sending a confirmation frame or processing a specific instruction. If the match fails, the error is recorded and an error response can be sent.

[0075] For example, assuming that the data frame returned by the battery is "INIT_ACK", the inverter needs to parse this data frame and confirm that the protocol matches. The specific process is as follows:

[0076] (1) Data frame reception: The receiving module of the inverter receives the "INIT_ACK" data frame.

[0077] (2) Data frame analysis:

[0078] Parse the data frame and extract the payload "INIT_ACK".

[0079] Perform integrity verification to confirm that the data frame is not damaged.

[0080] (3) Keyword matching:

[0081] The inverter queries the internal protocol library and finds that "INIT_ACK" exists in the library.

[0082] Confirm that the protocol matches and perform corresponding actions, such as updating the status or sending a confirmation response.

[0083] (4) Response processing:

[0084] Based on the successful matching result, the inverter sends status updates or further instructions to maintain communication with the battery.

[0085] Through this process, the inverter can effectively parse and process the data frames from the battery and ensure the accuracy and consistency of communication.

[0086] Step S50: If the match is successful, the protocol is automatically configured; if the initial match fails, the battery sends different keywords in sequence to retry until the match is successful or all keywords have been tried.

[0087] Therefore, the method for automatically matching inverter communication protocols provided by the present invention includes the process of establishing an inverter communication protocol library and automatically matching protocols. Figure 1 As shown in the figure, the establishment of the inverter communication protocol library includes the following steps:

[0088] Step 1: Collect various inverter communication protocols. Integrate common inverter communication protocol information and store them in the battery's BMS (battery management system) software.

[0089] Step 2: Set keywords. Assign a unique keyword to each inverter protocol for protocol matching between the battery and the inverter. For example, identify the inverter protocol by parsing the keyword field of the 0x305 data frame (such as "P" and "N" in Byte5 and Byte6).

[0090] Step 3: Write the protocol information into the BMS software. According to the collected inverter protocols and keywords, program the relevant protocol information into the BMS.

[0091] The process of automatically matching the agreement includes the following steps:

[0092] Step 1: Communication initialization: The inverter sends the data frame 0x305: 00-00-00-00-00-00-00-00 to the battery every second.

[0093] Step 2: Battery response. After receiving the data frame, the battery sends a frame containing a keyword (0x359) back to the inverter. The keyword includes two bytes, indicating the communication protocol supported by the battery.

[0094] Step 3: Protocol matching. The inverter parses the keyword in 0x359 and compares it with its internal protocol library. If the match is successful, the battery will automatically write the corresponding protocol into the BMS.

[0095] Step 4: Repeat the matching. If the initial matching fails, the battery will send different keywords in sequence for a second round of matching until the match is successful. If all keywords fail to match successfully, it means that the inverter protocol is not in the BMS protocol library and the protocol needs to be added to the library.

[0096] Among them, when executing the part of establishing the inverter communication protocol library, the method of automatically matching the inverter communication protocol of the present invention needs to integrate various commonly used inverter communication protocols into the BMS software at the battery end, and the communication protocol needs to set keywords according to the agreement to distinguish different inverter protocols. Take the CAN ID: 0x359 in Table 1 below as an example:

[0097] Table 1 CAN ID: 0x359

[0098] Byte0 Protection Table 1 Byte1 Protection Table 2 Byte 2 Alarm Table 3 Byte3 Alarm Table 4 Byte4 Module numbers 8 bits unsigned char Byte5 "P” 0x50 Byte 6 "N” 0x4E Byte 7 -

[0099] In the table above, the keywords "P" and "N" in Byte5 and Byte6 of CAN ID: 0X359 can be used to distinguish the protocols of different inverters. The inverter side needs to define keywords that match the battery. For example, if there are five inverters of different models, A, B, C, D, and E, and the keyword corresponding to inverter A is A, then the battery is compatible with the keywords of A, B, C, D, and E at the same time.

[0100] In this embodiment, the matching process is automatically completed by the software strategy. Figure 1 As shown in the figure, after the battery and the inverter are connected, the inverter sends data 0x305: 00-00-00-00-00-00-00-00 to the battery every 1S. After receiving the data, the battery will send the frame data 0X359 to the inverter. After receiving the data, the inverter parses the Byte5 and Byte6 keywords of 0X359. After the parsing is completed, the inverter compares the keywords with its own internal keywords. If the received keywords are consistent, it proves that the match is successful. At this time, the battery automatically writes the protocol corresponding to the keyword into the BMS. If the match is unsuccessful, the battery will send the protocol keywords in sequence for the second round of matching until the match is successful. If none of them match, it means that the inverter protocol currently used is not in the BMS protocol library, and this inverter protocol needs to be added to the BMS.

[0101] The present invention can achieve automatic compatibility between inverters and batteries of different brands and models through a method and system for automatically matching inverter communication protocols. The system can automatically identify and match protocols based on received data frames, reducing the complexity of manual configuration and improving system compatibility. Traditional protocol matching usually requires complex manual configuration and debugging. Through dynamic optimization modules and intelligent matching, communication strategies and keyword configurations can be adjusted in real time to adapt to different communication environments, thereby improving the stability and reliability of communications and reducing the occurrence of communication failures. During the protocol matching process, if the initial match fails, the system will automatically try different keywords to retry. This function ensures that the system can automatically debug and correct when faced with protocol mismatch problems, thereby improving the matching success rate.

[0102] The present invention supports multiple communication interfaces, such as CAN, 485, 232 and IIC. The wide range of interface support capabilities enables the system to adapt to different hardware devices, thereby improving the scope of application of the system. By optimizing the keyword configuration and sequence, efficient protocol matching can be completed in a shorter time, thereby improving the overall matching efficiency. The present invention can provide real-time feedback on the matching situation during the communication process, and adjust the communication strategy according to the feedback, thereby dynamically responding to changes in the communication process, thereby improving the accuracy of matching. The automatic matching and optimization process also reduces the reliance on manual intervention, reduces the difficulty of operation, reduces the requirements for technical personnel, and is suitable for large-scale application and deployment.

[0103] Since the system of the present invention can automatically complete protocol matching and optimization, users do not need to perform tedious configuration and adjustment during use, thereby improving the overall user experience and satisfaction. Through the regular update and dynamic adjustment function of the protocol library module, the system can adapt to the development of new communication protocols and technologies, ensuring that the system can continue to support new protocol expansions in the future, thereby improving the long-term availability of the system.

[0104] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for automatically matching inverter communication protocols, characterized in that: The method comprises the following steps: Collect and integrate inverter communication protocols into the battery's BMS software, and set keywords to distinguish different protocols; Write the inverter communication protocol and keywords into the battery's BMS software; The inverter periodically sends a specific data frame to the battery to initialize communication. After receiving the data frame, the battery generates a response data frame containing the keyword according to the keyword in the protocol library and sends it back to the inverter; The inverter parses the keywords in the returned data frame and compares them with the keywords in the internal protocol library to confirm protocol matching; If the match is successful, the protocol is automatically configured; if the initial match fails, the battery sends different keywords in sequence to retry until the match is successful or all keywords have been tried.

2. The method for automatically matching inverter communication protocols according to claim 1, characterized in that: When setting keywords for distinguishing different protocols, a protocol parsing module is built to integrate the inverter communication protocol into the battery's BMS, and the protocol features are learned and updated in real time; When constructing the protocol analysis module, data collection and preprocessing are included, among which; Communication data frames from different inverters are collected, including communication data under normal and abnormal conditions. Key fields in the data frames are extracted and standardized, and features are extracted from the data frames, including byte distribution of the data frames, protocol field values, and communication frequency characteristics.

3. The method for automatically matching inverter communication protocols as claimed in claim 2, characterized in that: The keyword includes one or more bytes, each byte being used to represent a specific protocol parameter. Setting of the keyword includes defining Byte5 and Byte6 as keywords in CAN ID: 0x359.

4. The method for automatically matching inverter communication protocols according to claim 1, characterized in that: When writing the inverter communication protocol and keywords into the battery's BMS software, it also includes introducing blockchain, selecting Ethereum as the blockchain platform, and using Ethereum for smart contracts and decentralized applications to design the block data structure, including the block header and block body. The block body contains protocol update data, keyword information, and timestamp.

5. The method for automatically matching inverter communication protocols as claimed in claim 4, characterized in that: When implementing protocol updates and keyword writing, the following steps are included: Generate blocks. Every time a protocol is updated or a keyword is written, a new block is generated. The block includes the hash value of the updated content, the operation time, and the operator information. Broadcast transactions, broadcast the generated blocks to all nodes through the blockchain network for verification and consensus; After the block record is confirmed, the block is added to the blockchain and the data is updated on all nodes.

6. The method for automatically matching inverter communication protocols as claimed in claim 5, characterized in that: The data frame sent by the battery in response to the data frame is 0x359, and 0x359 includes a keyword byte for indicating the communication protocol supported by the battery.

7. The method for automatically matching inverter communication protocols according to claim 6, characterized in that: The data frame sent by the inverter to the battery every 1 second is 0x305: 00-00-00-00-00-00-00-00, which is used to start the protocol matching process.

8. The method for automatically matching inverter communication protocols according to claim 1, characterized in that: The inverter periodically sends a specific data frame to the battery to initialize communication. When designing the data frame, the data frame structure is defined and the format of the data frame is determined, including the header, payload and check bit; each data frame contains instructions and data types; When the inverter sends periodically, a timer is set. A timer is set in the inverter to send an initialization data frame at a set time interval.

9. The method for automatically matching inverter communication protocols according to claim 8, characterized in that: When the battery receives a data frame, a receiving module is implemented in the battery's BMS to monitor the arrival of the data frame in real time; the received data frame is parsed; when performing keyword matching and response generation, the battery queries the protocol library based on the keyword in the received data frame, and generates a response data frame containing the keyword based on the query result.

10. A system for automatically matching inverter communication protocols, characterized in that: A method for automatically matching an inverter communication protocol according to any one of claims 1 to 9, wherein the system for automatically matching an inverter communication protocol comprises: Inverter communication protocol library, used to store inverter communication protocols and keywords; Battery-side BMS software is used to integrate the inverter communication protocol library and perform protocol matching based on protocol keywords; The inverter side is used to send specific data frames and parse keywords in the returned data frames for protocol matching; Automatic matching module, used for automatic matching and configuration of communication protocols between batteries and inverters.