An electric meter data query method, system and device

By pre-building a meter protocol library and instruction mapping dictionary, and dynamically matching communication protocols and mapping relationships, the problem of convenience and accuracy in cross-brand meter data query is solved, enabling data querying of multi-brand meters without damaging the meter seals.

CN122348976APending Publication Date: 2026-07-07GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
Filing Date
2026-03-31
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing technology cannot accurately and proactively query the internal data of different brands of electricity meters without damaging the meter's lead seal, and traditional remote controls are bound to specific brands, making cross-brand queries difficult.

Method used

By pre-building a meter protocol library and instruction mapping dictionary, the system dynamically matches target communication protocols and mapping relationships to enable cross-brand meter data queries. It also utilizes data identification codes for encapsulation and parsing to establish a reliable two-way communication link and obtain internal meter data.

Benefits of technology

It enables accurate, convenient, and non-intrusive data retrieval across different brands of electricity meters without damaging the meter's lead seal, ensuring the integrity of the query process and the accessibility of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122348976A_ABST
    Figure CN122348976A_ABST
Patent Text Reader

Abstract

The application discloses a kind of electric meter data query method, system and device, belong to electric power system technical field, the method is: by pre-constructing electric meter protocol library and instruction mapping dictionary, according to the query data matching target communication protocol and mapping relationship of user input, data query instruction is converted into data identification code and is encapsulated as instruction data frame and is sent to electric meter end, receives the response data frame returned by electric meter end and is parsed to obtain query result.Therefore, by implementing the present application, the internal data of different brand electric meters can be accurately queried without damaging the electric meter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power systems, and more particularly to a method, system, and apparatus for querying electricity meter data. Background Technology

[0002] In modern power systems, staff frequently need to record meter data on-site or conduct electricity usage checks to complete electricity billing, verify electricity usage information, or diagnose anomalies. However, meter boxes are usually completely sealed and secured with lead seals to ensure equipment safety and impartial metering. Therefore, remotely and non-contactly reading the internal data of the meters without breaking the seals or opening the meter box has become a rigid and frequent business requirement.

[0003] Currently, on-site meter data retrieval mainly relies on dedicated remote controls equipped with a few meter boxes, employing a passive scrolling display mode. Specifically, meter data is automatically displayed in a loop on the screen like a slideshow, and staff using the remote control can only "read" the data when the desired page is displayed. The drawback of this method is that the dedicated remote control is bound to the hardware of a specific brand and model of meter, preventing cross-brand use. This makes it impossible to accurately and proactively query specific internal data from different brands of meters without opening the meter box or breaking the seals. Attempting to access more data or perform precise queries often requires operating the meter's physical buttons, which in turn damages the seals and violates safety regulations. Therefore, there is an urgent need for a technical solution that enables universal and accurate data retrieval from multiple brands of meters without damaging the meters. Summary of the Invention

[0004] This invention provides a method, system, and device for querying electricity meter data, which can accurately query the internal data of electricity meters of different brands without damaging the meters.

[0005] In a first aspect, the present invention provides a method for querying electricity meter data, applied to a user terminal, the method comprising: Based on the query data input by the user, the system matches the target communication protocol corresponding to the meter terminal from a pre-built meter protocol library, and matches the target mapping relationship corresponding to the meter terminal from a pre-built instruction mapping dictionary; wherein, the query data includes brand matching instructions and data query instructions; According to the target mapping relationship, the data query instruction is converted into a first data identifier code, and according to the target communication protocol, the first data identifier code is encapsulated into an instruction data frame; The instruction data frame is sent to the meter terminal to receive the response data frame fed back by the meter terminal; wherein, the response data frame is obtained by the meter terminal after processing the instruction data frame; In response to the response data frame, the response data frame is parsed to obtain the data query result.

[0006] This application embodiment establishes a universal protocol adaptation foundation for user terminals supporting multiple brands and models of electricity meters by pre-building an electricity meter protocol library and command mapping dictionary. This fundamentally breaks the traditional hardware binding relationship between remote controls and specific electricity meters, making cross-brand universal queries possible. Secondly, through dynamic protocol matching, the communication protocol and mapping relationship corresponding to the target electricity meter are quickly determined based on the user-input query data (including brand matching commands). This allows the user terminal to automatically adapt to the communication rules of different electricity meters without physical contact or meter setup, ensuring convenient and non-intrusive operation. Finally, the data query command is converted into a first data identifier code. The data is encapsulated into instruction data frames, overcoming the inefficiencies and inability to query on demand inherent in the passive rotating display mode. Then, by sending instruction data frames and receiving response data frames, a reliable two-way communication link with the target meter is established, enabling the transmission of active query requests and obtaining direct data feedback from the meter, ensuring the integrity of the query process and the accessibility of the data. Finally, by parsing the response data frames, the data query results are obtained, accurately restoring the raw data returned by the meter into user-readable information. This completes the entire process from active request to final result presentation, allowing users to accurately and directly obtain the required internal data without damaging the meter's seal.

[0007] As a preferred example of the first aspect, the construction process of the meter protocol library and the instruction mapping dictionary includes: The meter protocol library is constructed based on the protocol databases corresponding to several different brands of meters, and the instruction mapping dictionary is constructed based on the instruction mapping relationship corresponding to each meter.

[0008] In this preferred example, by pre-building a meter protocol library, the communication rules of different brands of meters are centrally managed, providing a universal communication adaptation foundation for the requesting end, thereby breaking the hardware binding between traditional remote controls and single-brand meters. Simultaneously, by constructing an instruction mapping dictionary, a standardized mapping relationship is established between user query intents and the internal data identification codes of each brand of meter, enabling the same query instruction to be automatically converted into a specific address code recognizable by different meters. The combination of these two methods solves the fundamental problem of accurately identifying and accessing the internal data of multiple brands of meters without touching or modifying the meters, laying the core data foundation for subsequent universal query processes.

[0009] As a preferred example of the first aspect, the step of matching the target communication protocol corresponding to the meter terminal from a pre-built meter protocol library based on user-input query data includes: According to the brand matching instruction, the target communication protocol corresponding to the meter terminal is directly matched from the meter protocol library, and the target mapping relationship corresponding to the meter terminal is directly matched from the instruction mapping dictionary; Alternatively, a brand matching instruction can be sent to the meter terminal to receive brand query response information from the meter terminal, and a target communication protocol corresponding to the meter terminal can be matched from the meter protocol library based on the brand query response information, and a target mapping relationship corresponding to the meter terminal can be matched from the instruction mapping dictionary based on the brand query response information.

[0010] In this preferred example, two flexible and reliable dynamic protocol matching mechanisms are used to jointly solve the problem of instant compatibility between a universal remote control and meters of different brands. The user-manual matching method allows operators to quickly and directly select the protocol and mapping relationship based on known on-site information, ensuring the determinism and efficiency of the operation. The automatic interactive matching method, on the other hand, automatically identifies the meter brand through command interaction and response analysis, eliminating the need for the user to know the model number, significantly improving the intelligence and on-site adaptability of the device. These two methods complement each other, ensuring that in various application scenarios, the requesting end can accurately and reliably establish a dedicated communication link with the target meter without contact or damage.

[0011] As a preferred example of the first aspect, the response data frame is obtained by the meter terminal after processing the instruction data frame, including: Based on the target mapping relationship, the instruction data frame is converted into a second data identifier code; Data is read according to the target communication protocol and the second data identifier to obtain the original query data, and the original query data is encapsulated into a response data frame.

[0012] In this preferred example, the accurate response and standardized feedback from the meter to the universal query request ensure a complete closed loop for cross-brand data queries. First, the instruction data frame is converted into a second data identifier code, enabling the meter to accurately parse the universal query instruction from the requesting end and map it to a specific data address that it can identify internally, thus achieving precise location of specific data. Next, data is read based on the second data identifier code, and a response frame is encapsulated. This ensures that the meter can accurately extract the requested raw data from its internal registers and encapsulate it according to a unified communication protocol, allowing meters from different brands to return standardized, parsable data results to the universal requesting end in a compatible manner.

[0013] As a preferred example of the first aspect, parsing the response data frame to obtain the data query result includes: According to the target communication protocol, the response data frame is verified. If the verification passes, the original data is extracted from the response data frame and the original data is converted into the data query result.

[0014] In this preferred example, accurate delivery of cross-brand query results is ultimately achieved through reliable processing and transformation of the meter response data by the requesting end. First, the response data frame is validated to ensure the integrity of the transmission process and the authenticity of the data, preventing the adoption of erroneous or tampered data and providing a reliable guarantee for subsequent processing. Second, extracting the raw data is a crucial step in transforming the standardized byte stream returned by the meter into processable information, completing the handover of data from the communication layer to the application layer. Finally, the raw data is transformed into query results, translating the raw values ​​or codes within the meter into specific information that users or the system can intuitively understand, thus successfully achieving the ultimate goal of "accurate query" and forming an effective closed loop in the generalized query process.

[0015] Secondly, the present invention provides a method for querying electricity meter data, applied to an electricity meter terminal, the method comprising: The system receives instruction data frames sent by a user terminal and reads data according to the instruction data frames to obtain response data frames. The instruction data frames are obtained by the user terminal by converting the query data into a first data identifier code based on a target mapping relationship, and encapsulating the first data identifier code according to a target communication protocol. The target mapping relationship is obtained by matching a pre-built instruction mapping dictionary based on a brand matching instruction input by the user, and the target communication protocol is obtained by matching a pre-built meter protocol library based on a brand matching instruction input by the user. The response data frame is sent to the user terminal so that the user terminal can parse the response data frame and obtain the data query result.

[0016] As a preferred example of the second aspect, the step of receiving an instruction data frame sent by a user terminal and reading data according to the instruction data frame to obtain a response data frame includes: Receive instruction data frames sent by user terminals, and convert the instruction data frames into a second data identifier code according to the target mapping relationship; Data is read according to the target communication protocol and the second data identifier to obtain the original query data, and the original query data is encapsulated into a response data frame.

[0017] Thirdly, the present invention provides an electricity meter data query system for use in a user terminal, the electricity meter data query system comprising: a first query module, a second query module, a third query module, and a result parsing module; The first query module is used to match the target communication protocol corresponding to the meter terminal from a pre-built meter protocol library based on the query data input by the user, and to match the target mapping relationship corresponding to the meter terminal from a pre-built instruction mapping dictionary; wherein, the query data includes brand matching instructions and data query instructions; The second query module is used to convert the data query instruction into a first data identifier code according to the target mapping relationship, and to encapsulate the first data identifier code into an instruction data frame according to the target communication protocol; The third query module is used to send the instruction data frame to the meter terminal to receive the response data frame fed back by the meter terminal; wherein, the response data frame is obtained by the meter terminal after processing the instruction data frame; The result parsing module is used to respond to the response data frame, parse the response data frame, and obtain the data query result.

[0018] As a preferred example of the third aspect, the construction process of the meter protocol library and the instruction mapping dictionary includes: The meter protocol library is constructed based on the protocol databases corresponding to several different brands of meters, and the instruction mapping dictionary is constructed based on the instruction mapping relationship corresponding to each meter.

[0019] As a preferred example of the third aspect, the step of matching the target communication protocol corresponding to the meter terminal from a pre-built meter protocol library based on the query data input by the user includes: According to the brand matching instruction, the target communication protocol corresponding to the meter terminal is directly matched from the meter protocol library, and the target mapping relationship corresponding to the meter terminal is directly matched from the instruction mapping dictionary; Alternatively, a brand matching instruction can be sent to the meter terminal to receive brand query response information from the meter terminal, and a target communication protocol corresponding to the meter terminal can be matched from the meter protocol library based on the brand query response information, and a target mapping relationship corresponding to the meter terminal can be matched from the instruction mapping dictionary based on the brand query response information.

[0020] As a preferred example of the third aspect, the response data frame is obtained by the meter terminal after processing the instruction data frame, including: Based on the target mapping relationship, the instruction data frame is converted into a second data identifier code; Data is read according to the target communication protocol and the second data identifier to obtain the original query data, and the original query data is encapsulated into a response data frame.

[0021] As a preferred example of the third aspect, the parsing of the response data frame to obtain the data query result includes: According to the target communication protocol, the response data frame is verified. If the verification passes, the original data is extracted from the response data frame and the original data is converted into the data query result.

[0022] In summary, this application's embodiments establish a universal protocol adaptation foundation for user terminals that supports multiple brands and models of electricity meters by pre-building a meter protocol library and command mapping dictionary. This fundamentally breaks the hardware binding relationship between traditional remote controls and specific electricity meters, making cross-brand universal queries possible. Secondly, through dynamic protocol matching, the communication protocol and mapping relationship corresponding to the target electricity meter are quickly determined based on the user's input query data (including brand matching commands). This allows the user terminal to automatically adapt to the communication rules of different electricity meters without physical contact or meter setup, ensuring convenient and non-intrusive operation. Finally, by converting data query commands into a first data label... The code is identified and encapsulated into a command data frame, overcoming the inefficiencies and inability to query on demand inherent in the passive rotating display mode. Then, by sending command data frames and receiving response data frames, a reliable two-way communication link with the target meter is established, enabling the transmission of active query requests and obtaining direct data feedback from the meter, ensuring the integrity of the query process and the accessibility of the data. Finally, by parsing the response data frame, the data query result is obtained, accurately restoring the raw data returned by the meter into user-readable information. This completes the entire process from active request to final result presentation, allowing users to accurately and directly obtain the required internal data without damaging the meter's seal.

[0023] Fourthly, the present invention provides an electricity meter data query system, applied to an electricity meter terminal, the electricity meter data query system comprising: a data processing module and a data sending module; The data processing module is used to receive instruction data frames sent by the user terminal, and read data according to the instruction data frames to obtain response data frames; wherein, the instruction data frame is obtained by the user terminal converting the query data into a first data identifier code according to the target mapping relationship, and encapsulating the first data identifier code according to the target communication protocol; wherein, the target mapping relationship is obtained by matching from a pre-built instruction mapping dictionary according to the brand matching instruction input by the user, and the target communication protocol is obtained by matching from a pre-built meter protocol library according to the brand matching instruction input by the user; The data sending module is used to send the response data frame to the user terminal so that the user terminal can parse the response data frame and obtain the data query result.

[0024] As a preferred example of the fourth aspect, the step of receiving an instruction data frame sent by a user terminal and reading data according to the instruction data frame to obtain a response data frame includes: Receive instruction data frames sent by user terminals, and convert the instruction data frames into a second data identifier code according to the target mapping relationship; Data is read according to the target communication protocol and the second data identifier to obtain the original query data, and the original query data is encapsulated into a response data frame.

[0025] Fifthly, the present invention provides an electricity meter data query device, comprising a user terminal and a plurality of electricity meters. The user terminal includes an infrared transmitter, and each electricity meter includes a corresponding infrared receiver. The user terminal sends a corresponding instruction data frame to each of the electricity meters through the infrared transmitter, and each of the electricity meters receives the corresponding instruction data frame through the corresponding infrared receiver. The user terminal executes any of the electricity meter data query methods described above for the user terminal, and each of the electricity meters executes any of the electricity meter data query methods described above for the electricity meter. Attached Figure Description

[0026] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0027] Figure 1 This is a flowchart illustrating an embodiment of a method for querying electricity meter data applied to a user terminal provided by the present invention. Figure 2 This is a flowchart illustrating an embodiment of a method for querying electricity meter data applied to an electricity meter, provided by the present invention. Figure 3 This is a module structure diagram of an embodiment of an electricity meter data query system applied to a user terminal provided by the present invention; Figure 4 This is a module structure diagram of an embodiment of an electricity meter data query system applied to an electricity meter terminal provided by the present invention; Figure 5 This is a structural diagram of one embodiment of an electricity meter data query device provided by the present invention. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0030] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0031] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0032] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0033] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).

[0034] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0035] Example 1 See Figure 1 To address the problem in existing technologies of accurately retrieving internal data from different brands of electricity meters without damaging the meters, an embodiment of the present invention provides an electricity meter data query method applied to a user terminal. The electricity meter data query method includes: S1. Match the target communication protocol corresponding to the meter terminal from the pre-built meter protocol library based on the query data input by the user, and match the target mapping relationship corresponding to the meter terminal from the pre-built instruction mapping dictionary; wherein, the query data includes brand matching instructions and data query instructions; As a preferred embodiment, the construction process of the meter protocol library and the instruction mapping dictionary includes: The meter protocol library is constructed based on the protocol databases corresponding to several different brands of meters, and the instruction mapping dictionary is constructed based on the instruction mapping relationship corresponding to each meter.

[0036] For example, the meter protocol library includes a brand model ID, communication physical parameters, and data link layer parameters. The communication physical parameters include: symbol, baud rate, bit rate, and bandwidth; the data link layer parameters include: frame structure parameters, error control parameters, flow control parameters, and access control parameters.

[0037] It should be noted that different brands and models of electricity meters have their own corresponding instruction mapping dictionaries. The data identifier codes in the instruction mapping dictionary are generated through the data field in the meter's communication protocol. When the same user intention input is entered on the same requesting end, the mapped data identifier codes will be different. For example, for brand A electricity meters, the user intention input "read current positive active energy" is mapped to the data identifier 0x02 0x01 0x02 0x00; the user intention input "read current total active energy" is mapped to the data identifier 0x02 0x02 0x00 0x00. For brand B electricity meters, the same user intention input will result in different data identifier codes after being processed by the corresponding instruction mapping dictionary.

[0038] As a preferred implementation, the step of matching the target communication protocol corresponding to the meter terminal from a pre-built meter protocol library based on the query data input by the user includes: According to the brand matching instruction, the target communication protocol corresponding to the meter terminal is directly matched from the meter protocol library, and the target mapping relationship corresponding to the meter terminal is directly matched from the instruction mapping dictionary; Alternatively, a brand matching instruction can be sent to the meter terminal to receive brand query response information from the meter terminal, and a target communication protocol corresponding to the meter terminal can be matched from the meter protocol library based on the brand query response information, and a target mapping relationship corresponding to the meter terminal can be matched from the instruction mapping dictionary based on the brand query response information.

[0039] S2. Based on the target mapping relationship, the data query instruction is converted into a first data identifier code, and based on the target communication protocol, the first data identifier code is encapsulated into an instruction data frame; For example, the instruction data frame includes a frame header, a meter address field, a control code, a data field length, and a data field content. The data field content is the data identifier code obtained according to the instruction mapping dictionary. For example, the data identifier 0x02 0x01 0x02 0x00 obtained by mapping the intention data input by the A brand meter as "read current positive active energy" is the data field content of this message.

[0040] S3. Send the instruction data frame to the meter terminal to receive the response data frame fed back by the meter terminal; wherein, the response data frame is obtained by the meter terminal after processing the instruction data frame; In a preferred embodiment, the response data frame is obtained by the meter terminal after processing the instruction data frame, including: Based on the target mapping relationship, the instruction data frame is converted into a second data identifier code; Data is read according to the target communication protocol and the second data identifier to obtain the original query data, and the original query data is encapsulated into a response data frame.

[0041] S4. Respond to the response data frame, parse the response data frame, and obtain the data query result.

[0042] In a preferred embodiment, parsing the response data frame to obtain the data query result includes: According to the target communication protocol, the response data frame is verified. If the verification passes, the original data is extracted from the response data frame and the original data is converted into the data query result.

[0043] In summary, this application's embodiments establish a universal protocol adaptation foundation for user terminals that supports multiple brands and models of electricity meters by pre-building a meter protocol library and command mapping dictionary. This fundamentally breaks the hardware binding relationship between traditional remote controls and specific electricity meters, making cross-brand universal queries possible. Secondly, through dynamic protocol matching, the communication protocol and mapping relationship corresponding to the target electricity meter are quickly determined based on the user's input query data (including brand matching commands). This allows the user terminal to automatically adapt to the communication rules of different electricity meters without physical contact or meter setup, ensuring convenient and non-intrusive operation. Finally, by converting data query commands into a first data label... The code is identified and encapsulated into a command data frame, overcoming the inefficiencies and inability to query on demand inherent in the passive rotating display mode. Then, by sending command data frames and receiving response data frames, a reliable two-way communication link with the target meter is established, enabling the transmission of active query requests and obtaining direct data feedback from the meter, ensuring the integrity of the query process and the accessibility of the data. Finally, by parsing the response data frame, the data query result is obtained, accurately restoring the raw data returned by the meter into user-readable information. This completes the entire process from active request to final result presentation, allowing users to accurately and directly obtain the required internal data without damaging the meter's seal.

[0044] Example 2 See Figure 2 This invention provides a method for querying electricity meter data, applied to an electricity meter terminal. The method includes: S1. Receive an instruction data frame sent by a user terminal, and read data according to the instruction data frame to obtain a response data frame; wherein, the instruction data frame is obtained by the user terminal converting the query data into a first data identifier code according to the target mapping relationship, and encapsulating the first data identifier code according to the target communication protocol; wherein, the target mapping relationship is obtained by matching from a pre-built instruction mapping dictionary according to the brand matching instruction input by the user, and the target communication protocol is obtained by matching from a pre-built meter protocol library according to the brand matching instruction input by the user; S2. The response data frame is sent to the user terminal so that the user terminal can parse the response data frame and obtain the data query result.

[0045] In a preferred embodiment, receiving an instruction data frame sent by a user terminal and reading data according to the instruction data frame to obtain a response data frame includes: Receive instruction data frames sent by user terminals, and convert the instruction data frames into a second data identifier code according to the target mapping relationship; Data is read according to the target communication protocol and the second data identifier to obtain the original query data, and the original query data is encapsulated into a response data frame.

[0046] Example 3 Please refer to Figure 3 This invention provides an electricity meter data query system for use in a user terminal. The electricity meter data query system includes: a first query module 31, a second query module 32, a third query module 33, and a result parsing module 34. The first query module 31 is used to match the target communication protocol corresponding to the meter terminal from a pre-built meter protocol library based on the query data input by the user, and to match the target mapping relationship corresponding to the meter terminal from a pre-built instruction mapping dictionary; wherein, the query data includes brand matching instructions and data query instructions; The second query module 32 is used to convert the data query instruction into a first data identifier code according to the target mapping relationship, and to encapsulate the first data identifier code into an instruction data frame according to the target communication protocol. The third query module 33 is used to send the instruction data frame to the meter terminal to receive the response data frame fed back by the meter terminal; wherein, the response data frame is obtained by the meter terminal after processing the instruction data frame; The result parsing module 34 is used to respond to the response data frame, parse the response data frame, and obtain the data query result.

[0047] As a preferred embodiment, the construction process of the meter protocol library and the instruction mapping dictionary includes: The meter protocol library is constructed based on the protocol databases corresponding to several different brands of meters, and the instruction mapping dictionary is constructed based on the instruction mapping relationship corresponding to each meter.

[0048] As a preferred implementation, the step of matching the target communication protocol corresponding to the meter terminal from a pre-built meter protocol library based on the query data input by the user includes: According to the brand matching instruction, the target communication protocol corresponding to the meter terminal is directly matched from the meter protocol library, and the target mapping relationship corresponding to the meter terminal is directly matched from the instruction mapping dictionary; Alternatively, a brand matching instruction can be sent to the meter terminal to receive brand query response information from the meter terminal, and a target communication protocol corresponding to the meter terminal can be matched from the meter protocol library based on the brand query response information, and a target mapping relationship corresponding to the meter terminal can be matched from the instruction mapping dictionary based on the brand query response information.

[0049] In a preferred embodiment, the response data frame is obtained by the meter terminal after processing the instruction data frame, including: Based on the target mapping relationship, the instruction data frame is converted into a second data identifier code; Data is read according to the target communication protocol and the second data identifier to obtain the original query data, and the original query data is encapsulated into a response data frame.

[0050] In a preferred embodiment, parsing the response data frame to obtain the data query result includes: According to the target communication protocol, the response data frame is verified. If the verification passes, the original data is extracted from the response data frame and the original data is converted into the data query result.

[0051] For more detailed steps and working principles of this embodiment, please refer to the relevant description in Embodiment 1, but not limited to these descriptions.

[0052] In summary, this application's embodiments establish a universal protocol adaptation foundation for user terminals that supports multiple brands and models of electricity meters by pre-building a meter protocol library and command mapping dictionary. This fundamentally breaks the hardware binding relationship between traditional remote controls and specific electricity meters, making cross-brand universal queries possible. Secondly, through dynamic protocol matching, the communication protocol and mapping relationship corresponding to the target electricity meter are quickly determined based on the user's input query data (including brand matching commands). This allows the user terminal to automatically adapt to the communication rules of different electricity meters without physical contact or meter setup, ensuring convenient and non-intrusive operation. Finally, by converting data query commands into a first data label... The code is identified and encapsulated into a command data frame, overcoming the inefficiencies and inability to query on demand inherent in the passive rotating display mode. Then, by sending command data frames and receiving response data frames, a reliable two-way communication link with the target meter is established, enabling the transmission of active query requests and obtaining direct data feedback from the meter, ensuring the integrity of the query process and the accessibility of the data. Finally, by parsing the response data frame, the data query result is obtained, accurately restoring the raw data returned by the meter into user-readable information. This completes the entire process from active request to final result presentation, allowing users to accurately and directly obtain the required internal data without damaging the meter's seal.

[0053] Example 4 Please refer to Figure 4 This invention provides an electricity meter data query system, which is applied to an electricity meter. The electricity meter data query system includes a data processing module 41 and a data sending module 42. The data processing module 41 is used to receive instruction data frames sent by the user terminal, and read data according to the instruction data frames to obtain response data frames; wherein, the instruction data frame is obtained by the user terminal converting the query data into a first data identifier code according to the target mapping relationship, and encapsulating the first data identifier code according to the target communication protocol; wherein, the target mapping relationship is obtained by matching from a pre-built instruction mapping dictionary according to the brand matching instruction input by the user, and the target communication protocol is obtained by matching from a pre-built meter protocol library according to the brand matching instruction input by the user; The data sending module 42 is used to send the response data frame to the user terminal so that the user terminal can parse the response data frame and obtain the data query result.

[0054] In a preferred embodiment, receiving an instruction data frame sent by a user terminal and reading data according to the instruction data frame to obtain a response data frame includes: Receive instruction data frames sent by user terminals, and convert the instruction data frames into a second data identifier code according to the target mapping relationship; Data is read according to the target communication protocol and the second data identifier to obtain the original query data, and the original query data is encapsulated into a response data frame.

[0055] For more detailed steps and working principles of this embodiment, please refer to the relevant description in Embodiment 2.

[0056] Example 5 Please refer to Figure 5 This invention provides an electricity meter data query device, comprising a user terminal and several electricity meters. The user terminal includes an infrared transmitter, and each electricity meter includes a corresponding infrared receiver. The user terminal sends corresponding instruction data frames to each of the electricity meters via the infrared transmitter, and each of the electricity meters receives the corresponding instruction data frames via the corresponding infrared receiver. The user terminal executes the electricity meter data query method applied to the user terminal as described in Embodiment 1, and each of the electricity meters executes the electricity meter data query method applied to the electricity meter as described in Embodiment 2.

[0057] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for querying electricity meter data, characterized in that, The meter data query method, applied to user terminals, includes: Based on the query data input by the user, the system matches the target communication protocol corresponding to the meter terminal from a pre-built meter protocol library, and matches the target mapping relationship corresponding to the meter terminal from a pre-built instruction mapping dictionary; wherein, the query data includes brand matching instructions and data query instructions; According to the target mapping relationship, the data query instruction is converted into a first data identifier code, and according to the target communication protocol, the first data identifier code is encapsulated into an instruction data frame; The instruction data frame is sent to the meter terminal to receive the response data frame fed back by the meter terminal; wherein, the response data frame is obtained by the meter terminal after processing the instruction data frame; In response to the response data frame, the response data frame is parsed to obtain the data query result.

2. The method for querying electricity meter data as described in claim 1, characterized in that, The construction process of the meter protocol library and the instruction mapping dictionary includes: The meter protocol library is constructed based on the protocol databases corresponding to several different brands of meters, and the instruction mapping dictionary is constructed based on the instruction mapping relationship corresponding to each meter.

3. The method for querying electricity meter data as described in claim 1, characterized in that, The step of matching the target communication protocol corresponding to the meter from a pre-built meter protocol library based on the query data input by the user includes: According to the brand matching instruction, the target communication protocol corresponding to the meter terminal is directly matched from the meter protocol library, and the target mapping relationship corresponding to the meter terminal is directly matched from the instruction mapping dictionary; Alternatively, a brand matching instruction can be sent to the meter terminal to receive brand query response information from the meter terminal, and a target communication protocol corresponding to the meter terminal can be matched from the meter protocol library based on the brand query response information, and a target mapping relationship corresponding to the meter terminal can be matched from the instruction mapping dictionary based on the brand query response information.

4. The method for querying electricity meter data as described in claim 1, characterized in that, The response data frame is obtained by the meter terminal after processing the instruction data frame, including: Based on the target mapping relationship, the instruction data frame is converted into a second data identifier code; Data is read according to the target communication protocol and the second data identifier to obtain the original query data, and the original query data is encapsulated into a response data frame.

5. The method for querying electricity meter data as described in claim 1, characterized in that, The step of parsing the response data frame to obtain the data query results includes: According to the target communication protocol, the response data frame is verified. If the verification passes, the original data is extracted from the response data frame and the original data is converted into the data query result.

6. A method for querying electricity meter data, characterized in that, Applied to the electricity meter terminal, the electricity meter data query method includes: The system receives instruction data frames sent by a user terminal and reads data according to the instruction data frames to obtain response data frames. The instruction data frames are obtained by the user terminal by converting the query data into a first data identifier code based on a target mapping relationship, and encapsulating the first data identifier code according to a target communication protocol. The target mapping relationship is obtained by matching a pre-built instruction mapping dictionary based on a brand matching instruction input by the user, and the target communication protocol is obtained by matching a pre-built meter protocol library based on a brand matching instruction input by the user. The response data frame is sent to the user terminal so that the user terminal can parse the response data frame and obtain the data query result.

7. The method for querying electricity meter data as described in claim 6, characterized in that, The process of receiving a command data frame sent by a user terminal and reading data according to the command data frame to obtain a response data frame includes: Receive instruction data frames sent by user terminals, and convert the instruction data frames into a second data identifier code according to the target mapping relationship; Data is read according to the target communication protocol and the second data identifier to obtain the original query data, and the original query data is encapsulated into a response data frame.

8. A meter data query system, characterized in that, The meter data query system, applied to user terminals, includes: a first query module, a second query module, a third query module, and a result parsing module; The first query module is used to match the target communication protocol corresponding to the meter terminal from a pre-built meter protocol library based on the query data input by the user, and to match the target mapping relationship corresponding to the meter terminal from a pre-built instruction mapping dictionary; wherein, the query data includes brand matching instructions and data query instructions; The second query module is used to convert the data query instruction into a first data identifier code according to the target mapping relationship, and to encapsulate the first data identifier code into an instruction data frame according to the target communication protocol; The third query module is used to send the instruction data frame to the meter terminal to receive the response data frame fed back by the meter terminal; wherein, the response data frame is obtained by the meter terminal after processing the instruction data frame; The result parsing module is used to respond to the response data frame, parse the response data frame, and obtain the data query result.

9. A meter data query system, characterized in that, The electricity meter data query system, applied to the electricity meter terminal, includes: a data processing module and a data sending module; The data processing module is used to receive instruction data frames sent by the user terminal, and read data according to the instruction data frames to obtain response data frames; wherein, the instruction data frame is obtained by the user terminal converting the query data into a first data identifier code according to the target mapping relationship, and encapsulating the first data identifier code according to the target communication protocol; wherein, the target mapping relationship is obtained by matching from a pre-built instruction mapping dictionary according to the brand matching instruction input by the user, and the target communication protocol is obtained by matching from a pre-built meter protocol library according to the brand matching instruction input by the user; The data sending module is used to send the response data frame to the user terminal so that the user terminal can parse the response data frame and obtain the data query result.

10. A device for querying electricity meter data, characterized in that, The electricity meter data query device includes a user terminal and several electricity meter terminals. The user terminal includes an infrared transmitter, and each electricity meter terminal includes a corresponding infrared receiver. The user terminal sends corresponding instruction data frames to each of the electricity meter terminals through the infrared transmitter, and each of the electricity meter terminals receives the corresponding instruction data frames through the corresponding infrared receiver. The user terminal executes the electricity meter data query method as described in any one of claims 1 to 5, and each of the electricity meter terminals executes the electricity meter data query method as described in any one of claims 6 to 7.