Virtual electric energy meter implementation method supporting multiple protocols

The multi-protocol virtual energy meter cluster enables automated configuration and fault simulation of virtual energy meters, solving the problems of low test coverage, slow response speed, large memory consumption, and excessive manual intervention in existing technologies, thereby improving test efficiency and the flexibility of protocol modification.

CN121585587APending Publication Date: 2026-02-27QINGDAO TOPSCOMM COMM +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511685967.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing virtual energy meter technology suffers from several problems, including difficulty in fully covering fault scenario simulation, the need for manual intervention in configuring virtual meter numbers, frequent protocol switching affecting response speed, inability to dynamically load and release data, and the need for manual configuration of virtual meter instances.

Method used

It adopts a multi-protocol virtual energy meter cluster, supports plug-in management of protocols such as DL/T645, DL/T698, and ModBus, realizes on-demand dynamic loading, automated configuration, supports fault simulation and anomaly injection, and automatically generates meter numbers.

Benefits of technology

It improved test coverage, reduced compilation time and memory usage, enhanced testing efficiency, increased the flexibility of protocol modifications and the refinement of fault simulation, and reduced the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121585587A_ABST
    Figure CN121585587A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual electric energy meter implementation method supporting multiple protocols, and belongs to the technical field of power equipment testing. The method comprises the following steps: (1) a protocol plug-in engine packages protocols such as DL / T645, DL / T698, ModBus and the like into source code level plug-ins capable of being hot-plugged; 2) the virtual table manager dynamically creates / destroys a virtual table instance according to a collection command, and supports automatic table number generation and resource recovery; the intelligent configuration unit (3) is specially used for configuring abnormal response modes including negative acknowledgement, null data and communication timeout to realize dynamic fault simulation; according to the scheme, the problems that real faults are difficult to simulate, protocol switching efficiency is low, virtual table configuration is rigid and the like in a traditional test are solved, the protocol compatibility test coverage rate and automatic test efficiency of the electric power acquisition terminal can be remarkably improved, and the method is particularly suitable for full-scene verification of equipment such as an intelligent electric meter and a concentrator.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of power equipment testing, and particularly relates to a virtual electric energy meter implementation method and device supporting multiple protocols. TECHNICAL BACKGROUND

[0002] With the rapid development of smart grid and energy internet, electric energy metering equipment needs to be compatible with multiple communication protocols to adapt to different scene requirements. The traditional electric energy meter is limited by a single protocol. In this background, the virtual electric energy meter technology, through software definition and multiple protocol fusion, has become a key path to break through the bottleneck of traditional hardware. The core is to build a unified data processing framework to support dynamic switching and parallel analysis of DL / T645, DL / T698.45 and other protocols. The existing scheme still has the following deficiencies:

[0003] 1. Real fault scenarios are difficult to simulate, resulting in incomplete coverage of device testing.

[0004] 2. The virtual meter number needs to be manually configured.

[0005] 3. The virtual meter protocol library frequently switches at runtime, affecting response speed.

[0006] 4. The virtual meter protocol support cannot be dynamically loaded and released.

[0007] 5. The virtual meter instance cannot be loaded on demand, and the number of virtual meters needs to be manually set.

[0008] The core innovative technical solution of the present application is:

[0009] 1. Multi-protocol virtual electric energy meter cluster.

[0010] 2. Support for DL / T645, DL / T698, ModBus and other protocol plug-in management, dynamic loading on demand.

[0011] 3. Protocol exception injection function (such as returning error data, denial, timeout, etc.).

[0012] 4. Automatic generation of meter number, automatic configuration of virtual meter quantity on demand.

[0013] 5. Fault simulation dynamic. SUMMARY BRIEF DESCRIPTION OF DRAWINGS

[0014] Figure 1 is a structural diagram of a virtual electric energy meter implementation method provided by an embodiment of the present application;

[0015] The core components of the technical solution are: a virtual table routing manager, a virtual table configuration manager, a virtual table unit manager, a virtual table unit, a protocol plug-in engine, and various protocol plug-ins. DETAILED DESCRIPTION

[0016] The implementation of the present application is described in detail below in combination with specific embodiments.

[0017] Figure 1 A structure diagram of a multi-protocol supported virtual electric energy meter implementation method is shown.

[0018] 1. The virtual table configuration manager is responsible for configuring data in the reply command corresponding to the table number. Each virtual table unit fault data can be configured, including whether the virtual table reply command corresponding to the table number is a denial, empty data, or a timeout non-response.

[0019] 2. The virtual table router receives the collection command of the collection terminal and notifies the protocol plug-in engine to perform automatic identification of the protocol of the command.

[0020] 3. After the protocol plug-in engine identifies the protocol, if the protocol plug-in has been loaded, no further action is performed. If the protocol plug-in has not been loaded, the related plug-in is loaded into a running state.

[0021] 4. The plug-in interface standardization definition: frame protocol verification interface, frame data analysis interface, user data acquisition interface, and frame data encapsulation interface.

[0022] 5. Protocol plug-in dynamic loading and compiling interface: protocol plug-in loading preprocessing interface, protocol plug-in loading interface, protocol plug-in dynamic compiling interface, and compiling process result return interface.

[0023] 6. Security check mechanism for dynamic loading and compiling of protocol plug-in source code:

[0024] a) After the development of the protocol plug-in source code file is completed, the hash value of the protocol plug-in file is uploaded

[0025] b) The protocol plug-in engine performs file hash value check before loading the protocol plug-in for dynamic compilation. Only after the hash check is successful can dynamic compilation be performed. If the check is unsuccessful, an error code is returned.

[0026] c) The protocol plug-in engine checks the protocol plug-in source code file through the hash value to prevent the protocol plug-in source code from being tampered with, thereby ensuring the security of the protocol plug-in source code.

[0027] 7. The virtual table routing uses the protocol plug-in obtained from the protocol plug-in engine to perform collection command analysis and obtain the electric energy meter table number to be collected in the collection command. The virtual table routing notifies the virtual table unit manager of the protocol and table number information of the command.

[0028] 8. The virtual form unit manager identifies the protocol of the table number and the collection command, and if a virtual form unit corresponding to the table number already exists in the virtual form manager, the virtual form unit will not be created, if there is no virtual form unit corresponding to the table number, a virtual form unit corresponding to the table number is created, and the virtual form unit is bound with the loaded protocol obtained from the protocol plug-in engine, to form a complete collection command processing unit.

[0029] 9. The virtual form unit manager distributes the collection command to the corresponding virtual form unit. The virtual form unit assembles the reply collection command according to the bound protocol, and forwards the command to the virtual form routing manager.

[0030] 10. The virtual form routing manager sends the reply collection command to the collection terminal, and completes a collection task.

[0031] 11. Abnormal test scene: 10% of the table numbers return denial responses, and the retry mechanism of the collection terminal is verified.

[0032] 12. Protocol compatibility test: the same table number returns normal data under the DL / T645 protocol, and triggers a timeout under the Modbus protocol.

[0033] Technical effects

[0034] The method of the present application has the following effects compared with the traditional virtual electric energy meter implementation method:

[0035] 1. Protocol modification flexibility

[0036] Traditional implementation method: each time the protocol is modified, the entire virtual table project needs to be compiled.

[0037] The method of the present application: the entire virtual table project does not need to be recompiled, the protocol modification is flexible, the virtual table program does not need to be recompiled, and the compilation time is reduced by 80%.

[0038] 2. Program size

[0039] Traditional implementation method: various protocols are integrated in the virtual table program, which increases the size of the virtual table program.

[0040] The method of the present application: the protocol exists in the form of a plug-in file and is not integrated in the virtual table program, which reduces the size of the virtual table program by 30%.

[0041] 3. Memory occupation

[0042] Traditional implementation method: the protocol needs to run with the virtual table program, and the protocol exists in the memory even if it is not used.

[0043] The patent invention method: the protocol is provided in the form of plug-in, only when the corresponding plug-in is used to load into the memory. And can be unloaded when idle for 5 minutes, the protocol plug-in is not used, release the memory. Virtual table during operation to reduce the average memory usage by 30%.

[0044] 4. Analog fault type

[0045] Traditional implementation method: the traditional method can only simulate the response timeout, data error fault type.

[0046] The patent invention method: this method can simulate the response timeout, reply data empty, reply timestamp empty, reply data error, reply denial, response timing error. This method simulates fault type more detailed, test coverage covers 95%.

[0047] 5. Test efficiency

[0048] Traditional implementation method: virtual table number needs manual intervention configuration, reduces the automation test efficiency.

[0049] The patent invention method: virtual table number is automatically generated according to the request, reduces the manual configuration time, improves the test efficiency. Improve the test efficiency by 10%.

Claims

1. A method for implementing a virtual energy meter that supports multiple protocols, characterized in that, include: The system comprises virtual table routing management, a virtual table configuration manager, a virtual table unit manager, a protocol plug-in engine, and various protocol plugins. The virtual table routing manager receives acquisition commands from the acquisition terminal, coordinates the plug-in engine to load appropriate plugins for decoding the acquisition command protocol, and forwards the acquisition command to the corresponding virtual table unit in the virtual table unit manager, while forwarding the virtual table unit's response command to the acquisition terminal. The virtual table configuration manager configures the virtual table unit's response to acquisition commands, including common exception operations such as exception response commands. The virtual table unit manager is used to create, maintain, and delete virtual table units with corresponding table numbers. The protocol plug-in engine automatically identifies the command protocol based on the acquisition command format forwarded by the virtual table routing manager and loads the corresponding protocol plugin. Various protocol plugins are primarily responsible for parsing and framing the acquisition commands.

2. The method according to claim 1, characterized in that... include: (1) Protocol plug-in engine, which encapsulates each communication protocol as an independent plug-in and supports dynamic loading / unloading of plug-in source code at runtime; (2) Virtual table manager, dynamically creates / destroys virtual table instances based on the collection command.

3. The method according to claim 1, characterized in that... The implementation methods of the protocol plug-in engine include: a) Plugins are stored in source code form and compiled and loaded in real time at runtime; b) Provides a hot-swappable plugin interface, supporting the addition, deletion, and modification of plugins without restarting the system; c) The plugin resource usage is dynamically adjusted, and the protocol plugin automatically releases memory after 5 minutes of inactivity.

4. The method according to claim 1, characterized in that... The virtual table manager includes: a) Table number parsing unit, which extracts the target table number from the acquisition command; b) Instantiate the control unit and dynamically allocate virtual table resources according to the table number; c) Parallel execution units enable multiple virtual table instances to process commands of different protocols synchronously.

5. The method according to claim 1, wherein the virtual table unit is characterized in that... Each virtual table instance has: a) Independent metering data storage area, supporting custom voltage, current, frozen data, various real-time data, and operation response data; b) Protocol binding interface, establishing an exclusive connection with a specific protocol plugin; c) Response priority marking ensures real-time processing of critical instructions.

6. The virtual table manager according to claim 4, characterized in that... It further includes an intelligent configuration unit, which implements: a) Non-table number management principle: Do not pre-set the number of virtual tables and table numbers, only maintain the response data of activated table numbers; b) Fault simulation function: Allows configuration of abnormal response modes for specified table numbers, including: i. A denial response (NACK) is generated; ii. An empty data message is returned; iii. Communication timeout simulation; iv. Incorrect reply time stamp; v. The returned data is incorrect; vi. The reply data is empty; c) Dynamic data binding: Different response data can be configured for the same table number under different protocols.

7. The virtual table configuration manager according to claim 1, wherein the fault simulation implementation method includes: a) Probabilistic fault injection: Randomly triggers abnormal responses according to a preset ratio; b) Timing-triggered mechanism: Activate fault mode after a specified number of communication cycles; c) Protocol association strategy: Specific protocol commands trigger customized error codes.

8. The method according to claim 1, characterized in that... The generation logic of the virtual table instance is as follows: a) Passive instantiation: Instances are created only when a collection command containing a new table number is received; b) Lazy destruction: Resources are automatically released after the instance has been idle for more than 5 minutes; c) State snapshot: Save instance data before destruction for subsequent reconstruction.

Citation Information

Cited By

  • An electric energy meter protocol data full traversal automatic testing method and electric energy meter

    CN122395103A