Multi-type ammeter mixing method and device, computer equipment and storage medium
By configuring a unique communication address for the meter connected to the same communication port in the energy storage system, the problem of mixing and using multiple meter types is solved, and the system compatibility and data transmission reliability are improved.
Patent Information
- Application Number
- CN202510521820.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-07-25
AI Technical Summary
Existing energy storage systems are difficult to adapt to the needs of mixing and using a variety of different types of electricity meters, resulting in complex communication, redundant data integration and excessive chip resource utilization.
By obtaining the meter type that connects to the same communication port and configuring the communication address according to the meter type, including a preset serial number or address tag, to establish a communication connection, ensuring that each meter has a unique identity and address in the system.
It realizes access to a variety of meters with the same communication port, improves the flexibility and scalability of the system, ensures the timeliness and reliability of data transmission, reduces chip resource consumption, and simplifies the configuration process.
Smart Images

Figure CN120370029A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of energy storage systems, and particularly to a method, device, computer device and storage medium for mixing and combining multiple types of electric meters. Background Art
[0002] At present, the role of energy storage systems in the power system is becoming increasingly important. An energy storage system usually includes an EMS (Energy Management System), a BMS (Battery Management System), a PCS (Power Conversion System), and various electric meters (such as watt-hour meters, power meters, etc.). In an energy storage system, due to the need to adapt to different working conditions and on-site environments (such as meter sampling at grid connection points, photovoltaic points, energy storage points, etc.), various different types of electric meters are often used. These electric meters may come from different manufacturers and adopt different communication protocols and data formats, resulting in the need to design multiple hardware communication ports when using multiple types of electric meters in an energy storage system, occupying chip resources, and making communication and data integration in software complex and redundant.
[0003] Currently, there are also some related electric meter communication methods. For example, the communication is carried out by judging whether the meter and the port are idle to determine whether it can be queued. However, if one port corresponds to one hardware device and it is applied to the scenario of multiple electric meters in an energy storage system, multiple ports are required to dock with the electric meters, and flexible configuration cannot be given on-site. Or different communication units are used to establish different communications, but the involved RS485 ports still maintain the method of one port corresponding to one device, and it is impossible to process multiple different types of electric meters while saving chip port resources, and it is impossible to use multiple different types of electric meters simultaneously.
[0004] In summary, existing energy storage systems usually adopt a single communication port protocol or a customized communication interface, and it is difficult to meet the requirements of mixing and using multiple types of electric meters. Summary of the Invention
[0005] In view of this, the present invention provides a method, device, computer device and storage medium for mixing and combining multiple types of electric meters to solve the problem that it is difficult for the same communication port to meet the requirements of mixing and using multiple types of electric meters.
[0006] In the first aspect, the present invention provides a method for mixing and combining multiple types of electric meters, and the method includes:
[0007] Obtain the types of multiple electric meters connected to the same communication port;
[0008] Configure a communication address for each electric meter according to the type of electric meter and a preset serial number or configure a communication address for each electric meter according to an address label;
[0009] Establish communication for each electricity meter according to the communication address.
[0010] A method for mixing multiple types of electricity meters provided by the present invention obtains the electricity meter types of multiple electricity meters accessing the same communication port, and configures communication addresses for each electricity meter according to the electricity meter types in a preset serial number or configures communication addresses for each electricity meter according to the address tags, so that the same communication port can be compatible with the access requirements of different types of electricity meters, is applicable to complex scenarios where multiple electricity meters coexist, improves the tolerance of the energy storage system to different electricity meters, and improves the flexibility and scalability of the overall system. Based on the configured communication addresses, communication is established for each electricity meter, which ensures the timeliness of electricity meter data transmission, helps the energy storage system quickly obtain the data of each electricity meter, realizes real-time monitoring and management of the system. At the same time, it reduces the consumption of interface chip resources, and through data processing and integration of the same port, it ensures the consistency and reliability of the data, makes it more convenient for the overall software system to be modular, further improves the robustness of the energy storage system, and solves the problem that it is difficult for the same communication port to adapt to the mixing and use requirements of multiple electricity meter types.
[0011] In an alternative embodiment, obtaining the electricity meter types of multiple electricity meters accessing the same communication port includes:
[0012] Determine different installation points where the same communication port belongs;
[0013] Based on different installation points, obtain the electricity meter types of different electricity meters accessing the same communication port.
[0014] A method for mixing multiple types of electricity meters provided by the present invention determines different installation points where the same communication port belongs, can accurately determine the actual installation positions of each electricity meter, and obtains the electricity meter types of different electricity meters accessing the same communication port based on different installation points, so that the energy storage system can perform targeted data collection and processing according to the functional requirements and electricity meter characteristics of each installation point. Under the same communication port, clearly understand the type and belonging installation point of each electricity meter, and can avoid communication conflicts and data errors caused by chaotic access of electricity meters.
[0015] In an alternative embodiment, the electricity meter types include electricity meters with default addresses and electricity meters with known addresses;
[0016] Configuring communication addresses for each electricity meter according to the electricity meter types in a preset serial number or configuring communication addresses for each electricity meter according to the address tags includes:
[0017] When the electricity meter type is an electricity meter with a default address, configure communication addresses for each electricity meter in a preset serial number on the same communication port;
[0018] When the type of the electricity meter is an electricity meter with a known address, configure the communication address for each electricity meter according to the address label at the same communication port.
[0019] A method for mixing and combining multiple types of electricity meters provided by the present invention fully considers the diversity of electricity meter types. For electricity meters with default addresses, a preset serial number is used to configure the communication address, effectively solving the identification problem caused by possible repetition of default addresses; for electricity meters with known addresses, the communication address is directly configured according to the address label, simplifying the configuration process. This approach of flexibly selecting the configuration method according to the actual situation of the electricity meter can adapt to the access requirements of electricity meters from different manufacturers and different models, greatly improving the compatibility of the system with various types of electricity meters.
[0020] In an alternative embodiment, when the type of the electricity meter is an electricity meter with a default address, configure the communication address for each electricity meter according to the preset serial number at the same communication port, including:
[0021] When the type of the electricity meter is an electricity meter with a default address, reassign a new location address for the electricity meter with a default address at the same communication port;
[0022] Combine the electricity meter type, the new location address, and the preset serial number, and configure the communication address for each electricity meter according to the combination of the electricity meter type, the new location address, and the preset serial number at the same communication port.
[0023] A method for mixing and combining multiple types of electricity meters provided by the present invention reassigns a new location address for the electricity meter with a default address, making the physical location identifier of the electricity meter in the system more explicit. Combine the electricity meter type, the new location address, and the preset serial number to configure the communication address, greatly enriching the identification information of the electricity meter. The electricity meter type can help the system quickly identify the functions and characteristics of the electricity meter so as to adopt appropriate data processing strategies; the new location address clarifies the actual installation location of the electricity meter; the preset serial number ensures the uniqueness of each electricity meter in the system. This comprehensive information combination enables each electricity meter to have a unique and highly recognizable communication address under the same communication port, effectively avoiding address conflicts and identification errors, and ensuring the accuracy and stability of data transmission.
[0024] In an alternative embodiment, when the type of the electricity meter is an electricity meter with a known address, configure the communication address for each electricity meter according to the address label at the same communication port, including:
[0025] When the type of the electricity meter is an electricity meter with a known address, obtain the address label of each electricity meter when it leaves the factory;
[0026] Combine the electricity meter type and the address label, and configure the communication address for each electricity meter according to the combination of the electricity meter type and the address label at the same communication port.
[0027] The present invention provides a method for mixing and merging multiple types of electric meters. For electric meters with known addresses, the address label when leaving the factory is directly obtained to configure the communication address, which greatly simplifies the configuration process, reduces the steps of manual intervention, and uses the address label that comes with the electric meter when it leaves the factory for configuration, utilizing the unique identifier pre-set by the electric meter manufacturer. The communication address is configured by combining the meter type and the address label, so that the system can quickly identify the attributes and identity of each electric meter. The meter type helps the system to clarify the functional characteristics of the electric meter, and the address label accurately locates the individual electric meter. This concise and clear combination method allows the system to quickly and accurately find the corresponding electric meter during the data interaction process, realizes efficient data collection and transmission, and improves the system's processing efficiency of electric meter data.
[0028] In an optional implementation, establishing communication for each electric meter according to the communication address includes:
[0029] Matching configuration parameters of each meter communication address, the configuration parameters being a combination of meter type, new location address and preset serial number, or a combination of meter type and address label;
[0030] Communication is established for each meter based on the configuration parameters of each meter's communication address.
[0031] The present invention provides a method for mixing and merging multiple types of electric meters. By matching the configuration parameters corresponding to the communication address of each electric meter, whether it is a complex electric meter type, a new location address and a preset serial number combination, or a relatively simple combination of electric meter type and address label, the key features of the electric meter can be accurately located. This enables the system to dock with each electric meter based on an accurate and unique identifier when establishing communication, effectively avoiding the failure of communication establishment due to parameter errors or confusion, improving the success rate and stability of communication connections, and ensuring the reliability of data transmission of electric meters in energy storage systems. The present invention covers two configuration parameter methods corresponding to different types of electric meters, which fully adapts to the actual situation of diverse sources of electric meters in energy storage systems. For electric meters with default addresses, communication is established using their unique combination parameters; for electric meters with known addresses, communication is established through another combination parameter. This comprehensive adaptability enables the system to easily integrate electric meters of different manufacturers and models, build a unified communication network, and improve the system's tolerance and integration capabilities for various types of electric meters.
[0032] In an optional implementation, the method for mixing multiple types of electric meters further includes:
[0033] When the configuration parameters of each electricity meter communication address are a combination of electricity meter type, new location address, preset serial number, and address label, query the configuration method of the communication address. The configuration methods include the configuration method according to the combination of electricity meter type, new location address, and preset serial number, and the configuration method according to the combination of electricity meter type and address label;
[0034] Match the configuration parameters of each electricity meter communication address based on the configuration method of the communication address;
[0035] Establish communication for each electricity meter based on the configuration parameters of each electricity meter communication address.
[0036] A method for mixing multiple types of electricity meters provided by the present invention. In an actual energy storage system, the types and configuration situations of electricity meters are complex and diverse. When the configuration parameters incorporate electricity meter type, new location address, preset serial number, and address label, the key configuration information of different electricity meters can be effectively sorted out by querying the configuration method. By distinguishing the configuration method according to the combination of electricity meter type, new location address, and preset serial number, and the configuration method according to the combination of electricity meter type and address label, the energy storage system can accurately locate the applicable configuration logic for each electricity meter, thereby properly handling various complex electricity meter configuration scenarios and enhancing the compatibility of the system with electricity meters from different sources and with different characteristics.
[0037] In a second aspect, the present invention provides a device for mixing multiple types of electricity meters. The device includes:
[0038] An electricity meter type acquisition module for acquiring the electricity meter types of multiple electricity meters accessing the same communication port;
[0039] A communication address configuration module for configuring the communication address for each electricity meter according to the preset serial number based on the electricity meter type or configuring the communication address for each electricity meter according to the address label;
[0040] A communication establishment module for establishing communication for each electricity meter according to the communication address.
[0041] In a third aspect, the present invention provides a computer device, including: a memory and a processor. The memory and the processor are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the method for mixing multiple types of electricity meters in the first aspect or any corresponding embodiment thereof.
[0042] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored. The computer instructions are used to cause a computer to execute the method for mixing multiple types of electricity meters in the first aspect or any corresponding embodiment thereof.
[0043] Fifth aspect, the present invention provides a computer program product, including computer instructions for causing a computer to execute the multi-type electric meter merging method according to the first aspect or any corresponding embodiment thereof as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0045] Figure 1 is a schematic flowchart of a multi-type electric meter merging method according to an embodiment of the present invention;
[0046] Figure 2 is a schematic flowchart of another multi-type electric meter merging method according to an embodiment of the present invention;
[0047] Figure 3 is a schematic flowchart of yet another multi-type electric meter merging method according to an embodiment of the present invention;
[0048] Figure 4 is a schematic flowchart of still another multi-type electric meter merging method according to an embodiment of the present invention;
[0049] Figure 5 is a structural block diagram of a multi-type electric meter merging device according to an embodiment of the present invention;
[0050] Figure 6 is a schematic hardware structure diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0052] An embodiment of the present invention provides a method for hybrid connection of multiple types of electric meters. Here, hybrid connection means that multiple electric meters of different types are connected to one communication port, which is different from the same-type connection method. The same-type connection means that multiple electric meters of the same type, that is, multiple identical electric meters, are connected to the same communication port. The embodiment of the present invention covers two configuration parameter methods corresponding to different types of electric meters, fully adapting to the actual situation of diverse sources of electric meters in the energy storage system, enabling the same communication port to be compatible with the access requirements of different types of electric meters, and being applicable to complex scenarios where multiple types of electric meters coexist.
[0053] According to an embodiment of the present invention, there is provided an embodiment of a method for hybrid connection of multiple types of electric meters. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0054] In this embodiment, a method for hybrid connection of multiple types of electric meters is provided, which can be used in an energy storage system. Figure 1 It is a flowchart of the method for hybrid connection of multiple types of electric meters according to an embodiment of the present invention. As Figure 1 shown, the process includes the following steps:
[0055] Step S101, obtain the types of electric meters of multiple electric meters connected to the same communication port.
[0056] Specifically, the type of electric meter refers to electric meters produced by different manufacturers with different communication protocols. Common electric meter communication protocols include Modbus, DL / T 645, etc. When the electric meter is connected to the communication port, it can send a general query command to the bus, such as function code 0x01 (read coil status) in the Modbus protocol or address broadcast query command in the DL / T 645 protocol. After receiving the command, the electric meter will return a response, and the type of electric meter can be judged according to the format and content of the response.
[0057] Taking an energy storage system as an example, in the energy storage system, multiple electricity meters are connected to the same communication port through the RS485 communication bus. When the communication protocol of the electricity meter is the Modbus protocol, after the electricity meter is connected to the communication port, it sends a general query command in the Modbus protocol, such as a function code 0x01 (read coil status) command frame, to the bus. The command frame contains the device address (usually set to the broadcast address first, that is, all electricity meters will respond), the function code 0x01, and other relevant fields. After receiving the command, the electricity meter will return a response frame according to the protocol rules it follows. The Modbus response frame contains fields such as the device address, function code, and corresponding data. For example, if the function code in the response frame is 0x01 and the data format conforms to the coil status data format specified by the Modbus protocol, it can be initially judged that the electricity meter supports the Modbus protocol. Combining other information such as the device address returned by the electricity meter, its specific type can be further determined. Different types of Modbus electricity meters may have differences in data storage formats, register address allocations, etc. By analyzing these differences, the electricity meter type can be accurately identified.
[0058] Step S102, configure a communication address for each electricity meter according to the preset serial number according to the electricity meter type or configure a communication address for each electricity meter according to the address label.
[0059] Specifically, configure a communication address for each electricity meter according to the preset serial number according to the electricity meter type:
[0060] Taking the communication protocol of the electricity meter as the Modbus protocol as an example, according to the Modbus protocol regulations, use the function code 0x03 (read holding register) to read the register address storing the serial number. First, it is necessary to clarify the starting register address where the serial number is stored in the electricity meter and the number of registers occupied, which can usually be obtained from the technical manual of the electricity meter. For example, the serial number of a certain Modbus electricity meter is stored in two consecutive holding registers with a starting address of 0x1000. Construct a read command frame, which contains the device address (use the broadcast address first), the function code 0x03, the starting register address 0x1000, and the number of registers to be read 2. Send this command frame through the communication port, and after the electricity meter receives it, it will return a response frame containing the serial number data, and the response frame can be parsed to obtain the electricity meter serial number.
[0061] Implementation of communication address allocation: Preset an algorithm for converting the serial number into a communication address. Assume that the communication address range is set to 1 - 255, and it is stipulated that the last two digits of the serial number are taken modulo 255 to obtain the communication address. For example, if the serial number of an electricity meter is 123456, take the last two digits 56, and the result of 56 modulo 255 is still 56, then the initially allocated communication address of this electricity meter is 56.
[0062] Configure a communication address for each electricity meter according to the address label:
[0063] If the address label is in the form of a QR code or barcode, a dedicated barcode scanning device is used for reading. The information encoded in the QR code or barcode includes the target communication address of the electricity meter and possibly other relevant information (such as the electricity meter model, production batch, etc., which can be used to assist in verifying the electricity meter type).
[0064] According to the electricity meter type (here it is known that the electricity meter follows the Modbus protocol), the read address is written into the electricity meter using the write command of the Modbus protocol. Using the function code 0x06, a write command frame is constructed. In the frame, the device address first uses the temporary address of the electricity meter (such as the default address), the function code is 0x06, the address register address is the specific register address where the electricity meter stores the communication address, and the data is the communication address read from the address label. This command frame is sent to the electricity meter to complete the communication address setting.
[0065] Step S103, establish communication for each electricity meter according to the communication address.
[0066] Specifically, multiple electricity meters in the energy storage system are connected to the same communication port through the RS485 communication bus. According to the configured communication address, a communication frame is constructed in the communication protocol format. For example, if you want to read the voltage data of a Modbus electricity meter with the address 10, a frame for reading the holding register with the function code 0x03 needs to be constructed. The frame structure is as follows: the device address field is set to 10 (indicating communication with the electricity meter with the address 10), the function code field is 0x03, the starting register address field is set to the register address corresponding to the voltage data storage location (assumed to be 0x0100), and the number of registers to read field is set to 1 (because only the voltage data of one register is read). Then, according to the verification rules of the Modbus RTU protocol, the CRC (Cyclic Redundancy Check) verification code is calculated and added to the end of the frame.
[0067] After the entire communication frame is constructed, it is sent through the selected communication interface (such as the RS 485 interface). The constructed communication frame is sent through the communication interface according to the set communication parameters (baud rate, data bits, stop bits, parity bits, etc.). During the sending process, the communication interface hardware will send the data bit by bit to the bus according to a certain timing sequence. After receiving the frame, the electricity meter will parse the frame, check whether the device address matches, whether the function code is supported, whether the verification code is correct, etc. If the electricity meter verification passes, it will read the corresponding data according to the function code requirement and construct a response frame to return to the sender. After receiving the response frame, the host or microcontroller also parses it in the protocol format and extracts the data returned by the electricity meter (such as the voltage value). During the receiving process, the communication interface hardware will convert the signal on the bus into a digital signal, receive and assemble the data according to the set communication parameters, and pass the complete response frame to the upper-layer processing software. Communication is established for each electricity meter through the above processing.
[0068] For different types of manufacturer meters installed at different points in the energy storage system, they are connected to the same upper device controller for communication by RS485 and are uniformly coordinated and processed in the upper local controller.
[0069] According to actual requirements, multiple meters can be connected. The overall data requirements for different meters in the energy storage system are different, so the cycle and data of each meter can be differentiated.
[0070] The method for mixing multiple types of meters provided in this embodiment obtains the meter types of multiple meters connected to the same communication port, and configures communication addresses for each meter according to the meter types according to a preset serial number or configures communication addresses for each meter according to address tags, so that the same communication port can be compatible with the access requirements of different types of meters, is applicable to complex scenarios where multiple meters coexist, improves the tolerance of the energy storage system to different meters, and improves the flexibility and scalability of the overall system. Based on the configured communication addresses, communication is established for each meter, which ensures the timeliness of meter data transmission, helps the energy storage system quickly obtain the data of each meter, realizes real-time monitoring and management of the system. At the same time, it reduces the consumption of interface chip resources, and through data processing and integration of the same port, it ensures the consistency and reliability of data, is more convenient for the modularization of the overall software system, further improves the robustness of the energy storage system, and solves the problem that it is difficult for the same communication port to adapt to the mixing and use requirements of multiple meter types.
[0071] In this embodiment, a method for mixing multiple types of meters is provided, which can be used in the energy storage system. Figure 2 It is a flowchart of the method for mixing multiple types of meters according to the embodiment of the present invention, as Figure 2 shown, and this process includes the following steps:
[0072] Step S201, obtain the meter types of multiple meters connected to the same communication port.
[0073] Specifically, the above step S201 includes:
[0074] Step S2011, determine different points where the same communication port is installed.
[0075] Specifically, different points can be the grid connection point position, photovoltaic point position, etc. of the energy storage system. The communication protocols of meters installed at different points are different.
[0076] Step S2012, obtain the meter types of different meters connected to the same communication port based on different points.
[0077] Specifically, taking the Modbus protocol as an example: After sending a general query command of the Modbus protocol (such as a function code 0x01 coil status command frame) to the bus, the electricity meter returns a response frame. When parsing the response frame to determine the electricity meter type, the installation location information of the electricity meter is also referred to.
[0078] There may be some differences in different types of Modbus electricity meters at different locations, such as data storage formats, register address allocations, etc. By establishing a corresponding knowledge base for these differences, the electricity meter type, and the installation location, when parsing the response frame of a certain electricity meter, combined with the installation location information where it is located, search and match in the knowledge base to determine the electricity meter type.
[0079] Step S202, configure a communication address for each electricity meter according to the preset serial number according to the electricity meter type or configure a communication address for each electricity meter according to the address label.
[0080] Specifically, configuring the electricity meter type and the electricity meter serial number can establish communication. According to the electricity meter type, use a combination command of the new location address and the serial number to reassign the communication address for the electricity meter. When multiple electricity meter devices are connected to the same port, the system will assign different communication addresses to distinguish the electricity meter sampling at different installation locations.
[0081] Or establish communication according to the configured electricity meter type and address label. When multiple electricity meter devices are connected to the same port, different communication addresses need to be configured according to the combination command of the electricity meter type and the address label.
[0082] The electricity meter types include electricity meters with default addresses and electricity meters with known addresses; the above step S202 includes:
[0083] Step S2021, when the electricity meter type is an electricity meter with a default address, configure a communication address for each electricity meter according to the preset serial number on the same communication port.
[0084] Specifically, the configuration method of configuring the electricity meter type and the serial number is applicable to some occasions where some electricity meters only have default addresses. At this time, it may occur that the default addresses of different electricity meters are the same. In the same communication port, if all addresses are the same, the energy storage system bus cannot distinguish them. Therefore, it is necessary to reassign addresses according to the serial number and rewrite the combination of the serial number and the new address into the electricity meter internally as the communication address.
[0085] In some alternative embodiments, the above step S2021 includes:
[0086] Step a1, when the electricity meter type is an electricity meter with a default address, reassign a new location address for the electricity meter with a default address on the same communication port.
[0087] Specifically, different new addresses, i.e., new location addresses, are assigned to the accessed electricity meters according to the electricity meter types.
[0088] Step a2: Combine the electricity meter type, the new location address, and the preset serial number, and configure communication addresses for each electricity meter at the same communication port according to the combination of the electricity meter type, the new location address, and the preset serial number.
[0089] Specifically, use the command that combines the electricity meter type, the new location address, and the serial number to reassign communication addresses to the accessed electricity meters. If multiple electricity meters are accessed at the same port, the energy storage system will assign different communication addresses to the electricity meters according to the combination of the new address and the serial number to distinguish the electricity meter sampling at different installation locations.
[0090] For example: Suppose the energy storage system accesses 3 electricity meters. Then, according to the electricity meter types with different communication protocols, new location addresses will be assigned to these 3 electricity meters, i.e., location addresses numbered 1, 2, and 3. Then, combined with the serial numbers of these 3 electricity meters, communication addresses of location address 1 + serial number, location address 2 + serial number, and location address 3 + serial number are generated.
[0091] For the conversion between the combination of the location address and the serial number and the communication address, please refer to step S102, which will not be elaborated here.
[0092] A method for mixing multiple types of electricity meters provided in this embodiment reassigns new location addresses to the electricity meters with default addresses, making the physical location identification of the electricity meters in the system clearer. The electricity meter type, the new location address, and the preset serial number are combined to configure communication addresses, greatly enriching the identification information of the electricity meters. The electricity meter type can help the system quickly identify the functions and characteristics of the electricity meters so as to adopt appropriate data processing strategies; the new location address clarifies the actual installation location of the electricity meters; the preset serial number ensures the uniqueness of each electricity meter in the system. This comprehensive information combination enables each electricity meter to have a unique and highly recognizable communication address under the same communication port, effectively avoiding address conflicts and identification errors, and ensuring the accuracy and stability of data transmission.
[0093] Step S2022: When the electricity meter type is an electricity meter with a known address, configure communication addresses for each electricity meter at the same communication port according to the address label.
[0094] Specifically, the configuration method that combines the electricity meter type and the address label is applicable to the occasion of known addresses. Some electricity meters from electricity meter manufacturers have address labels when leaving the factory, and the address labels of each electricity meter are different. Therefore, there is no need to distinguish by serial numbers, and the address labels can be directly assigned for distinction. As long as the types correspond, communication can be established.
[0095] In some alternative embodiments, the above step S2022 includes:
[0096] Step b1: when the meter type is a meter with a known address, obtain the address label of each meter when it leaves the factory.
[0097] Step b2: Combine the meter type and the address tag, and configure a communication address for each meter on the same communication port according to the combination of the meter type and the address tag.
[0098] Specifically, a communication address is allocated to the connected meter according to the meter type and the known address tag. If multiple meters are connected to the same port, different communication addresses need to be allocated to the multiple meters. Communication can be established as long as the meter types correspond.
[0099] This embodiment provides a method for mixing and merging multiple types of electricity meters. For electricity meters with known addresses, the address label when they leave the factory is directly obtained to configure the communication address, which greatly simplifies the configuration process, reduces the steps of manual intervention, and uses the address label that comes with the electricity meter when it leaves the factory for configuration, utilizing the unique identifier pre-set by the manufacturer of the electricity meter. The communication address is configured by combining the meter type and the address label, so that the system can quickly identify the attributes and identity of each electricity meter. The meter type helps the system to clarify the functional characteristics of the electricity meter, and the address label accurately locates the individual electricity meter. This concise and clear combination method allows the system to quickly and accurately find the corresponding electricity meter during the data interaction process, realize efficient data collection and transmission, and improve the system's processing efficiency of electricity meter data.
[0100] Step S203: establish communication for each meter according to the communication address. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0101] The mixed merging method of multiple types of meters provided in this embodiment determines the different installation points to which the same communication port belongs, can accurately determine the actual installation position of each meter, and obtain the meter types of different meters connected to the same communication port based on different points, so that the energy storage system can perform targeted data collection and processing according to the functional requirements and meter characteristics of each point. Under the same communication port, the type and point of each meter can be clearly understood, which can avoid communication conflicts and data errors caused by confusion in meter access. The diversity of meter types is fully considered. For meters with default addresses, a preset serial number is used to configure the communication address, which effectively solves the identification problem caused by possible duplication of the default address; for meters with known addresses, the communication address is directly configured according to the address label, which simplifies the configuration process. This method of flexibly selecting the configuration method according to the actual situation of the meter can adapt to the access requirements of meters of different manufacturers and models, and greatly improves the compatibility of the system with various types of meters.
[0102] In this embodiment, a method for mixing multiple types of electricity meters is provided, which can be used in an energy storage system. Figure 3 It is a flowchart of the method for mixing multiple types of electricity meters according to an embodiment of the present invention. As Figure 3 shown, this process includes the following steps:
[0103] Step S301, obtain the electricity meter types of multiple electricity meters accessing the same communication port. For details, please refer to Figure 2 step S201 of the embodiment shown, which will not be elaborated here.
[0104] Step S302, configure a communication address for each electricity meter according to the preset serial number according to the electricity meter type or configure a communication address for each electricity meter according to the address label. For details, please refer to Figure 2 step S202 of the embodiment shown, which will not be elaborated here.
[0105] Step S303, establish communication for each electricity meter according to the communication address.
[0106] Specifically, the above step S303 includes:
[0107] Step S3031, match the configuration parameters of the communication address of each electricity meter. The configuration parameters are a combination of the electricity meter type, the new location address, and the preset serial number, or the configuration parameters are a combination of the electricity meter type and the address label.
[0108] Step S3032, establish communication for each electricity meter based on the configuration parameters of the communication address of each electricity meter.
[0109] Specifically, after the two methods of the above step S2021 and step S2022 are configured, according to the electricity meter type of each path, query the corresponding configuration method, whether it is configured according to the serial number or according to the address label. After successful matching, communication can be established for each path of electricity meters respectively.
[0110] For example, when different types of electricity meters (such as electricity meter 1 and electricity meter 2) are accessed, since it can be specified in the energy storage system which position electricity meter 1 is used for. For example, this port of electricity meter 1 is used for the grid connection point position, and this port of electricity meter 2 is used for the photovoltaic point position. At this time, even if electricity meter 1 and electricity meter 2 are connected to the same port, any electricity meter type can be configured randomly for each of them.
[0111] Step S304, when the configuration parameters of the communication address of each electricity meter are a combination of the electricity meter type, the new location address, the preset serial number, and the address label, query the configuration method of the communication address. The configuration methods include the configuration method according to the combination of the electricity meter type, the new location address, and the preset serial number and the configuration method according to the combination of the electricity meter type and the address label; match the configuration parameters of the communication address of each electricity meter based on the configuration method of the communication address; establish communication for each electricity meter based on the configuration parameters of the communication address of each electricity meter.
[0112] Specifically, the energy storage system stores the configuration method corresponding to the type of the electricity meter. Even if all parameters are configured, it will preferentially query, according to the type of the electricity meter for each circuit, whether the corresponding configuration method is configured according to the combination of the new location address and the serial number or according to the address label. After matching, it establishes communication for each circuit of the electricity meter respectively.
[0113] The method for mixing multiple types of electricity meters provided in this embodiment can accurately locate the key features of the electricity meter by matching the configuration parameters corresponding to the communication address of each electricity meter, whether it is a complex electricity meter type, a combination of a new location address and a preset serial number, or a relatively simple combination of an electricity meter type and an address label. This enables the system to dock with each electricity meter based on an accurate and unique identifier when establishing communication, effectively avoiding the failure of communication establishment caused by parameter errors or confusion, improving the success rate and stability of the communication connection, and ensuring the reliability of the electricity meter data transmission in the energy storage system. This embodiment covers two configuration parameter methods corresponding to different types of electricity meters, fully adapting to the actual situation of diverse sources of electricity meters in the energy storage system. For electricity meters with default addresses, communication is established using their unique combined parameters; for electricity meters with known addresses, communication establishment is achieved through another combined parameter. This comprehensive adaptability enables the system to easily integrate electricity meters from different manufacturers and different models, build a unified communication network, and enhance the system's tolerance and integration ability for various types of electricity meters.
[0114] As one or more specific application embodiments of the embodiment of the present invention, in combination with Figure 4 a further detailed description of the method for mixing multiple types of electricity meters provided by the present invention is made, as Figure 4 shown, specifically including:
[0115] The method for mixing multiple types of electricity meters provided in this embodiment is adapted to multiple circuits of electricity meters. Taking two circuits of parallel and mixed electricity meters as an example for analysis, as Figure 4 shown, in the normal operation mode of the energy storage system (the electricity meter communication is not loaded in modes such as upgrade to save the resources of the energy storage system), after refreshing the electricity meter configuration parameters of the upper-layer platform / local according to a custom period, the energy storage system will synchronously check whether the configuration parameters (electricity meter type, serial number, address label) corresponding to electricity meters 1 to n are configured:
[0116] If the configuration parameters corresponding to electricity meters 1 to n are not configured, it will directly exit without loading any communication to save resources for other functional tasks of the system.
[0117] If the configuration of electricity meter 1 is successful, the corresponding electricity meter type and communication protocol are initialized according to the configuration parameters of electricity meter 1, and data is queried according to the custom period of electricity meter 1, and at the same time, it is confirmed whether the configuration of electricity meter 2 is successful.
[0118] If the configuration of meter 2 is successful, the communication of meter 2 will be initialized and loaded in the next custom cycle.
[0119] If the configuration of meter 2 is not successful, the custom cycle of meter 1 will be directly fixed, and the communication will be carried out using the meter type of meter 1.
[0120] Similarly, if only the configuration of meter 2 is successful, the custom cycle of meter 2 will be directly fixed, and the communication will be carried out using the meter type of meter 2, and meter 1 will not occupy resources for communication.
[0121] The multi-type meter hybrid method provided in this embodiment enables the same port of the energy storage system to improve the flexibility and scalability of the overall energy storage system through the multi-type meter hybrid method. At the same time, it reduces the consumption of interface chip resources, and through the data processing and integration of the same port, it ensures the consistency and reliability of the data, making it more convenient for the overall software system to be modularized, and further improving the robustness of the system.
[0122] In this embodiment, a multi-type meter hybrid device is also provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0123] This embodiment provides a multi-type meter hybrid device, as Figure 5 shown, including:
[0124] A meter type acquisition module 501, configured to acquire the meter types of multiple meters connected to the same communication port.
[0125] A communication address configuration module 502, configured to configure a communication address for each meter according to the meter type in accordance with a preset serial number or configure a communication address for each meter according to an address label.
[0126] A communication establishment module 503, configured to establish communication for each meter according to the communication address.
[0127] In some optional implementation manners, the meter type acquisition module 501 includes:
[0128] A point position determination unit, configured to determine different point positions installed in the same communication port.
[0129] A meter type acquisition unit, configured to acquire the meter types of different meters connected to the same communication port based on different point positions.
[0130] In some alternative embodiments, the types of electricity meters include electricity meters with default addresses and electricity meters with known addresses. The communication address configuration module 502 includes:
[0131] A serial number configuration unit, configured to, when the electricity meter type is an electricity meter with a default address, configure a communication address for each electricity meter at the same communication port according to a preset serial number.
[0132] An address label configuration unit, configured to, when the electricity meter type is an electricity meter with a known address, configure a communication address for each electricity meter at the same communication port according to the address label.
[0133] In some alternative embodiments, the serial number configuration unit includes:
[0134] A location address allocation subunit, configured to, when the electricity meter type is an electricity meter with a default address, re-allocate a new location address for the electricity meter with a default address at the same communication port.
[0135] A first configuration command combination and communication address configuration subunit, configured to combine the electricity meter type, the new location address, and the preset serial number, and configure a communication address for each electricity meter at the same communication port according to the combination of the electricity meter type, the new location address, and the preset serial number.
[0136] In some alternative embodiments, the address label configuration unit includes:
[0137] An address label acquisition subunit, configured to, when the electricity meter type is an electricity meter with a known address, acquire the address label of each electricity meter at the time of factory.
[0138] A second configuration command combination and communication address configuration subunit, configured to combine the electricity meter type and the address label, and configure a communication address for each electricity meter at the same communication port according to the combination of the electricity meter type and the address label.
[0139] In some alternative embodiments, the communication establishment module 503 includes:
[0140] A configuration parameter matching unit, configured to match the configuration parameters of each electricity meter's communication address, where the configuration parameters are the combination of the electricity meter type, the new location address, and the preset serial number, or the configuration parameters are the combination of the electricity meter type and the address label.
[0141] A communication establishment unit, configured to establish communication for each electricity meter based on the configuration parameters of each electricity meter's communication address.
[0142] In some alternative embodiments, the multi-type electricity meter mixing device further includes:
[0143] Configuration method query and communication establishment module, which is used to query the configuration method of the communication address when the configuration parameters of each electricity meter communication address are a combination of electricity meter type, new location address, preset serial number, and address label. The configuration methods include the configuration method according to the combination of electricity meter type, new location address, and preset serial number, and the configuration method according to the combination of electricity meter type and address label. Match the configuration parameters of each electricity meter communication address based on the configuration method of the communication address; establish communication for each electricity meter based on the configuration parameters of each electricity meter communication address.
[0144] The further function descriptions of the above-mentioned various modules and units are the same as those in the corresponding embodiments above, and will not be elaborated here.
[0145] The multi-type electricity meter hybrid device in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0146] The embodiment of the present invention also provides a computer device having the above Figure 5 shown multi-type electricity meter hybrid device.
[0147] Please refer to Figure 6 , Figure 6 is a schematic structural diagram of a computer device provided by an optional embodiment of the present invention. As Figure 6 shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as a server array, a set of blade servers, or a multi-processor system). Figure 6 In
[0148] The processor 10 may be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 may further include a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above-mentioned programmable logic device may be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.
[0149] Among them, the memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0150] The memory 20 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device and the like. In addition, the memory 20 may include a high-speed random access memory, and may further include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely provided with respect to the processor 10, and these remote memories may be connected to the computer device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0151] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 may further include a combination of the above types of memories.
[0152] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected through a bus or other means, Figure 6 Taking the connection through the bus as an example.
[0153] The input device 30 can receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (such as an LED), and a tactile feedback device (such as a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device may be a touch screen.
[0154] Embodiments of the present invention also provide a computer-readable storage medium. The methods according to the embodiments of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the methods described herein can be stored as such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.
[0155] A part of the present invention can be applied as a computer program product, for example, computer program instructions. When executed by a computer, through the operation of the computer, the methods and / or technical solutions according to the present invention can be called or provided. Those skilled in the art should be able to understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0156] Although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for mixing and combining multiple types of electricity meters, characterized in that, The method includes: Obtaining the meter types of multiple electric meters accessing the same communication port; Configuring communication addresses for each electric meter according to the meter types in a preset serial number or configuring communication addresses for each electric meter according to address labels; Establishing communication for each electric meter according to the communication addresses.
2. The method according to claim 1, wherein The obtaining the meter types of multiple electric meters accessing the same communication port includes: Determining different installation points to which the same communication port belongs; Obtaining the meter types of different electric meters accessing the same communication port based on the different installation points.
3. The method according to claim 1, wherein The meter types include electric meters with default addresses and electric meters with known addresses; The configuring communication addresses for each electric meter according to the meter types in a preset serial number or configuring communication addresses for each electric meter according to address labels includes: When the meter type is an electric meter with a default address, configuring communication addresses for each electric meter in a preset serial number at the same communication port; When the meter type is an electric meter with a known address, configuring communication addresses for each electric meter according to address labels at the same communication port.
4. The method according to claim 3, wherein The when the meter type is an electric meter with a default address, configuring communication addresses for each electric meter in a preset serial number at the same communication port includes: When the meter type is an electric meter with a default address, reassigning new location addresses for the electric meters with default addresses at the same communication port; Combining the meter type, the new location address, and the preset serial number, and configuring communication addresses for each electric meter at the same communication port according to the combination of the meter type, the new location address, and the preset serial number.
5. The method according to claim 3, wherein The when the meter type is an electric meter with a known address, configuring communication addresses for each electric meter according to address labels at the same communication port includes: When the meter type is an electric meter with a known address, obtaining the address labels of each electric meter at the time of leaving the factory; Combining the meter type and the address label, and configuring communication addresses for each electric meter at the same communication port according to the combination of the meter type and the address label.
6. The method according to claim 1, wherein The establishing communication for each electric meter according to the communication addresses includes: Matching the configuration parameters of each electric meter's communication address, where the configuration parameters are the combination of the meter type, the new location address, and the preset serial number, or the configuration parameters are the combination of the meter type and the address label; Establishing communication for each electric meter based on the configuration parameters of each electric meter's communication address.
7. The method according to claim 6, wherein The method further includes: When the configuration parameters of each electric meter's communication address are the combination of the meter type, the new location address, the preset serial number, and the address label, querying the configuration method of the communication address, where the configuration method includes the configuration method according to the combination of the meter type, the new location address, and the preset serial number and the configuration method according to the combination of the meter type and the address label; Matching the configuration parameters of each electric meter's communication address based on the configuration method of the communication address; Establishing communication for each electric meter based on the configuration parameters of each electric meter's communication address.
8. A multi-type electric meter mixing and combining device, characterized in that, The device includes: A meter type obtaining module, configured to obtain the meter types of multiple electric meters accessing the same communication port; A communication address configuration module, configured to configure communication addresses for each electric meter according to the meter types in a preset serial number or configure communication addresses for each electric meter according to address labels; A communication establishment module for establishing communication for each electric meter according to the communication address.
9. A computer device, characterized in that, Including: A memory and a processor, which are communicatively connected to each other. Computer instructions are stored in the memory, and the processor executes the computer instructions to execute the multi-type electric meter mixing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Computer instructions are stored on the computer-readable storage medium, and the computer instructions are used to cause a computer to execute the multi-type electric meter mixing method according to any one of claims 1 to 7.
Citation Information
Cited By
Charging metering port switching method and circuit
CN121291183A
Charging metering port switching method and circuit
CN121291183B