Intelligent electric meter storage distribution method and device, equipment and medium

Through modular and layered design, the smart meter storage allocation method solves the problem of lack of unified planning and scalability in the existing technology, and realizes support for system stability and functional expansion.

CN119961180APending Publication Date: 2025-05-09LEHE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411748878.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The existing smart meter storage allocation methods lack unified planning and do not consider scalability, resulting in address overlap and data conflicts, affecting system stability.

Method used

Modular and hierarchical design is adopted, by obtaining different modules in the smart meter, memory address allocation is performed according to the importance and degree of change of the module's data, building a total structure and dynamically adding new modules and parameters to avoid address conflicts and storage errors.

Benefits of technology

It realizes systematization and organization of storage allocation, reduces address conflicts and allocation chaos, ensures priority storage of key data, supports function expansion and dynamic modification, and reduces development and maintenance complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961180A_ABST
    Figure CN119961180A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent electric meter storage distribution method. The method comprises the following steps: acquiring different modules in an intelligent electric meter; according to the data importance degree and the variation degree of different modules, allocating positions in the memory; a total structure body is constructed through a memory, and module occupation structure bodies are constructed for different modules respectively; whenever a new module is added, adding a new occupying structural body into the total structural body. According to the main technical scheme and the main effects, a developer can easily manage address allocation of the nonvolatile memory and data interaction between modules, and errors and repeated work in the development process are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of event storage, and in particular to a smart meter storage allocation method, device, equipment and medium. Background Art

[0002] As a key device in the smart grid, smart meters are responsible for recording and storing various data, including meter operation configuration data, meter performance parameter data, power data, etc. These data need to be stably and reliably recorded in eeprom (non-volatile memory) to ensure that the data will not be lost when the meter loses power.

[0003] The existing event recording and freezing recording schemes have the following main defects: lack of unified planning. In the design phase, the address space is not systematically allocated, resulting in frequent address modifications during subsequent function expansion. Scalability is not considered, and sufficient storage space is not reserved for future functions, which can easily lead to insufficient addresses or chip replacement, address overlap, and different functional modules are assigned to the same address, resulting in data conflicts and storage errors, which seriously affect system stability. Summary of the invention

[0004] Purpose of the invention: The purpose of the present invention is to solve the problems of lack of unified planning, failure to consider scalability, and address overlap in the prior art, and to provide a smart meter storage allocation method, device, equipment, and medium, which can achieve modular and hierarchical design, so that developers can easily manage non-volatile memory address allocation and data between modules, reducing errors and duplication of work in the development process.

[0005] One or more embodiments of this specification also relate to a smart meter storage allocation device, an electronic device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.

[0006] Technical solution:

[0007] In a first aspect, the present application proposes a smart meter storage allocation method, comprising the steps of:

[0008] Get different modules in smart meters;

[0009] Allocate the location in the memory according to the importance and degree of variation of the data in different modules;

[0010] The overall structure is constructed through the memory, and the module placeholder structures are constructed for different modules respectively;

[0011] Whenever a new module is added, a new placeholder structure is added to the overall structure.

[0012] Preferably, data of different modules with high importance and low mutation degree are placed at the front.

[0013] Preferably, the locations in the memory allocated according to the importance and variation of the data of different modules include:

[0014] Determine the address positions of different modules in the memory to determine different offset addresses, and obtain specific addresses of different modules by adding the memory and the offset address.

[0015] As a preference, data of different modules with high importance and low mutation degree are placed at the front, including:

[0016] The weights of different modules are added according to their importance and degree of variation, and modules with high weights are placed at the front of the memory.

[0017] Preferably, the different modules include at least power, instantaneous quantity, TOU, freeze, event, demand, display, and communication.

[0018] Preferably, the module placeholder structure includes a parameter placeholder structure, and the parameter placeholder structure includes a plurality of parameter structures, and the address is allocated by allocating address offsets of different parameter structures through the overall structure.

[0019] Preferably, whenever a new parameter is added, the parameter structure of the new parameter is added to a different module placeholder structure.

[0020] In a second aspect, an embodiment of the present invention provides a smart meter storage allocation device, characterized in that it includes:

[0021] An acquisition unit, used for acquiring different modules in a smart meter;

[0022] An allocation unit, used to allocate locations in the memory according to the importance and variation of data of different modules;

[0023] A construction unit is used to construct a total structure through a memory, and different modules respectively construct module placeholder structures;

[0024] Addition unit is used to add a new placeholder structure to the overall structure whenever a new module is added.

[0025] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory is used to store one or more computer programs; when the one or more computer programs stored in the memory are executed by the processor, the electronic device can implement any possible design method of the first aspect.

[0026] In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method as described in any one of the above embodiments is implemented.

[0027] In a fifth aspect, an embodiment of the present invention further provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute any possible design method of any of the above aspects.

[0028] Beneficial effects: Modular design makes storage allocation more systematic and organized, reduces address conflicts and allocation confusion, and prioritizes the storage of key data at the front of the memory to ensure that it is not interfered with by volatile data. When dynamically adding modules and parameters, there is no need to modify the original storage allocation plan on a large scale, which significantly reduces the complexity of development and maintenance. The offset address mechanism and modular design reserve sufficient flexibility for functional expansion. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 Provide a schematic diagram of the method framework for the present invention;

[0030] Figure 2 It is a schematic diagram of the overall structure of the present invention;

[0031] Figure 3 It is a schematic diagram of the structure of the module structure of the present invention;

[0032] Figure 4 It is a schematic diagram of the parameter placeholder structure of the present invention;

[0033] Figure 5 is a schematic diagram of the structure of a device provided by an embodiment of the present application;

[0034] Figure 6 This is a structural block diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the technical solution of the present invention clearer, the present invention is further described in detail below with reference to the specific embodiments of the accompanying drawings.

[0036] Example 1

[0037] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be understood by people with general skills in the field to which the present invention belongs. "Including" and similar words used in this article mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects.

[0038] In view of the problems existing in the existing technology, such as Figure 1 and Figure 2 As shown, the present application proposes a smart meter storage allocation method, comprising the steps of:

[0039] S101, obtaining different modules in the smart meter;

[0040] S102, allocating locations in the memory according to the importance and variation degree of data of different modules;

[0041] S103, constructing a total structure through the memory, and constructing module placeholder structures for different modules respectively;

[0042] S104, whenever a new module is added, a new placeholder structure is added to the overall structure.

[0043] Specifically, the functional modules of the smart meter are identified to provide basic data for storage allocation. The locations of the modules are allocated in the memory according to the importance and degree of variation of the data. This optimizes the space utilization of the memory, improves the reliability and access efficiency of the data, and constructs an overall structure through the memory. Different modules construct module placeholder structures respectively to achieve modular storage design, which is convenient for management and expansion. Whenever a new module is added, the new placeholder structure is added to the overall structure to support dynamic expansion and reduce maintenance and modification costs.

[0044] In some specific embodiments, the different modules include at least power, instantaneous quantity, TOU, freeze, event, demand, display, and communication.

[0045] Specifically, the power module

[0046] Function: record the accumulated electricity consumption measured by the meter for billing and historical query;

[0047] Storage requirements: Data importance: Very high (core billing data);

[0048] Degree of mutation: Low (only changes during cumulative updates);

[0049] Allocation strategy: front position, giving priority to ensuring data security;

[0050] Instantaneous quantity module

[0051] Function: Real-time recording of instantaneous operating data such as current, voltage, power, etc. for monitoring and optimization;

[0052] Data importance: Medium (short-term operation optimization);

[0053] Degree of mutation: High (frequent changes);

[0054] Allocation strategy: moderate location, avoid occupying important areas;

[0055] TOU (Time of Use) Module

[0056] Function: Record time-based electricity consumption data (such as peak, valley, and normal periods) for billing strategy optimization;

[0057] Data importance: high (critical data for billing);

[0058] Degree of mutation: medium (updated in time);

[0059] Allocation strategy: Header area, ensuring that billing-related data is processed first;

[0060] Freeze Module

[0061] Function: Periodically freeze the power or other key data at a certain moment to record historical status;

[0062] Data importance: high (historical data storage);

[0063] Degree of mutation: low (updated regularly);

[0064] Allocation strategy: close to the power module to ensure logical relevance;

[0065] Event module function: record important events (such as power outages, overloads, voltage anomalies, etc.) for operation analysis and troubleshooting;

[0066] Data importance: Moderate (diagnostic use);

[0067] Degree of mutation: High (events are triggered frequently);

[0068] Allocation strategy: middle area, taking into account both safety and flexibility;

[0069] Demand Module

[0070] Function: Record the user's maximum power demand data for power supply capacity planning and user management;

[0071] Data importance: Medium;

[0072] Degree of mutation: medium (statistical periodic changes);

[0073] Allocation strategy: close to the instantaneous quantity module to facilitate real-time data association;

[0074] Display Module

[0075] Function: Provide visual data of the current status of the meter (such as power consumption and voltage);

[0076] Data importance: low (for interface display);

[0077] Degree of mutation: High (updated in real time);

[0078] Allocation strategy: rear area, lower priority;

[0079] Communication Module

[0080] Function: Store configuration parameters for communicating with external devices (such as baud rate, protocol);

[0081] Data importance: medium (system function dependency);

[0082] Degree of mutation: high (dynamic modification);

[0083] Allocation strategy: tail area, easy for dynamic adjustment.

[0084] In some specific embodiments, data of different modules with high importance and low variance are placed at the front.

[0085] Specifically, in the TOU module, the RTC plug-in is a circuit that can generate time and date information such as hours, minutes, seconds, and calendars. The RTC can transmit time information to other modules to ensure the time synchronization of the entire system. When designing a program, time is one of the most important factors in maintaining the normal operation of the entire program framework, so the TOU module is placed at the head in the eeprom allocation;

[0086] The electric energy module is a key component for realizing the electric energy measurement, recording and billing functions. When the electric energy meter is in normal operation, when the electric energy accumulates to a certain degree, the electric energy meter will store the electric energy in the eeprom. The electric energy data belongs to the core key data of the electric energy meter. When other modules change the data, the electric energy data should not be affected. Therefore, the electric energy data is placed in the second position allocated by the eeprom, which can effectively avoid the occurrence of errors.

[0087] Communication module. In actual applications, the client may need to change the communication parameters according to different application scenarios. This parameter is a variable parameter, so it should be positioned at the back when eeprom is arranged.

[0088] In some specific embodiments, allocating locations in the memory according to the importance and variance of data of different modules includes:

[0089] Determine the address positions of different modules in the memory to determine different offset addresses, and obtain specific addresses of different modules by adding the memory and the offset address.

[0090] Specifically, define the starting address and available storage range of the memory (such as the starting address EE_START_ADDR and size EE_SIZE of eeprom), determine the priority according to the importance and degree of variation of the module list (such as power, instantaneous quantity, TOU, etc.), assign the modules with high data importance and low degree of variation to the front address (such as power and TOU modules), and assign the modules with high degree of data variation or low importance to the back address (such as communication modules);

[0091] The starting address of each module is: module starting address = memory starting address + offset address, the offset address is the end address of the previous module storage area plus the safety interval, the memory base address and the offset address are added to obtain the specific storage address range of each module. In some embodiments, the formula is as follows:

[0092] Module start address = EE_START_ADDR + module offset;

[0093] The module address is calculated through a formula to avoid manual allocation errors and conflicts. When adding a new module, you only need to add the offset address at the end without replanning the entire storage area. The core module is placed in the front to reduce the interference of volatile modules on key data.

[0094] In some specific embodiments, data of different modules with high importance and low mutation degree are placed in the front position, including:

[0095] The weights of different modules are added according to their importance and degree of variation, and modules with high weights are placed at the front of the memory.

[0096] Specifically, in some embodiments, the weight factor is defined as:

[0097] Importance factor (W_imp): quantifies the importance of module data, assuming the value range is 1-10, the higher the value, the more important it is;

[0098] Mutation degree factor (W_var): quantifies the mutation frequency of module data. The value range is 1-10, and the lower the value, the lower the mutation degree.

[0099] Comprehensive weight formula:

[0100] ;

[0101] W_total is the comprehensive weight, which is determined by the importance of the module and the degree of mutation. The modules are sorted from high to low according to the comprehensive weight value, and the storage locations are allocated in order of weight. Modules with high weights are preferentially allocated to the front positions of the storage.

[0102] In some specific embodiments, Figure 3 and Figure 4 The module placeholder structure includes a parameter placeholder structure, and the parameter placeholder structure includes multiple parameter structures. The address offset calculation of different parameter structures is performed through the overall structure.

[0103] Specifically, each module occupies a storage area through a placeholder structure, and the placeholder structure contains one or more parameter placeholder structures. Each parameter placeholder structure defines specific parameter data and is stored in a predetermined memory location. The starting address of the module placeholder structure is determined by the offset address of the existing module in the overall structure. The offset of the parameter structure is calculated based on the order of the parameter placeholder structure in the module to calculate its specific address in the memory.

[0104] In some specific embodiments, Figure 3 and Figure 4 , whenever a new parameter is added, add the parameter structure of the new parameter to a different module placeholder structure.

[0105] Specifically, when adding a parameter structure to a module, you only need to add it to the corresponding parameter placeholder structure without considering address allocation. Whenever you need to add new parameters to a module, you can do so by dynamically expanding the parameter structure in the module placeholder structure. This design requires us to be able to flexibly allocate new storage space for each module.

[0106] In some specific embodiments, Figure 5 , in combination with the figure, an embodiment of the present invention provides a smart meter storage allocation device, including:

[0107] An acquisition unit 301 is used to acquire different modules in a smart meter;

[0108] An allocation unit 302, configured to allocate locations in the memory according to the importance and variation of data of different modules;

[0109] A construction unit 303 is used to construct a total structure through a memory, and different modules respectively construct module placeholder structures;

[0110] The adding unit 304 is used to add a new placeholder structure into the overall structure whenever a new module is added.

[0111] All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0112] In some other embodiments of the present invention, the present invention discloses an electronic device, such as Figure 6 As shown, the electronic device may include: one or more processors 401; a memory 402; a display 403; one or more applications (not shown); and one or more computer programs 404. The above components may be connected via one or more communication buses 405. The one or more computer programs 404 are stored in the above memory 402 and configured to be executed by the one or more processors 401. The one or more computer programs 404 include instructions, which may be used to execute the following: Figure 1 to Figure 2 And each step in the corresponding embodiment.

[0113] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0114] Each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0115] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk and other media that can store program codes.

[0116] The above is only a specific implementation of the embodiment of the present invention, but the protection scope of the embodiment of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiment of the present invention should be included in the protection scope of the embodiment of the present invention. Therefore, the protection scope of the embodiment of the present invention should be based on the protection scope of the claims.

Claims

1. A smart meter storage allocation method, characterized in that: Includes steps: Get different modules in smart meters; Allocate the location in the memory according to the importance and degree of variation of the data in different modules; The overall structure is constructed through the memory, and the module placeholder structures are constructed for different modules respectively; Whenever a new module is added, a new placeholder structure is added to the overall structure.

2. The method according to claim 1, characterized in that Data from different modules with high importance and low mutation levels are placed at the front.

3. The method according to claim 2, characterized in that The locations allocated in the memory according to the importance and variation of the data of different modules include: Determine the address positions of different modules in the memory to determine different offset addresses, and obtain specific addresses of different modules by adding the memory and the offset address.

4. The method according to claim 3, characterized in that The data of different modules with high importance and low mutation degree are placed in the front, including: The weights of different modules are added according to their importance and degree of variation, and modules with high weights are placed at the front of the memory.

5. The method according to claim 1, characterized in that The different modules include power, instantaneous, TOU, freeze, event, demand, display, and communication.

6. The method according to claim 1, characterized in that The module placeholder structure includes a parameter placeholder structure, and the parameter placeholder structure includes multiple parameter structures. The address offset calculation of different parameter structures is performed by allocating the address through the overall structure.

7. The method according to claim 6, characterized in that Whenever a new parameter is added, add the parameter structure of the new parameter to a different module placeholder structure.

8. A smart meter storage allocation device, characterized in that: include: An acquisition unit, used for acquiring different modules in a smart meter; An allocation unit, used to allocate locations in the memory according to the importance and variation of data of different modules; A construction unit is used to construct a total structure through a memory, and different modules respectively construct module placeholder structures; Addition unit is used to add a new placeholder structure to the overall structure whenever a new module is added.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.