A method, device, equipment and medium for managing electric energy of electric energy meter
By obtaining and storing real-time power data at preset times in the power meter, and synchronously storing key data when preset conditions are met, the problem of data loss when the power meter is lost is solved, real-time data storage is realized and long-term storage extends the service life of memory devices and optimizes the utilization efficiency of storage resources.
Patent Information
- Application Number
- CN202411328047.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-09-24
AI Technical Summary
When the power meter cannot backup data in real time, too much data that needs to be stored in time during power failure may lead to data loss.
Real-time power data is obtained every preset time and written to the internal memory as power chunking data, while simultaneously cycling is stored in the sub-blocks of the external memory. When the real-time power data meets the preset conditions, it is synchronized as the power head data and stored. When power is lost, the current power chunking data is stored in the sub-blocks of the chunked storage space.
Real-time data storage and backup are realized, ensuring that key data is stored in a stable and reliable storage space when preset conditions are met, extending the service life of storage devices, optimizing the utilization efficiency of storage resources, and protecting in abnormal situations such as power failure. Key data will not be lost.
Smart Images

Figure CN118838746B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electric energy meters, and in particular to an electric energy meter power management method, device, equipment and medium. Background Art
[0002] In metering equipment such as electric energy meters, the calculation and storage of electricity data is one of the core functions of electric energy meters. However, due to the cost and resource limitations of electric energy meters, non-volatile storage devices are usually used, generally electrically erasable programmable read only memory (EEPROM) or flash memory (FLASH). However, the capacity of EEPROM and FLASH is generally small and has a limited erase / write life (generally 100,000 to 1 million times), which cannot meet the requirement of storing electric energy once per second.
[0003] At present, the common practice is to calculate the power data in real time and store it in the random access memory (RAM) of the microcontroller unit (MCU) of the energy meter. After accumulating for a period of time (for example, storing once every 10 minutes) or accumulating a certain value (for example, storing once every 1kwh), an EEPROM or FLASH storage operation is performed. In the power failure scenario, the common practice is to use a backup power supply (such as a battery, a farad capacitor, etc.) to quickly store the data in the RAM to the EEPROM or FLASH before the power failure, so as to save the power before reset or power failure.
[0004] However, since the energy meter relies entirely on external storage devices (such as batteries, farad capacitors, etc.) to store power when the power is off, the requirements for external energy storage devices are relatively high. If a battery is used to store power-off data, when the battery power is insufficient or the battery is passivated (these two situations often occur during field operation), data storage will fail, resulting in abnormal power data. If a farad capacitor is used to store power-off data, when the farad capacitor is undercharged, data storage will fail, resulting in abnormal power data.
[0005] It can be seen that how to solve the problem that when the electric energy meter cannot back up data in real time and too much data needs to be stored in time during power outage, which may lead to data loss, is a technical problem that needs to be solved urgently by people in this field. Summary of the invention
[0006] The purpose of the present application is to provide a method, device, equipment and medium for managing the power of an electric energy meter, so as to solve the problem that when the electric energy meter cannot back up data in real time and there is too much data that needs to be stored in time when the power is off, data loss may occur.
[0007] In order to solve the above technical problems, the present application provides a method for managing the power of an electric energy meter, comprising:
[0008] Get real-time power data at preset intervals;
[0009] The real-time power data is written as power block data into the internal memory, and the power block data is synchronously stored in a sub-block of the external memory in a loop; wherein the external memory includes a header storage space and a block storage space; the block storage space is evenly divided into N sub-blocks;
[0010] When the real-time power data meets the preset conditions, the current power block data is synchronized as power header data and stored in the internal memory;
[0011] storing the electric quantity header data in the header storage space;
[0012] Clear the electric quantity block data in the internal memory and the data in the block storage space in the external memory, and return to the step of acquiring real-time electric quantity data at every preset time;
[0013] When power failure occurs, the current power block data is stored in the sub-blocks of the block storage space.
[0014] As an optional solution, in the above-mentioned method for managing the power of the electric energy meter, the step of acquiring the real-time power data at preset intervals includes:
[0015] Obtain the number of power pulses from the metering chip every second and obtain real-time power data and accumulated power data;
[0016] Obtaining accumulated billing data according to a preset rate and the real-time electric energy data;
[0017] The accumulated electricity data and the accumulated billing data are used as the real-time electric energy data.
[0018] As an optional solution, in the above-mentioned method for managing the electric energy meter, the preset rate is step rate data; the electric energy header data also includes the step rate data;
[0019] Correspondingly, the accumulated billing data is obtained according to the preset rate and the real-time electric energy data, including:
[0020] Determine the real-time rate corresponding to the tiered rate data according to the current time;
[0021] The accumulated billing data is obtained according to the real-time rate and the real-time electric energy data.
[0022] As an optional solution, in the above-mentioned method for managing the electric energy meter, the real-time electric energy data meets the preset conditions, including:
[0023] Determine the current accumulated power data according to the real-time power data;
[0024] Determine whether the current accumulated power data exceeds a preset power threshold;
[0025] If yes, it is determined that the real-time power data meets the preset condition;
[0026] If not, it is determined that the real-time power data does not meet the preset condition.
[0027] As an optional solution, in the above-mentioned method for managing the electric energy meter, when a power failure occurs, after storing the current electric energy block data in the sub-block of the block storage space, it also includes:
[0028] When power is turned on again, the backup power block data stored in the latest sub-block is obtained from the block storage space of the external memory;
[0029] Determine whether the current accumulated power exceeds a preset power threshold according to the backup power block data;
[0030] If yes, it is determined that the real-time power data meets the preset condition, and the process returns to the step of synchronizing the current power block data into power header data and storing the data in the internal memory;
[0031] If not, return to the step of obtaining real-time power data at preset intervals.
[0032] As an optional solution, in the power management method of the electric energy meter, the power block data is cyclically stored in the sub-blocks of the external memory, including:
[0033] Write the power block data into the N sub-blocks of the block storage space in order;
[0034] When all sub-blocks are written, writing starts again at the first sub-block.
[0035] As an optional solution, the above-mentioned method for managing the electric energy meter further includes:
[0036] After the power header data in the header storage space is updated, the power header data is sent to the mobile terminal via wireless communication.
[0037] In order to solve the above technical problems, the present application also provides an electric energy meter power management device, comprising:
[0038] An acquisition module is used to acquire real-time power data at preset intervals;
[0039] A low-bit data storage module, used to write the real-time power data as power block data into an internal memory, and synchronously store the power block data in a sub-block of an external memory in a loop; wherein the external memory includes a header storage space and a block storage space; the block storage space is evenly divided into N sub-blocks;
[0040] A full power data storage module, used for synchronizing the current power block data into power header data and storing it in the internal memory when the real-time power data meets a preset condition;
[0041] A backup module, used for storing the electric quantity header data in the header storage space;
[0042] A clearing module, used to clear the electric quantity block data in the internal memory and the data in the block storage space in the external memory, and return to the step of acquiring real-time electric quantity data at preset intervals;
[0043] The power failure backup module is used to store the current power block data into the sub-blocks of the block storage space when a power failure occurs.
[0044] In order to solve the above technical problems, the present application also provides an electric energy meter power management device, including:
[0045] Memory for storing computer programs;
[0046] The processor is used to implement the steps of the above-mentioned method for managing the electric energy of the electric energy meter when executing the computer program.
[0047] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned power management method of the electric energy meter are implemented.
[0048] The power management method of the electric energy meter provided in the present application obtains real-time power data at preset time intervals; writes the real-time power data as power block data into the internal memory, and synchronously stores the power block data in a sub-block of the external memory in a loop; wherein the external memory includes a header storage space and a block storage space; the block storage space is evenly divided into N sub-blocks; when the real-time power data meets the preset conditions, the current power block data is synchronized as power header data and stored in the internal memory; the power header data is stored in the header storage space; the power block data in the internal memory and the data in the block storage space in the external memory are cleared, and the step of obtaining real-time power data at preset time intervals is returned; when power failure occurs, the current power block data is stored in the sub-block of the block storage space. In the present application, the real-time collected power data is stored in real time and backed up in real time; when the preset conditions are met, the key data is stored in a stable and reliable storage space to achieve long-term data preservation. When power failure occurs, only the latest block content needs to be saved, so the requirements for energy storage devices are relatively low, and the residual power can be used to complete the write and save operation of the block. It improves the reliability of data storage, extends the service life of storage devices, optimizes the utilization efficiency of storage resources, and protects key data from loss in abnormal situations such as power failure.
[0049] In addition, the present application also provides a device, equipment and medium, which correspond to the power management method of the above-mentioned electric energy meter and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0051] Figure 1 A flow chart of a method for managing electric energy of an electric energy meter is provided for an embodiment of the present application;
[0052] Figure 2 A data management schematic diagram provided for an embodiment of the present application;
[0053] Figure 3 A structural diagram of an electric energy meter power management device provided in an embodiment of the present application;
[0054] Figure 4 A structural diagram of another power management device for an electric energy meter provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0056] The core of this application is to provide a method, device, equipment and medium for managing the power of an electric energy meter.
[0057] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0058] In metering equipment such as electric energy meters, the calculation and storage of electric energy data is one of the core businesses of electric energy meters. However, due to the cost and resource limitations of electric energy meters, non-volatile storage devices are generally EE or FLASH, and the capacity of EE and FLASH is generally small and has a limited erase / write life (generally 100,000 to 1 million times), which cannot meet the requirement of storing electric energy once per second. In actual use, the electric energy data cannot be stored in time after real-time calculation, resulting in the loss of electric energy data, the reverse flow of electric energy data, and the inequality of the total score of electric energy data in the case of accidental reset, frequent power on and off, battery undervoltage, backup power failure, etc., causing losses to power supply companies and users. After the electric energy data is calculated in real time, it is stored in the RAM of the electric energy meter MCU. After accumulating for a period of time (for example, storing once every 10 minutes) or accumulating a certain value (for example, storing once every 1kwh), an EE or FLASH storage operation is performed. In the case of a power failure, a common practice is to use a backup power source (such as a battery, a farad capacitor, etc.) to quickly store the data in the RAM into the EE or FLASH before the power failure, so as to save power before reset or power failure.
[0059] When the power meter loses power, the power storage is completely dependent on external storage devices (such as batteries, farad capacitors, etc.), which places high requirements on external energy storage devices. If a battery is used to store power-off data, when the battery power is insufficient or the battery is passivated (these two situations often occur during field operation), data storage will fail, resulting in abnormal power data. If a farad capacitor is used to store power-off data, when the farad capacitor is undercharged, data storage will fail, resulting in abnormal power data. This embodiment does not limit the application environment or type of the power meter.
[0060] In order to solve the above problems, the present application provides a method for managing the power of an electric energy meter. Figure 1 A flowchart of a method for managing the power consumption of an electric energy meter is provided in an embodiment of the present application, such as Figure 1 As shown, including:
[0061] S11: Acquire real-time power data at preset intervals;
[0062] S12: writing the real-time power data as power block data into the internal memory, and synchronously storing the power block data in a loop in the sub-blocks of the external memory; wherein the external memory includes a header storage space and a block storage space; the block storage space is evenly divided into N sub-blocks;
[0063] S13: When the real-time power data meets the preset conditions, the current power block data is synchronized as power header data and stored in the internal memory;
[0064] S14: storing the power header data into the header storage space;
[0065] S15: Clear the electric quantity block data in the internal memory and the data in the block storage space in the external memory, and return to the step of obtaining real-time electric quantity data at preset intervals;
[0066] S16: When a power failure occurs, the current power block data is stored in a sub-block of the block storage space.
[0067] Step S11, obtain real-time electricity data. Every preset time refers to the time interval set by the system according to the accuracy requirements and data processing capabilities of the electricity meter, which can be specifically every second, every minute or other suitable time units; obtaining real-time electricity data refers to reading the current electricity information from the metering chip of the electricity meter. In this step, real-time data acquisition is achieved by regularly querying the metering chip. It should be noted that in order to ensure the continuity and accuracy of the electricity data, periodic data updates are performed through step S11, including but not limited to the accumulated electricity data and electricity tariffs every minute; accumulated electricity data and electricity tariffs every hour, etc.
[0068] Step S12 is to write the current real-time data into the internal memory and store it in a loop to the external memory. Writing the real-time electricity data into the internal memory means temporarily storing the acquired data in the RAM of the electric energy meter or other high-speed storage media; synchronously storing the electricity block data in a sub-block of the external memory in a loop means copying the internally stored data to the external memory and writing in a loop, wherein the sub-block refers to a plurality of storage units into which the external storage space is divided, and N is the number of these storage units. In this step, dual protection of data is achieved through internal storage and external loop storage mechanisms. It should be noted that the instant backup and recycling of data through step S12 improves the reliability of data storage and the service life of the memory.
[0069] Furthermore, when the real-time power data meets the preset conditions, the power block data is synchronized to the power header data. In step S13, when the real-time power data meets the preset conditions, it means reaching a certain power threshold or condition, such as the accumulated power reaches a certain value; synchronizing to the power header data means updating the current status of the block data to the power header data. The key data is updated through step S13 to ensure the accuracy and timeliness of the power data.
[0070] In step S14, storing the electric quantity header data in the header storage space means saving the updated electric quantity header data in a designated area of the external memory. In this step, by storing the key data in a stable and reliable storage space, the long-term preservation of the data is achieved. It should be noted that step S14 ensures that the key electric quantity data will not be lost even in the event of power failure or other abnormal conditions. The external memory can be EEPROM, FLASH, or ferroelectric memory (FRAM).
[0071] Step S15 clears the data and returns to the acquisition step. "Clearing the power block data in the internal memory and the block storage space data in the external memory" means clearing the old data after data synchronization to prepare for the new data cyclic writing. In this step, effective management of the storage space is achieved by clearing and resetting the data. The utilization efficiency of storage resources is optimized by refreshing the data and recycling the storage space. Specifically, the power header data uses the header storage space in the memory according to a single address. It should be noted that the size of the header storage space and the block storage space of the external memory should be reasonably allocated to ensure the needs of data carry storage.
[0072] In step S16, when power outage occurs, it means that the system detects a power outage, and storing the current power block data in a sub-block of the block storage space means urgently saving the current data to an external memory before power outage. In this step, data protection is achieved through an emergency write mechanism. It should be noted that step S16 ensures the security and integrity of power data in the event of an unexpected power outage. Since only the block contents need to be saved when a power outage occurs, the requirements for energy storage devices are relatively low, and the residual power can be used to complete the write and save operations of the blocks. It should be noted that step S16 can occur in any step after step S11.
[0073] In order to make this solution more easily understood, a specific implementation scheme is provided as a schematic illustration. Figure 2 A data management schematic diagram provided in an embodiment of the present application, such as Figure 2 As shown, data is obtained from the metering chip once per second, and the block data is saved once in the external memory. The data read from the metering chip every second is saved in the external memory in a timely manner; the power block time is based on Figure 2 As shown, the storage is cyclically performed according to sub-blocks 1, 2, 3, ... N, ensuring that the FLASH life limit is still met in the case of once per second; since the power header will only be modified when the power sub-data block meets the preset conditions, the data in the block will be synchronized to the power header and the header data will be saved to the external memory. After synchronization, the block is cleared and re-accumulated and synchronized to the external memory; the power header data is large in size, only one copy is retained in the storage, and it will not be easily updated. Only when the power block is about to overflow, a storage operation is performed, as long as the entire life cycle does not exceed 100,000 times; the power block data is small in size, and N copies can be stored in the storage device, so that each write will use these N copies of space cyclically to spread the erase and write life times, which is equivalent to a life of (10*N) million times. If the value of N is reasonable, storage once per second can be achieved in the limited FALSH space.
[0074] Through the power management method of the electric energy meter provided by the embodiment of the present application, real-time power data is obtained at preset time intervals; the real-time power data is written into the internal memory as power block data, and the power block data is synchronously stored in the sub-block of the external memory in a loop; wherein the external memory includes a header storage space and a block storage space; the block storage space is evenly divided into N sub-blocks; when the real-time power data meets the preset conditions, the current power block data is synchronized as power header data and stored in the internal memory; the power header data is stored in the header storage space; the power block data in the internal memory and the data in the block storage space in the external memory are cleared, and the step of obtaining real-time power data at preset time intervals is returned; when power failure occurs, the current power block data is stored in the sub-block of the block storage space. In the present application, the real-time collected power data is stored in real time and backed up in real time; when the preset conditions are met, the key data is stored in a stable and reliable storage space to achieve long-term data preservation. When power failure occurs, only the latest block content needs to be saved, so the requirements for energy storage devices are relatively low, and the residual power can be used to complete the write and save operation of the block. It improves the reliability of data storage, extends the service life of storage devices, optimizes the utilization efficiency of storage resources, and protects key data from loss in abnormal situations such as power failure.
[0075] According to the above embodiment, in particular, the method for managing the electric energy meter, the step of acquiring real-time electric energy data at preset intervals includes:
[0076] Obtain the number of power pulses from the metering chip every second and obtain real-time power data and accumulated power data;
[0077] Obtaining accumulated billing data according to a preset rate and the real-time electric energy data;
[0078] The accumulated electricity data and the accumulated billing data are used as the real-time electric energy data.
[0079] Obtaining real-time power data from the metering chip every second means that the system calculates the number of power pulses through the metering chip in units of second, and converts the number of power pulses into real-time power data per second, and further obtains the cumulative power data. On the basis of obtaining real-time power data, the system will accumulate these data to form the cumulative power data over a period of time. The cumulative power data reflects the total power consumption recorded by the power meter from a certain starting point to the current moment.
[0080] The accumulated billing data is obtained based on the preset rate and the real-time power data. This step involves the electricity fee calculation process. The system will calculate the electricity fee based on the preset rate (which may be a fixed rate or a dynamically changing rate, such as time-of-day electricity price, etc.) and the real-time power data. This calculation process may take into account factors such as time period, type of electricity consumption, user category, etc. to determine the electricity fee per kilowatt-hour.
[0081] The accumulated electricity data and the accumulated billing data are used as the real-time electricity data, and the accumulated electricity data and the accumulated billing data are combined and processed and stored as part of the real-time electricity data, in order to provide a comprehensive view for the electricity meter, including not only electricity usage but also related cost information.
[0082] By acquiring data every second, real-time monitoring and recording of power usage is ensured. Accumulating power data and billing data ensures the accuracy of power consumption and cost calculation. Combining power data and billing data provides users with a comprehensive view of energy consumption and costs for easy management and analysis.
[0083] Specifically, the preset rates are adjusted in real time according to factors such as grid load, time, and season to achieve more flexible electricity fee calculation.
[0084] In the power management method of the electric energy meter, it is a common practice to use the tiered rate data to calculate the accumulated billing data, especially in the case of tight power supply or encouragement of energy conservation and emission reduction. Specifically, in the power management method of the electric energy meter, the preset rate is the tiered rate data; the power header data also includes the tiered rate data;
[0085] Correspondingly, the accumulated billing data is obtained according to the preset rate and the real-time electric energy data, including:
[0086] Determine the real-time rate corresponding to the tiered rate data according to the current time;
[0087] The accumulated billing data is obtained according to the real-time rate and the real-time electric energy data.
[0088] Tiered rates refer to different electricity prices set according to different stages of electricity consumption. The electricity price increases as the electricity consumption increases to encourage users to use electricity reasonably. The electricity header data contains the tiered rate data and is stored in the header storage space. In each billing cycle, the system determines the applicable tiered rate based on the current time (such as hour, day, month, etc.). This may involve retrieving the rate information for the current time period from the memory of the energy meter.
[0089] Once the real-time rate is determined, the system will calculate the electricity cost per second or minute based on the rate and real-time power data. Then, these costs will be accumulated to the total billing data to obtain the cumulative billing data.
[0090] The tiered rates encourage users to use more electricity during periods of lower electricity demand, thereby reducing the electricity load during peak hours. This incentivizes users to reduce electricity consumption during peak hours, helping to reduce overall energy consumption and carbon emissions. The rates are updated in real time and the fees are calculated accordingly, ensuring the accuracy and timeliness of billing.
[0091] According to the above embodiment, specifically, the power management method of the electric energy meter, the real-time power data meets the preset conditions, including:
[0092] Determine the current accumulated power data according to the real-time power data;
[0093] Determine whether the current accumulated power data exceeds a preset power threshold;
[0094] If yes, it is determined that the real-time power data meets the preset condition;
[0095] If not, it is determined that the real-time power data does not meet the preset condition.
[0096] The system will calculate the total power consumption from the start of metering by the power meter or a specific time period based on the real-time power data, that is, the current cumulative power data. Compare the current cumulative power data with one or more preset power thresholds. These thresholds are pre-set power thresholds used to trigger specific operations or conditions. If the current cumulative power data exceeds the preset power threshold (for example, 20kwh), the system will determine that the real-time power data meets the preset conditions. Update the current status of the block data to the power header data. Storing the power header data in the header storage space means saving the updated power header data to the specified area of the external memory. By storing key data in a stable and reliable storage space, long-term data preservation is achieved. Even in power failure or other abnormal conditions, key power data will not be lost.
[0097] In addition, if the conditions are met, a series of actions may be triggered, such as updating the display of the power meter, sending notifications to users or management systems, adjusting rates, or starting energy-saving mode.
[0098] If the current accumulated power data does not exceed the preset power threshold, the system will determine that the real-time power data does not meet the preset conditions. In this case, the power meter will continue to operate normally, monitor and record power data, but will not perform special operations triggered by exceeding the threshold.
[0099] By setting different power thresholds, customized responses can be provided for different power consumption stages. By setting reasonable power thresholds, timely data storage can be achieved.
[0100] In the power management method of the electric energy meter, the processing of power failure events is an important link to ensure data integrity and reliability. Specifically, the power management method of the electric energy meter, when a power failure occurs, after storing the current power block data in the sub-block of the block storage space, further includes:
[0101] When power is turned on again, the backup power block data stored in the latest sub-block is obtained from the block storage space of the external memory;
[0102] Determine whether the current accumulated power exceeds a preset power threshold according to the backup power block data;
[0103] If yes, it is determined that the real-time power data meets the preset condition, and the process returns to the step of synchronizing the current power block data into power header data and storing the data in the internal memory;
[0104] If not, return to the step of obtaining real-time power data at preset intervals.
[0105] When the system detects a power outage, it immediately saves the current power block data to a sub-block of the block storage space of the external memory. This is to preserve the metering state of the energy meter during the power outage. Once the energy meter is powered back on, the system automatically retrieves the backup power block data stored in the latest sub-block from the block storage space of the external memory. These data are the last saved state before the power outage.
[0106] To determine whether the accumulated power exceeds the threshold, the system will use the backed-up power block data to determine the accumulated power from the last normal operation to the power failure moment, and determine whether the accumulated power exceeds the preset power threshold. If the judgment result shows that the accumulated power has exceeded the preset power threshold, the system will consider that the real-time power data meets the preset conditions. Subsequently, the system will execute the operation of synchronizing the power block data to the power header data, and store the updated power header data in the internal memory.
[0107] If the accumulated power does not exceed the preset power threshold, the system will consider that the real-time power data does not meet the preset conditions. At this time, the system will not perform the synchronization operation, but continue to operate normally, return to the step of obtaining real-time power data at preset intervals, and continue to monitor and record power usage.
[0108] In the event of a power outage, the power data is quickly saved to prevent data loss. After powering on, the data can be restored to the state before the power outage to ensure continuity and consistency. Intelligently determine whether specific synchronization operations need to be performed based on the backup data.
[0109] According to the above embodiment, the power management method of the electric energy meter specifically stores the power block data cyclically in the sub-blocks of the external memory, including:
[0110] Write the power block data into the N sub-blocks of the block storage space in order;
[0111] When all sub-blocks are written, writing starts again at the first sub-block.
[0112] In the power management method of the electric energy meter, cyclically storing the power block data to the sub-blocks of the external memory is an effective means to improve the data storage efficiency and ensure the data persistence. The system writes the power block data obtained in real time into the N pre-divided sub-block space in the external memory in a fixed order. Each sub-block represents an independent area of the storage space, which is used to store a certain time or amount of power data. When the system completes writing the data of all N sub-blocks, it does not stop writing, but restarts the writing cycle. This means that the system will return to the first sub-block, overwrite the old data and start a new round of data storage. Through cyclic writing, the system can continuously utilize the space of the external memory without frequent space allocation or garbage collection operations, thereby improving storage efficiency.
[0113] The cyclic storage mechanism ensures that the power data can be continuously recorded and saved even when the power meter is running for a long time, which enhances the data persistence. Each write cycle uses these N spaces to spread the erase and write lifespan, which is equivalent to a lifespan of (10*N) million times. If the value of N is reasonable, it can be stored once per second in the limited FALSH space.
[0114] According to the above embodiment, the power management method of the electric energy meter specifically includes:
[0115] After the power header data in the header storage space is updated, the power header data is sent to the mobile terminal via wireless communication.
[0116] In the power management method of the electric energy meter, sending the power header data to the mobile terminal through wireless communication is an effective means to improve user experience and data accessibility. According to information such as real-time power data and tiered rate data, the power header data in the header storage space is updated regularly or under specific conditions. These data may include but are not limited to key information such as accumulated power, total electricity cost, current electricity rate, etc. Once the power header data is updated, the system will be ready to send these data through the wireless communication network. The updated power header data is transmitted to the mobile terminal specified by the user through wireless communication methods such as cellular networks, wireless network communication technology (Wi-Fi), Bluetooth, etc. This requires the electric energy meter to have corresponding wireless communication modules and software support. The user's mobile terminal (such as a smart phone, tablet computer, etc.) is equipped with a corresponding receiving and processing module, which can receive the power header data from the electric energy meter and display it on the user interface or perform further processing to understand the power consumption in a timely manner.
[0117] Users can access the electricity meter's electricity header data in real time and keep abreast of electricity usage and costs. By receiving data through mobile terminals, users can view electricity usage information at any time and place, which improves convenience.
[0118] In the above embodiments, the power management method of the electric energy meter is described in detail, and the present application also provides an embodiment corresponding to the power management device of the electric energy meter. It should be noted that the present application describes the embodiments of the device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.
[0119] From the perspective of functional modules, Figure 3 A structural diagram of an electric energy meter power management device provided in an embodiment of the present application, such as Figure 3 As shown, a power management device of an electric energy meter includes:
[0120] An acquisition module 21 is used to acquire real-time power data at preset intervals;
[0121] The low-bit data storage module 22 is used to write the real-time power data as power block data into the internal memory, and synchronously store the power block data in a sub-block of the external memory in a loop; wherein the external memory includes a header storage space and a block storage space; the block storage space is evenly divided into N sub-blocks;
[0122] A full power data storage module 23, used for synchronizing the current power block data into power header data and storing it in the internal memory when the real-time power data meets a preset condition;
[0123] A backup module 24, used for storing the power header data in the header storage space;
[0124] A clearing module 25, used to clear the electric quantity block data in the internal memory and the data in the block storage space in the external memory, and return to the step of acquiring real-time electric quantity data at every preset time;
[0125] The power failure backup module 26 is used to store the current power block data into the sub-blocks of the block storage space when a power failure occurs.
[0126] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.
[0127] Figure 4 A structural diagram of another power management device of an electric energy meter provided in an embodiment of the present application, such as Figure 4 As shown, the power management device of the electric energy meter includes: a memory 30 for storing a computer program;
[0128] The processor 31 is used to implement the steps of the method for obtaining user operation habit information in the above embodiment (electricity management method of electric energy meter) when executing the computer program.
[0129] The power management device of the electric energy meter provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.
[0130] Among them, the processor 31 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 31 may be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 31 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 31 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 31 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0131] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 30 is at least used to store the following computer program 301, wherein, after the computer program is loaded and executed by the processor 31, it can implement the relevant steps of the power management method of the electric energy meter disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 30 may also include an operating system 302 and data 303, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 302 may include Windows, Unix, Linux, etc. Data 303 may include but is not limited to data involved in implementing the power management method of the electric energy meter, etc.
[0132] In some embodiments, the power management device of the electric energy meter may further include a display screen 32 , an input / output interface 33 , a communication interface 34 , a power supply 35 , and a communication bus 36 .
[0133] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the power management device of the electric energy meter, and may include more or fewer components than those shown in the figure.
[0134] The power management device of the electric energy meter provided in the embodiment of the present application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: the power management method of the electric energy meter.
[0135] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps described in the embodiment of the method for managing the electric energy meter are implemented.
[0136] It is understandable that if the method in the above embodiment 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 present application 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, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0137] The computer-readable storage medium provided in this embodiment stores a computer program, and when a processor executes the program, the following method can be implemented: a method for managing electric power of an electric energy meter.
[0138] The above is a detailed introduction to the power management method, device, equipment and medium of the electric energy meter provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
[0139] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for managing electric energy of an electric energy meter, characterized in that: include: Get real-time power data at preset intervals; The real-time power data is written as power block data into the internal memory, and the power block data is synchronously stored in a sub-block of the external memory in a loop; wherein the external memory includes a header storage space and a block storage space; the block storage space is evenly divided into N sub-blocks; When the real-time power data meets the preset conditions, the current power block data is synchronized as power header data and stored in the internal memory; storing the electric quantity header data in the header storage space; Clear the electric quantity block data in the internal memory and the data in the block storage space in the external memory, and return to the step of acquiring real-time electric quantity data at every preset time; When power failure occurs, the current power block data is stored in the sub-block of the block storage space; The real-time power data meets the preset conditions, including: Determine the current accumulated power data according to the real-time power data; Determine whether the current accumulated power data exceeds a preset power threshold; If yes, it is determined that the real-time power data meets the preset condition; If not, it is determined that the real-time power data does not meet the preset condition.
2. The method for managing the electric energy of an electric energy meter according to claim 1, characterized in that: The real-time power data is obtained at preset intervals, including: Obtain the number of power pulses from the metering chip every second and obtain real-time power data and accumulated power data; Obtaining accumulated billing data according to a preset rate and the real-time electric energy data; The accumulated electricity data and the accumulated billing data are used as the real-time electric energy data.
3. The method for managing the electric energy of an electric energy meter according to claim 2, characterized in that: The preset rate is step rate data; The electricity header data also includes the tiered rate data; Correspondingly, the accumulated billing data is obtained according to the preset rate and the real-time electric energy data, including: Determine the real-time rate corresponding to the tiered rate data according to the current time; The accumulated billing data is obtained according to the real-time rate and the real-time electric energy data.
4. The method for managing the electric energy of an electric energy meter according to claim 3, characterized in that: When power failure occurs, the method further includes storing the current power block data in the sub-blocks of the block storage space: When power is turned on again, the backup power block data stored in the latest sub-block is obtained from the block storage space of the external memory; Determine whether the current accumulated power exceeds a preset power threshold according to the backup power block data; If so, it is determined that the real-time power data meets the preset conditions, and the step of synchronizing the current power block data into power header data and storing it in the internal memory is returned; if not, the step of obtaining real-time power data at preset intervals is returned.
5. The method for managing the electric energy of an electric energy meter according to claim 1, characterized in that: The power block data is cyclically stored in the sub-blocks of the external memory, including: Write the power block data into the N sub-blocks of the block storage space in order; When all sub-blocks are written, writing starts again at the first sub-block.
6. The method for managing the electric energy of an electric energy meter according to claim 1, characterized in that: Also includes: After the power header data in the header storage space is updated, the power header data is sent to the mobile terminal via wireless communication.
7. An electric energy management device for an electric energy meter, characterized in that: include: An acquisition module is used to acquire real-time power data at preset intervals; A low-bit data storage module, used to write the real-time power data as power block data into an internal memory, and synchronously store the power block data in a sub-block of an external memory in a loop; wherein the external memory includes a header storage space and a block storage space; the block storage space is evenly divided into N sub-blocks; A full power data storage module, used for synchronizing the current power block data into power header data and storing it in the internal memory when the real-time power data meets a preset condition; A backup module, used for storing the electric quantity header data in the header storage space; A clearing module, used to clear the electric quantity block data in the internal memory and the data in the block storage space in the external memory, and return to the step of acquiring real-time electric quantity data at preset intervals; A power failure backup module, used for storing the current power block data into the sub-blocks of the block storage space when power failure occurs; The real-time power data meets the preset conditions, including: Determine the current accumulated power data according to the real-time power data; Determine whether the current accumulated power data exceeds a preset power threshold; If yes, it is determined that the real-time power data meets the preset condition; If not, it is determined that the real-time power data does not meet the preset condition.
8. An electric energy meter power management device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the method for managing the electric energy of an electric energy meter as described in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for managing the electric energy of an electric energy meter as claimed in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Electric energy meter power down protection data storing method
CN106648982A
Switching circuit, method and device for storing power failure data
CN116312705A