Ammeter multi-protocol adaptive docking method and system, and medium

By using a multi-protocol adaptive docking method for electricity meters, and utilizing the basic protocol interface package and protocol plug-in decoupling processing unit, the problems of high coupling and poor scalability in traditional electricity meter docking methods are solved, achieving seamless and efficient docking of electricity meter devices and simplified maintenance.

CN121531044APending Publication Date: 2026-02-13QINGDAO ITECHENE TECH CO LTD

Patent Information

Application Number
CN202610039650.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Traditional electricity meter devices have high coupling, poor scalability, difficult maintenance and low reliability. They cannot achieve quick 'plug and play' and the mixed multiple protocol parsing codes lead to bloated systems and difficult debugging.

Method used

The method of multi-protocol adaptive docking of electricity meters is adopted. The core processing unit and protocol plug-in are decoupled through basic protocol interface packets. Protocol routers and protocol plug-ins are used to handle different protocols. Standard interface packets are built to shield protocol differences and support hot-swapping of new protocols.

Benefits of technology

It enables seamless and efficient connection of electricity meter equipment, reduces system coupling, improves scalability and reliability, simplifies the maintenance process, and reduces development and debugging complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121531044A_ABST
    Figure CN121531044A_ABST
Patent Text Reader

Abstract

The invention provides an electricity meter multi-protocol self-adaptive docking method and system and a medium. The method comprises the following steps that an application system sends a control request to a core processing unit; the protocol router obtains a protocol plug-in according to the protocol type, and the core processing unit calls a standard interface in the basic protocol interface packet according to the operation instruction; implementing the standard interface by the protocol plug-in, and generating a message conforming to a protocol specification; the core processing unit issues the message to the target electric meter according to the target equipment address; the target electric meter reports a corresponding original message to the core processing unit according to the message content; the protocol router identifies a protocol type according to an original message and obtains a protocol plug-in, and the core processing unit calls a standard interface in the basic protocol interface packet; the protocol plug-in realizes the standard interface, and performs frame format verification, data integrity verification and message analysis on an original message in sequence; and the core processing unit extracts the standardized data after message analysis and pushes the standardized data to an application system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of Internet of Things and energy management communication, and particularly relates to a meter multi-protocol adaptive interfacing method, system and medium. BACKGROUND

[0002] Currently, in the Internet of Things scenarios such as smart grid and industrial energy management, meter devices integrating multiple different communication protocols are needed, such as DL / T645, GB / T 69845.1, IEC 104, DLMS / COSEM, etc. The traditional interfacing method is usually to write an independent, hard-coded parsing process for each protocol, and to integrate it closely with the system core business logic. The system core code of this method is deeply dependent on the parsing rules of specific protocols, and the system coupling is high. Protocol changes or upgrades require modification of the core code, which is risky and labor-intensive. The introduction of new protocols means that the system needs to be redeveloped, tested and deployed, which cannot achieve fast "plug and play", has poor scalability, and is difficult to adapt to the agility requirements of market access to new devices. Moreover, the parsing codes of multiple protocols are mixed together, resulting in a bloated system, complex logic, and great inconvenience for debugging and troubleshooting. Defects in any protocol parsing module can affect the stable operation of the entire system, and the reliability is low.

[0003] The present application is designed to solve the above technical problems, and provides a meter multi-protocol adaptive interfacing method, system and medium. SUMMARY

[0004] The present application provides a meter multi-protocol adaptive interfacing method, system and medium, aiming to solve the problems of high coupling, poor scalability, difficult maintenance and low reliability of the traditional interfacing method between the client and the meter.

[0005] To achieve the above object, the application provides the following technical scheme: a meter multi-protocol adaptive interfacing method, comprising the following steps: S1, a control request is sent by an application system to a core processing unit, the control request comprising a target device address, a protocol type and an operation instruction; S2, a protocol router acquires a corresponding protocol plug-in according to the protocol type, and the core processing unit calls a corresponding standard interface in a basic protocol interface package according to the operation instruction; S3, the protocol plug-in implements the corresponding standard interface and generates a message conforming to a protocol specification; S4, the core processing unit delivers the message to a target meter according to the target device address; S5, the target meter reports a corresponding original message to the core processing unit according to the message content; S6, the protocol router identifies a protocol type according to the original message, acquires a corresponding protocol plug-in, and the core processing unit calls a corresponding standard interface in the basic protocol interface package; S7, the protocol plug-in implements the corresponding standard interface and sequentially performs frame format verification, data integrity verification and message analysis on the original message; S8, the core processing unit extracts standardized data after message analysis and pushes the data to the application system.

[0006] On the basis of the above technical scheme, in step S2, the construction of the basic protocol interface package comprises the following steps: A1, a plurality of standard interfaces are constructed, and each standard interface writes a corresponding function; A2, the plurality of standard interfaces constitute the basic protocol interface package, wherein a communication protocol becomes a protocol plug-in of the basic protocol interface package by implementing the standard interface.

[0007] On the basis of the above technical scheme, in step S4, when the message is delivered to the target meter, the sending completion information is fed back to the application system after sending, indicating that the message has been delivered and is waiting for a reply.

[0008] On the basis of the above technical scheme, step S6 comprises the following steps: S6.1, it is judged whether the target device completes the first communication and protocol registration, in the case that the target device does not complete the first communication and protocol registration, the protocol router identifies and judges the protocol type according to the frame features of the original message, the frame features comprising a start symbol, a protocol identification field and a reserved field; S6.2, in the case that the target device has completed the first communication and protocol registration, the protocol router acquires the protocol type when the target device performs protocol registration from the session according to the session ID, wherein the session ID is an identification ID generated by the target device when a communication channel is established, and the target device caches the session ID and the corresponding protocol type into the session when performing protocol registration; S6.3, the protocol router acquires a corresponding protocol plug-in according to the protocol type, and the core processing unit calls a corresponding standard interface in the basic protocol interface package.

[0009] Further, before the step S6.1, the protocol router further constructs a mapping table of protocol types and protocol plug-ins, and stores the mapping relationship between the basic protocol types and the protocol plug-ins.

[0010] Further, after the step 6.3, the method further includes the following step S6.4: if the acquisition fails, adding a corresponding protocol plug-in according to the protocol type, and recording the mapping relationship between the identified protocol type and the added protocol plug-in into the mapping table.

[0011] Based on the above technical solution, the step S7 includes the following steps: S7.1, the protocol plug-in performs frame format verification and data integrity verification on the original message in sequence; S7.2, it is judged whether the frame format verification and the data integrity verification of the original message pass, if the frame format verification or the data integrity verification does not pass, an exception processing procedure is triggered; S7.3, if the frame format verification and the data integrity verification both pass, the protocol plug-in analyzes the original message into standardized data.

[0012] In a second aspect, the application provides an electric meter multi-protocol adaptive interfacing system, which comprises a core processing unit, a protocol router, a basic protocol interface package and a protocol plug-in, wherein the core processing unit is configured to receive a control request of an application system, call a corresponding standard interface in the basic protocol interface package according to an operation instruction, send the message to a target electric meter according to a target device address, receive an original message reported by the target electric meter, call a corresponding standard interface in the basic protocol interface package, extract standardized data after message analysis and push the standardized data to the application system; the protocol router is configured to acquire a corresponding protocol plug-in according to a protocol type, and acquire a corresponding protocol plug-in after identifying a protocol type of the original message; the basic protocol interface package is configured to define a standard interface and a function corresponding to the standard interface; and the protocol plug-in is configured to implement the corresponding standard interface to generate a message conforming to a protocol specification, and implement the corresponding standard interface to perform frame format verification, data integrity verification and message analysis on the original message in sequence.

[0013] In a third aspect, the application provides a computer readable storage medium, which stores program instructions, and the program instructions are configured to make a computer execute the electric meter multi-protocol adaptive interfacing method according to any one of the above embodiments when running.

[0014] Compared with the related art, the application has the following beneficial effects: The application achieves decoupling between the core processing unit and the protocol plug-in by setting the basic protocol interface package, so that the core processing unit only depends on the basic protocol interface package and does not need to understand the implementation details of the specific protocol plug-in. When a new protocol needs to be accessed, only a protocol plug-in corresponding to the protocol needs to be developed, without modifying the core processing unit and the application system core code, which is good in scalability and realizes the "hot plug" of the protocol plug-in. The exception of a single protocol plug-in will not affect other protocol plug-ins and the core processing unit, which is convenient for maintenance and high in reliability and stability. The connection method can uniformly process the downlink control instructions from the client application system and the uplink data from the client meter device, shield the protocol difference in the bidirectional data flow through the protocol plug-in architecture, and achieve seamless and efficient connection with heterogeneous protocol devices. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only one embodiment of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.

[0016] Fig. 1 is a flow chart of the meter multi-protocol adaptive connection method provided by the present application; Fig. 2 is another flow chart of the meter multi-protocol adaptive connection method provided by the present application. DETAILED DESCRIPTION

[0017] The present application will be further described below in combination with the drawings and examples: The embodiments of the present application will be described in detail below, and examples of the embodiments are shown in the drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are only used to explain the present application, and cannot be understood as a limitation of the present application.

[0018] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connection" and "connection" should be understood in a broad sense, for example, it can be fixed connection, or detachable connection, or integral connection; it can be directly connected, or indirectly connected through an intermediate medium. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0019] In the description of the present application, it should be understood that the terms "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.

[0020] In combination Figs. 1-2 As shown, the present disclosure provides an electric meter multi-protocol adaptive interfacing method, comprising the following steps: S1, the application system sends a control request to the core processing unit, wherein the control request includes a target device address, a protocol type and an operation instruction; S2, the protocol router acquires the corresponding protocol plug-in according to the protocol type, and the core processing unit calls the corresponding standard interface in the basic protocol interface package according to the operation instruction; S3, the protocol plug-in implements the corresponding standard interface to generate a message conforming to the protocol specification; S4, the core processing unit distributes the message to the target electric meter according to the target device address; S5, the target electric meter reports the corresponding original message to the core processing unit according to the message content; S6, the protocol router identifies the protocol type according to the original message, acquires the corresponding protocol plug-in, and the core processing unit calls the corresponding standard interface in the basic protocol interface package; S7, the protocol plug-in implements the corresponding standard interface, and sequentially performs frame format verification, data integrity verification and message analysis on the original message; S8, the core processing unit extracts the standardized data after message analysis and pushes it to the application system.

[0021] By adopting the electric meter multi-protocol adaptive interfacing method provided by the present disclosure, by setting the basic protocol interface package, the core processing unit only relies on the basic protocol interface package and does not need to understand the specific protocol plug-in implementation details, the decoupling between the core processing unit and the protocol plug-in is realized, when an electric meter supporting a new protocol needs to be accessed, only a protocol plug-in corresponding to the protocol needs to be developed, without modifying the core processing unit and the application system core code, realizing the "hot plugging" of the protocol plug-in, the exception of a single protocol plug-in will not affect other protocol plug-ins and the core processing unit, the interfacing method can uniformly process the downlink control instruction from the client application system and the uplink data from the client electric meter device, through the protocol plug-in architecture, the shielding of protocol differences in the bidirectional data flow is realized, and seamless and efficient interfacing with heterogeneous protocol devices is achieved.

[0022] On the basis of the above technical solutions, in the step S2, the construction of the basic protocol interface package comprises the following steps: A1, constructing a plurality of standard interfaces, each of which writes a corresponding function; A2, the plurality of standard interfaces constitute a basic protocol interface package, wherein the communication protocol becomes a protocol plug-in of the basic protocol interface package by implementing the standard interface.

[0023] Each interface does not contain any implementation details of a specific protocol, but only defines a corresponding function, such as message assembly, parsing, integrity check, protocol type judgment, etc.

[0024] Specifically, the basic protocol interface package includes a plurality of standard interfaces, each interface corresponds to a function, and each protocol plug-in needs to implement these standard interfaces. If other devices corresponding to new protocol types are added, only one protocol plug-in needs to be added, without the need to modify the entire system, greatly shortening the development cycle, and developers can focus on the implementation of a single protocol, with clear code, easy debugging and maintenance, clear architecture, and reduced overall technical complexity and long-term maintenance cost.

[0025] The basic protocol interface package defines a set of standardized method interfaces, and the basic protocol interface package is independent of any specific protocol and is mainly used for standardization. It can be regarded as a "contract" between the core processing unit and all protocol plug-ins, and any protocol needs to become a protocol plug-in by implementing the interface. The basic protocol interface package includes protocol judgment, frame format verification, integrity check, table address acquisition, message framing and deframing, etc. As the "contract layer" between the system core and the protocol plug-in, the basic protocol interface package defines standardized operations for the whole life cycle of the electric meter communication through abstract methods, which can completely shield the technical differences of different protocols.

[0026] The basic protocol interface package defines a protocol identification interface, which can return the unique identification of the protocol, such as "DLT645-2007", "DLT698-2013", "DLMS", etc., which can provide a basis for protocol router judgment, and can also return the protocol version, supporting differentiated processing of different versions of the same protocol, such as the difference between the frame structure of the 2007 version and the 1997 version of the 645 protocol. The contact protocol interface package can verify the legality of the message structure, such as the position and format of the "start symbol, length field, control field, end symbol" of the 645 protocol, the legality of the "application protocol control information, application service data unit structure" of the 698 protocol, and can also verify the data integrity and reliability, such as the CRC16 check of the 645 protocol, the checksum and encryption integrity verification of the 698 protocol.

[0027] The basic protocol interface package can extract the unique physical address of the meter from the message, such as the "meter address field" of the 645 protocol and the "logical device identifier" of the 698 protocol, for target device identity positioning, and can also determine whether the message is actively reported by the meter, such as the frame with the "control code first bit being a specific value" in the 645 protocol being an active reporting frame, for the core service to distinguish between "request-response" and "active reporting" processes. In the downlink process from the application system to the meter, the basic protocol interface package can construct a message that meets the corresponding protocol specification according to the application system control instruction, and in the uplink process from the meter to the application system, the basic protocol interface package can parse the raw message reported by the meter, extract the business data and encapsulate it as a standardized key-value pair for direct use by the application system. The basic protocol interface package can also determine whether the message is a link layer frame, such as the 645 protocol link layer frame for device addressing and the application layer frame for business data transmission, supporting "link layer-application layer" layered processing scenarios.

[0028] Further, as shown in Fig. 2 In step S2, the protocol type of the control request is known in step S1, and the corresponding protocol plug-in is found according to the protocol type. Then, the operation instruction of the control request is known in step S1, and the corresponding standard interface in the basic protocol interface package is called according to the operation instruction. In step S3, the protocol plug-in implements the corresponding standard interface, and subsequently generates a message that meets the protocol specification.

[0029] Specifically, each protocol plug-in corresponding to the interface is a specific implementation of the basic protocol interface package, completely encapsulating the analysis and encapsulation logic of a specific communication protocol. The core processing unit only needs to obtain the corresponding interface through the protocol router and does not need to know the implementation details of the specific protocol of the task, realizing the decoupling between the core processing unit and the protocol plug-in. For example, the interface defines the getMeterAddress(data byte[]) method instruction, which forces all protocol plug-ins to implement the logic of "extracting the meter address from the message", and the core processing unit can obtain the address by only calling the interface without needing to pay attention to the address field format of the specific protocol (such as the "6-byte address field" of the 645 protocol and the "logical device identifier" of the 698 protocol). For example, the interface defines the parseFrame(data byte[]) method instruction, which requires the protocol plug-in to parse the raw message into a standardized key-value pair (such as {"voltage": 220V, "current": 5A}), and the core processing unit does not need to process protocol differences and can directly use the standardized data.

[0030] Further, in step S3, when the protocol plug-in implements the standard interface, a message that meets the protocol specification is generated according to the parameters in the operation instruction, including the operation type, register address, set value, time range of request data, whether the instruction needs to be broadcast, whether the instruction needs to be replied, and whether there is a subsequent request, etc.

[0031] On the basis of the above technical solutions, in step S4, when the message is sent to the target meter, the sending completion information is fed back to the application system after being sent, indicating that the message has been sent and is waiting for a reply. When the message is sent to the target meter, because the distances between the addresses of the target meters and the core processing unit are different, the time required for the target meter to receive the message and the time required for the target meter to report the corresponding original message are different, and the sending completion information is fed back in advance to avoid repeated sending by the user.

[0032] Further, as shown in step S5, according to the instruction of the sent message, the target meter replies to the response message and reports the corresponding original message to the core processing unit, and the target meter can also actively report the abnormal event message. Fig. 2

[0033] On the basis of the above technical solutions, step S6 includes the following steps: S6.1, judging whether the target device completes the first communication and protocol registration, in the case that the target device does not complete the first communication and protocol registration, the protocol router identifies the protocol type according to the frame features of the original message, the frame features including the start symbol, the protocol identification field and the reserved field; S6.2, in the case that the target device has completed the first communication and protocol registration, the protocol router acquires the protocol type when the target device performs protocol registration from the session according to the session ID, wherein the session ID is an identification ID generated by the target device when the communication channel is established, and the target device caches the session ID and the corresponding protocol type into the session when performing protocol registration; S6.3, the protocol router acquires the corresponding protocol plug-in according to the protocol type, and the core processing unit calls the corresponding standard interface in the basic protocol interface package.

[0034] Specifically, in step S6.1, the protocol router identifies the protocol type according to the frame features such as the start symbol, the protocol identification field and the reserved field of the original message, for example, the frame starts with a specific character and ends with another specific character, which matches “DLT645”; the frame contains a specific control field, which matches “DLT698”; the frame conforms to the specific structure of DLMS, which matches “DLMS”.

[0035] In step S6.2, when the target device performs the first communication, the protocol router identifies the protocol type of the target device and performs protocol registration, establishes a communication channel and generates a session ID for the target device, and the protocol router stores the session ID and the protocol type of the target device and their mapping relationship into the session, so that the protocol type corresponding to the session ID can be acquired from the session when the target device reports data next time, avoiding repeated judgment.

[0036] ​In step S6.3, calling the corresponding standard interface in the basic protocol interface package refers to calling the standard interface corresponding to "frame format verification, data integrity verification and message parsing".

[0037] Furthermore, before step S6.1, the protocol router constructs a mapping table of protocol types and protocol plugins, and stores the mapping relationship between basic protocol types and protocol plugins.

[0038] Furthermore, step 6.3 is followed by the following steps: S6.4 If the acquisition fails, add the corresponding protocol plugin according to the protocol type, and record the mapping relationship between the identified protocol type and the newly added protocol plugin in the mapping table.

[0039] Protocol routers avoid creating protocol plugin objects repeatedly by maintaining a mapping table of "protocol type → plugin instance".

[0040] Based on the above technical solutions, such as Fig. 2 As shown, step S7 includes the following steps: S7.1, the protocol plugin performs frame format verification and data integrity verification on the original message in sequence; S7.2 Determine whether the frame format check and data integrity check of the original message pass. If the frame format check or data integrity check fails, trigger the exception handling process. S7.3 If both frame format verification and data integrity verification pass, the protocol plugin parses the original message into standardized data.

[0041] Specifically, different protocol plugins use different verification and parsing rules when performing frame format verification, data integrity verification, and message parsing.

[0042] For example, in the DLT645-2007 plugin, during frame format verification, it verifies whether the message's "start character, end character, and length field match the actual frame length"; during data integrity verification, it calculates the CRC16 value of a specific part of the message based on the "checksum field" within the frame and compares it with the checksum field; message parsing includes framing and deframing. During framing, it concatenates fields according to the structure of "start character + address field + control code + data field + checksum + end character" and generates a CRC16 checksum; during deframing, it extracts the "data field," parses the "data identifier" and "data value," and converts them into standardized key-value pairs.

[0043] For example, the DLT698-2013 plug-in, when checking the frame format, verifies the legality of the "transmission reason of application protocol control information, service type" and "object identifier, attribute identifier of application service data unit"; when checking the data integrity, verifies the data has not been tampered based on "application layer encryption authentication" or "checksum field"; when framing, encapsulates "application layer service primitive" to generate application protocol data unit; when deframing, parses "object value" in the application service data unit, and adapts "mapping of object identifier and business meaning" (for example, a specific object identifier corresponds to "total active power").

[0044] For example, the DLMS plug-in supports the electric energy metering system object model, encapsulates the DLMS specific fields such as "logical name, method identifier, parameter" when framing, parses "data block, result code" when deframing, and converts into standardized data conforming to the electric power business.

[0045] The traditional electric power protocols (such as DLT645, DLT698), international general protocols (such as DLMS) and customized private protocols can be quickly accessed through the implementation of the unified basic protocol interface without changing the interaction logic between the server and the application system.

[0046] In step 7.2, the triggered exception handling process can be log recording, retry or alarm.

[0047] The disclosure embodiment further provides an electric meter multi-protocol adaptive interfacing system, comprising a core processing unit, a protocol router, a basic protocol interface package and a protocol plug-in, The core processing unit is configured to receive a control request of an application system, call a corresponding standard interface in the basic protocol interface package according to an operation instruction, send the message to a target electric meter according to the target device address, receive a raw message reported by the target electric meter, call a corresponding standard interface in the basic protocol interface package, extract standardized data after message parsing and push to the application system; The protocol router is configured to obtain a corresponding protocol plug-in according to the protocol type, and obtain a corresponding protocol plug-in after identifying the protocol type according to the raw message; The basic protocol interface package is configured to define a standard interface and a function corresponding to the standard interface; The protocol plug-in is configured to implement a corresponding standard interface to generate a message conforming to a protocol specification, and implement a corresponding standard interface to sequentially perform frame format checking, data integrity checking and message parsing on a raw message.

[0048] The disclosure embodiment further provides a computer readable storage medium storing program instructions, characterized in that the program instructions, when running, are configured to make a computer execute the electric meter multi-protocol adaptive interfacing method according to any one of the above embodiments.

[0049] The present invention has been described above by way of example, but the present invention is not limited to the specific embodiments described above. Any modifications or variations made based on the present invention shall fall within the scope of protection claimed by the present invention.

Claims

1. A method for adaptive interfacing with multiple protocols for electricity meters, characterized in that, Includes the following steps: S1, the application system sends a control request to the core processing unit, the control request including the target device address, protocol type and operation instructions; S2, the protocol router obtains the corresponding protocol plugin according to the protocol type, and the core processing unit calls the corresponding standard interface in the basic protocol interface packet according to the operation instruction; S3, the protocol plugin implements the corresponding standard interface and generates a message that conforms to the protocol specification; S4, the core processing unit sends the message to the target meter according to the target device address; S5, the target meter reports the corresponding original message to the core processing unit according to the message content; S6, the protocol router identifies the protocol type based on the original message, obtains the corresponding protocol plugin, and the core processing unit calls the corresponding standard interface in the basic protocol interface packet; S7, the protocol plugin implements the corresponding standard interface, and performs frame format verification, data integrity verification and message parsing on the original message in sequence; S8, the core processing unit, extracts the standardized data after parsing the message and pushes it to the application system.

2. The multi-protocol adaptive docking method for electricity meters according to claim 1, characterized in that, In step S2, the construction of the basic protocol interface package includes the following steps: A1: Build multiple standard interfaces, and write the corresponding functions into each standard interface; A2 consists of multiple standard interfaces forming a basic protocol interface package, where communication protocols become protocol plugins of the basic protocol interface package by implementing standard interfaces.

3. The multi-protocol adaptive docking method for electricity meters according to claim 1, characterized in that, In step S4, when the message is sent to the target meter, after sending, a message indicating that the message has been sent is sent back to the application system, and a reply is pending.

4. The multi-protocol adaptive docking method for electricity meters according to claim 1, characterized in that, Step S6 includes the following steps: S6.1, determine whether the target device has completed the first communication and protocol registration. If the target device has not completed the first communication and protocol registration, the protocol router identifies and determines the protocol type based on the frame characteristics of the original message. The frame characteristics include start character, protocol identifier field, and reserved field. S6.2, when the target device has completed the first communication and protocol registration, the protocol router obtains the protocol type of the target device when registering the protocol from the session according to the session ID. The session ID is the identification ID generated by the target device when the communication channel is established. When the target device registers the protocol, it caches the session ID and the corresponding protocol type in the session. S6.3, the protocol router obtains the corresponding protocol plugin according to the protocol type, and the core processing unit calls the corresponding standard interface in the basic protocol interface package.

5. The multi-protocol adaptive docking method for electricity meters according to claim 4, characterized in that, Before step S6.1, the protocol router also includes: constructing a mapping table of protocol types and protocol plugins, and storing the mapping relationship between basic protocol types and protocol plugins.

6. The multi-protocol adaptive docking method for electricity meters according to claim 5, characterized in that, The steps following step 6.3 are as follows: S6.4 If the acquisition fails, add the corresponding protocol plugin according to the protocol type, and record the mapping relationship between the identified protocol type and the newly added protocol plugin in the mapping table.

7. The multi-protocol adaptive docking method for electricity meters according to any one of claims 1 to 6, characterized in that, Step S7 includes the following steps: S7.1, the protocol plugin performs frame format verification and data integrity verification on the original message in sequence; S7.2 Determine whether the frame format check and data integrity check of the original message pass. If the frame format check or data integrity check fails, trigger the exception handling process. S7.3 If both frame format verification and data integrity verification pass, the protocol plugin parses the original message into standardized data.

8. A multi-protocol adaptive docking system for electricity meters, characterized in that, This includes the core processing unit, protocol router, basic protocol interface packets, and protocol plugins. The core processing unit is used to receive control requests from the application system, call the corresponding standard interface in the basic protocol interface package according to the operation instructions, send the message to the target meter according to the target device address, receive the original message reported by the target meter, call the corresponding standard interface in the basic protocol interface package, extract the standardized data after message parsing and push it to the application system. The protocol router is used to obtain the corresponding protocol plugin according to the protocol type, and to obtain the corresponding protocol plugin after identifying the protocol type based on the original message. The basic protocol interface package is used to define standard interfaces and the corresponding functions of the standard interfaces; The protocol plugin is used to implement the corresponding standard interface to generate messages that conform to the protocol specification, and to implement the corresponding standard interface to perform frame format verification, data integrity verification and message parsing on the original message in sequence.

9. A computer-readable storage medium storing program instructions, characterized in that, When the program instructions are executed, they cause the computer to perform the multi-protocol adaptive docking method for electricity meters as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Object-oriented protocol and traditional protocol based electricity meter adaptive method and apparatus, and electricity meter

    CN107070589A

  • Industrial field bus communication protocol unified adaptation method and device, medium and equipment

    CN121193820A

  • Multi-protocol adaptive access method and device for Internet of Things, and medium

    CN121309631A

  • Protocol independent interface supporting general communications interface debugging and testing tool

    US20130080832A1

Cited By

  • A communication method for smart meters compatible with multiple communication protocols and a smart meter

    CN122293766A