CN112667643A - Power failure data storage method and device based on double-core intelligent electric meter - Google Patents

Power failure data storage method and device based on double-core intelligent electric meter Download PDF

Info

Publication number
CN112667643A
CN112667643A CN202110017504.4A CN202110017504A CN112667643A CN 112667643 A CN112667643 A CN 112667643A CN 202110017504 A CN202110017504 A CN 202110017504A CN 112667643 A CN112667643 A CN 112667643A
Authority
CN
China
Prior art keywords
data
core
priority
data storage
power supply
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110017504.4A
Other languages
Chinese (zh)
Other versions
CN112667643B (en
Inventor
张乐平
石少青
张本松
张鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southern Power Grid Digital Grid Research Institute Co Ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN202110017504.4A priority Critical patent/CN112667643B/en
Publication of CN112667643A publication Critical patent/CN112667643A/en
Application granted granted Critical
Publication of CN112667643B publication Critical patent/CN112667643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Power Sources (AREA)

Abstract

The application relates to a power failure data storage method and device based on a double-core intelligent electric meter, computer equipment and a storage medium. The method comprises the steps of starting an electric quantity storage device when a power failure signal is detected in the double-core intelligent electric meter, detecting the residual power supply time of the electric quantity storage device, generating a data storage queue by using data corresponding to each component and basic application according to data priority identification corresponding to each component and basic application in a management core, and storing the data in the data storage queue according to the residual power supply time and the data storage queue. Compared with a power failure processing mode of a traditional electric meter, the scheme has the advantages that the electric quantity storage device is arranged in the double-core intelligent electric meter, the data of each component and basic application are generated into the data storage queue according to the priority, the data are stored in time when the double-core intelligent electric meter fails, the power failure data storage of the software and hardware structure of the new-generation double-core intelligent electric meter is adapted, and the effect of the stability of the power failure data storage is improved.

Description

Power failure data storage method and device based on double-core intelligent electric meter
Technical Field
The application relates to the technical field of data security, in particular to a power failure data storage method and device based on a double-core intelligent electric meter, computer equipment and a storage medium.
Background
In China, the electric meter adopting the integrated design is applied to thousands of households, and when software or hardware faults occur, the whole meter is replaced by the only feasible measure for ensuring the smooth operation of electric power metering. In addition, in order to prevent the problem of inaccurate electric energy metering caused by tampering of an electric meter program from the outside, the software of the electric meter in China is not allowed to be upgraded on line, the service life and the strain capacity of the electric meter are reduced, and resource waste is caused by huge quantity of required replacement. The ammeter can appear the condition of outage suddenly because improper operation or other exogenic actions act on in the use, if can not in time resume the power supply, can not effectively in time save data, can cause the condition such as data loss damage to take place, influences the life of thousands of households simultaneously.
The electric meter is in the use process because of various external force influences, the situation that sudden power failure is unavoidable, at the moment, data needs to be protected, the data cannot be processed in a very short time, and in order to avoid damage to the data caused by sudden power supply interruption, a battery is generally added in the electric meter to deal with the situation of data loss caused by sudden power failure. However, as the IR46 standard advances to implement, in order to meet the requirement of "independent metering", the new generation of smart meters adopt the setting of two control units, and the hardware and software structures of the new generation of smart meters are different from those of the traditional smart meters, so the power-down data storage method of the traditional smart meter cannot adapt to the structure of the new generation of smart meters.
Therefore, how to realize the power failure data storage of the software and hardware structure suitable for the new generation of double-core intelligent electric meter becomes a problem which needs to be solved urgently.
Disclosure of Invention
Therefore, in order to solve the technical problems, a method, a device, a computer device and a storage medium for saving power failure data based on a dual-core smart meter, which can adapt to the software and hardware structure of a new generation of dual-core smart meters, are needed.
A power failure data storage method based on a double-core intelligent electric meter is applied to a management core, and comprises the following steps:
responding to a power failure signal sent by a metering core in a dual-core intelligent ammeter through a preset pin, sending a starting signal to electric quantity storage equipment in a management core of the dual-core intelligent ammeter, and detecting the residual power supply time of the electric quantity storage equipment;
acquiring data priority identifications corresponding to each component and basic application in the double-core intelligent ammeter management core, and generating a data storage queue according to the data priority identifications and the data in each component and basic application corresponding to the data priority identifications; the data priority identification characterizes the storage priority of the data;
and storing the data in the data storage queue according to the remaining power supply time and the data storage queue.
In one embodiment, before the obtaining the data priority corresponding to each component and the basic application in the dual-core smart meter management core, the method further includes:
determining the priority of the data in each component and the basic application according to a preset priority rule table; the preset priority rule table stores the corresponding relation between the data in the components and the priority;
and generating corresponding data priority identification according to the priority of the data in each component and the basic application, and adding the corresponding data priority identification into the data of each component and the basic application.
In one embodiment, the generating a data storage queue according to the data priority identifiers and the corresponding data in the components and the basic application includes:
and storing the data corresponding to the data priority identifications into a queue to be stored according to the sequence of the data priority identifications from high to low to obtain the data storage queue.
In one embodiment, the storing data in the data storage queue according to the remaining power supply time and the data storage queue includes:
and storing the data in the data storage queue through a non-preemptive priority algorithm according to the residual power supply time and the data storage queue.
In one embodiment, the method further comprises the following steps:
if the remaining power supply time is detected to be lower than the processing time corresponding to the data in the data storage queue, stopping processing the data;
and sending power failure processing information comprising the processed data to a platform management application in the dual-core intelligent ammeter management core.
In one embodiment, the detecting the remaining power supply time of the power storage device includes:
acquiring a power supply voltage of the electric quantity storage equipment;
and determining the residual power supply time corresponding to the electric quantity storage equipment according to the power supply voltage.
In one embodiment, after storing the data in the data storage queue according to the remaining power supply time and the data storage queue, the method further includes:
and sending storage completion information to a platform management application in the dual-core intelligent ammeter management core, and setting each component and basic application in the dual-core intelligent ammeter management core into a low power consumption mode.
The utility model provides a fall electric data save set based on two core smart electric meters, is applied to the management core, the device includes:
the response module is used for responding to a power failure signal sent by a metering core in the double-core intelligent ammeter through a preset pin, sending a starting signal to electric quantity storage equipment in a management core of the double-core intelligent ammeter, and detecting the residual power supply time of the electric quantity storage equipment;
the acquisition module is used for acquiring data priority identifications corresponding to each component and basic application in the double-core intelligent ammeter management core and generating a data storage queue according to the data priority identifications and the data corresponding to the components and the basic application; the data priority identification characterizes the storage priority of the data;
and the storage module is used for storing the data in the data storage queue according to the residual power supply time and the data storage queue.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
According to the power failure data storage method and device based on the dual-core intelligent electric meter, when a power failure signal is detected in the dual-core intelligent electric meter, a starting signal is sent to the electric quantity storage device, the residual power supply time of the electric quantity storage device is detected, a data storage queue is generated by using data corresponding to each component and a basic application according to data priority identification corresponding to each component and the basic application in a dual-core intelligent electric meter management core, and the data in the data storage queue is stored according to the residual power supply time and the data storage queue. Compared with a power failure processing mode of a traditional electric meter, the electric quantity storage device is arranged in the intelligent electric meter, the data of each component and basic application are generated into the data storage queue according to the priority, the data in the data storage queue are stored according to the priority, the data can be stored in time when the double-core intelligent electric meter fails, power failure data storage of a software and hardware structure of a new generation of double-core intelligent electric meters is adapted, and the effect of stability of power failure data storage is improved.
Drawings
FIG. 1 is an application environment diagram of a power failure data storage method based on a two-core smart meter in an embodiment;
FIG. 2 is a schematic flow chart of a power failure data storage method based on a two-core smart meter in one embodiment;
FIG. 3 is a schematic flow chart of a power failure data storage method based on a two-core smart meter in another embodiment;
FIG. 4 is a block diagram of a power-down data storage device based on a two-core smart meter in one embodiment;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The power failure data storage method based on the double-core intelligent electric meter can be applied to the application environment shown in fig. 1. Among other things, the management core 102 may communicate with the metering core 104. The management core 102 may detect a power down signal sent by the metering core 104 through a preset pin, send a start signal to the electric quantity storage device, and detect a remaining power supply time of the electric quantity storage device, and the management core 102 may further generate a data storage queue according to priority identifiers of data of each component and a basic application therein, and store data in the data storage queue according to the remaining power supply time and the data storage queue. The management core 102 and the measurement core 104 may be disposed in a dual-core smart meter, and the management core 102 may be disposed therein with a power storage device, an MCU (micro controller Unit), and preset pins.
In an embodiment, as shown in fig. 2, a method for saving power-down data based on a two-core smart meter is provided, which is described by taking the method applied to the management core in fig. 1 as an example, and includes the following steps:
step S202, responding to a power failure signal sent by the metering core 104 in the double-core smart electric meter through a preset pin, sending a starting signal to the electric quantity storage device in the management core 102, and detecting the remaining power supply time of the electric quantity storage device.
The management core 102 may be one of chips in a dual-core smart meter, the preset PIN may be a PIN disposed in the management core 102, and the PIN may be configured to detect whether a power failure occurs in the management core 102, specifically, the PIN may be a PWR _ PIN, that is, a power detection PIN, the management core 102 may detect a power failure signal through the preset PIN, if a power failure signal sent by the metering core 104 through the preset PIN is detected, the management core 102 may send a start signal to the power storage device therein, the power storage device may start discharging after receiving the start signal, and provide power for each component, basic application and device in the management core 102. The metering core 104 may be a chip for realizing the metering function of the electric meter in a dual-core smart electric meter, the electric quantity storage device may be a super capacitor, the super capacitor is a power supply which is between a traditional capacitor and a battery and has special performance, electric energy is stored mainly by electric double layers and redox pseudocapacitance charges, but no chemical reaction occurs in the process of energy storage, the energy storage process is reversible, the capacity of the super capacitor is very large and is the same as that of the battery, so the super capacitor may also be called a "capacitor battery", after the management core 102 is powered on, the super capacitor can be charged, and can provide a power supply for the management core 102 when the management core 102 is powered off, and the super capacitor can be arranged in the management core of the management core 102. The management core 102 may be provided with a plurality of software modules, such as a platform management service and a super capacitor monitoring module, where the platform management service may be used to manage the dual-core smart electric meter, and the super capacitor monitoring module may be used to monitor and manage the electric quantity storage device; the management core 102 may receive a power-down signal sent by the metering core 104 through the platform management service, and the platform management service may send a start signal to the electric quantity storage device by using the super capacitor monitoring module after receiving the power-down signal, so as to start the electric quantity storage device, such as a super capacitor; the management core 102 may also receive a power-down signal directly through the power detection pin and send a start signal directly to the power storage device.
The management core 102 may also detect a remaining power time of the power storage device after sending the activation signal to the power storage device, where the remaining power time may be indicative of the remaining power time of the power storage device, for example, the remaining power time of the power storage device may be determined by detecting a specific parameter of the power storage device, such as the number of charges.
Step S204, acquiring data priority identifications corresponding to each component and basic application in the dual-core intelligent ammeter management core 102, and generating a data storage queue according to the data priority identifications and the data in each component and basic application corresponding to the data priority identifications; the data priority identification characterizes the storage priority of the data.
The components and the basic applications may be each component and basic application included in the management core 102, for example, a main control chip, a bluetooth chip, a memory chip, a security chip, an electric power data analysis application, and the like, there may be a plurality of components and basic applications in the management core 102, and data in each component and basic application in the management core 102 may have a corresponding priority, specifically, the priority of the data may be determined by a data priority identifier carried by the data priority identifier, and the data priority identifier may be used to characterize the storage priority of the data of each component and basic application. The management core 102 may obtain, for example, a data priority identifier corresponding to each component and the basic application when the management core 102 is powered down, and generate a data storage queue using data of each component and the basic application according to the priority identifier of the data in the multiple components and the basic application, specifically, the management core 102 may determine the priority of each data according to the data priority identifier of the data in each component and the basic application, and may store the data of each component and the basic application into the data storage queue in a manner that the priority is from high to low, for example, store the data with the highest priority into the first bit of the data storage queue, and continue to store the remaining data according to a descending order of the priority, thereby obtaining the data storage queue.
And step S206, storing the data in the data storage queue according to the remaining power supply time and the data storage queue.
The remaining power supply time may be a time that the power storage device supplies power to each component, a basic application, and a device in the management core 102, and the management core 102 may store data in the data storage queue based on the remaining power supply time and the obtained data storage queue, specifically, the management core 102 may determine which data in the data storage queue may be stored based on the remaining power supply time, and store the data in the queue according to a storage order of the data in the data storage queue, so that the data with a high priority may be stored preferentially, and the management core 102 may store the data in the data storage queue into a storage device of the management core 102, for example, in a Nor Flash (non-volatile Flash).
According to the power failure data storage method based on the double-core intelligent ammeter, when a power failure signal is detected in the double-core intelligent ammeter, a starting signal is sent to the electric quantity storage device, the residual power supply time of the electric quantity storage device is detected, then a data storage queue is generated by using data corresponding to each component and a basic application according to data priority identification corresponding to each component and the basic application in a double-core intelligent ammeter management core, and the data in the data storage queue is stored according to the residual power supply time and the data storage queue. Compared with a power failure processing mode of a traditional electric meter, the electric quantity storage device is arranged in the double-core intelligent electric meter, the data of each component and basic application are generated into the data storage queue according to the priority, the data in the data storage queue are stored according to the priority, the data can be stored in time when the double-core intelligent electric meter is powered down, power failure data storage of software and hardware structures of a new generation of double-core intelligent electric meters is achieved, and the effect of stability of power failure data storage is improved.
In one embodiment, before acquiring the data priority corresponding to each component and the basic application in the dual-core smart meter management core 102, the method further includes: determining the priority of each component and data in the basic application according to a preset priority rule table; the corresponding relation between the data in the plurality of components and the priority is stored in the preset priority rule table; and generating corresponding data priority identification according to the priority of the data in each component and the basic application, and adding the corresponding data priority identification into the data of each component and the basic application.
In this embodiment, the management core 102 may include a plurality of components and a plurality of basic applications, each component and basic application may have corresponding data, and the data may have corresponding priorities, the priorities of the data may be determined according to a preset priority rule table, and the preset priority rule table may include priorities of the data in the plurality of components and the data corresponding thereto. The management core 102 may determine the priority of the data in each component and the basic application according to the preset priority rule table, for example, the management core 102 may query the data in the preset priority rule table, so as to obtain the priority corresponding to the data in the preset priority rule table. After determining the priority of the data, the management core 102 generates a data priority identifier corresponding to each data according to the priority of each data, and adds the data priority identifier to the data of each component and the basic application, thereby obtaining the data with the data priority identifier.
Through the embodiment, the management core 102 can determine the data priority of each component and the basic application in the management core 102 through presetting the priority rule table, and can also add the data priority identification for the data, so that the management core 102 can store the data according to the data priority identification and the identification when the power failure occurs, the power failure data storage of a software and hardware structure suitable for a new generation of double-core smart electric meters is realized, and the effect of the stability of the power failure data storage is improved.
In one embodiment, storing data in a data storage queue according to a remaining power supply time and the data storage queue comprises: and storing the data in the data storage queue through a non-preemptive priority algorithm according to the remaining power supply time and the data storage queue.
In this embodiment, the remaining power supply time may be a time corresponding to the remaining available power of the power storage device, the data storage queue may be a queue formed by using the data based on priorities of the components in the management core 102 and data in the basic application, the management core 102 may store the data in the data storage queue according to the remaining power supply time and the data storage queue, where the remaining power supply time may determine how much data the management core 102 may store, and the data storage queue may determine an order of data storage and data to be stored. Specifically, the management core 102 may store the data in the data storage queue by using a specific algorithm, and specifically, the management core 102 may store the data in the data storage queue by using a non-preemptive priority algorithm. The non-preemptive priority algorithm may be an algorithm for obtaining priority processing after data enters the system in order to take care of urgent jobs. Specifically, the management core 102 may store data with a high priority in the data storage queue, and once a certain data enters a storage processing phase, the management core 102 may execute the storage phase until the storage of the data is completed. For example, with a non-preemptive priority algorithm, data P1 comes first, so data P1 is processed first until it ends, time 10; during the 10 time, data P2 comes first, then P3, P4 and finally P5, and since the data cannot preempt the data of P1, only P1 can be waited for to complete. The priority of P4 is highest in these wait data, so when P1 completes execution, data P4 is executed first. By analogy, the final available storage order is: p1 ═ P4 ═ P3 ═ P5 ═ P2.
Through the embodiment, the management core 102 can store the data in the data storage queue based on the non-preemptive priority algorithm, so that the integrity of data storage is ensured, namely, the data storage is not lost due to the queue insertion of the storage process of other data, the power failure data storage suitable for the software and hardware structure of the new generation of double-core smart electric meter can be realized, and the effect of the stability of the power failure data storage is improved.
In one embodiment, further comprising: if the detected residual power supply time is lower than the processing time corresponding to the data in the current data storage queue, stopping processing the data; the power down process information including the data that has completed processing is sent to the platform management application in the management core 102.
In this embodiment, the remaining power supply time may be the remaining power supply time of the power storage device in the management core 102, the power storage device may be a capacitor, when the management core 102 is powered down, the power storage device may be started, and after the power storage device is started, the power storage device may provide power for the management core 102 after the power down for a certain time, so that the management core 102 may store important data for a certain time, for example, the data may be stored in Nor Flash. The management core 102 may always detect the remaining power supply time of the power storage device in the data storage process after the power failure, if the management core 102 detects that the remaining power supply time is lower than the processing time corresponding to the data in the current data storage queue, for example, the remaining power supply time cannot complete the storage process of the data currently being processed, the management core 102 may stop the processing of the queue and stop the processing of the data, and the management core 102 may further send power failure processing information including the processed data to the platform management application after stopping the processing of the data, for example, which data has been stored, which data has not been stored, and the storage progress of the data that has not been stored, and the platform management application may store and process the information. Where the platform management application may be disposed in the management core 102.
The management core 102 may generate and transmit the power down processing information when the data store queue processing is stopped, that is, may generate the power down processing information when all the data store queues are completely stored, or may generate the power down processing information when the processing of the data store queues is interrupted.
Through the embodiment, the management core 102 can stop the queue processing when the electric quantity storage device is not enough to maintain and store the data in the data storage queue currently stored, so that the data damage is avoided, the power failure data storage of the software and hardware structure of the new generation of double-core smart electric meter is realized, and the stability of the power failure data storage is improved.
In one embodiment, detecting the remaining power time of the power storage device comprises: acquiring a power supply voltage of the electric quantity storage equipment; and determining the residual power supply time corresponding to the electric quantity storage equipment according to the power supply voltage.
In this embodiment, the power storage device may be a device installed in the management core 102 and capable of providing power to the management core 102 when the management core 102 is powered down. The management core 102 may always detect the remaining power supply time of the power storage device during the process of power-down data storage. For example, the management core 102 may calculate and determine the remaining power supply time of the power storage device according to some parameters of the power storage device, specifically, the management core 102 may obtain a power supply voltage of the power storage device, for example, detect a voltage of the super capacitor, and calculate and obtain the remaining power supply time of the power storage device according to the power supply voltage of the power storage device, so that the management core 102 may determine whether to complete data storage according to the remaining power supply time.
Through the embodiment, the management core 102 can determine the remaining power supply time of the power storage device based on the voltage of the power storage device, so that the management core 102 can store data in the data storage queue based on the remaining power supply time, the power failure data storage of a software and hardware structure of a new generation of double-core smart electric meter is realized, and the effect of the stability of the power failure data storage is improved.
In one embodiment, after storing the data in the data storage queue according to the remaining power supply time and the data storage queue, the method further includes: and sending storage completion information to the platform management application in the dual-core intelligent ammeter management core, and setting each component and the basic application in the dual-core intelligent ammeter management core into a low power consumption mode.
In this embodiment, the remaining power supply time may be the remaining power supply time that the power storage device can provide for the management core 102 after the management core 102 is powered down, the data storage queue may include a plurality of data with data priority identifiers, the management core 102 may store the data in the data storage queue, and the management core 102 may change the operation mode of the management core 102 after completing the data storage in the data storage queue, specifically, the management core 102 may receive information that the data storage is completed through the platform management application, and the management core 102 may enter the low power consumption mode after detecting the information that the storage is completed, at this time, each component and the basic application in the management core 102 may be in the low power consumption mode.
Through the embodiment, the management core 102 can set the management core 102 to be in the low power consumption mode after the storage in the data storage queue is completed, so that the system operation for a longer time can be continued, the power failure data storage of software and hardware structures of a new generation of smart electric meters is realized, and the effect of the stability of the power failure data storage is improved.
In one embodiment, as shown in fig. 3, fig. 3 is a schematic flowchart of a power failure data storage method based on a two-core smart meter in another embodiment. The management core 102 may detect a power down signal sent by the metering core 104 through a PWR _ PIN, that is, a power detection PIN, when the power down signal is detected, an electric quantity storage device, such as a super capacitor, in the management core 102 may be started to provide power for data storage of the management core 102, the management core 102 may initiate a storage request for data of each component and a basic application in the management core 102 according to the power down signal, generate a data storage queue for the data of each component and the basic application according to a data priority, and store the data into a Nor Flash of the management core 102, when the storage is completed, the management core 102 may enter a low power consumption mode, for example, the management core 102 may enter a low power consumption processing mode through a low power consumption processing module, so that each component and the basic application in the management core 102 are processed in the low power consumption mode.
Through this embodiment, the management core 102 can utilize the electric quantity storage device in the dual-core smart meter management core, and generate the data storage queue with the data of each component and basic application according to the priority, store the data in the data storage queue according to the priority, can in time store data when the dual-core smart meter loses power, realize the power failure data storage that adapts to the software and hardware structure of the dual-core smart meter of a new generation, and the effect of the stability of the power failure data storage that has improved.
It should be understood that although the various steps in the flowcharts of fig. 2-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-3 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 4, there is provided a power failure data saving device based on a two-core smart meter, including: a response module 500, an acquisition module 502, and a storage module 504, wherein:
the response module 500 is configured to send a start signal to the electric quantity storage device in the management core 102 in response to a power down signal sent by the metering core in the dual-core smart meter through a preset pin, and detect remaining power supply time of the electric quantity storage device.
An obtaining module 502, configured to obtain data priority identifiers corresponding to each component and basic application in a dual-core intelligent ammeter management core, and generate a data storage queue according to a plurality of data priority identifiers and data in each corresponding component and basic application; the data priority identification characterizes the storage priority of the data.
And the storage module 504 is configured to store data in the data storage queue according to the remaining power supply time and the data storage queue.
In one embodiment, the above apparatus further comprises: the generating module is used for determining the priority of the data in each component and the basic application according to a preset priority rule table; the corresponding relation between the data in the plurality of components and the priority is stored in the preset priority rule table; and generating corresponding data priority identification according to the priority of the data in each component and the basic application, and adding the corresponding data priority identification into the data of each component and the basic application.
In an embodiment, the obtaining module 502 is specifically configured to store, according to a sequence from high to low of the data priority identifier, data corresponding to a plurality of data priority identifiers in a queue to be stored, so as to obtain a data storage queue.
In an embodiment, the storage module 504 is specifically configured to store data in the data storage queue through a non-preemptive priority algorithm according to the remaining power supply time and the data storage queue.
In one embodiment, the above apparatus further comprises: the detection module is used for stopping processing the data if the detected residual power supply time is lower than the processing time corresponding to the data in the current data storage queue; and sending power failure processing information comprising the processed data to a platform management application in the dual-core intelligent ammeter management core.
In an embodiment, the response module 500 is specifically configured to obtain a supply voltage of the electric quantity storage device; and determining the residual power supply time corresponding to the electric quantity storage equipment according to the power supply voltage.
In one embodiment, the above apparatus further comprises: and the setting module is used for sending storage completion information to the platform management application in the dual-core intelligent ammeter management core and setting each component and the basic application in the dual-core intelligent ammeter management core into a low power consumption mode.
For specific limitations of the device for saving power-down data based on the two-core smart meter, reference may be made to the above limitations of the method for saving power-down data based on the two-core smart meter, and details are not repeated here. All modules in the power failure data storage device based on the double-core intelligent electric meter can be completely or partially realized through software, hardware and a combination of the software and the hardware. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a two-core smart meter, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing data of each component and basic application in the double-core intelligent ammeter management core. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by the processor to realize the power failure data storage method based on the double-core intelligent electric meter.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided and comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to realize the power failure data storage method based on the two-core smart electric meter.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the method for saving power failure data based on the dual-core smart electric meter is implemented.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A power failure data storage method based on a double-core intelligent electric meter is characterized by being applied to a management core and comprising the following steps:
responding to a power failure signal sent by a metering core in a dual-core intelligent ammeter through a preset pin, sending a starting signal to electric quantity storage equipment in a management core of the dual-core intelligent ammeter, and detecting the residual power supply time of the electric quantity storage equipment;
acquiring data priority identifications corresponding to each component and basic application in the double-core intelligent ammeter management core, and generating a data storage queue according to the data priority identifications and the data in each component and basic application corresponding to the data priority identifications; the data priority identification characterizes the storage priority of the data;
and storing the data in the data storage queue according to the remaining power supply time and the data storage queue.
2. The method according to claim 1, wherein before obtaining the data priority corresponding to each component and basic application in the dual-core smart meter management core, the method further comprises:
determining the priority of the data in each component and the basic application according to a preset priority rule table; the preset priority rule table stores the corresponding relation between the data in the components and the priority;
and generating corresponding data priority identification according to the priority of the data in each component and the basic application, and adding the corresponding data priority identification into the data of each component and the basic application.
3. The method of claim 1, wherein generating a data storage queue according to the plurality of data priority identifiers and their corresponding data in the respective components and base applications comprises:
and storing the data corresponding to the data priority identifications into a queue to be stored according to the sequence of the data priority identifications from high to low to obtain the data storage queue.
4. The method of claim 1, wherein storing the data in the data storage queue according to the remaining power time and the data storage queue comprises:
and storing the data in the data storage queue through a non-preemptive priority algorithm according to the residual power supply time and the data storage queue.
5. The method of claim 1, further comprising:
if the remaining power supply time is detected to be lower than the processing time corresponding to the data in the data storage queue, stopping processing the data;
and sending power failure processing information comprising the processed data to a platform management application in the dual-core intelligent ammeter management core.
6. The method of claim 1, wherein the detecting the remaining power time of the power storage device comprises:
acquiring a power supply voltage of the electric quantity storage equipment;
and determining the residual power supply time corresponding to the electric quantity storage equipment according to the power supply voltage.
7. The method of claim 1, wherein after storing the data in the data storage queue according to the remaining power time and the data storage queue, further comprising:
and sending storage completion information to a platform management application in the dual-core intelligent ammeter management core, and setting each component and basic application in the dual-core intelligent ammeter management core into a low power consumption mode.
8. The utility model provides a power down data save set based on two core smart electric meters which characterized in that is applied to the management core, the device includes:
the response module is used for responding to a power failure signal sent by a metering core in the double-core intelligent ammeter through a preset pin, sending a starting signal to electric quantity storage equipment in a management core of the double-core intelligent ammeter, and detecting the residual power supply time of the electric quantity storage equipment;
the acquisition module is used for acquiring data priority identifications corresponding to each component and basic application in the double-core intelligent ammeter management core and generating a data storage queue according to the data priority identifications and the data corresponding to the components and the basic application; the data priority identification characterizes the storage priority of the data;
and the storage module is used for storing the data in the data storage queue according to the residual power supply time and the data storage queue.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110017504.4A 2021-01-07 2021-01-07 Power failure data storage method and device based on double-core intelligent ammeter Active CN112667643B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110017504.4A CN112667643B (en) 2021-01-07 2021-01-07 Power failure data storage method and device based on double-core intelligent ammeter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110017504.4A CN112667643B (en) 2021-01-07 2021-01-07 Power failure data storage method and device based on double-core intelligent ammeter

Publications (2)

Publication Number Publication Date
CN112667643A true CN112667643A (en) 2021-04-16
CN112667643B CN112667643B (en) 2023-09-15

Family

ID=75413463

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110017504.4A Active CN112667643B (en) 2021-01-07 2021-01-07 Power failure data storage method and device based on double-core intelligent ammeter

Country Status (1)

Country Link
CN (1) CN112667643B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626257A (en) * 2021-07-20 2021-11-09 烽火通信科技股份有限公司 Method, device and equipment for protecting and recovering service of Internet of things terminal in case of power failure

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080010212A1 (en) * 2006-06-22 2008-01-10 Itron, Inc. System and method for storing metering data while increasing memory endurance
CN102207520A (en) * 2011-03-31 2011-10-05 华立仪表集团股份有限公司 Electrical metering system for electrical vehicle and metering method thereof
CN105675977A (en) * 2016-03-02 2016-06-15 江苏林洋能源股份有限公司 Electric energy meter and method for pre-stage and post-stage stage power failure detection and control of power switching-off by magnetic latching relay and data storage
CN106054723A (en) * 2016-06-28 2016-10-26 厦门宏发开关设备有限公司 Intelligent comprehensive protection switch task scheduling system
CN106571887A (en) * 2016-10-17 2017-04-19 国家电网公司 Management core and metering core clock synchronization processing method and device for dual-core intelligent electric energy meter
CN108226590A (en) * 2017-12-27 2018-06-29 深圳市科陆电子科技股份有限公司 A kind of method and system for settling accounts electric energy meter power failure data
CN111583622A (en) * 2020-04-28 2020-08-25 南方电网数字电网研究院有限公司 Metering information distribution processing system and method of double-core intelligent ammeter management unit
CN111651304A (en) * 2020-07-16 2020-09-11 南方电网数字电网研究院有限公司 Software recovery method and device based on double-core intelligent electric meter and computer equipment
CN111768608A (en) * 2020-07-16 2020-10-13 南方电网数字电网研究院有限公司 Data transmission method and device based on double-core intelligent electric meter and computer equipment
CN111857777A (en) * 2020-07-16 2020-10-30 南方电网数字电网研究院有限公司 System updating method and device based on double-core intelligent electric meter and computer equipment
CN212301660U (en) * 2020-04-30 2021-01-05 广州瓦良格机器人科技有限公司 Single-phase safety electric meter

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080010212A1 (en) * 2006-06-22 2008-01-10 Itron, Inc. System and method for storing metering data while increasing memory endurance
CN102207520A (en) * 2011-03-31 2011-10-05 华立仪表集团股份有限公司 Electrical metering system for electrical vehicle and metering method thereof
CN105675977A (en) * 2016-03-02 2016-06-15 江苏林洋能源股份有限公司 Electric energy meter and method for pre-stage and post-stage stage power failure detection and control of power switching-off by magnetic latching relay and data storage
CN106054723A (en) * 2016-06-28 2016-10-26 厦门宏发开关设备有限公司 Intelligent comprehensive protection switch task scheduling system
CN106571887A (en) * 2016-10-17 2017-04-19 国家电网公司 Management core and metering core clock synchronization processing method and device for dual-core intelligent electric energy meter
CN108226590A (en) * 2017-12-27 2018-06-29 深圳市科陆电子科技股份有限公司 A kind of method and system for settling accounts electric energy meter power failure data
CN111583622A (en) * 2020-04-28 2020-08-25 南方电网数字电网研究院有限公司 Metering information distribution processing system and method of double-core intelligent ammeter management unit
CN212301660U (en) * 2020-04-30 2021-01-05 广州瓦良格机器人科技有限公司 Single-phase safety electric meter
CN111651304A (en) * 2020-07-16 2020-09-11 南方电网数字电网研究院有限公司 Software recovery method and device based on double-core intelligent electric meter and computer equipment
CN111768608A (en) * 2020-07-16 2020-10-13 南方电网数字电网研究院有限公司 Data transmission method and device based on double-core intelligent electric meter and computer equipment
CN111857777A (en) * 2020-07-16 2020-10-30 南方电网数字电网研究院有限公司 System updating method and device based on double-core intelligent electric meter and computer equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
WENXIONG MO 等: "Electric Power Meter Classification Based on BOW", 《ICSCA \'19: PROCEEDINGS OF THE 2019 8TH INTERNATIONAL CONFERENCE ON SOFTWARE AND COMPUTER APPLICATIONS》, pages 353 *
沈帅言: "低功耗的高精度智能电表的设计与实现", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》, no. 6, pages 042 - 1177 *
陶军 等: "一种基于SoC的三相智能电表设计", 《江苏电机工程》, no. 4, pages 48 - 50 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626257A (en) * 2021-07-20 2021-11-09 烽火通信科技股份有限公司 Method, device and equipment for protecting and recovering service of Internet of things terminal in case of power failure
CN113626257B (en) * 2021-07-20 2024-01-30 烽火通信科技股份有限公司 Method, device and equipment for protecting and recovering service under power failure of Internet of things terminal

Also Published As

Publication number Publication date
CN112667643B (en) 2023-09-15

Similar Documents

Publication Publication Date Title
WO2018133230A1 (en) Control method and apparatus for micro-grid system
CN110729790B (en) Charging method and device, computer equipment and storage medium
TWI692647B (en) Server, maintenance terminal, power battery maintenance method, device and system
CN106338690A (en) Standby battery detection method, device and system and power supply method
CN104122508A (en) Online monitoring method for backup power supply system of intelligent power distribution terminal
CN105379058A (en) Rapid charging method for storage cell, rapid charging system, and program
US9933488B2 (en) Open circuit voltage checking for a battery system
CN112667643B (en) Power failure data storage method and device based on double-core intelligent ammeter
CN111239621A (en) Storage battery remote boosting and capacity checking method, device, equipment and storage medium
US11846677B2 (en) Method and apparatus for monitoring battery backup unit, server, and readable storage medium
CN113376537A (en) Capacity calibration method of energy storage system, battery management system and inversion system
CN115603351B (en) Energy storage system processing method and device, processor and electronic equipment
CN109495588A (en) Task processing method, device, computer equipment and the storage medium of front end processor
CN115549247A (en) Mixed power management method and system
CN104103860A (en) Method for controlling self-check of intelligent cell, cell controller and intelligent cell
CN106790188A (en) The main frame collocation method of battery management system, device and battery management system
CN105281979A (en) Load test method for virtualization application platform
CN110618388B (en) Battery performance detection method and device
KR102652000B1 (en) Power management method performing power management apparatus managing energy storage system based on power conversion system for connection of different batteries and power management apparatus therefor
CN104679133A (en) Computer device
CN115080280B (en) Multi-time scale data fusion edge computing platform control system and method
CN117375158A (en) Intelligent operation and maintenance method and system for vehicle retired battery pack echelon energy storage system
KR20230064967A (en) Apparatus and method for processing bms data
CN117421260A (en) RAID card power-down protection method, device, equipment and storage medium
CN116879792A (en) Power supply detection method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant