CN114025032B - Transmission protocol method, system, equipment and storage medium of EMS and BMS - Google Patents

Transmission protocol method, system, equipment and storage medium of EMS and BMS Download PDF

Info

Publication number
CN114025032B
CN114025032B CN202210007445.7A CN202210007445A CN114025032B CN 114025032 B CN114025032 B CN 114025032B CN 202210007445 A CN202210007445 A CN 202210007445A CN 114025032 B CN114025032 B CN 114025032B
Authority
CN
China
Prior art keywords
address
register
ems
bms
management system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210007445.7A
Other languages
Chinese (zh)
Other versions
CN114025032A (en
Inventor
欧阳海平
郭晨霏
陈欣然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen NYY Technology Co Ltd
Original Assignee
Shenzhen NYY Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen NYY Technology Co Ltd filed Critical Shenzhen NYY Technology Co Ltd
Priority to CN202210007445.7A priority Critical patent/CN114025032B/en
Publication of CN114025032A publication Critical patent/CN114025032A/en
Application granted granted Critical
Publication of CN114025032B publication Critical patent/CN114025032B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures

Abstract

The invention relates to the field of power supply signal transmission, and discloses a transmission protocol method, a system, equipment and a storage medium for EMS and BMS. The method comprises the following steps: the EMS energy management system sends a data read-write instruction to the BMS battery management system based on the TCP/IP protocol; the BMS battery management system receives the data reading and writing instruction, reads the protocol identification of the data reading and writing instruction, and judges whether the protocol identification is an ETH protocol identification; if the ETH protocol identifier is the ETH protocol identifier, reading a function code, an equipment address and a register address of the data read-write instruction; judging whether the function code is a preset write-in function code; if the function code is written, reading a register value of the data read-write instruction, writing the register value into a register address in the equipment address according to an execution instruction corresponding to the function code, and sending a command of successful modification to the EMS energy management system; and if the function code is not written in, reading the register value of the register address in the equipment address, and sending the register value to the EMS energy management system.

Description

Transmission protocol method, system, equipment and storage medium of EMS and BMS
Technical Field
The present invention relates to the field of power supply signal transmission, and in particular, to a transmission protocol method, system, device, and storage medium for EMS and BMS.
Background
EMS is an electric energy management system, BMS is a battery management system, EMS and BMS are widely applied to the current micro-grid, and the transmission process of current is realized through the exchange of information data. In the information transmission process of the current EMS and BMS, the BMS is sometimes required to be translated into different protocols as the middle on transmission protocols of the EMS and the BMS. However, BMS translation results in EMS inability to directly control the first line of power devices and sensors and is prone to errands during translation.
Therefore, a new technology is needed to solve the problem that the current EMS cannot directly control the power devices and the sensors and the BMS is prone to error in the translation process.
Disclosure of Invention
The invention mainly aims to solve the technical problem that the prior EMS cannot directly control electric energy equipment and sensors and is easy to make mistakes in the translation process of the BMS.
The first aspect of the present invention provides a transmission protocol method for an EMS and a BMS, the transmission protocol method for the EMS and the BMS being applied to a transmission protocol system for the EMS and the BMS, the transmission protocol system for the EMS and the BMS comprising: EMS energy management system, BMS battery management system, EMS and BMS transmission protocol method includes:
the EMS energy management system sends a data read-write instruction to the BMS battery management system based on a TCP/IP protocol;
the BMS battery management system receives the data reading and writing instruction, reads a protocol identifier of the data reading and writing instruction, and judges whether the protocol identifier is an ETH protocol identifier;
if the read-write instruction is an ETH protocol identifier, reading a function code, an equipment address and a register address of the data read-write instruction;
judging whether the function code is a preset write-in function code;
if the function code is written, reading a register value of the data read-write instruction, writing the register value into a register address in the equipment address according to an execution instruction corresponding to the function code, and sending a command of successful modification to the EMS energy management system;
and if the write-in function code is not the write-in function code, reading a register value of the register address in the equipment address, and sending the register value to the EMS energy management system.
Optionally, in a first implementation manner of the first aspect of the present invention, the writing, according to the execution instruction corresponding to the function code, the register value into a register address in the device address includes:
according to a preset range mode table, carrying out range matching processing on the equipment address to obtain an address type corresponding to the equipment address;
and inquiring a preset address definition table corresponding to the address type according to the address type and the register address to obtain a target address, and filling the register value into the target address.
Optionally, in a second implementation manner of the first aspect of the present invention, the device address includes: a Basic Allocation Unit (BAU) address and a Basic Communication Unit (BCU) address, wherein the querying a preset address definition table corresponding to the address type according to the address type and the register address to obtain a target address, and the filling of the register value into the target address comprises:
when the equipment address is a Basic Allocation Unit (BAU) address, matching the register address with an allocation register address of the Basic Allocation Unit (BAU) address to obtain a target address, and filling the register value into the target address;
and when the equipment address is a Basic Communication Unit (BCU) address, matching the register address with a communication register address of the Basic Communication Unit (BCU) address to obtain a target address, and filling the register value into the target address.
Optionally, in a third implementation manner of the first aspect of the present invention, the range of the Basic Allocation Unit (BAU) address is 0xf4 to 0xfe, and the range of the Basic Communication Unit (BCU) address is 0xa0 to 0 xfe.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the writing of the function code includes: writing a single register code and a plurality of register codes, wherein the writing the register value into a register address in the device address according to the execution instruction corresponding to the function code comprises:
when the writing function code is to write a plurality of register codes, reading the initial address and the number of registers in the data reading and writing instruction;
according to the starting address and the number of the registers, sequentially filling the register values into register addresses in the equipment address;
and when the write-in function code is a single register code, writing the register value into a single register address of the data read-write instruction.
Optionally, in a fifth implementation manner of the first aspect of the present invention, after the writing the register value into the register address in the device address according to the execution instruction corresponding to the function code, before sending the modification success instruction to the EMS power management system, after reading the register value of the register address in the device address, and before sending the register value to the EMS power management system, the method further includes:
judging whether the data reading and writing instruction is executed successfully or not;
if the execution is not successful, obtaining an error code corresponding to the functional code based on a preset execution mapping relation, and analyzing an abnormal condition that the execution of the data reading and writing instruction is unsuccessful to obtain an error value;
and writing the error code and the error value into an error response frame to obtain error response data, and sending the error response data to the EMS energy management system.
Optionally, in a sixth implementation manner of the first aspect of the present invention, after the determining whether the protocol identifier is an ETH protocol identifier, the method further includes:
and if the command is not the ETH protocol identifier, sending a data request command to the EMS energy management system for reacquiring the character data of the data read-write command.
A second aspect of the present invention provides a transmission protocol system of an EMS and a BMS, the transmission protocol system of the EMS and the BMS including:
an EMS energy management system and a BMS battery management system;
the EMS energy management system is used for sending a data read-write instruction to the BMS battery management system based on a TCP/IP protocol;
the BMS battery management system is used for receiving the data reading and writing instruction, reading a protocol identifier of the data reading and writing instruction and judging whether the protocol identifier is an ETH protocol identifier or not;
if the read-write instruction is an ETH protocol identifier, reading a function code, an equipment address and a register address of the data read-write instruction;
judging whether the function code is a preset write-in function code;
if the function code is written, reading a register value of the data read-write instruction, writing the register value into a register address in the equipment address according to an execution instruction corresponding to the function code, and sending a command of successful modification to the EMS energy management system;
and if the write-in function code is not the write-in function code, reading a register value of the register address in the equipment address, and sending the register value to the EMS energy management system.
A third aspect of the present invention provides a transmission protocol device for an EMS and a BMS, comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line; the at least one processor invokes the instructions in the memory to cause the transmission protocol devices of the EMS and BMS to perform the transmission protocol methods of the EMS and BMS as described above.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the above-described EMS and BMS transmission protocol method.
In the embodiment of the invention, by designing an operation data structure of an ETH interface protocol for transmitting lower bits under a TCP/IP protocol, the data of the BMS in the BMS battery management system can be directly executed without translation, and the problem that the EMS cannot directly control the electric energy equipment and the sensor and the EMS is easy to make mistakes in the translation process is solved.
Drawings
Fig. 1 is a diagram illustrating an embodiment of a transmission protocol method of EMS and BMS according to an embodiment of the present invention;
fig. 2 is a diagram illustrating an embodiment of a transmission protocol system of an EMS and a BMS according to an embodiment of the present invention;
fig. 3 is a diagram illustrating another embodiment of a transmission protocol system of an EMS and a BMS according to an embodiment of the present invention;
fig. 4 is a diagram illustrating an embodiment of a transmission protocol device of an EMS and a BMS according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a transmission protocol method, a transmission protocol system, transmission protocol equipment and a storage medium of EMS and BMS.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a detailed procedure of an embodiment of the present invention is described below, and referring to fig. 1, in an embodiment of a transmission protocol method for an EMS and a BMS according to the embodiment of the present invention, the transmission protocol method for the EMS and the BMS is applied to a transmission protocol system for the EMS and the BMS, and the transmission protocol system for the EMS and the BMS includes: EMS energy management system, BMS battery management system, EMS and BMS transmission protocol method includes:
101. the EMS energy management system sends a data read-write instruction to the BMS battery management system based on the TCP/IP protocol;
102. the BMS battery management system receives the data reading and writing instruction, reads the protocol identification of the data reading and writing instruction, and judges whether the protocol identification is an ETH protocol identification;
in the step 101-.
103. If the ETH protocol identifier is the ETH protocol identifier, reading a function code, an equipment address and a register address of the data read-write instruction;
in this embodiment, the data read-write instruction has three types of reading a register, writing a single register, and writing a plurality of registers, and different processing modes adopt function codes, and the function code processing process needs an equipment address and a register address under the equipment address, and obviously, the register addresses of different equipment addresses are different.
104. Judging whether the function code is a preset write-in function code;
in this embodiment, 03 (H) is a read function code, while a function code written in a single register is 06 (H), and a function code 10 (H) written in a plurality of registers, where H is data in 16 systems, and 03, 06, 10 are compared in 16 systems to 10 systems.
105. If the function code is written, reading a register value of the data read-write instruction, writing the register value into a register address in the equipment address according to an execution instruction corresponding to the function code, and sending a command of successful modification to the EMS energy management system;
in this embodiment, if the function code is written, the written single register is different from the plurality of registers, the register address is the final target address when the function code is written into the single register, the number of registers is also read when the function code is written into the plurality of registers, register values are sequentially written into the registers with the number of registers according to the sequence of the registers, and a register modification success instruction is sent to the EMS energy management system after modification is completed.
Further, in the "writing the register value into the register address in the device address according to the execution instruction corresponding to the function code", the following steps may be performed:
1051. according to a preset range mode table, carrying out range matching processing on the equipment address to obtain an address type corresponding to the equipment address;
1052. and inquiring a preset address definition table corresponding to the address type according to the address type and the register address to obtain a target address, and filling the register value into the target address.
In 1051-.
Further, the device address includes: basic Allocation Unit (BAU) address, Basic Communication Unit (BCU) address, according to address type and register address, querying preset address definition table corresponding to address type to obtain target address, filling register value into target address, the following steps can be executed:
1053. when the equipment address is a Basic Allocation Unit (BAU) address, matching the register address with an allocation register address of the Basic Allocation Unit (BAU) address to obtain a target address, and filling a register value into the target address;
1054. when the equipment address is a Basic Communication Unit (BCU) address, the register address is matched with a communication register address of the Basic Communication Unit (BCU) address to obtain a target address, and a register value is filled into the target address.
In this embodiment, the range of the Basic Allocation Unit (BAU) address is 0xf4 to 0xfe, and can also be converted into an address range of 1-99, and the identification meaning of the register can refer to the Basic Allocation Unit (BAU) address description example table in Table 1.
TABLE 1 Basic Allocation Unit (BAU) Address description example Table
Figure 4635DEST_PATH_IMAGE001
The range of the Basic Communication Unit (BCU) address is 0xa0 to 0xfe, and can also be converted into the address range of 100 + 900, and the identification meaning of the register can refer to the Basic Communication Unit (BCU) address description example table in table 2.
TABLE 2 Basic Communication Unit (BCU) Address description example Table
Figure 187355DEST_PATH_IMAGE002
Further, writing the function code includes: writing a single register code and writing a plurality of register codes, and writing a register value into a register address in the device address according to an execution instruction corresponding to the function code may perform the following steps:
1055. when the writing function code is to write a plurality of register codes, reading the initial address and the number of registers in the data reading and writing instruction;
1056. according to the initial address and the number of registers, sequentially filling register values into register addresses in the equipment address;
1057. and when the write-in function code is to write in a single register code, the register value is written in a single register address of the data read-write instruction.
In the 1055-1057 embodiment, the data structure example table of table 3 for writing a plurality of register codes may be referred to in the instruction for writing a plurality of register codes.
Table 3, example table of data structure for writing a plurality of register codes
Figure 294988DEST_PATH_IMAGE003
2B in table 3 is represented as 2 bytes, the start address is the start address to be written, and the number of registers is the number of registers written in-order.
In the instruction to write a single register code, the data structure example table of table 4 to write a single register code may be referred to.
Table 4 example table of data structure written into single register code
Figure 955776DEST_PATH_IMAGE004
There is no extension in the number of registers in writing only register values in a single register code to be written to register addresses alone.
106. And if the function code is not written in, reading the register value of the register address in the equipment address, and sending the register value to the EMS energy management system.
In this embodiment, the data of the register may be read by referring to the data structure example table of the write function code in table 5, the data of the start address (high order bits) and the start address (low order bits) is read, then the number of registers is checked, the register value is read according to the address reading, and the register value is sent to the EMS energy management system.
TABLE 5 data structure example table written with function code
Figure 98045DEST_PATH_IMAGE005
Further, after writing the register value into the register address in the device address according to the execution instruction corresponding to the function code, before sending the modification success instruction to the EMS power management system, after reading the register value of the register address in the device address, and before sending the register value to the EMS power management system, the method further includes:
107. judging whether the data read-write instruction is successfully executed;
108. if the execution is not successful, obtaining an error code corresponding to the functional code based on a preset execution mapping relation, and analyzing the abnormal condition that the execution of the data reading and writing instruction is unsuccessful to obtain an error value;
109. and writing the error code and the error value into an error response frame to obtain error response data, and sending the error response data to the EMS energy management system.
In step 107-. For example, error type 01 indicates that the function code does not support (returns an error code of read data), error type 02 indicates that the register address is illegal, error type 03 indicates that the number of register values is not correct or illegal, and error type 04 indicates that the function code handles an exception. And sending the wrong response data to the EMS energy management system.
TABLE 6 error response frame schematic
Figure 186087DEST_PATH_IMAGE006
Further, after 102, the following steps may also be performed:
110. and if the command is not the ETH protocol identifier, sending a data request command to the EMS energy management system for reacquiring the character data of the data read-write command.
In step 110, if the ETH protocol may not have the problem of character loss in communication, the execution data request command is sent back to the EMS energy management system, so that the EMS energy management system receives the request command and then sends a data read/write command again.
In the embodiment of the invention, by designing an operation data structure of an ETH interface protocol for transmitting lower bits under a TCP/IP protocol, the data of the BMS in the BMS battery management system can be directly executed without translation, and the problem that the EMS cannot directly control the electric energy equipment and the sensor and the EMS is easy to make mistakes in the translation process is solved.
With reference to fig. 2, the transmission protocol method of the EMS and the BMS in the embodiment of the present invention is described above, and the transmission protocol system of the EMS and the BMS in the embodiment of the present invention is described below, and the transmission protocol system of the EMS and the BMS in the embodiment of the present invention includes:
an EMS energy management system 201, a BMS battery management system 202;
the EMS energy management system 201 is configured to send a data read-write command to the BMS battery management system based on a TCP/IP protocol;
the BMS battery management system 202 is configured to receive the data reading and writing instruction, read a protocol identifier of the data reading and writing instruction, and determine whether the protocol identifier is an ETH protocol identifier;
if the read-write instruction is an ETH protocol identifier, reading a function code, an equipment address and a register address of the data read-write instruction;
judging whether the function code is a preset write-in function code;
if the function code is written, reading a register value of the data read-write instruction, writing the register value into a register address in the equipment address according to an execution instruction corresponding to the function code, and sending a command of successful modification to the EMS energy management system;
and if the write-in function code is not the write-in function code, reading a register value of the register address in the equipment address, and sending the register value to the EMS energy management system.
In the embodiment of the invention, by designing an operation data structure of an ETH interface protocol for transmitting lower bits under a TCP/IP protocol, the data of the BMS in the BMS battery management system can be directly executed without translation, and the problem that the EMS cannot directly control the electric energy equipment and the sensor and the EMS is easy to make mistakes in the translation process is solved.
Referring to fig. 3, another embodiment of the transmission protocol system of the EMS and the BMS according to the embodiment of the present invention includes:
an EMS energy management system 201, a BMS battery management system 202;
the EMS energy management system 201 is configured to send a data read-write command to the BMS battery management system based on a TCP/IP protocol;
the BMS battery management system 202 is configured to receive the data reading and writing instruction, read a protocol identifier of the data reading and writing instruction, and determine whether the protocol identifier is an ETH protocol identifier;
if the read-write instruction is an ETH protocol identifier, reading a function code, an equipment address and a register address of the data read-write instruction;
judging whether the function code is a preset write-in function code;
if the function code is written, reading a register value of the data read-write instruction, writing the register value into a register address in the equipment address according to an execution instruction corresponding to the function code, and sending a command of successful modification to the EMS energy management system;
and if the write-in function code is not the write-in function code, reading a register value of the register address in the equipment address, and sending the register value to the EMS energy management system.
In the embodiment of the invention, by designing an operation data structure of an ETH interface protocol for transmitting lower bits under a TCP/IP protocol, the data of the BMS in the BMS battery management system can be directly executed without translation, and the problem that the EMS cannot directly control the electric energy equipment and the sensor and the EMS is easy to make mistakes in the translation process is solved.
Wherein the BMS battery management system 202 is specifically configured to:
according to a preset range mode table, carrying out range matching processing on the equipment address to obtain an address type corresponding to the equipment address;
and inquiring a preset address definition table corresponding to the address type according to the address type and the register address to obtain a target address, and filling the register value into the target address.
Wherein, the BMS battery management system 202 may be further specifically configured to:
when the equipment address is a Basic Allocation Unit (BAU) address, matching the register address with an allocation register address of the Basic Allocation Unit (BAU) address to obtain a target address, and filling the register value into the target address;
and when the equipment address is a Basic Communication Unit (BCU) address, matching the register address with a communication register address of the Basic Communication Unit (BCU) address to obtain a target address, and filling the register value into the target address.
Wherein the Basic Allocation Unit (BAU) address ranges from 0xf4 to 0xfe, and the Basic Allocation Unit (BAU) address ranges from 0xa0 to 0 xfe.
Wherein, the BMS battery management system 202 may be further specifically configured to:
when the writing function code is to write a plurality of register codes, reading the initial address and the number of registers in the data reading and writing instruction;
according to the starting address and the number of the registers, sequentially filling the register values into register addresses in the equipment address;
and when the write-in function code is a single register code, writing the register value into a single register address of the data read-write instruction.
The BMS battery management system 202 further includes an error feedback module 2021, wherein the error feedback module 2021 is specifically configured to:
judging whether the data reading and writing instruction is executed successfully or not;
if the execution is not successful, obtaining an error code corresponding to the functional code based on a preset execution mapping relation, and analyzing an abnormal condition that the execution of the data reading and writing instruction is unsuccessful to obtain an error value;
and writing the error code and the error value into an error response frame to obtain error response data, and sending the error response data into the EMS energy management system.
The BMS battery management system 202 further includes a data request module 2022, where the data request module 2022 is specifically configured to:
and if the command is not the ETH protocol identifier, sending a data request command to the EMS energy management system for reacquiring the character data of the data read-write command.
Fig. 2 and 3 describe the transmission protocol system of the EMS and the BMS in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the transmission protocol device of the EMS and the BMS in the embodiment of the present invention in detail from the perspective of hardware processing.
Fig. 4 is a schematic structural diagram of a transmission protocol device of an EMS and a BMS according to an embodiment of the present invention, where the transmission protocol device 400 of the EMS and the BMS may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 410 (e.g., one or more processors) and a memory 420, one or more storage media 430 (e.g., one or more mass storage devices) for storing applications 433 or data 432. Memory 420 and storage medium 430 may be, among other things, transient or persistent storage. The program stored in the storage medium 430 may include one or more modules (not shown), each of which may include a series of instruction operations in the transmission protocol device 400 of the EMS and the BMS. Further, the processor 410 may be configured to communicate with the storage medium 430, and perform a series of instruction operations in the storage medium 430 on the transmission protocol device 400 of the EMS and BMS.
The EMS and BMS based transport protocol apparatus 400 may also include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input-output interfaces 460, and/or one or more operating systems 431, such as Windows service, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art will appreciate that the configuration of the transmission protocol device of the EMS and BMS illustrated in fig. 4 does not constitute a limitation of the EMS and BMS-based transmission protocol device and may include more or less components than those illustrated, or combine some components, or a different arrangement of components.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and which may also be a volatile computer-readable storage medium, having stored therein instructions, which, when executed on a computer, cause the computer to perform the steps of the EMS and BMS transmission protocol method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described system or system and unit may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A transmission protocol method of an EMS and a BMS is applied to a transmission protocol system of the EMS and the BMS, and the transmission protocol system of the EMS and the BMS comprises: EMS energy management system, BMS battery management system, EMS and BMS transmission protocol method includes:
the EMS energy management system sends a data read-write instruction to the BMS battery management system based on a TCP/IP protocol;
the BMS battery management system receives the data reading and writing instruction, reads a protocol identifier of the data reading and writing instruction, and judges whether the protocol identifier is an ETH protocol identifier, wherein the ETH protocol identifier comprises: the method comprises the following steps that a TCP/IP protocol is used between EMS and BMS to transmit character strings of an ETH physical layer communication interface protocol;
if the read-write instruction is an ETH protocol identifier, reading a function code, an equipment address and a register address of the data read-write instruction;
judging whether the function code is a preset write-in function code;
if the function code is written, reading a register value of the data read-write instruction, writing the register value into a register address in the equipment address according to an execution instruction corresponding to the function code, and sending a command of successful modification to the EMS energy management system;
and if the write-in function code is not the write-in function code, reading a register value of the register address in the equipment address, and sending the register value to the EMS energy management system.
2. The EMS and BMS transport protocol method of claim 1, wherein the writing the register value into the register address of the device address according to the execution instruction corresponding to the function code comprises:
according to a preset range mode table, carrying out range matching processing on the equipment address to obtain an address type corresponding to the equipment address;
and inquiring a preset address definition table corresponding to the address type according to the address type and the register address to obtain a target address, and filling the register value into the target address.
3. The EMS and BMS transport protocol method of claim 2, wherein the device address comprises: a Basic Allocation Unit (BAU) address and a Basic Communication Unit (BCU) address, wherein the querying a preset address definition table corresponding to the address type according to the address type and the register address to obtain a target address, and the filling of the register value into the target address comprises:
when the equipment address is a Basic Allocation Unit (BAU) address, matching the register address with an allocation register address of the Basic Allocation Unit (BAU) address to obtain a target address, and filling the register value into the target address;
and when the equipment address is a Basic Communication Unit (BCU) address, matching the register address with a communication register address of the Basic Communication Unit (BCU) address to obtain a target address, and filling the register value into the target address.
4. The EMS and BMS transmission protocol method of claim 3, wherein the Basic Allocation Unit (BAU) address ranges from 0xf4 to 0xfe, and the Basic Communication Unit (BCU) address ranges from 0xa0 to 0 xfe.
5. The EMS and BMS transmission protocol method of claim 1, wherein writing the function code comprises: writing a single register code and a plurality of register codes, wherein the writing the register value into a register address in the device address according to the execution instruction corresponding to the function code comprises:
when the writing function code is to write a plurality of register codes, reading the initial address and the number of registers in the data reading and writing instruction;
according to the starting address and the number of the registers, sequentially filling the register values into register addresses in the equipment address;
and when the write-in function code is a single register code, writing the register value into a single register address of the data read-write instruction.
6. The EMS and BMS transmission protocol method according to claim 1, wherein after the writing of the register value into the register address in the device address according to the execution instruction corresponding to the function code, before the sending of the modification success instruction into the EMS power management system, after the reading of the register value of the register address in the device address, before the sending of the register value into the EMS power management system, further comprises:
judging whether the data reading and writing instruction is executed successfully or not;
if the execution is not successful, obtaining an error code corresponding to the functional code based on a preset execution mapping relation, and analyzing an abnormal condition that the execution of the data reading and writing instruction is unsuccessful to obtain an error value;
and writing the error code and the error value into an error response frame to obtain error response data, and sending the error response data to the EMS energy management system.
7. The EMS and BMS transmission protocol method of claim 1, wherein after the determining whether the protocol identifier is an ETH protocol identifier, further comprising:
and if the command is not the ETH protocol identifier, sending a data request command to the EMS energy management system for reacquiring the character data of the data read-write command.
8. An EMS and BMS transmission protocol system, comprising:
an EMS energy management system and a BMS battery management system;
the EMS energy management system is used for sending a data read-write instruction to the BMS battery management system based on a TCP/IP protocol;
the BMS battery management system is used for receiving the data reading and writing instruction, reading a protocol identifier of the data reading and writing instruction, and judging whether the protocol identifier is an ETH protocol identifier, wherein the ETH protocol identifier comprises: the method comprises the following steps that a TCP/IP protocol is used between EMS and BMS to transmit character strings of an ETH physical layer communication interface protocol;
if the read-write instruction is an ETH protocol identifier, reading a function code, an equipment address and a register address of the data read-write instruction;
judging whether the function code is a preset write-in function code;
if the function code is written, reading a register value of the data read-write instruction, writing the register value into a register address in the equipment address according to an execution instruction corresponding to the function code, and sending a command of successful modification to the EMS energy management system;
and if the write-in function code is not the write-in function code, reading a register value of the register address in the equipment address, and sending the register value to the EMS energy management system.
9. An EMS and BMS transmission protocol device, comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor invokes the instructions in the memory to cause transmission protocol devices of the EMS and BMS to perform the transmission protocol method of the EMS and BMS according to any of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the EMS and BMS transmission protocol method according to any one of claims 1 to 7.
CN202210007445.7A 2022-01-06 2022-01-06 Transmission protocol method, system, equipment and storage medium of EMS and BMS Active CN114025032B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210007445.7A CN114025032B (en) 2022-01-06 2022-01-06 Transmission protocol method, system, equipment and storage medium of EMS and BMS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210007445.7A CN114025032B (en) 2022-01-06 2022-01-06 Transmission protocol method, system, equipment and storage medium of EMS and BMS

Publications (2)

Publication Number Publication Date
CN114025032A CN114025032A (en) 2022-02-08
CN114025032B true CN114025032B (en) 2022-04-22

Family

ID=80069684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210007445.7A Active CN114025032B (en) 2022-01-06 2022-01-06 Transmission protocol method, system, equipment and storage medium of EMS and BMS

Country Status (1)

Country Link
CN (1) CN114025032B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116980499A (en) * 2023-08-10 2023-10-31 湖南银杏电池智能管理技术有限公司 BMS serial port data transmission method based on Modbus communication protocol

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417764A (en) * 2019-07-19 2019-11-05 西门子工厂自动化工程有限公司 The method and apparatus for sending the method and apparatus of data and receiving data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106489132B (en) * 2014-09-19 2019-04-19 华为技术有限公司 Read and write the method, apparatus, storage equipment and computer system of data
CN109145627A (en) * 2018-09-05 2019-01-04 郑州云海信息技术有限公司 A kind of method and relevant apparatus of data processing
CN113095026A (en) * 2021-03-12 2021-07-09 苏州芯启微电子科技有限公司 Register group circuit device supporting out-of-order multi-read-write

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417764A (en) * 2019-07-19 2019-11-05 西门子工厂自动化工程有限公司 The method and apparatus for sending the method and apparatus of data and receiving data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向RS-485控制网络的Modbus协议扩展及应用;胡文翔等;《自动化仪表》;20130420(第04期);全文 *

Also Published As

Publication number Publication date
CN114025032A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
US8660130B2 (en) Transmitting a packet
US7685322B2 (en) Port number emulation for wireless USB connections
CN1185578C (en) Central processing unit capable of testing and debugging program easily
US6668374B1 (en) Method and apparatus for upgrading firmware in an embedded system
US6636521B1 (en) Flexible runtime configurable application program interface (API) that is command independent and reusable
US7069373B2 (en) USB endpoint controller flexible memory management
US20060020414A1 (en) System and method for automatically allocating MAC addresses to network cards
US7523378B2 (en) Techniques to determine integrity of information
US7296190B2 (en) Parallel text execution on low-end emulators and devices
US20060123123A1 (en) Hardware device and method for creation and management of toe-based socket information
CN110532106B (en) Inter-process communication method, device, equipment and storage medium
CN114025032B (en) Transmission protocol method, system, equipment and storage medium of EMS and BMS
JP5395108B2 (en) Apparatus and method for upgrading firmware in embedded systems
CN102165739A (en) Reliable reception of messages written via RDMA using hashing
US20090271171A1 (en) Emulator device, and a method for testing a test target device
CN113238856B (en) RDMA-based memory management method and device
CN112788576B (en) Equipment offline processing method and system, storage medium and electronic device
CN112350912B (en) Data acquisition method, system and device based on Modbus protocol
CN116931996A (en) Firmware updating method, device, equipment and storage medium
US11726666B2 (en) Network adapter with efficient storage-protocol emulation
CN115454896A (en) SMBUS-based SSD MCTP control message verification method and device, computer equipment and storage medium
CN111669358B (en) Method and device for processing vrouter network isolation spaces in batch
CN112416509B (en) Virtual machine control system and related equipment
US20080140687A1 (en) Socket structure simultaneously supporting both toe and ethernet network interface card and method of forming the socket structure
CN113472744A (en) Data interaction method, device, equipment and medium under different storage protocols

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant