CN112328556A - Electric energy curve data storage method, electric energy meter and computer readable storage medium - Google Patents

Electric energy curve data storage method, electric energy meter and computer readable storage medium Download PDF

Info

Publication number
CN112328556A
CN112328556A CN202011114713.2A CN202011114713A CN112328556A CN 112328556 A CN112328556 A CN 112328556A CN 202011114713 A CN202011114713 A CN 202011114713A CN 112328556 A CN112328556 A CN 112328556A
Authority
CN
China
Prior art keywords
electric energy
data
time
real
energy data
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.)
Pending
Application number
CN202011114713.2A
Other languages
Chinese (zh)
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.)
Wasion Group Co Ltd
Original Assignee
Wasion Group 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 Wasion Group Co Ltd filed Critical Wasion Group Co Ltd
Priority to CN202011114713.2A priority Critical patent/CN112328556A/en
Publication of CN112328556A publication Critical patent/CN112328556A/en
Priority to PCT/CN2021/084129 priority patent/WO2022077874A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1737Details of further file system functions for reducing power consumption or coping with limited storage space, e.g. in mobile devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Human Computer Interaction (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Human Resources & Organizations (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an electric energy curve data storage method. The electric energy curve data storage method comprises the following steps: acquiring real-time electric energy data every other preset acquisition period; detecting whether the current real-time electric energy data is reference electric energy data of a preset storage period or not; if the current real-time electric energy data is the reference electric energy data of a preset storage period, taking the acquisition time of the current real-time electric energy data as a timestamp of the current storage period; if the current real-time electric energy data is not the reference electric energy data of the preset storage period, calculating to obtain incremental electric energy data according to the real-time electric energy data; and respectively storing the reference electric energy data, the time stamp and the incremental electric energy data of each preset storage period according to the preset storage periods. The invention also discloses an electric energy meter and a computer readable storage medium. The invention can realize the compression and storage of the electric energy curve data, thereby reducing the occupied space of the memory and reducing the storage pressure of the memory.

Description

Electric energy curve data storage method, electric energy meter and computer readable storage medium
Technical Field
The invention relates to the technical field of data storage, in particular to an electric energy curve data storage method, an electric energy meter and a computer readable storage medium.
Background
In order to count and manage the electricity consumption of users, some basic electric energy data are stored in the electric energy meter. And a series of electric energy data storage points with the same time interval form electric energy curve data. Along with the increase of the power consumption of users, the storage requirement on the electric energy data is higher and higher, the storage time interval period is shorter and shorter, and the required storage time is longer and longer. At present, positive and negative active total electric energy with an interval of 1 minute and four-quadrant reactive total electric energy with an interval of 15 minutes are generally required to be stored, and the total recorded length is not less than 1 year. The conventional electric energy curve data storage scheme adopts a non-compression storage scheme, that is, the electric energy curve data storage scheme is sequentially stored according to time points with interval periods as time change lengths, and the storage data volume of the electric energy curve data storage scheme is large, so that a large amount of space (a Memory with small capacity or even a Memory which cannot meet the storage requirement) of an electric energy meter Flash Memory is occupied, and the storage pressure of the Memory is large.
Disclosure of Invention
The invention mainly aims to provide an electric energy curve data storage method, an electric energy meter and a computer readable storage medium, and aims to realize the compression storage of electric energy curve data, so that the occupied space of a memory is reduced, and the storage pressure of the memory is reduced.
In order to achieve the above object, the present invention provides an electric energy curve data storage method, including:
acquiring real-time electric energy data every other preset acquisition period;
detecting whether the current real-time electric energy data is reference electric energy data of a preset storage period or not;
if the current real-time electric energy data is the reference electric energy data of a preset storage period, taking the acquisition time of the current real-time electric energy data as a timestamp of the current storage period;
if the current real-time electric energy data is not the reference electric energy data of the preset storage period, calculating to obtain incremental electric energy data according to the real-time electric energy data;
and respectively storing the reference electric energy data, the time stamp and the incremental electric energy data of each preset storage period according to the preset storage periods.
Optionally, the step of acquiring the real-time electric energy data every preset acquisition period includes:
acquiring real-time forward active total electric energy and real-time reverse active total electric energy every a first preset acquisition period;
and acquiring real-time first-quadrant reactive total electric energy, real-time second-quadrant reactive total electric energy, real-time third-quadrant reactive total electric energy and real-time fourth-quadrant reactive total electric energy every other second preset acquisition period.
Optionally, the step of detecting whether the current real-time electric energy data is the reference electric energy data of the preset storage period includes:
detecting whether the acquisition time of the current real-time electric energy data is the initial time of a preset storage period or not;
if the acquisition time of the current real-time electric energy data is the initial time of a preset storage period, judging that the current real-time electric energy data is the reference electric energy data of the preset storage period;
and if the acquisition time of the current real-time electric energy data is not the initial time of the preset storage period, judging that the current real-time electric energy data is not the reference electric energy data of the preset storage period.
Optionally, the step of calculating incremental electric energy data according to the real-time electric energy data includes:
and calculating the difference value between the electric energy data of adjacent acquisition time according to the real-time electric energy data to obtain incremental electric energy data.
Optionally, the preset storage period is every other day.
Optionally, the step of storing the reference electrical energy data, the timestamp, and the incremental electrical energy data of each preset storage period according to the preset storage period includes:
and respectively storing the reference electric energy data, the timestamp and the incremental electric energy data of each preset storage period into corresponding data blocks according to the preset storage periods.
Optionally, after the step of storing the reference electrical energy data, the timestamp, and the incremental electrical energy data of each preset storage period into the corresponding data block, the method further includes:
storing the data blocks and acquiring the storage address of each data block;
and constructing a mapping relation between each data block and the storage address according to the time stamp of the data block.
Optionally, the electric energy curve data storage method further comprises:
when a data query request is received, acquiring target query time according to the data query request;
and determining a target storage address according to the target query time and the mapping relation, and acquiring target query data according to the target storage address.
In addition, to achieve the above object, the present invention also provides an electric energy meter, including: a memory, a processor and an electrical energy profile data storage program stored on the memory and executable on the processor, the electrical energy profile data storage program, when executed by the processor, implementing the steps of the electrical energy profile data storage method as described above.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, on which an electrical energy curve data storage program is stored, which when executed by a processor implements the steps of the electrical energy curve data storage method as described above.
The invention provides an electric energy curve data storage method, an electric energy meter and a computer readable storage medium, wherein real-time electric energy data are acquired at intervals of a preset acquisition period; then, detecting whether the current real-time electric energy data is reference electric energy data of a preset storage period; if the current real-time electric energy data is the reference electric energy data of a preset storage period, taking the acquisition time of the current real-time electric energy data as a timestamp of the current storage period; if the current real-time electric energy data is not the reference electric energy data of the preset storage period, calculating to obtain incremental electric energy data according to the real-time electric energy data; and respectively storing the reference electric energy data, the time stamp and the incremental electric energy data of each preset storage period according to the preset storage periods. Through the mode, the freezing time is updated in the preset storage period, so that the storage quantity of the storage time is reduced, and the space for storing the time information is saved. Meanwhile, a method of separating the reference electric quantity data and the increment electric quantity data is used, so that the electric energy data of each preset storage period only needs to be stored in the increment part, the data volume can be effectively compressed, and the storage space of the electric energy data is saved. Therefore, the invention can reduce the occupied space of the memory and reduce the storage pressure of the memory by realizing the compression storage of the electric energy curve data. In addition, the subsequent retrieval efficiency can be improved.
Drawings
Fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of the electric energy curve data storage method according to the present invention;
FIG. 3 is a schematic diagram of a prior art electric energy curve data storage method;
fig. 4 is a schematic diagram of a data storage method related to the electric energy curve data storage method of the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be an electric energy meter.
As shown in fig. 1, the electric energy meter may include: a processor 1001, such as a CPU, a communication bus 1002, a network interface 1003, and a memory 1004. Wherein a communication bus 1002 is used to enable connective communication between these components. The network interface 1003 may optionally include a standard wired interface, a wireless interface (e.g., a Wi-Fi interface). The Memory 1004 may be a high-speed RAM Memory or a non-volatile Memory such as a Flash Memory. The memory 1004 may also be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, the memory 1004, which is a kind of computer storage medium, may include therein an operating system, a network communication module, and an electric energy curve data storage program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client and performing data communication with the client; and the processor 1001 may be configured to call the electric energy curve data storage program stored in the memory 1004 and perform the following operations:
acquiring real-time electric energy data every other preset acquisition period;
detecting whether the current real-time electric energy data is reference electric energy data of a preset storage period or not;
if the current real-time electric energy data is the reference electric energy data of a preset storage period, taking the acquisition time of the current real-time electric energy data as a timestamp of the current storage period;
if the current real-time electric energy data is not the reference electric energy data of the preset storage period, calculating to obtain incremental electric energy data according to the real-time electric energy data;
and respectively storing the reference electric energy data, the time stamp and the incremental electric energy data of each preset storage period according to the preset storage periods.
Further, the processor 1001 may call the electric energy curve data storage program stored in the memory 1004, and further perform the following operations:
acquiring real-time forward active total electric energy and real-time reverse active total electric energy every a first preset acquisition period;
and acquiring real-time first-quadrant reactive total electric energy, real-time second-quadrant reactive total electric energy, real-time third-quadrant reactive total electric energy and real-time fourth-quadrant reactive total electric energy every other second preset acquisition period.
Further, the processor 1001 may call the electric energy curve data storage program stored in the memory 1004, and further perform the following operations:
detecting whether the acquisition time of the current real-time electric energy data is the initial time of a preset storage period or not;
if the acquisition time of the current real-time electric energy data is the initial time of a preset storage period, judging that the current real-time electric energy data is the reference electric energy data of the preset storage period;
and if the acquisition time of the current real-time electric energy data is not the initial time of the preset storage period, judging that the current real-time electric energy data is not the reference electric energy data of the preset storage period.
Further, the processor 1001 may call the electric energy curve data storage program stored in the memory 1004, and further perform the following operations:
and calculating the difference value between the electric energy data of adjacent acquisition time according to the real-time electric energy data to obtain incremental electric energy data.
Further, the preset storage period is every other day.
Further, the processor 1001 may call the electric energy curve data storage program stored in the memory 1004, and further perform the following operations:
and respectively storing the reference electric energy data, the timestamp and the incremental electric energy data of each preset storage period into corresponding data blocks according to the preset storage periods.
Further, the processor 1001 may call the electric energy curve data storage program stored in the memory 1004, and further perform the following operations:
storing the data blocks and acquiring the storage address of each data block;
and constructing a mapping relation between each data block and the storage address according to the time stamp of the data block.
Further, the processor 1001 may call the electric energy curve data storage program stored in the memory 1004, and further perform the following operations:
when a data query request is received, acquiring target query time according to the data query request;
and determining a target storage address according to the target query time and the mapping relation, and acquiring target query data according to the target storage address.
Based on the hardware structure, various embodiments of the electric energy curve data storage method are provided.
The invention provides an electric energy curve data storage method.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the electric energy curve data storage method according to the present invention.
In this embodiment, the electric energy curve data storage method includes:
step S10, acquiring real-time electric energy data every other preset acquisition period;
at present, positive and negative active total electric energy with an interval of 1 minute and four-quadrant reactive total electric energy with an interval of 15 minutes are generally required to be stored, and the total recorded length is not less than 1 year. While the traditional electric energy curve data storage scheme adopts a non-compression storage scheme, namely, the data are sequentially stored according to time points with interval periods as time change lengths, as shown in fig. 3, aiming at active total electric energy, each time point corresponds to a forward active total electric energy and a reverse active total electric energy; aiming at the reactive total electric energy, each time point corresponds to a first quadrant reactive total electric energy, a second quadrant reactive total electric energy, a third quadrant reactive total electric energy and a fourth quadrant reactive total electric energy. Correspondingly, the example that the electric energy data is 5 bytes is taken as an example, when the electric energy data is stored, for the stored active total electric energy, the data stored at each time point respectively include 5 bytes of time (year, month, day, time), 5 bytes of forward active total electric energy, and 5 bytes of reverse active total electric energy. For the stored reactive total electric energy, the data stored at each time point respectively comprise 5 bytes of time (year, month, day and time), 5 bytes of first quadrant reactive total electric energy, 5 bytes of second quadrant reactive total electric energy, 5 bytes of third quadrant reactive total electric energy and 5 bytes of fourth quadrant reactive total electric energy.
Taking 366 days as an example, when the total recording length is 366 days, the storage space required for storing the positive and negative active total electric energy is (the number of bytes in the storage time + the number of bytes in the positive active total electric energy + the number of bytes in the reverse active total electric energy) × (5+2 × 5) × (24 × 60) × 366 × 7905600byte (byte), and when the storage space required for storing the four-quadrant reactive total electric energy is (the number of bytes in the storage time + the number of bytes in the first quadrant reactive total electric energy + the number of bytes in the second quadrant reactive total electric energy + the number of bytes in the third quadrant reactive total electric energy + the number of bytes in the fourth quadrant reactive total electric energy) × (5+ 4) × 878400 byte), the total storage space required for storing the electric energy curve data is 7905600+878400 × 8784000 byte.
From the above calculations, it can be seen that for the uncompressed data storage scheme, the required data storage space is about 8.377M bytes. In order to reduce the cost, the current electric energy meter generally adopts a flash memory (with the capacity not exceeding 4M byte) on a single chip, and obviously cannot meet the storage requirement of electric energy curve data.
In view of this, the electric energy curve data storage method according to the embodiment of the present invention is proposed, and the execution terminal of the electric energy curve data storage method is an electric energy meter.
And acquiring real-time electric energy data every other preset acquisition period. Wherein, the type of the real-time electric energy data comprises: the system comprises active total electric energy and reactive total electric energy, wherein the active total electric energy is divided into forward active total electric energy and reverse active total electric energy, and the reactive total electric energy is divided into first-quadrant reactive total electric energy, second-quadrant reactive total electric energy, third-quadrant reactive total electric energy and fourth-quadrant reactive total electric energy.
Specifically, step S10 includes:
step a11, acquiring real-time forward active total electric energy and real-time reverse active total electric energy every a first preset acquisition period;
step a12, acquiring real-time first quadrant reactive total electric energy, real-time second quadrant reactive total electric energy, real-time third quadrant reactive total electric energy and real-time fourth quadrant reactive total electric energy every other second preset acquisition period.
Due to the fact that the acquisition periods of different types of electric energy data are different, real-time forward active total electric energy and real-time reverse active total electric energy can be acquired every first preset acquisition period; meanwhile, real-time first-quadrant reactive total electric energy, real-time second-quadrant reactive total electric energy, real-time third-quadrant reactive total electric energy and real-time fourth-quadrant reactive total electric energy are obtained every other second preset obtaining period, wherein the first preset obtaining period is every other 1 minute, and the second preset obtaining period is every other 15 minutes.
Step S20, detecting whether the current real-time electric energy data is the reference electric energy data of a preset storage period;
after the real-time electric energy data is acquired, whether the current real-time electric energy data (namely the currently acquired real-time electric energy data) is the reference electric energy data of the preset storage period is detected. The reference electric quantity data is optionally initial data of a preset storage period, and the initial data comprises initial data of forward active total electric quantity, initial data of reverse active total electric quantity and initial data of first, second, third and fourth quadrant reactive electric quantities.
Specifically, step S20 includes:
step a21, detecting whether the acquisition time of the current real-time electric energy data is the initial time of a preset storage period;
step a22, if the acquisition time of the current real-time electric energy data is the initial time of the preset storage period, determining that the current real-time electric energy data is the reference electric energy data of the preset storage period;
in step a23, if the obtaining time of the current real-time electric energy data is not the initial time of the preset storage period, it is determined that the current real-time electric energy data is not the reference electric energy data of the preset storage period.
The specific detection mode is as follows:
whether the obtaining time of the current real-time electric energy data is the initial time of a preset storage period is detected, wherein the preset storage period is optionally every other day, and certainly, in specific implementation, every other week, every other month and the like can be set, but in comparison, the subsequent searching is more convenient every other day. For convenience of the following description, the preset storage period is set to every other day as an example. The initial time is optionally set to 0 hours, 0 minutes and 0 seconds per day, thereby facilitating detection and subsequent search.
If the acquisition time of the current real-time electric energy data is the initial time of a preset storage period, judging that the current real-time electric energy data is the reference electric energy data of the preset storage period; and if the acquisition time of the current real-time electric energy data is not the initial time of the preset storage period, judging that the current real-time electric energy data is not the reference electric energy data of the preset storage period.
If the current real-time electric energy data is the reference electric energy data of the preset storage period, executing step S31, and taking the obtaining time of the current real-time electric energy data as the timestamp of the current storage period;
and then, when the current real-time electric energy data is detected to be the reference electric energy data of the preset storage period, taking the acquisition time of the current real-time electric energy data as a time stamp of the current storage period, wherein the time stamp comprises two dimensions of date and time and can be represented in a form of time, year, month, date, time and point.
If the current real-time electric energy data is not the reference electric energy data of the preset storage period, executing step S32, and calculating to obtain incremental electric energy data according to the real-time electric energy data;
if the current real-time electric energy data is not the reference electric energy data of the preset storage period, calculating to obtain incremental electric energy data according to the real-time electric energy data;
specifically, step S32 includes:
and calculating the difference value between the electric energy data of adjacent acquisition time according to the real-time electric energy data to obtain incremental electric energy data.
When the incremental electric energy data are calculated, the difference value between the electric energy data of adjacent acquisition time is calculated according to the real-time electric energy data, namely the current real-time electric energy data is subtracted by the last real-time electric energy data to obtain the incremental electric energy data. It will be appreciated that the same type of data needs to be guaranteed when performing the difference operation. For example, when the total forward active power at the current obtaining time is 1001.2, and the total forward active power at the last obtaining time is 1000.2, the current incremental power data is 1001.2-1000.2 — 1.0.
And step S40, storing the reference electric energy data, the time stamp and the incremental electric energy data of each preset storage period according to the preset storage periods respectively.
And finally, respectively storing the reference electric energy data, the time stamp and the incremental electric energy data of each preset storage period according to the preset storage periods. That is, the data of each preset storage period is stored separately, for example, the data of the first day is stored in the first Block data Block or the first folder, the data of the second day is stored in the second Block data Block or the second folder, … …, and the data of the nth day is stored in the nth Block data Block or the nth folder.
By storing in the above manner, the storage result can be as shown in fig. 4, and each Block data Block stores 3 parts of contents: the time stamp, the reference electric quantity data and the incremental electric quantity data are provided, and only one time stamp is arranged in each preset storage period, so that the storage space can be saved. In addition, the number of data bits of the incremental charge data is typically less than the number of bits of the normal charge data, thereby further saving storage space. When the data in the above example is stored in the data storage manner in the embodiment of the present invention, the total storage space required for storing the positive and negative active total electric energy (the number of bytes of the timestamp + the number of bytes of the reference electric quantity data of the active total electric energy + the number of bytes of the incremental electric quantity data of the active total electric energy) × (5+2 × 5+ (2 +2 × 24 × 60)) × 366 × 2106330byte (where the incremental electric quantity data occupies 2 bytes as an example) may be calculated, and the total storage space required for storing the four-quadrant reactive total electric energy (the number of bytes of the timestamp + the number of bytes of the reference electric quantity data of the four-quadrant reactive total electric energy + the number of bytes of the incremental electric quantity data of the four-quadrant reactive total electric energy) × (5+4 × 5+ (2 +4 × 96)) × 366 × 290238 byte) may be calculated, and then the total storage space required for the electric energy curve data is 2106330+290238 × 2396568 ×.
Compared with the existing non-compressed data storage method, the data compression storage method provided by the embodiment of the invention has the advantages that the compression ratio is 73.4% for the total active energy, 67% for the total four-quadrant reactive energy and 72.7% for the total storage space, so that the occupied space of the memory is greatly reduced, the storage pressure of the memory is reduced, and the subsequent retrieval efficiency is improved.
The embodiment of the invention provides an electric energy curve data storage method, which comprises the steps of acquiring real-time electric energy data every other preset acquisition period; then, detecting whether the current real-time electric energy data is reference electric energy data of a preset storage period; if the current real-time electric energy data is the reference electric energy data of a preset storage period, taking the acquisition time of the current real-time electric energy data as a timestamp of the current storage period; if the current real-time electric energy data is not the reference electric energy data of the preset storage period, calculating to obtain incremental electric energy data according to the real-time electric energy data; and respectively storing the reference electric energy data, the time stamp and the incremental electric energy data of each preset storage period according to the preset storage periods. Through the mode, the freezing time is updated in the preset storage period, so that the storage quantity of the storage time is reduced, and the space for storing the time information is saved. Meanwhile, a method of separating the reference electric quantity data and the increment electric quantity data is used, so that the electric energy data of each preset storage period only needs to be stored in the increment part, the data volume can be effectively compressed, and the storage space of the electric energy data is saved. Therefore, the invention can reduce the occupied space of the memory and reduce the storage pressure of the memory by realizing the compression storage of the electric energy curve data. In addition, the subsequent retrieval efficiency can be improved.
Further, based on the above-described first embodiment, a second embodiment of the electric energy curve data storage method of the present invention is proposed.
In this embodiment, the step S40 includes:
step A41, storing the reference electric energy data, the time stamp and the incremental electric energy data of each preset storage period into corresponding data blocks according to the preset storage periods.
In this embodiment, the reference electrical energy data, the timestamp, and the incremental electrical energy data of each preset storage period may be stored in the corresponding data blocks according to the preset storage period. As shown in fig. 4, taking every other day as an example of a preset storage period, the reference power data, the time stamp and the incremental power data of each day are respectively stored in different data blocks.
Further, after the step a41, the method for storing electric energy curve data further includes:
b, storing the data blocks and acquiring the storage address of each data block;
and step C, constructing a mapping relation between each data block and the storage address according to the time stamp of the data block.
After the electric energy data are stored in the corresponding data blocks, the data blocks can be stored, the storage addresses of the data blocks are obtained, and then the mapping relation between the data blocks and the storage addresses is built according to the time stamps of the data blocks, so that the data query can be carried out subsequently.
Further, based on the above-described second embodiment, a third embodiment of the electric energy curve data storage method of the present invention is proposed.
In this embodiment, after the step C, the electric energy curve data storage method further includes:
step D, when a data query request is received, acquiring target query time according to the data query request;
in this embodiment, a worker or a user may initiate a data query request through corresponding software or application, where the data query request carries a time that the worker or the user wants to query. Correspondingly, when the electric energy meter receives the data query request, the target query time is obtained according to the data query request.
And E, determining a target storage address according to the target query time and the mapping relation, and acquiring target query data according to the target storage address.
And then, determining to obtain a target storage address according to the target query time and the mapping relation between the constructed data block and the storage address, further obtaining target query data according to the target storage address, and returning the target query data to a query end for a worker or a user to check.
Of course, the data query request may also carry a data type, and correspondingly, after the target data block is determined according to the target storage address, data corresponding to the data type is obtained, and then returned to the query end for a worker or a user to view.
In this embodiment, when a data query request is received, a storage address of data may be determined according to target query time therein and a mapping relationship between a data block and the storage address established in advance, and then corresponding target query data is obtained by searching for the staff or the user to view.
The invention also provides a computer-readable storage medium, on which an electrical energy curve data storage program is stored, which, when being executed by a processor, carries out the steps of the electrical energy curve data storage method according to any one of the above embodiments.
The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the above-mentioned electric energy curve data storage method, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An electric energy curve data storage method is characterized by comprising the following steps:
acquiring real-time electric energy data every other preset acquisition period;
detecting whether the current real-time electric energy data is reference electric energy data of a preset storage period or not;
if the current real-time electric energy data is the reference electric energy data of a preset storage period, taking the acquisition time of the current real-time electric energy data as a timestamp of the current storage period;
if the current real-time electric energy data is not the reference electric energy data of the preset storage period, calculating to obtain incremental electric energy data according to the real-time electric energy data;
and respectively storing the reference electric energy data, the time stamp and the incremental electric energy data of each preset storage period according to the preset storage periods.
2. The method for storing electric energy curve data according to claim 1, wherein the step of acquiring real-time electric energy data every predetermined acquisition period comprises:
acquiring real-time forward active total electric energy and real-time reverse active total electric energy every a first preset acquisition period;
and acquiring real-time first-quadrant reactive total electric energy, real-time second-quadrant reactive total electric energy, real-time third-quadrant reactive total electric energy and real-time fourth-quadrant reactive total electric energy every other second preset acquisition period.
3. The electric energy curve data storage method according to claim 1, wherein the step of detecting whether the current real-time electric energy data is the reference electric energy data of the preset storage period comprises:
detecting whether the acquisition time of the current real-time electric energy data is the initial time of a preset storage period or not;
if the acquisition time of the current real-time electric energy data is the initial time of a preset storage period, judging that the current real-time electric energy data is the reference electric energy data of the preset storage period;
and if the acquisition time of the current real-time electric energy data is not the initial time of the preset storage period, judging that the current real-time electric energy data is not the reference electric energy data of the preset storage period.
4. The method of storing electrical energy curve data according to claim 1, wherein said step of calculating incremental electrical energy data from said real-time electrical energy data comprises:
and calculating the difference value between the electric energy data of adjacent acquisition time according to the real-time electric energy data to obtain incremental electric energy data.
5. The method for storing electrical energy profile data according to claim 1, wherein said predetermined storage period is every other day.
6. The electric energy curve data storage method according to any one of claims 1 to 5, wherein the step of storing the reference electric energy data, the time stamp and the incremental electric energy data for each preset storage period separately for each preset storage period comprises:
and respectively storing the reference electric energy data, the timestamp and the incremental electric energy data of each preset storage period into corresponding data blocks according to the preset storage periods.
7. The method for storing electric energy curve data according to claim 6, wherein the step of storing the reference electric energy data, the time stamp and the incremental electric energy data of each preset storage period into the corresponding data blocks respectively further comprises:
storing the data blocks and acquiring the storage address of each data block;
and constructing a mapping relation between each data block and the storage address according to the time stamp of the data block.
8. The electrical energy profile data storage method according to claim 7, further comprising:
when a data query request is received, acquiring target query time according to the data query request;
and determining a target storage address according to the target query time and the mapping relation, and acquiring target query data according to the target storage address.
9. An electric energy meter, characterized in that the electric energy meter comprises: memory, processor and electrical energy curve data storage program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the electrical energy curve data storage method according to one of claims 1 to 8.
10. A computer-readable storage medium, in which an electrical energy curve data storage program is stored, which, when being executed by a processor, carries out the steps of the electrical energy curve data storage method according to one of claims 1 to 8.
CN202011114713.2A 2020-10-16 2020-10-16 Electric energy curve data storage method, electric energy meter and computer readable storage medium Pending CN112328556A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011114713.2A CN112328556A (en) 2020-10-16 2020-10-16 Electric energy curve data storage method, electric energy meter and computer readable storage medium
PCT/CN2021/084129 WO2022077874A1 (en) 2020-10-16 2021-03-30 Electric energy curve data storage method, electric energy meter, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011114713.2A CN112328556A (en) 2020-10-16 2020-10-16 Electric energy curve data storage method, electric energy meter and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112328556A true CN112328556A (en) 2021-02-05

Family

ID=74314010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011114713.2A Pending CN112328556A (en) 2020-10-16 2020-10-16 Electric energy curve data storage method, electric energy meter and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN112328556A (en)
WO (1) WO2022077874A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115736A (en) * 2021-11-22 2022-03-01 北京煜邦电力技术股份有限公司 Electric quantity data processing method, device, equipment and medium
WO2022077874A1 (en) * 2020-10-16 2022-04-21 威胜集团有限公司 Electric energy curve data storage method, electric energy meter, and computer-readable storage medium
CN116204684A (en) * 2023-02-01 2023-06-02 浙江正泰仪器仪表有限责任公司 Storage method, device, equipment and medium of electric energy meter
CN117053619A (en) * 2023-10-13 2023-11-14 常州中冷环保技术有限公司 Cooling tower operation monitoring system and control method
CN116204684B (en) * 2023-02-01 2024-06-04 浙江正泰仪器仪表有限责任公司 Storage method, device, equipment and medium of electric energy meter

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708440A (en) * 2016-12-26 2017-05-24 深圳市科陆电子科技股份有限公司 Electric energy meter and data storage method for load curve of electric energy meter
CN107239232A (en) * 2017-05-10 2017-10-10 华立科技股份有限公司 Date storage method for electric energy meter
US10057269B1 (en) * 2017-04-21 2018-08-21 InfoSci, LLC Systems and methods for device verification and authentication

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183669A (en) * 2015-09-22 2015-12-23 珠海格力电器股份有限公司 Data storage method and device
CN106940625B (en) * 2017-03-15 2020-07-17 四川创能海博科技有限公司 Data storage method of intelligent electric meter
US10852947B2 (en) * 2017-05-26 2020-12-01 Dell Products, L.P. Organization and compression of data in storage arrays to reduce cleaning overhead
CN112328556A (en) * 2020-10-16 2021-02-05 威胜集团有限公司 Electric energy curve data storage method, electric energy meter and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708440A (en) * 2016-12-26 2017-05-24 深圳市科陆电子科技股份有限公司 Electric energy meter and data storage method for load curve of electric energy meter
US10057269B1 (en) * 2017-04-21 2018-08-21 InfoSci, LLC Systems and methods for device verification and authentication
CN107239232A (en) * 2017-05-10 2017-10-10 华立科技股份有限公司 Date storage method for electric energy meter

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022077874A1 (en) * 2020-10-16 2022-04-21 威胜集团有限公司 Electric energy curve data storage method, electric energy meter, and computer-readable storage medium
CN114115736A (en) * 2021-11-22 2022-03-01 北京煜邦电力技术股份有限公司 Electric quantity data processing method, device, equipment and medium
CN114115736B (en) * 2021-11-22 2024-03-19 北京煜邦电力技术股份有限公司 Electric quantity data processing method, device, equipment and medium
CN116204684A (en) * 2023-02-01 2023-06-02 浙江正泰仪器仪表有限责任公司 Storage method, device, equipment and medium of electric energy meter
CN116204684B (en) * 2023-02-01 2024-06-04 浙江正泰仪器仪表有限责任公司 Storage method, device, equipment and medium of electric energy meter
CN117053619A (en) * 2023-10-13 2023-11-14 常州中冷环保技术有限公司 Cooling tower operation monitoring system and control method
CN117053619B (en) * 2023-10-13 2024-01-02 常州中冷环保技术有限公司 Cooling tower operation monitoring system and control method

Also Published As

Publication number Publication date
WO2022077874A1 (en) 2022-04-21

Similar Documents

Publication Publication Date Title
CN112328556A (en) Electric energy curve data storage method, electric energy meter and computer readable storage medium
JP7279266B2 (en) Methods and apparatus for storing and querying time series data, and their servers and storage media
CN111125089B (en) Time sequence data storage method, device, server and storage medium
CN108563711B (en) Time sequence data storage method based on time nodes
CN111176976B (en) Test data generation method and device, storage medium and electronic device
CN108509592B (en) Data storage method, reading method and device based on Redis
CN104462141A (en) Data storage and query method and system and storage engine device
CN110781184A (en) Data table construction method, device, equipment and storage medium
CN111597158A (en) Log file rolling method and device, storage medium and terminal
CN112613271A (en) Data paging method and device, computer equipment and storage medium
WO2023029753A1 (en) Device power supply method and apparatus, terminal device and storage medium
CN109470918A (en) The electricity data processing method and IR46 electric energy meter of IR46 electric energy meter
CN111143239B (en) Frozen electric quantity data compression storage method and decompression method for intelligent electric meter
CN109656474B (en) Data storage method and device, computer equipment and storage medium
CN111046081A (en) Access method and system for industrial time sequence data
CN108881630B (en) Reverse charging management method and device and terminal
CN112714368A (en) Method and device for prompting abnormal electricity consumption, computer equipment and storage medium
CN111813773A (en) Power grid meter reading data storage method, uploading method, device and storage device
CN115380267A (en) Data compression method and device, data compression equipment and readable storage medium
CN116204734A (en) Data processing method, device, electronic equipment and storage medium
CN115268794A (en) Data storage method and related device
CN115049267A (en) Wind turbine generator data processing method, system, equipment and computer medium
CN104219102A (en) Network data discounting counter method, device and system
CN114547030B (en) Multi-stage time sequence data compression method and device, electronic equipment and storage medium
CN114968645B (en) Memory leak detection method and device, electronic equipment 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210205

RJ01 Rejection of invention patent application after publication