Disclosure of Invention
The application aims to provide an electric quantity management method, device, equipment and medium for an electric energy meter, which solve the problem that excessive data which needs to be stored in time can cause data loss when the electric energy meter cannot backup data in real time and is powered down.
In order to solve the above technical problems, the present application provides a method for managing electric quantity of an electric energy meter, including:
acquiring real-time electric quantity data at intervals of preset time;
writing the real-time electric quantity data into an internal memory as electric quantity block data, and synchronously circularly storing the electric quantity block data into sub-blocks of an external memory, wherein the external memory comprises a head storage space and a block storage space;
When the real-time electric quantity data meet preset conditions, synchronizing the current electric quantity block data into electric quantity head data and storing the electric quantity head data in the internal memory;
Storing the power header data into the header storage space;
Clearing the electric quantity block data in the internal memory and the data in the block storage space in the external memory, and returning to the step of acquiring real-time electric quantity data every preset time;
and when power failure occurs, storing the current electric quantity block data into the sub-blocks of the block storage space.
As an alternative, in the method for managing electric quantity of the electric energy meter, the acquiring real-time electric quantity data at intervals of a preset time includes:
Acquiring the power consumption pulse number from the metering chip every second and acquiring real-time electric energy data and accumulated electric quantity data;
obtaining accumulated charging data according to a preset rate and the real-time electric energy data;
And taking the accumulated electric quantity data and the accumulated charging data as the real-time electric energy data.
In the electric quantity management method of the electric energy meter, the preset rate is ladder rate data, and the electric quantity head data further comprises the ladder rate data;
Correspondingly, the obtaining the accumulated charging data according to the preset rate and the real-time electric energy data includes:
determining a corresponding real-time rate in the ladder rate data according to the current moment;
And obtaining accumulated charging data according to the real-time rate and the real-time electric energy data.
As an alternative, in the method for managing electric quantity of electric energy meter, the real-time electric quantity data satisfies a preset condition, including:
determining current accumulated electric quantity data according to the real-time electric quantity data;
Judging whether the current accumulated electric quantity data exceeds a preset electric quantity threshold or not;
If yes, determining that the real-time electric quantity data meets a preset condition;
if not, determining that the real-time electric quantity data does not meet the preset condition.
As an alternative, in the method for managing electric quantity of an electric energy meter, when power failure occurs, storing the current electric quantity block data into the sub-blocks of the block storage space further includes:
When the power is on again, backup electric quantity block data stored in the latest sub-block are obtained from the block storage space of the external memory;
Judging whether the current accumulated electric quantity exceeds a preset electric quantity threshold according to the backup electric quantity blocking data;
If yes, determining that the real-time electric quantity data meets a preset condition, and returning to the step of synchronizing the current electric quantity block data into electric quantity head data and storing the electric quantity head data in the internal memory;
if not, returning to the step of acquiring the real-time electric quantity data at intervals of preset time.
As an alternative, in the method for managing electric quantity of the electric energy meter, the storing the electric quantity block data into the sub-blocks of the external memory in a circulating manner includes:
Sequentially writing the electric quantity block data into N sub-blocks of a block storage space according to the sequence;
When all the sub-blocks are written, the writing in the first sub-block is restarted.
As an alternative, the method for managing electric quantity of the electric energy meter further includes:
after the electric quantity head data in the head storage space are updated, the electric quantity head data are generated to the mobile terminal in a wireless communication mode.
In order to solve the technical problem, the application also provides an electric quantity management device of the electric energy meter, comprising:
the acquisition module is used for acquiring real-time electric quantity data at intervals of preset time;
The low-order data storage module is used for writing the real-time electric quantity data into the internal memory as electric quantity block data and synchronously circularly storing the electric quantity block data into sub-blocks of the external memory, wherein the external memory comprises a head storage space and a block storage space;
the full-electric quantity data storage module is used for synchronizing the current electric quantity block data into electric quantity head data and storing the electric quantity head data in the internal memory when the real-time electric quantity data meet preset conditions;
The backup module is used for storing the electric quantity head data into the head storage space;
The emptying module is used for emptying the electric quantity block data in the internal memory and the data in the block storage space in the external memory, and returning to the step of acquiring real-time electric quantity data at intervals of preset time;
and the power-down backup module is used for storing the current electric quantity block data into the sub-blocks of the block storage space when power-down occurs.
In order to solve the above technical problems, the present application further provides an electric quantity management device of an electric energy meter, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the electric quantity management method of the electric energy meter when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements the steps of the electric quantity management method of the electric energy meter.
The electric quantity management method of the electric energy meter comprises the steps of acquiring real-time electric quantity data at preset time intervals, writing the real-time electric quantity data serving as electric quantity block data into an internal memory, synchronously storing the electric quantity block data into sub-blocks of an external memory in a circulating mode, wherein the external memory comprises a head storage space and a block storage space, dividing the block storage space into N sub-blocks on average, synchronizing current electric quantity block data into electric quantity head data and storing the electric quantity head data into the internal memory when the real-time electric quantity data meet preset conditions, storing the electric quantity head data into the head storage space, emptying the electric quantity block data in the internal memory and the data in the block storage space in the external memory, returning to the step of acquiring the real-time electric quantity data at preset time intervals, and storing the current electric quantity block data into the sub-blocks of the block storage space when power is lost. When the preset condition is met, key data are stored in a stable and reliable storage space, long-term storage of the data is realized, and when power failure occurs, only the latest block content is needed to be stored, so that the requirement on an energy storage device is low, and the writing and storage operation of the blocks can be completed by using residual electric quantity. The reliability of data storage is improved, the service life of a storage device is prolonged, the utilization efficiency of storage resources is optimized, and key data is protected from being lost under abnormal conditions such as power failure.
In addition, the application also provides a device, equipment and medium, which correspond to the electric quantity management method of the electric energy meter and have the same effects.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present application.
The application provides an electric quantity management method, device, equipment and medium of an electric energy meter.
In order to better understand the aspects of the present application, the present application will be described in further detail with reference to the accompanying drawings and detailed description.
In metering equipment such as an electric energy meter, calculation and storage of electric quantity data are one of core services of the electric energy meter, but are limited by cost and resources of the electric energy meter, a nonvolatile storage device is generally EE or FLASH, the capacity of EE and FLASH is generally smaller, the erasing/writing service life is limited (generally 10-100 ten thousand times), the requirement of once-per-second storage of electric energy cannot be met, the electric quantity data cannot be stored in time after being calculated in real time in actual use, and therefore, abnormal conditions such as electric quantity data loss, electric quantity data fall-off, electric quantity data total distribution inequality and the like occur under the conditions of unexpected reset, frequent power on and off, battery undervoltage, standby power failure and the like, and loss is brought to power supply companies and users. And (3) storing the electric quantity data in a RAM of the electric energy meter MCU after the electric quantity data are calculated in real time, and performing EE or FLASH storage operation once after accumulating for a period of time (for example, storing once every 10 min) or accumulating a certain value (for example, storing once every 1kwh of the word). Under the power failure situation, a standby power supply (such as a battery, a Faraday capacitor and the like) is used for supplying power before power failure to quickly store data in the RAM into EE or FLASH, so that the purpose of saving electric quantity before resetting and power failure is achieved.
When the electric energy meter is powered down, electric energy storage is performed completely by means of an external storage device (such as a battery, a Farad capacitor and the like), and the requirement on the external storage device is high. If the battery is used for power failure data storage, when the battery is in low power and the battery is passivated (the two conditions often occur in field operation), the data storage failure can occur, so that the power data is abnormal. If the Faraday capacitor is used for power-down data storage, when the Faraday capacitor is not charged enough, data storage failure occurs, and the electric quantity data is abnormal. The embodiment does not limit the application environment and the type of the electric energy meter.
In order to solve the above problems, an embodiment of the present application provides a method for managing electric quantity of an electric energy meter, and fig. 1 is a flowchart of the method for managing electric quantity of an electric energy meter according to the embodiment of the present application, as shown in fig. 1, including:
s11, acquiring real-time electric quantity data at intervals of preset time;
s12, writing real-time electric quantity data into an internal memory as electric quantity block data, and synchronously circularly storing the electric quantity block data into sub-blocks of an external memory, wherein the external memory comprises a head storage space and a block storage space;
S13, synchronizing current electric quantity block data into electric quantity head data and storing the electric quantity head data in an internal memory when the real-time electric quantity data meet preset conditions;
S14, storing the electric quantity head data into a head storage space;
S15, clearing electric quantity block data in the internal memory and data in a block storage space in the external memory, and returning to the step of acquiring real-time electric quantity data at intervals of preset time;
and S16, when power failure occurs, storing the current electric quantity block data into the sub-blocks of the block storage space.
Step S11, acquiring real-time electric quantity data, namely reading current electric quantity information from a metering chip of the electric energy meter, wherein each preset time refers to a time interval set by the system according to the accuracy requirement and the data processing capability of the electric energy meter, and the time interval can be specifically each second, each minute or other suitable time units. In the step, the real-time acquisition of data is realized by the timing inquiry metering chip. It should be noted that, in order to ensure the continuity and accuracy of the electrical quantity data, the step S11 is performed to periodically update the data, including but not limited to the cumulative electrical quantity data and the electrical quantity tariff per minute, the cumulative electrical quantity data and the electrical quantity tariff per hour, and the like.
The step S12 is to write the current real-time data into the internal memory and circularly store the current real-time data into the external memory, wherein the writing of the real-time electric quantity data into the internal memory means to temporarily store the acquired data into a RAM or other high-speed storage medium of the electric energy meter, the circularly storing of the electric quantity block data into the sub-blocks of the external memory means to copy the internally stored data into the external memory, and the circularly writing mode is adopted, wherein the sub-blocks means a plurality of storage units with divided external storage space, and N is the number of the storage units. In the step, double guarantee of data is realized through an internal storage mechanism and an external circulation storage mechanism. It should be noted that, by performing the instant backup and cyclic utilization of the data in step S12, the reliability of data storage and the service life of the memory are improved.
Further, when the real-time electric quantity data meets the preset condition, the electric quantity block data is synchronized to the electric quantity head data, in step S13, when the real-time electric quantity data meets the preset condition, which means that a certain specific electric quantity threshold value or condition is reached, for example, the accumulated electric quantity reaches a certain value, and when the real-time electric quantity data is synchronized to the electric quantity head data, which means that the current state of the block data is updated to the electric quantity head data, the updating of the key data is performed in step S13, so that the accuracy and timeliness of the electric quantity data are ensured.
In step S14, storing the power header data in the header storage space means saving the updated power header data in a designated area of the external memory. In the step, the key data is stored in a stable and reliable storage space, so that the data can be stored for a long time. It should be noted that, by step S14, it is ensured that the critical power data is not lost even in the event of power failure or other abnormality. The external memory may be EEPROM, FLASH, ferroelectric memory (FRAM).
Step S15 clears the data and returns to the acquisition step, "clear the electric quantity block data in the internal memory and the block memory space data in the external memory" means clear the old data after the data synchronization, and prepare for the new data cycle writing. In this step, efficient management of storage space is achieved through data flushing and resetting. And through refreshing data and circularly using the storage space, the utilization efficiency of the storage resource is optimized. Specifically, the head storage space in the memory is used by the electric quantity head data according to a single address, and the head storage space and the size of the block storage space of the external memory are reasonably distributed to ensure the requirement of data carry storage.
In step S16, when power failure occurs, it means that the system detects a power interruption, and storing the current electric quantity block data into the sub-blocks of the block storage space means that the current data is saved to the external memory in an emergency before power failure. In this step, protection of the data is achieved by an emergency writing mechanism. It should be noted that, through step S16, the safety and integrity of the power data are ensured in the event of unexpected power failure. Because only the contents of the blocks need to be stored when power is lost, the requirement on the energy storage device is low, and the writing and storing operation of the blocks can be completed by using the residual electric quantity. It should be noted that step S16 may occur at any step after step S11.
In order to more easily understand the scheme, a specific implementation manner is provided as a schematic illustration, fig. 2 is a schematic illustration of data management provided by the embodiment of the application, as shown in fig. 2, data in a block is acquired from a metering chip once per second and stored in an external memory, data read from the metering chip is stored in the external memory once per second, the electric quantity block time is according to the sub-blocks 1,2,3 and the number of the N cycle storage according to fig. 2, the FLASH life limit is still met under the condition of ensuring once per second, and because an electric quantity head can be modified only when the electric quantity sub-block data block reaches a preset condition, namely, the data in the block is synchronized into the electric quantity head and stored in the external memory, the data in the block is reset and accumulated again and synchronized into the external memory after the synchronization, the volume of the data in the electric quantity head is large, only one part of the data is reserved in the storage, the data is not easily updated, only the electric quantity is required to be overflowed once in the electric quantity block, as long as the whole life cycle is not more than 10 ten thousand times, the electric quantity is available, the volume of the data in the storage device is small, the storage of N part of the electric quantity is stored in the storage device, and the N can be written in the storage space for 10 ten thousand times for realizing the reasonable time per second, and the life is equal to the equivalent to the life of the time when the N cycle is written in the N space and is equal to 10 ten thousands of time.
The electric quantity management method of the electric energy meter comprises the steps of obtaining real-time electric quantity data at preset time intervals, writing the real-time electric quantity data serving as electric quantity block data into an internal memory, synchronously storing the electric quantity block data into sub-blocks of an external memory in a circulating mode, wherein the external memory comprises a head storage space and a block storage space, dividing the block storage space into N sub-blocks on average, synchronizing current electric quantity block data into electric quantity head data and storing the electric quantity head data into the internal memory when the real-time electric quantity data meet preset conditions, storing the electric quantity head data into the head storage space, emptying the electric quantity block data in the internal memory and the data in the block storage space in the external memory at preset time intervals, returning to the step of obtaining the real-time electric quantity data, and storing the current electric quantity block data into the sub-blocks of the block storage space when power is lost. When the preset condition is met, key data are stored in a stable and reliable storage space, long-term storage of the data is realized, and when power failure occurs, only the latest block content is needed to be stored, so that the requirement on an energy storage device is low, and the writing and storage operation of the blocks can be completed by using residual electric quantity. The reliability of data storage is improved, the service life of a storage device is prolonged, the utilization efficiency of storage resources is optimized, and key data is protected from being lost under abnormal conditions such as power failure.
According to the above embodiment, in particular, the method for managing electric energy of the electric energy meter, the acquiring real-time electric energy data at intervals of a preset time includes:
Acquiring the power consumption pulse number from the metering chip every second and acquiring real-time electric energy data and accumulated electric quantity data;
obtaining accumulated charging data according to a preset rate and the real-time electric energy data;
And taking the accumulated electric quantity data and the accumulated charging data as the real-time electric energy data.
The method comprises the steps of acquiring real-time electric energy data from a metering chip every second, wherein the step is that the system calculates the number of electric pulses by taking every second as a unit through the metering chip, converts the number of the electric pulses into the second real-time electric energy data, and further obtains accumulated electric quantity data. Based on the acquisition of the real-time electric energy data, the system can accumulate the data to form accumulated electric quantity data in a period of time. The accumulated electricity quantity data reflects the total electricity consumption recorded by the electric energy meter from a certain starting point to the current moment.
And obtaining accumulated charging data according to the preset rate and the real-time electric energy data, wherein the step relates to an electric charge calculation process. The system calculates the electricity rate based on preset rates (possibly flat rates or dynamically changing rates, such as time of day rates, etc.) and real-time power data. This calculation process may consider the time period, the type of electricity used, the category of the user, etc. to determine the electricity charge per kilowatt-hour.
The accumulated electric quantity data and the accumulated charging data are used as the real-time electric energy data, the accumulated electric quantity data and the accumulated charging data are combined and are processed and stored as a part of the real-time electric energy data, and the purpose is to provide a comprehensive view for the electric energy meter, and the comprehensive view not only comprises electric quantity use conditions, but also comprises related cost information.
By acquiring data every second, real-time monitoring and recording of the usage of the electric energy is ensured. And the electric quantity data and the charging data are accumulated, so that the accuracy of electric energy consumption and cost calculation is ensured. And the electric quantity data and the charging data are combined, so that a comprehensive energy consumption and cost view is provided for the user, and the management and analysis are convenient.
Specifically, the preset rate is adjusted in real time according to factors such as power grid load, time and seasons, so that more flexible electricity charge calculation is realized.
In the method of power management of an electric energy meter, it is a common practice to use stepped rate data to calculate accumulated billing data, especially in situations where the power supply is intense or energy conservation and emission reduction are encouraged. In particular to a method for managing the electric quantity of an electric energy meter, the preset rate is ladder rate data; the power header data further includes the ladder rate data;
Correspondingly, the obtaining the accumulated charging data according to the preset rate and the real-time electric energy data includes:
determining a corresponding real-time rate in the ladder rate data according to the current moment;
And obtaining accumulated charging data according to the real-time rate and the real-time electric energy data.
The stepped rate refers to different electricity rates set according to different stages of the electricity consumption. Wherein electricity prices are increased with an increase in electricity consumption to encourage users to reasonably use electricity. The electricity header data includes ladder rate data and is stored in the header storage space. At each billing period, the system will determine the applicable step rate based on the current time (e.g., hour, day, month, etc.). This may involve retrieving rate information for the current time period from the memory of the power meter.
Once the real-time rate is determined, the system will calculate an electricity rate per second or per minute based on the rate and the real-time power data. These charges are then added to the total billing data to obtain accumulated billing data.
The step rate encourages the user to use more power in the period with lower power demand, thereby reducing the power load in the peak period, motivating the user to reduce the power consumption in the peak period, being beneficial to reducing the whole energy consumption and carbon emission, updating the rate in real time and calculating the cost according to the rate, and ensuring the accuracy and the real-time performance of charging.
According to the above embodiment, in particular, the method for managing electric energy of an electric energy meter, the real-time electric energy data satisfies a preset condition, including:
determining current accumulated electric quantity data according to the real-time electric quantity data;
Judging whether the current accumulated electric quantity data exceeds a preset electric quantity threshold or not;
If yes, determining that the real-time electric quantity data meets a preset condition;
if not, determining that the real-time electric quantity data does not meet the preset condition.
The system calculates the total electricity consumption from the electric energy meter or the specific time period according to the real-time electricity data, namely the current accumulated electricity data. The current accumulated charge data is compared to one or more preset charge thresholds. These thresholds are pre-set power thresholds that are used to trigger a particular operation or condition. If the current accumulated electricity quantity data exceeds a preset electricity quantity threshold (for example, 20 kwh), the system can determine that the real-time electricity quantity data meets the preset condition. Updating the current state of the block data into the electric quantity head data, storing the electric quantity head data into a head storage space refers to storing the updated electric quantity head data into a designated area of an external memory, and long-term storage of the data is realized by storing key data into a stable and reliable storage space. Even in the event of a power loss or other anomaly, critical power data is not lost.
In addition, a series of operations such as updating the display of the electric energy meter, sending a notification to the user or the management system, adjusting the rate or starting the energy saving mode, etc. may be triggered if the condition is satisfied.
If the current accumulated electric quantity data does not exceed the preset electric quantity threshold, the system can determine that the real-time electric quantity data does not meet the preset condition. In this case, the meter will continue to operate normally, monitoring and recording the charge data, but not performing special operations triggered by exceeding the threshold.
By setting different power thresholds, customized responses may be provided for different power usage phases. By setting a reasonable electric quantity threshold, the timely storage of data is realized.
In the electric quantity management method of the electric energy meter, the processing of the power failure event is an important link for ensuring the data integrity and reliability. The method for managing the electric quantity of the electric energy meter, when power failure occurs, further comprises the steps of after storing the current electric quantity block data into the sub-blocks of the block storage space:
When the power is on again, backup electric quantity block data stored in the latest sub-block are obtained from the block storage space of the external memory;
Judging whether the current accumulated electric quantity exceeds a preset electric quantity threshold according to the backup electric quantity blocking data;
If yes, determining that the real-time electric quantity data meets a preset condition, and returning to the step of synchronizing the current electric quantity block data into electric quantity head data and storing the electric quantity head data in the internal memory;
if not, returning to the step of acquiring the real-time electric quantity data at intervals of preset time.
When the system detects the power failure condition, the current electric quantity block data are stored into the sub-blocks of the block storage space of the external memory immediately. This is to preserve the metering state of the meter during power interruption. Once the electric energy meter is powered on again, the system can automatically search backup electric quantity 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 is lost.
And judging whether the accumulated electric quantity exceeds a threshold or not, determining the accumulated electric quantity from the last normal operation to the power-down time by using the backed-up electric quantity blocking data by the system, and judging whether the accumulated electric quantity exceeds a preset electric quantity threshold or not. If the judgment result shows that the accumulated electric quantity exceeds the preset electric quantity threshold, the system considers that the real-time electric quantity data meets the preset condition. Then, the system will perform the operation of synchronizing the power partition data into power header data and store the updated power header data in the internal memory.
If the accumulated electric quantity does not exceed the preset electric quantity threshold, the system considers that the real-time electric quantity data does not meet the preset condition. At this time, the system does not perform the synchronization operation, but continues to operate normally, returns to the step of acquiring the real-time electric quantity data every preset time, and continues to monitor and record the electric quantity use condition.
Under the condition of power failure, the electric quantity data is stored rapidly, and the data loss is prevented. The state before power failure can be restored after power-on, and continuity and consistency are ensured. And intelligently judging whether a specific synchronous operation needs to be executed according to the backup data.
According to the above embodiment, in particular, the method for managing electric energy of an electric energy meter circularly stores the electric energy block data into a sub-block of an external memory, including:
Sequentially writing the electric quantity block data into N sub-blocks of a block storage space according to the sequence;
When all the sub-blocks are written, the writing in the first sub-block is restarted.
In the electric quantity management method of the electric energy meter, sub-blocks for circularly storing electric quantity block data to an external memory are effective means for improving data storage efficiency and ensuring data durability. The system writes the electric quantity block data acquired in real time into N sub-block spaces which are divided in advance in an external memory according to a fixed sequence. Each sub-block represents an independent area of memory space for storing a certain amount or amount of power data. After the system completes writing the data of all N sub-blocks, the writing is not stopped, but the writing cycle is restarted. This means that the system will revert to the first sub-block, overwrite the old data and begin a new round of data storage. By cycling writing, the system can continuously utilize the space of the external memory without frequently performing space allocation or garbage collection operation, thereby improving the storage efficiency.
The circulation storage mechanism ensures that the electric quantity data can be continuously recorded and stored even under the condition that the electric energy meter runs for a long time, and the durability of the data is enhanced. The N space is circularly used every writing, the number of times of erasing and writing life is averaged, which is equivalent to the life becoming (10 x N) ten thousands times, and if the value of N is reasonable, the N can be stored once per second in the limited FALSH space.
According to the above embodiment, in particular, the method for managing electric quantity of the electric energy meter further includes:
after the electric quantity head data in the head storage space are updated, the electric quantity head data are generated to the mobile terminal in a wireless communication mode.
In the electric quantity management method of the electric energy meter, sending the electric quantity head data to the mobile terminal in a wireless communication mode is an effective means for improving user experience and data accessibility. And updating the power head data in the head storage space periodically or under specific conditions according to the information such as the real-time power data, the ladder rate data and the like. Such data may include, but is not limited to, key information such as accumulated electricity, total electricity charge, current electricity rates, etc. Once the power header data is updated, the system will be ready to send such data over the wireless communication network. The updated power header data is transmitted to the mobile terminal designated by the user through a wireless communication manner, such as a cellular network, a wireless network communication technology (Wi-Fi), bluetooth, etc. This requires the power meter to be provided with a corresponding wireless communication module and software support. The mobile terminal (such as a smart phone, a tablet personal computer and the like) of the user is provided with a corresponding receiving and processing module, can receive the electric quantity head data from the electric energy meter, and displays or carries out further processing on a user interface so as to know the electricity consumption condition in time.
The user can access the electric quantity head data of the electric energy meter in real time, and timely know the electricity consumption condition and the electricity cost. The mobile terminal receives the data, so that a user can check the power consumption information at any time and place, and convenience is improved.
In the above embodiments, the method for managing electric quantity of the electric energy meter is described in detail, and the application further provides a corresponding embodiment of the electric energy meter electric quantity management device. It should be noted that the present application describes an embodiment of the device portion from two angles, one based on the angle of the functional module and the other based on the angle of the hardware.
Based on the angle of the functional module, fig. 3 is a block diagram of an electric quantity management device of an electric energy meter according to an embodiment of the present application, as shown in fig. 3, the electric quantity management device of an electric energy meter includes:
an acquisition module 21, configured to acquire real-time electric quantity data at intervals of a preset time;
The low-order data storage module 22 is configured to write the real-time electric quantity data as electric quantity block data into an internal memory, and synchronously store the electric quantity block data into sub-blocks of an external memory in a circulating manner, where the external memory includes a head storage space and a block storage space;
A full power data storage module 23, configured to synchronize the current power block data into power header data and store the power header data in the internal memory when the real-time power data satisfies a preset condition;
A backup module 24, configured to store the power header data into the header storage space;
the emptying module 25 is configured to empty 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 intervals of a preset time;
And the power-down backup module 26 is configured to store the current power-down block data into the sub-blocks of the block storage space when power-down occurs.
Since the embodiments of the apparatus portion and the embodiments of the method portion correspond to each other, the embodiments of the apparatus portion are referred to the description of the embodiments of the method portion, and are not repeated herein.
Fig. 4 is a block diagram of another power management apparatus for an electric energy meter according to an embodiment of the present application, and as shown in fig. 4, the power management apparatus for an electric energy meter includes a memory 30 for storing a computer program;
the processor 31 is configured to implement the steps of the method for acquiring user operation habit information according to the above-described embodiment (electric quantity management method of the electric energy meter) when executing the computer program.
The electric quantity management device of the electric energy meter provided by the embodiment can include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer or the like.
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 (DIGITAL SIGNAL Processor, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 31 may also include a main processor, which is a processor for processing data in a wake-up state, also referred to as a central processor (Central Processing Unit, CPU), and a coprocessor, which is a low-power processor for processing data in a standby state. In some embodiments, the processor 31 may integrate with an image processor (Graphics Processing Unit, GPU) for rendering and rendering of content to be displayed by the display screen. In some embodiments, the processor 31 may also include an artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) processor for processing computing operations related to machine learning.
Memory 30 may include one or more computer-readable storage media, which may be non-transitory. Memory 30 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 30 is at least used for storing a computer program 301, where the computer program, when loaded and executed by the processor 31, can implement the relevant steps of the power management method of the electric energy meter disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 30 may further include an operating system 302, data 303, and the like, where the storage manner may be transient storage or permanent storage. Operating system 302 may include Windows, unix, linux, among other things. The data 303 may include, but is not limited to, data related to implementing a power management method of the power meter, and the like.
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.
Those skilled in the art will appreciate that the configuration shown in fig. 4 does not constitute a limitation of the power management device of the power meter and may include more or less components than those illustrated.
The electric quantity management device of the electric energy meter comprises a memory and a processor, wherein the processor can realize the electric quantity management method of the electric energy meter when executing a program stored in the memory.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer readable storage medium stores a computer program which, when executed by a processor, performs the steps described in the above embodiments of the power management method of the electric energy meter.
It will be appreciated that the methods of the above embodiments, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored on a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present application. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The computer readable storage medium provided in this embodiment has a computer program stored thereon, which when executed by a processor, implements a method for managing the power of an electric energy meter.
The method, the device, the equipment and the medium for managing the electric quantity of the electric energy meter are described in detail. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. 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 points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the application can be made without departing from the principles of the application and these modifications and adaptations are intended to be within the scope of the application as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.