Electricity consumption information acquisition system construction method, information acquisition system and related equipment

By building a protocol analysis engine, the general analysis and processing of multiple communication protocols by the power consumption information acquisition system is solved, and the compatibility and maintenance cost problems of existing systems when facing diversified communication protocols are solved, and the flexibility and scalability of the system are improved.

CN119544834APending Publication Date: 2025-02-28BEIJING CHINA POWER INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411416814.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

Due to the diversity and complexity of communication protocols, existing power consumption information collection systems have increased system complexity, reduced compatibility, and high development and maintenance costs, making it difficult to cope with diversified communication protocol requirements.

Method used

By obtaining the power consumption information of the target area and its communication protocol, analyzing the protocol description file, determining the general protocol description file, building a protocol analysis engine, realizing general protocol analysis and processing of the protocol, and improving the flexibility and scalability of the system.

Benefits of technology

It realizes universal parsing and processing of protocols, improves the flexibility and scalability of the system, enables the system to cope with diverse communication protocol requirements, and reduces development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544834A_ABST
    Figure CN119544834A_ABST
Patent Text Reader

Abstract

The invention provides an electricity utilization information acquisition system construction method, an information acquisition system and related equipment. The electricity utilization information acquisition system construction method comprises the steps of obtaining electricity utilization information of a target area and a communication protocol of the electricity utilization information; analyzing any communication protocol, determining a protocol description file of any communication protocol, and determining a general protocol description file according to a plurality of protocol description files; constructing a protocol analysis engine according to the general protocol description file; and determining the electricity utilization information acquisition system according to the general description method and the protocol analysis engine. According to the invention, the general protocol description file is determined according to the plurality of protocol description files, and then the protocol analysis engine is constructed according to the general protocol description file, so that the protocol analysis engine can realize centralized protocol analysis and coding and decoding processing, thereby realizing general analysis and processing of the protocol, and improving the protocol analysis efficiency. And the flexibility and the expandability of the system are improved, so that the system can meet diversified communication protocol requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data collection technology, and in particular to a method for constructing an electricity consumption information collection system, an information collection system and related equipment. Background Art

[0002] In the field of electricity, the electricity consumption information collection system is an indispensable and important infrastructure and a core part of the power system. Its main function is to monitor and collect electricity consumption information of power users in real time, such as electric energy (the ability to use electricity to do work in various forms), voltage, current, etc. This information is of great significance to the dispatch, operation and management of the power system.

[0003] However, due to the diversity and complexity of communication protocols, the complexity of the system has increased, while the compatibility has decreased. Various smart meters and other data collection devices may use different communication protocols, each with its own unique data format and rules, which makes the data parsing process difficult. The protocol parsing method in the traditional electricity collection system requires writing a specific codec program for each protocol, which not only increases the development cost, but also makes maintenance difficult. Summary of the invention

[0004] In view of this, the purpose of this application is to propose an electricity consumption information collection system construction method, information collection system and related equipment.

[0005] Based on the above purpose, the present application provides a method for constructing an electricity consumption information collection system, including:

[0006] Acquire power usage information of a target area and a communication protocol for the power usage information;

[0007] Parsing any of the communication protocols to determine a protocol description file of any of the communication protocols, and determining a common protocol description file based on a plurality of the protocol description files;

[0008] Constructing a protocol parsing engine according to the general protocol description file;

[0009] According to the general description method and the protocol parsing engine, the power consumption information collection system is determined.

[0010] Optionally, the parsing the communication protocol to determine a protocol description file of any of the communication protocols includes:

[0011] Determine protocol data of any of the communication protocols, perform abstract processing on any of the protocol data, and determine a data block data structure, a bitmap block data structure, an enumeration block data structure, and a data type definition block;

[0012] The protocol description file is determined according to the data block data structure, the bitmap block data structure, the enumeration block data structure and the data type definition block.

[0013] Optionally, the determining of the protocol data of any of the communication protocols, abstracting any of the protocol data, and determining a data block data structure, a bitmap block data structure, an enumeration block data structure, and a data type definition block includes:

[0014] Abstracting the protocol data through preset formats and items to determine the data type of any of the protocol data;

[0015] According to the data type, the data block data structure, the bitmap block data structure, the enumeration block data structure and the data type definition block are determined.

[0016] Optionally, the determining a common protocol description file according to the plurality of protocol description files includes:

[0017] The protocol type and data structure of any of the protocol description files are determined, and the general protocol description file is determined based on a number of the protocol types, the data structures and the protocol description files.

[0018] Optionally, constructing a protocol parsing engine according to the general protocol description file includes:

[0019] According to the general protocol description file, a protocol model, a data structure block and a data structure block member are determined; wherein the data structure block includes a data block, an enumeration block and a bitmap block, and the data structure block members include: a data type member, a bitmap block member, a data block member and an enumeration block member;

[0020] The protocol parsing engine is determined according to the protocol model, the data structure block and the data structure block members; wherein the protocol parsing engine is used for encoding and decoding.

[0021] Based on the same inventive concept, the embodiment of the present application further provides a method for collecting electricity consumption information, which is characterized by comprising:

[0022] A collection module collects electricity usage information of a target area and determines a communication protocol for the electricity usage information;

[0023] A protocol parsing module encodes any of the communication protocols, determines the byte data corresponding to any of the protocol models, and sends the byte data to the information processing module;

[0024] The information processing module receives the byte data and processes the communication protocol according to the byte data.

[0025] Based on the same inventive concept, the embodiment of the present application also provides a device for constructing a power consumption information collection system, including:

[0026] An acquisition module, configured to acquire power usage information of a target area and a communication protocol of the power usage information;

[0027] A parsing module, configured to parse any of the communication protocols, determine a protocol description file of any of the communication protocols, and determine a common protocol description file based on a plurality of the protocol description files;

[0028] A construction module, configured to construct a protocol parsing engine according to the general protocol description file;

[0029] A determination module is configured to determine the power consumption information collection system according to the general description method and the protocol parsing engine.

[0030] Based on the same inventive concept, the embodiment of the present application also provides an electricity consumption information collection system, including: a collection module, a protocol description module, a protocol encoding and decoding model, and an information processing module;

[0031] A collection module, used to collect power usage information of a target area and determine a communication protocol for the power usage information;

[0032] A protocol parsing module, used to encode any of the communication protocols, determine the byte data corresponding to any of the communication protocols, and send the byte data to the information processing module;

[0033] The information processing module is used to receive the byte data and process the communication protocol according to the byte data.

[0034] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the program, it implements a method for constructing a power consumption information collection system or a method for collecting power consumption information as described in any one of the above.

[0035] Based on the same inventive concept, an embodiment of the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, characterized in that the computer instructions are used to enable a computer to execute any of the above-mentioned methods for constructing a power consumption information collection system or methods for collecting power consumption information.

[0036] From the above, it can be seen that the electricity consumption information collection system construction method, information collection system and related equipment provided by the present application determine a general protocol description file based on several protocol description files, and then construct a protocol coding engine based on the general protocol description file, so that the protocol coding engine can realize centralized protocol parsing and processing, thereby realizing general parsing and processing of the protocol, improving the flexibility and scalability of the system, and enabling the system to cope with diverse communication protocol requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0038] Figure 1 This is a schematic diagram of the structure of a method for constructing a power consumption information collection system according to an embodiment of the present application;

[0039] Figure 2 A schematic diagram of the logical architecture of a power consumption information collection system in the prior art of an embodiment of the present application;

[0040] Figure 3 This is a schematic diagram of the 376.1 protocol frame structure of an embodiment of the present application;

[0041] Figure 4 This is a schematic diagram of the 698.45 protocol frame format of an embodiment of the present application;

[0042] Figure 5 This is a schematic diagram of the 645-07 protocol frame structure of an embodiment of the present application;

[0043] Figure 6 A schematic diagram of communication parameter settings for an uplink communication port of a terminal according to an embodiment of the present application;

[0044] Figure 7 A schematic diagram of a collection file configuration unit according to an embodiment of the present application;

[0045] Figure 8 A schematic diagram of a combined active power data unit according to an embodiment of the present application;

[0046] Fig. 9 A schematic diagram of a protocol description file of an embodiment of the present application;

[0047] Fig.10 A schematic diagram of the protocol model association relationship class diagram structure of an embodiment of the present application;

[0048] Fig.11A schematic diagram of the data conversion process of the protocol parsing engine according to an embodiment of the present application;

[0049] Fig.12 A schematic diagram of the application architecture of the general protocol parsing engine in the power consumption information collection system according to an embodiment of the present application;

[0050] Fig.13 A schematic diagram of a device structure for constructing a power consumption information collection system according to an embodiment of the present application;

[0051] Fig.14 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0053] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0054] In order to facilitate understanding of the technical solutions of the present disclosure, some technical terms involved in the present disclosure are introduced below.

[0055] Communication protocol: refers to a set of rules and agreements that both entities must follow when exchanging data or providing services. It specifies the rules and standards for data transmission and information exchange between smart meters and master stations, and between terminals and master stations. Through this protocol, smart meters can transmit electricity usage information to the master station system in real time, and the master station system can also remotely control and monitor smart meters.

[0056] Special transformer collection terminal: It is a device for collecting electricity consumption information of special transformer users. It can collect electricity meter data, monitor the working condition of electricity metering equipment and power supply quality, as well as monitor customer power load and electric energy, and manage and transmit the collected data in both directions.

[0057] Centralized meter reading terminal: It is a device for collecting electricity consumption information of low-voltage users, including concentrators and collectors. It can realize the collection of electric energy meter data, the monitoring of the working condition of electric energy metering equipment and the quality of power supply, as well as the monitoring of customer power load and electric energy, and manage and transmit the collected data in both directions.

[0058] Concentrator: refers to a device that collects data from various collectors and electricity meters, processes and stores them, and can exchange data with the main station or handheld devices.

[0059] Collector: A device used to collect electric energy information from multiple or single electric energy meters and exchange data with the concentrator.

[0060] Energy meter: It is a meter used to measure the amount and speed of electricity consumption. It is also called kilowatt-hour meter, watt-hour meter or fire meter. It is an essential device in the power system, used to measure how much electricity users use and calculate electricity bills based on this.

[0061] Encoding: refers to the conversion of information or data from one form to another. This conversion is usually for the purpose of storage, transmission or further processing.

[0062] Decoding: is the reverse operation of the encoding process, that is, restoring the encoded information to its original form. This process requires knowing the corresponding decoding rules or algorithms to ensure the correct interpretation and understanding of the encoded data.

[0063] OAD: Object attribute descriptor, used to describe the attributes of a class object. It is used in the protocol to access the attribute data of the object.

[0064] OMD: Object Method Descriptor, used to describe the methods of class objects. Used in protocols to access object method data.

[0065] In order to make the technical solution of the present disclosure clearer and easier to understand, the method for constructing the power consumption information collection system provided by the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.

[0066] As mentioned in the background technology section, various smart meters and other data collection devices may use different communication protocols, each with its own unique data format and rules, which makes the data parsing process difficult. Traditional protocol parsing methods require writing specific codecs for each protocol, which not only increases the development cost but also makes maintenance difficult.

[0067] However, current existing solutions usually use customized methods to deal with data processing of multiple different protocols. For example, a separate module or application is created for each protocol to receive, parse and process the data of the corresponding protocol. Although this method can solve the problem of a single protocol, it will bring high development and maintenance costs when more protocols need to be supported, and it is difficult to expand. Or use middleware or adapters to act as a bridge between different protocols to convert one protocol into another. The use of middleware or adapters to act as a bridge between different protocols is implemented in a hard-coded manner, which has poor versatility and cannot completely solve the problem of protocol mapping. Therefore, there is a lack of a flexible and efficient universal protocol encoding and decoding engine.

[0068] In view of this, the embodiments of the present application provide a method for constructing an electricity consumption information collection system, a collection system, a device, an electronic device and a storage medium. It includes: obtaining the electricity consumption information of the target area and the communication protocol of the electricity consumption information; parsing any of the communication protocols, determining the protocol description file of any of the communication protocols, and determining a general protocol description file based on several of the protocol description files; constructing a protocol coding engine based on the general protocol description file; determining the electricity consumption information collection system based on the general description method and the protocol coding engine. By determining a general protocol description file based on several protocol description files, and then constructing a protocol coding engine based on the general protocol description file, the protocol coding engine can realize centralized protocol parsing and processing, thereby realizing general parsing and processing of the protocol, improving the flexibility and scalability of the system, and enabling the system to cope with diverse communication protocol requirements.

[0069] like Figure 1 As shown, the method for constructing the power consumption information collection system includes:

[0070] Step S102, obtaining power usage information of a target area and a communication protocol of the power usage information;

[0071] Step S104, parsing any of the communication protocols, determining a protocol description file of any of the communication protocols, and determining a common protocol description file based on a plurality of the protocol description files;

[0072] Step S106: construct a protocol encoding engine according to the general protocol description file;

[0073] Step S108: Determine the power consumption information collection system according to the general description method and the protocol coding engine.

[0074] The power user electricity consumption information collection system is a system for collecting, processing and real-time monitoring of power users' electricity consumption information. It has the functions of automatic collection of electricity consumption information, abnormal metering monitoring, power quality monitoring, electricity consumption analysis and management, relevant information release, distributed energy monitoring, and information interaction of smart power consumption equipment. Figure 2 As shown, the electricity consumption information collection system in the prior art includes a master station layer, a communication channel layer and a collection device layer. In the collection device layer, different electric energy meters correspond to different communication protocols, so there are various communication protocols, and different communication protocols correspond to various protocol codec managers and device encryption managers. Therefore, the huge challenges brought to the electricity consumption information collection system in terms of protocol parsing include:

[0075] (1) There are many types of communication protocols used by field collection equipment, including the communication protocol between the master station and the collection terminal and the communication protocol of the multi-function meter, such as: QGDW 376.1-2009 "Communication Protocol of Electric Power User Electricity Consumption Information Collection System: Communication Protocol between Master Station and Terminal" (hereinafter referred to as "376.1 Protocol"), DL / T645-2007 "Communication Protocol of Multi-function Electric Energy Meter" (hereinafter referred to as "645-07 Protocol"), DL / T698.45 "Electric Energy Information Collection and Management System Part 4-5: Object-oriented Interoperability Data Exchange Protocol" (hereinafter referred to as "698 Protocol"), etc. Each protocol has its own unique data format and rules, which requires developers to master and understand the rules of various different communication protocols, and write dedicated parsing programs to handle various communication protocols, and at the same time develop corresponding encryption and decryption programs to be applicable to the devices of these communication protocols;

[0076] (2) The standard communication protocol released by the official organization may not meet the personalized (communication protocol) needs of each network province. Therefore, each network province will adaptively expand and modify the communication protocol according to its own actual situation and needs. In this case, even when facing similar communication protocols, it may be necessary to develop multiple sets of encoding and decoding programs and corresponding encryption and decryption programs to cope with different versions and modifications;

[0077] (3) With the continuous advancement of IoT technology, more and more new devices such as distributed energy, energy storage equipment, and charging piles are connected to the power grid. However, these devices may use different communication protocols, which requires us to carry out customized development work based on the characteristics of each device to adapt to its unique communication protocol. As the number of connected devices increases, the complexity of the system will increase exponentially;

[0078] (4) With the development of time and technology, each network province may continuously propose new business requirements. In order to meet new requirements, it may be necessary to continuously expand and update the communication protocol. For example, a network province proposed the need to collect the longitude and latitude information of the equipment, but there was no protocol entry in the original communication protocol to obtain the longitude and latitude information of the equipment. At this time, it is necessary to expand the communication protocol and add a protocol item for collecting longitude and latitude information. In this case, the on-site equipment may have new and old versions of the protocol coexisting. In order to ensure effective and accurate data exchange, the acquisition front-end and communication front-end need to develop the function of identifying the communication protocol versions used by different devices, and develop corresponding parsing programs to ensure that the data of all devices can be accurately parsed and processed.

[0079] Therefore, there is a need for an electricity consumption information collection system that can handle multiple communication protocols to meet the challenges of communication protocol diversity, to improve the efficiency of pre-collection and pre-communication development, and to enhance the scalability of the system so as to meet the requirements of the electricity consumption information collection system to parse multiple communication protocols.

[0080] In some optional implementations, the parsing of the communication protocol to determine the protocol description file of any of the communication protocols includes: determining the protocol data of any of the communication protocols, abstracting any of the protocol data, determining the data block data structure, the bitmap block data structure, the enumeration block data structure, and the data type definition block; and determining the protocol description file according to the data block data structure, the bitmap block data structure, the enumeration block data structure, and the data type definition block. Wherein, the determining the protocol data of any of the communication protocols, abstracting any of the protocol data, determining the data block data structure, the bitmap block data structure, the enumeration block data structure, and the data type definition block includes: abstracting the protocol data through a preset format and item, determining the data type of any of the protocol data; and determining the data block data structure, the bitmap block data structure, the enumeration block data structure, and the data type definition block according to the data type. The determining of a general protocol description file according to several of the protocol description files includes: determining the protocol type and data structure of any of the protocol description files, and determining the general protocol description file according to several of the protocol types, the data structure, and the protocol description files.

[0081] In some optional implementations, the communication protocol is discussed by taking the 376.1 protocol, the 698.45 protocol, and the 645-07 protocol as examples. Through in-depth research and comprehensive analysis of various power communication protocols such as the 376.1 protocol, the 698.45 protocol, and the 645-07 protocol, we find that although different protocols have differences in frame structure; among them, the frame structure of the 376.1 protocol is as follows: Figure 3 As shown, the frame structure of the 698.45 protocol is as follows Figure 4 As shown, the frame structure of the 645-07 protocol is as follows Figure 5 As shown, in the encoding and decoding process, the main differences are concentrated in the link user data part, especially the format and content of the data unit.

[0082] Specifically, the data units of the 376.1 series of protocols (including 376.1, 1376.1, and 10376.1) are clearly reflected in the protocol in the form of information classes, for example Figure 6 As shown in the figure, "F1: Terminal uplink communication port communication parameter setting". The data unit of the 698.45 protocol is mainly reflected in OAD (object attribute descriptor) or OMD (object method descriptor), such as Figure 7 The data unit of the 645 series of protocols (such as 645-2007 and 645-2013) is mainly represented by the data block corresponding to the data identifier in the protocol, such as Figure 8 "Combined active energy data block" in.

[0083] Further, such as Figure 6-8 As shown in the figure, the data unit of each protocol is a data block structure composed of one or more members. Each member contains key information such as member name, data type, unit and precision. Therefore, in order to process these data members more efficiently, they are abstracted into data member data structures.

[0084] In addition, some data members may be composite structures, as shown above Figure 6 The timeout time and number of retransmissions (in seconds or times) in the , or its data type is an enumeration type, as shown above Figure 7 In the example, we can see the baud rate (300, 600...) in the bitmap block, so we further abstract the bitmap block and enumeration block data structures as a composite data type. The bitmap block consists of multiple bitmap members, each of which contains meta information such as the number of bytes occupied and the data type. The enumeration block consists of multiple enumeration members, each of which contains the specific enumeration value, the data type of the enumeration member and other meta information. Among them, the composite structure is used to describe the various data of a thing, which is composed of several different basic types; the bitmap block is a data structure used to record the usage of data blocks. In the file system, the bitmap block uses binary bits to indicate whether each data block is used.

[0085] In some embodiments, since different protocols may have their own data type definitions and these types may be incompatible, the data types are abstracted to form a data type block data structure. The data type block data structure consists of a series of data type members, providing a universal way to represent data types in different protocols. In addition, considering Figure 7The attribute value in the extended information (Annex_Object) structure is of Data type. In order to clarify the specific type, it needs to be determined based on the value of the previous field object attribute descriptor. Therefore, the data type of the field attribute value is given by using a placeholder (#Data), which is dynamically processed during subsequent parsing.

[0086] At the same time, in order to comprehensively manage various communication protocols, we abstract them into data block data structures. Each data block not only contains its own meta information, such as the name of the data block, the AFN (used to identify the attributes of the data block related to a certain network framework or technology), FN (indicating whether the data block is associated with a specific function or function), OAD (identifying the relationship between the data block and the wireless download technology), OMD (object management domain), DI (communication device identifier), etc., but also contains a data block member list.

[0087] Furthermore, in order to better organize and manage these data blocks, bitmap blocks, and enumeration blocks, the following are further abstracted: Fig. 9 The protocol description file (also called the general protocol description method) shown in FIG. Among them, the protocol model data structure not only contains its own original information, such as the protocol name, but also includes a complete set of data blocks, bitmap blocks, and enumeration blocks (also called data block data structure, bitmap block data structure, and enumeration block data structure). The protocol description file contains data blocks, bitmap blocks, enumeration blocks, data type definition blocks, and data block members, bitmap block members, enumeration block members, and data type block members.

[0088] In some embodiments, a general communication protocol description method is used to uniformly and in detail describe various communication protocols such as 376.1, 698.45, and 645, wherein the XML file format is used as the core configuration file to determine the protocol model corresponding to any protocol and complete the final model configuration. Through this flexible and efficient intermediate carrier method, we can easily and precisely set and manage various communication protocol parameters to ensure that the key elements of these protocols and their interaction rules are accurately embodied in the model, thereby laying the foundation for the subsequent seamless integration and efficient parsing of different communication protocols. For example, the XML configuration file of the 376.1 protocol contains the protocol model configuration content, the general format of the protocol, and some examples. The XML configuration file of the 698.45 protocol contains the protocol model configuration content, the general format of the protocol, and some examples. The XML configuration file of the 645 protocol contains the protocol model configuration content, the general format of the protocol, and some examples.

[0089] In some optional implementations, in order to clearly display the various tags and attributes in the XML file Fig. 9The correspondence between the general description methods of the power communication protocol shown below will be exhaustively sorted out and compared in the form of a mapping table of power communication protocol XML configuration tags and general description methods as shown in Table 1.

[0090] Table 1 Mapping table between XML configuration tags and general description methods of power communication protocol

[0091]

[0092]

[0093] In some optional embodiments, constructing a protocol parsing engine according to the general protocol description file includes: determining a protocol model, a data structure block and a data structure block member according to the general protocol description file; wherein the data structure block includes a data block, an enumeration block and a bitmap block, and the data structure block members include: a data type member, a bitmap block member, a data block member and an enumeration block member; determining the protocol parsing engine according to the protocol model, the data structure block and the data structure block members; wherein the protocol parsing engine is used for encoding and decoding.

[0094] In some optional implementations, after completing the abstraction of the communication protocol and building a set of general methods to describe multiple communication protocols, we then enter the algorithm implementation stage and convert this general description method into executable program code to achieve effective configuration and parsing of specific communication protocols. Furthermore, by adopting object-oriented development technology, a corresponding class structure is designed for the refined general description method. In order to enhance the convenience and consistency of external calls, we not only provide a unified interface definition, but also implement the corresponding implementation class. In this way, you only need to fill the data into the corresponding class instance according to the agreed format to easily complete the effective encapsulation and parsing process of the protocol frame. Fig.10 As shown, the base class rule item is formed by extracting common features from the protocol model, block definition (including data block, enumeration block and bitmap block) and various members (such as data type member, bitmap block member, data block member and enumeration block member). The rule item base class includes: the unique identifier of the rule item, Chinese name, English name and type, etc.

[0095] In some optional implementations, the protocol model is an abstract description of a communication protocol, such as the 376.1 protocol and the 698.45 protocol. It contains the following key parts: data type block, data block list, bitmap block list, and enumeration block list. These components together constitute the infrastructure of the protocol model. Block definitions include: data type block, data block, bitmap block, enumeration block, and data unit block. The data type block is an abstract summary of the custom data types in the protocol, forming a specific data structure. This data structure consists of a list of data type block members, each of which corresponds to a custom data type in the protocol. In this way, the data type block provides a unified framework for processing and parsing protocol data.

[0096] A data block is an abstract definition of a specific data unit in a protocol. It describes in detail the components of the data unit, the order between the components, and the parsing rules of the data unit. Figure 6 , Figure 7 and Figure 8 As shown in Figure 1, a data block consists of data block members and its own meta information to ensure accurate description of the data unit. A bitmap block is an abstract definition of a data unit member in the protocol that contains multiple attributes, such as Figure 8 The timeout time and number of retransmissions shown. The bitmap block consists of its own meta information and bitmap block members, where the bitmap block members describe each attribute and its meaning in detail. The bitmap block describes the constituent members, the order between members, and the corresponding parsing rules. The enumeration block is an abstract definition of the data type of the data unit member as an enumeration type, such as Figure 7 The baud rate, protocol type, etc. are shown. It consists of a group of enumeration block members. The enumeration block members are used to describe each unit of the enumeration.

[0097] In some optional implementations, encoding is the process of converting a protocol model into byte data for easy transmission and storage; and decoding is the reverse process of restoring the byte data into the protocol model.

[0098] The encoding process specifically includes the encoding process for DataBlock data blocks, which covers the validity judgment of choice attributes and member variables, and the process of organizing the Bitmap structure according to the dMask attribute. Finally, the data block is successfully converted into byte data and is ready for subsequent transmission and storage. For the encoding process of Bitmap data blocks, the process encodes each member in a loop, and then combines the byte array using bit operation technology. This process ensures the preparation encoding of the Bitmap data block and provides a reliable data source for subsequent processing. For the encoding process of the enumeration type DataEnum, the byte array is generated by traversing the enumeration members and calling the encoding method only for non-empty members. For the encoding process of DataBlockMember, the encoding is achieved through nested structures, selection of attributes, validity verification and specific type processing mechanisms, ensuring the accurate encoding of complex data structures and providing a strong guarantee for the integrity and reliability of the data. For the BitmapMember encoding process, different encoding strategies are adopted according to different types of data (basic types and DataEnum types). For DataEnumMember (data unit member), the encoding process converts the enumeration member into a byte array by calling the basic type encoding method.

[0099] Furthermore, the decoding process specifically includes: the decoding process of the DataBlock data block is the process of assigning values ​​to the Bitmap structure members according to the dMask attribute, and finally completing the conversion of byte data to data blocks. The decoding process of the DataBlock data block is the reverse operation of the encoding process. It covers the validity judgment of the choice attribute and member variables.

[0100] In some optional implementations, based on the UML class diagram design of the general protocol parsing engine, we convert these design contents into actual code modules through the Java development language to form a general encoding and decoding microservice, namely the general protocol parsing engine, so as to realize the automatic processing of the communication protocol. The general protocol parsing engine is independently deployed on the server, and other systems can obtain the encoding and decoding capabilities by calling the service. Fig.11 The process of data conversion through a general protocol parsing engine.

[0101] Furthermore, in order to make the general protocol parsing engine play a better role, the protocol parsing engine is deployed in the power consumption system collection system to form a Fig.12The complete power consumption system collection system shown in the figure includes the following specific steps: (1) Protocol model integration configuration: First, the complete protocol model data set that matches the general protocol parsing engine is integrated into the power consumption information collection system to ensure that the system can accurately identify and process data packets of different communication protocols. (2) Codec component upgrade and replacement: Subsequently, the various independent codec components customized for specific protocols are gradually eliminated, and the general protocol engine is used to implement centralized protocol parsing and processing. This step is to achieve universal parsing and processing of protocols, improve the flexibility and scalability of the system, so as to easily cope with diverse communication protocol requirements. (3) Data conversion logic reconstruction: Then, the existing data conversion module is deeply transformed. The function that was originally responsible for converting business data according to the codec specifications of each specific protocol needs to be redesigned to convert the original business data into a standard format that conforms to the general protocol model. The goal of this stage is to build a standardized and efficient data conversion process to improve the consistency and accuracy of data processing.

[0102] In some optional embodiments, the electricity consumption information collection system includes: a collection module, a protocol parsing model and an information processing module; the collection module is used to collect the electricity consumption information of the target area and determine the communication protocol of the electricity consumption information; the protocol parsing module is used to encode any of the protocol models, determine the byte data corresponding to any of the protocol models, and send the byte data to the information processing module; the information processing module is used to receive the byte data and process the communication protocol according to the byte data.

[0103] Furthermore, an electricity consumption information collection method corresponding to the electricity consumption information collection system includes: a collection module, which collects electricity consumption information of a target area and determines a communication protocol for the electricity consumption information; a protocol encoding and decoding module, which encodes any of the protocol models, determines the byte data corresponding to any of the protocol models, and sends the byte data to an information processing module; an information processing module, which receives the byte data and processes the communication protocol according to the byte data.

[0104] By determining a general protocol description file based on several protocol description files and then constructing a protocol encoding engine based on the general protocol description file, the protocol encoding engine can realize centralized protocol parsing and processing, thereby realizing general parsing and processing of the protocol, improving the flexibility and scalability of the system, and enabling the system to cope with diverse communication protocol requirements.

[0105] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.

[0106] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0107] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a device for constructing an electricity consumption information collection system.

[0108] refer to Fig.13 , the electricity consumption information collection system construction device comprises:

[0109] An acquisition module, configured to acquire power usage information of a target area and a communication protocol of the power usage information;

[0110] A parsing module, configured to parse any of the communication protocols, determine a protocol description file of any of the communication protocols, and determine a common protocol description file based on a plurality of the protocol description files;

[0111] A construction module, configured to construct a protocol parsing engine according to the general protocol description file;

[0112] A determination module is configured to determine the power consumption information collection system according to the general description method and the protocol parsing engine.

[0113] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0114] The device of the above embodiment is used to implement the corresponding method for constructing the power consumption information collection system in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0115] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods and / or devices, according to the above-mentioned method and / or device for constructing an electricity consumption information collection system, the present application also provides an electricity consumption information collection method, including: a collection module, which collects electricity consumption information of a target area and determines the communication protocol of the electricity consumption information; a protocol parsing module, which encodes any of the communication protocols, determines the byte data corresponding to any of the communication protocols, and sends the byte data to an information processing module; an information processing module, which receives the byte data and processes the communication protocol according to the byte data.

[0116] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for constructing a power consumption information collection system described in any of the above embodiments is implemented.

[0117] Fig.14 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0118] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0119] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0120] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0121] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0122] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0123] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0124] The electronic device of the above-mentioned embodiment is used to implement the corresponding method for constructing the power consumption information collection system in any of the above-mentioned embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0125] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for constructing an electricity consumption information collection system as described in any of the above embodiments.

[0126] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0127] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method for constructing the electricity consumption information collection system as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0128] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0129] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0130] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0131] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.

Claims

1. A method for constructing an electricity consumption information collection system, characterized in that: include: Acquire power usage information of a target area and a communication protocol for the power usage information; Parsing any of the communication protocols to determine a protocol description file of any of the communication protocols, and determining a common protocol description file based on a plurality of the protocol description files; Constructing a protocol parsing engine according to the general protocol description file; According to the general description method and the protocol parsing engine, the power consumption information collection system is determined.

2. The method according to claim 1, characterized in that The parsing of the communication protocol to determine a protocol description file of any of the communication protocols includes: Determine protocol data of any of the communication protocols, perform abstract processing on any of the protocol data, and determine a data block data structure, a bitmap block data structure, an enumeration block data structure, and a data type definition block; The protocol description file is determined according to the data block data structure, the bitmap block data structure, the enumeration block data structure and the data type definition block.

3. The method according to claim 2, characterized in that The determining of the protocol data of any of the communication protocols, performing abstract processing on any of the protocol data, determining a data block data structure, a bitmap block data structure, an enumeration block data structure and a data type definition block, comprises: Abstracting the protocol data through preset formats and items to determine the data type of any of the protocol data; According to the data type, the data block data structure, the bitmap block data structure, the enumeration block data structure and the data type definition block are determined.

4. The method according to claim 3, characterized in that The determining of a common protocol description file according to the plurality of protocol description files comprises: The protocol type and data structure of any of the protocol description files are determined, and the general protocol description file is determined based on a number of the protocol types, the data structures and the protocol description files.

5. The method according to claim 4, characterized in that The step of constructing a protocol parsing engine according to the general protocol description file includes: According to the general protocol description file, a protocol model, a data structure block and a data structure block member are determined; wherein the data structure block includes a data block, an enumeration block and a bitmap block, and the data structure block members include: a data type member, a bitmap block member, a data block member and an enumeration block member; The protocol parsing engine is determined according to the protocol model, the data structure block and the data structure block members; wherein the protocol parsing engine is used for encoding and decoding.

6. A power consumption information collection system, characterized in that: include: Acquisition module, protocol description module, protocol encoding and decoding model and information processing module; A collection module, used to collect power usage information of a target area and determine a communication protocol for the power usage information; A protocol parsing module, used to encode any of the communication protocols, determine the byte data corresponding to any of the protocol models, and send the byte data to the information processing module; The information processing module is used to receive the byte data and process the communication protocol according to the byte data.

7. A device for constructing an electricity consumption information collection system, characterized in that: include: An acquisition module, configured to acquire power usage information of a target area and a communication protocol of the power usage information; A parsing module, configured to parse any of the communication protocols, determine a protocol description file of any of the communication protocols, and determine a common protocol description file based on a plurality of the protocol description files; A construction module, configured to construct a protocol parsing engine according to the general protocol description file; The determination module is configured to determine the power consumption information collection system according to the general description method and the protocol parsing engine.

8. A method for collecting electricity consumption information, characterized in that: include: A collection module collects electricity usage information of a target area and determines a communication protocol for the electricity usage information; A protocol parsing module encodes any of the communication protocols, determines the byte data corresponding to any of the communication protocols, and sends the byte data to the information processing module; The information processing module receives the byte data and processes the communication protocol according to the byte data.

9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method according to any one of claims 1 to 5 or the method according to claim 6 when executing the computer program. 10 . A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method according to claim 1 or the method according to claim 6 .