CN111796775A - Intelligent ammeter data storage method and device - Google Patents

Intelligent ammeter data storage method and device Download PDF

Info

Publication number
CN111796775A
CN111796775A CN202010648875.8A CN202010648875A CN111796775A CN 111796775 A CN111796775 A CN 111796775A CN 202010648875 A CN202010648875 A CN 202010648875A CN 111796775 A CN111796775 A CN 111796775A
Authority
CN
China
Prior art keywords
time
data
recording
time index
index
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
CN202010648875.8A
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 CN202010648875.8A priority Critical patent/CN111796775A/en
Priority to PCT/CN2020/113960 priority patent/WO2022007169A1/en
Publication of CN111796775A publication Critical patent/CN111796775A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • 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/13File access structures, e.g. distributed indices
    • 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
    • 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
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Recording Measured Values (AREA)

Abstract

The invention relates to the technical field of intelligent electric meters, in particular to a method and a device for storing data of an intelligent electric meter. The method comprises the following steps: acquiring power consumption data and a recording time node corresponding to the power consumption data; reading preset reference time and an ammeter recording period; performing byte compression on the recording time node according to the preset reference time and the ammeter recording period to obtain a time index; and associating the electricity utilization data with the time index and then storing. By the method, the storage pressure of curve data is reduced, and data storage and data query can be performed at a higher response speed due to a concise calculation mode of time index.

Description

Intelligent ammeter data storage method and device
Technical Field
The invention relates to the technical field of intelligent electric meters, in particular to a method and a device for storing data of an intelligent electric meter.
Background
At present, the smart electric meter demand presents explosive growth, and original non-smart electric meter will gradually replace for smart electric meter update, and smart electric meter's advantage is self-evident. The most common user data of the intelligent electric meter, such as load curve records, maximum demand and the like, are judged based on the current use situation and the trend of future user data demands, the future demands for the user data are larger, and the energy distribution problem is solved by analyzing the energy distribution through a large amount of historical data. Especially, the curve data is definitely the most important data for the user. These data often include user electricity consumption data, time data, and meter operating status information. When the historical data is increased, the data storage space requirement of the electric meter is also increased, which means that the cost of the intelligent electric meter is increased. In this case, the conventional uncompressed storage scheme has a large data volume, and brings great difficulty to data storage and retrieval.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method and a device for storing data of an intelligent electric meter, and aims to solve the technical problems that the intelligent electric meter has large requirement on storage capacity and data retrieval is difficult.
In order to achieve the above object, the present invention provides a method for storing data of an intelligent electric meter, wherein the method comprises:
acquiring power consumption data and a recording time node corresponding to the power consumption data;
reading preset reference time and an ammeter recording period;
performing byte compression on the recording time node according to the preset reference time and the ammeter recording period to obtain a time index;
and associating the electricity utilization data with the time index and then storing.
Preferably, the step of performing byte compression on the recording time node according to the preset reference time and the electric meter recording period to obtain a time index specifically includes:
calculating a date-time difference value between the preset reference time and the recording time node;
converting the date and time difference value into time division data;
and carrying out byte compression on the recording time node according to the time division data and the ammeter recording period to obtain a time index.
Preferably, the step of performing byte compression on the recording time node according to the time division data and the electric meter recording period to obtain a time index includes:
according to the time division data and the ammeter recording period, byte compression is carried out on the recording time node through a first calculation formula to obtain a time index;
wherein the first calculation formula is:
N=(T/t)*H
n is a time index, H is time division data, T is an ammeter recording period, and T is a preset reference period.
The step of associating and storing the electricity consumption data and the time index specifically includes:
and establishing a mapping relation between the electricity utilization data and the time index, and storing the mapping relation.
Preferably, after the step of storing the electricity consumption data and the time index after associating, the method further includes:
receiving a data query instruction input by a user, and reading a query time node contained in the data query instruction;
performing byte compression on the query time node according to the preset reference time and the ammeter recording period to obtain a query time index;
and searching the target electricity utilization data corresponding to the query time index in the mapping relation, and sending the target electricity utilization data to the user.
In addition, in order to achieve the above object, the present invention further provides a data storage device for a smart meter, the device including:
the acquisition module is used for acquiring power consumption data and a recording time node corresponding to the power consumption data;
the reading module is used for reading preset reference time and an ammeter recording period;
the compression module is used for carrying out byte compression on the recording time node according to the preset reference time and the ammeter recording period so as to obtain a time index;
and the storage module is used for associating and storing the electricity utilization data with the time index.
Preferably, the compression module comprises:
the calculation submodule is used for calculating the date-time difference value between the preset reference time and the recording time node;
the conversion submodule is used for converting the date and time difference value into time division data;
and the compression submodule is used for carrying out byte compression on the recording time node according to the time division data and the ammeter recording period so as to obtain a time index.
Preferably, the compression submodule comprises:
the compression unit is used for carrying out byte compression on the recording time node through a first calculation formula according to the time division data and the ammeter recording period so as to obtain a time index;
wherein the first calculation formula is:
N=(T/t)*H
n is a time index, H is time division data, T is an ammeter recording period, and T is a preset reference period.
Preferably, the storage module is further configured to establish a mapping relationship between the electricity consumption data and the time index, and store the mapping relationship.
Preferably, the apparatus further comprises:
the receiving module is used for receiving a data query instruction input by a user and reading a query time node contained in the data query instruction;
the compression module is further used for carrying out byte compression on the query time node according to the preset reference time and the ammeter recording period so as to obtain a query time index;
and the output module is used for searching the target electricity utilization data corresponding to the query time index in the mapping relation and sending the target electricity utilization data to the user.
According to the method, the power utilization data and the recording time node corresponding to the power utilization data are obtained; reading preset reference time and an ammeter recording period; performing byte compression on the recording time node according to the preset reference time and the ammeter recording period to obtain a time index; and associating the electricity utilization data with the time index and then storing. By the method, the storage pressure of curve data is reduced, and data storage and data query can be performed at a higher response speed due to a concise calculation mode of time index.
Drawings
Fig. 1 is a schematic flow chart of a data storage method for an intelligent electric meter according to a first embodiment of the invention;
FIG. 2 is a prior art graph data storage schematic;
fig. 3 is a schematic diagram of curve data storage according to an embodiment of the data storage method for the smart meter;
fig. 4 is a schematic flow chart of a data storage method for an intelligent electric meter according to a second embodiment of the invention;
fig. 5 is a schematic flow chart of a data storage method for an intelligent electric meter according to a third embodiment of the invention;
fig. 6 is a block diagram illustrating a first embodiment of a data storage device for a smart meter according to the present 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.
An embodiment of the invention provides a method for storing data of an intelligent electric meter, and referring to fig. 1, fig. 1 is a schematic flow diagram of a first embodiment of the method for storing data of an intelligent electric meter.
It should be noted that, in the prior art, no processing is performed on the stored curve data, all the stored curve data is original data, and the consumed storage space is definitely huge. Conventionally, it is calculated, for example: each record contains 4 data objects (4 bytes each) and one time object (12 bytes), then 28 bytes are required for one record. If the record storage is performed every 15 minutes and 4 times per hour, 48 times per day. If the storage space is 200 kbytes, data can be stored for about 152 days in the above storage manner. Referring to fig. 2, fig. 2 is a schematic diagram of a prior art curve data storage.
It should be appreciated that as the number of data objects stored by a record increases, the total number of pieces that can be accommodated decreases. The total number of bars decreased, meaning that the number of days recorded decreased. In fact, the load curves may record more data objects than in the example, the load curves in the smart meter have multiple types, multiple types of load curves are used comprehensively, and if the storage space has higher requirements, the complexity of devices in the smart meter and the actual cost of the smart meter are increased.
In order to solve the above problem, this embodiment provides a method for storing data of a smart meter, where the method for storing data of a smart meter includes the following steps:
step S100: and acquiring power consumption data and a recording time node corresponding to the power consumption data.
It is easy to understand that, when the smart meter records each time, each record contains the power consumption data of a plurality of record objects and the current time, and the record time node is the current time and is the time information corresponding to the current power consumption data of the plurality of record objects. Since direct recording of time data causes a large amount of memory space consumption, it is necessary to process the acquired recording time node.
Step S200: and reading the preset reference time and the recording period of the electric meter.
It should be understood that the preset reference time is a preset value in the smart meter, and all the periodic time-related data in the smart meter are referenced to the preset reference time. Because different intelligent ammeter can have different settings, and the user can reset in the intelligent ammeter use, should predetermine the benchmark time and ammeter recording cycle and read before carrying out the record storage. The 0 point of the whole year can be selected as the preset reference time, and the preset reference time can be adjusted according to different recording requirements. The data storage is carried out according to the preset reference time, so that the storage pressure of curve data is reduced, the preset reference time can be properly adjusted according to the actual use condition of the intelligent electric meter, the calculated time index value cannot overflow, and meanwhile, the calculation process can be simplified.
It will be readily appreciated that the meter recording period, in this embodiment, is illustrated as being recorded twice per hour, i.e. once every half hour. And the ammeter records the period, namely the time interval for recording electricity consumption data by the ammeter every time.
Step S300: and carrying out byte compression on the recording time node according to the preset reference time and the ammeter recording period to obtain a time index.
It should be noted that step S300 specifically includes: calculating a date-time difference value between the preset reference time and the recording time node; converting the date and time difference value into time division data; and carrying out byte compression on the recording time node according to the time division data and the ammeter recording period to obtain a time index.
In specific implementations, for example: when the preset reference time is 0 of each year, the recording period of the electric meter is half an hour, and the recording period is as follows, namely 1 month 1 day 00 in 2020: 00 as an example, the current recording time node is 2/5/2020, 18: 30, the date-time difference is 35 days, 18 hours and 30 minutes (31 days +4 days +18 hours +30 minutes). The 35 days, 18 hours and 30 minutes were converted into time division data, i.e., 858.5 hours.
It should be understood that the date and time difference may be obtained by a perpetual calendar algorithm.
Further, the step of performing byte compression on the recording time node according to the time division data and the electric meter recording period to obtain a time index includes: according to the time division data and the ammeter recording period, byte compression is carried out on the recording time node through a first calculation formula to obtain a time index; wherein the first calculation formula is:
N=(T/t)*H
n is a time index, H is time division data, T is an ammeter recording period, and T is a preset reference period.
In a specific implementation, the time division data is 858.5 hours, the meter recording period is half an hour, and the preset reference period is one hour in this embodiment, so the time index N is 1717.
It should be noted that, referring to fig. 3, fig. 3 is a schematic diagram of curve data storage according to an embodiment of the data storage method for the smart meter. When the time data is converted into the time index for storage, the time index occupies 4 bytes, and the required storage space is reduced.
It should be understood that when the recording period of the electric meter is fixed, the number of the storage pieces per day is fixed, the consistency of the calculation process is maintained, and the response speed of the storage can be improved.
Step S400: and associating the electricity utilization data with the time index and then storing.
It is easy to understand that the time indexes obtained after the calculation reduce the required storage space, and each time index corresponds to each time node, and no repetition exists, so that the time indexes can be associated with the electricity utilization data to replace the original time data for storage.
According to the embodiment, the time data are converted into the time index, the time index is simple in calculation mode and unique, the occupied amount of the storage space of the curve data is greatly reduced, the requirement on the storage space in the intelligent electric meter is reduced, and the cost of the intelligent electric meter is reduced.
Based on the first embodiment of the data storage method for the intelligent electric meter, the second embodiment of the data storage method for the intelligent electric meter is provided, and referring to fig. 4, fig. 4 is a schematic flow chart of the second embodiment of the data storage method for the intelligent electric meter.
The step S400 specifically includes a step S401: and establishing a mapping relation between the electricity utilization data and the time index, and storing the mapping relation.
It is easy to understand that the electricity consumption data and the time index are stored by establishing mapping, and in specific implementation, if the smart electric meter has the function of internet of things, the mapping of the electricity consumption data and the time index can be sent to a remote management platform for storage or analysis. The time index and the time node also present a mapping relation, and under the condition that the reference time and the recording period are unchanged, conversion can be directly carried out according to mapping, so that the time required by byte compression is saved, and the response efficiency of the intelligent electric meter is improved.
After step S401, the method further includes:
step S501: receiving a data query instruction input by a user, and reading a query time node contained in the data query instruction.
It is easy to understand that the data query instruction may include a plurality of query time nodes, that is, a user may query the power consumption data at one time, the power consumption data at a plurality of times, or the power consumption data at one time period through the data query instruction.
Step S502: and carrying out byte compression on the query time node according to the preset reference time and the ammeter recording period to obtain a query time index.
It is easy to understand that, based on the first embodiment of the present invention, for example: the user has issued a data query instruction to query the power consumption data from 2/month 5/0 in 2020 to 2/month 6/0 in 2020. The calculation method of the time index has already been described in the first embodiment, and is not described in detail here. Through calculation, it can be known that the time indexes corresponding to the two time nodes are 1680 and 1728, and therefore, the time index interval corresponding to the power utilization data to be queried by the user is 1680 to 1728.
Step S503: and searching the target electricity utilization data corresponding to the query time index in the mapping relation, and sending the target electricity utilization data to the user.
In specific implementations, for example: through the steps, the time index is obtained from 1680 to 1728, the power utilization data corresponding to the time indexes 1680 to 1728 are obtained in the stored record, the power utilization data are inquiry power utilization data, and the inquiry power utilization data are output to the user so that the user can obtain the inquiry power utilization data.
In the present embodiment, the time index is calculated from the date and time by the above method, and the electricity consumption data is acquired by using the uniqueness of the time index. Due to the time index value type check, the search algorithm is greatly optimized, each data does not need to be compared, and the search can be quickly carried out by only calculating the time index corresponding to the time range.
Based on the first embodiment of the data storage method for the intelligent electric meter, a third embodiment of the data storage method for the intelligent electric meter is provided, and referring to fig. 5, fig. 5 is a schematic flow chart of the third embodiment of the data storage method for the intelligent electric meter.
After step S401, the method further includes:
step S601: receiving a time query instruction input by a user, and reading the time query instruction containing query electricity utilization data.
It is easy to understand that the data query command may include a plurality of query power consumption data, that is, the user may query the time corresponding to one power consumption data, the times corresponding to a plurality of power consumption data, or the time interval corresponding to one interval of power consumption data through the time query command.
Step S602: and searching a target time index corresponding to the query electricity utilization data in the mapping relation.
It is easy to understand that, based on the first embodiment of the present invention, for example: the user enters a time interval corresponding to a power consumption data interval from the first power consumption data to the second power consumption data to be inquired, a time index interval corresponding to the first power consumption data and the second power consumption data can be obtained, and the time interval is deduced according to the time index interval. For example: the time index corresponding to the first electrical data is 1680, and the time index corresponding to the second electrical data is 1728. Therefore, the time index interval corresponding to the time interval to be queried by the user is 1680 to 1728.
Step S603: and byte decompression is carried out on the target time index according to the preset reference time and the ammeter recording period so as to obtain a target time node, and the target time node is sent to the user.
It is easy to understand that, based on the calculation method in the first embodiment, details are not repeated here, and the time intervals corresponding to the time index intervals 1680 to 1728 can be obtained by decompression from 0 at 2 month and 5 days at 2020 year to 0 at 2 month and 6 days at 2020 year.
According to the method provided by the embodiment of the invention, the time index is decompressed to the time data, and the method can ensure that the date and time can be calculated from the time index and the time index can also be calculated from the date and time, so that convenience is provided for reading the data of the electric meter, the storage space is saved, and the retrieval efficiency is improved.
Referring to fig. 6, fig. 6 is a block diagram illustrating a first embodiment of a data storage device for a smart meter according to the present invention.
As shown in fig. 6, an embodiment of the present invention provides a smart meter data storage device, where the smart meter data storage device includes:
the acquisition module 10 is configured to acquire power consumption data and a recording time node corresponding to the power consumption data.
It is easy to understand that, when the smart meter records each time, each record contains the power consumption data of a plurality of record objects and the current time, and the record time node is the current time and is the time information corresponding to the current power consumption data of the plurality of record objects. Since direct recording of time data causes a large amount of memory space consumption, it is necessary to process the acquired recording time node.
The reading module 20 is configured to read a preset reference time and an ammeter recording period.
It should be understood that the preset reference time is a preset value in the smart meter, and all the periodic time-related data in the smart meter are referenced to the preset reference time. Because different intelligent ammeter can have different settings, and the user can reset in the intelligent ammeter use, should predetermine the benchmark time and ammeter recording cycle and read before carrying out the record storage. The 0 point of the whole year can be selected as the preset reference time, and the preset reference time can be adjusted according to different recording requirements. The data storage is carried out according to the preset reference time, so that the storage pressure of curve data is reduced, the preset reference time can be properly adjusted according to the actual use condition of the intelligent electric meter, the calculated time index value cannot overflow, and meanwhile, the calculation process can be simplified.
It will be readily appreciated that the meter recording period, in this embodiment, is illustrated as being recorded twice per hour, i.e. once every half hour. And the ammeter records the period, namely the time interval for recording electricity consumption data by the ammeter every time.
And the compression module 30 is configured to perform byte compression on the recording time node according to the preset reference time and the electric meter recording period to obtain a time index.
It should be noted that the compression module 30 includes: the calculation submodule is used for calculating the date-time difference value between the preset reference time and the recording time node; the conversion submodule is used for converting the date and time difference value into time division data; and the compression submodule is used for carrying out byte compression on the recording time node according to the time division data and the ammeter recording period so as to obtain a time index.
In specific implementations, for example: when the preset reference time is 0 of each year, the recording period of the electric meter is half an hour, and the recording period is as follows, namely 1 month 1 day 00 in 2020: 00 as an example, the current recording time node is 2/5/2020, 18: 30, the date-time difference is 35 days, 18 hours and 30 minutes (31 days +4 days +18 hours +30 minutes). The 35 days, 18 hours and 30 minutes were converted into time division data, i.e., 858.5 hours.
It should be understood that the date and time difference may be obtained by a perpetual calendar algorithm.
Further, the compression submodule includes: the compression unit is used for carrying out byte compression on the recording time node according to the time division data and the ammeter recording period to obtain a time index, and comprises the following steps: according to the time division data and the ammeter recording period, byte compression is carried out on the recording time node through a first calculation formula to obtain a time index; wherein the first calculation formula is:
N=(T/t)*H
n is a time index, H is time division data, T is an ammeter recording period, and T is a preset reference period.
In a specific implementation, the time division data is 858.5 hours, the meter recording period is half an hour, and the preset reference period is one hour in this embodiment, so the time index N is 1717.
It should be noted that, referring to fig. 3, fig. 3 is a schematic diagram of curve data storage according to an embodiment of the data storage method for the smart meter. When the time data is converted into the time index for storage, the time index occupies 4 bytes, and the required storage space is reduced.
It should be understood that when the recording period of the electric meter is fixed, the number of the storage pieces per day is fixed, the consistency of the calculation process is maintained, and the response speed of the storage can be improved.
And the storage module 40 is used for associating and storing the electricity utilization data with the time index.
It is easy to understand that the time indexes obtained after the calculation reduce the required storage space, and each time index corresponds to each time node, and no repetition exists, so that the time indexes can be associated with the electricity utilization data to replace the original time data for storage.
The storage module 40 is specifically configured to establish a mapping relationship between the electricity consumption data and the time index, and store the mapping relationship.
It is easy to understand that the electricity consumption data and the time index are stored by establishing mapping, and in specific implementation, if the smart electric meter has the function of internet of things, the mapping of the electricity consumption data and the time index can be sent to a remote management platform for storage or analysis. The time index and the time node also present a mapping relation, and under the condition that the reference time and the recording period are unchanged, conversion can be directly carried out according to mapping, so that the time required by byte compression is saved, and the response efficiency of the intelligent electric meter is improved.
It should be understood that, the device converts the time data into the time index, the time index is simple in calculation mode and unique, the occupied amount of the storage space of the curve data is greatly reduced, the requirement on the storage space in the intelligent electric meter is reduced, and the cost of the intelligent electric meter is reduced.
It should be noted that the apparatus further includes: and the receiving module is used for receiving a data query instruction input by a user and reading a query time node contained in the data query instruction.
It is easy to understand that the data query instruction may include a plurality of query time nodes, that is, a user may query the power consumption data at one time, the power consumption data at a plurality of times, or the power consumption data at one time period through the data query instruction.
The compression module 30 is further configured to perform byte compression on the query time node according to the preset reference time and the electric meter recording period, so as to obtain a query time index.
It is easy to understand that, based on the first embodiment of the present invention, for example: the user has issued a data query instruction to query the power consumption data from 2/month 5/0 in 2020 to 2/month 6/0 in 2020. The calculation method of the time index has already been described in the first embodiment, and is not described in detail here. Through calculation, it can be known that the time indexes corresponding to the two time nodes are 1680 and 1728, and therefore, the time index interval corresponding to the power utilization data to be queried by the user is 1680 to 1728.
And the output module is used for searching the target electricity utilization data corresponding to the query time index in the mapping relation and sending the target electricity utilization data to the user.
In specific implementations, for example: through the steps, the time index is obtained from 1680 to 1728, the power utilization data corresponding to the time indexes 1680 to 1728 are obtained in the stored record, the power utilization data are inquiry power utilization data, and the inquiry power utilization data are output to the user so that the user can obtain the inquiry power utilization data.
It should be understood that the present apparatus calculates a time index from the date and time, and acquires power consumption data by using uniqueness of the time index. Due to the time index value type check, the search algorithm is greatly optimized, each data does not need to be compared, and the search can be quickly carried out by only calculating the time index corresponding to the time range.
It should be noted that the receiving module is configured to receive a time query instruction input by a user, and read that the time query instruction includes query power consumption data.
It is easy to understand that the data query command may include a plurality of query power consumption data, that is, the user may query the time corresponding to one power consumption data, the times corresponding to a plurality of power consumption data, or the time interval corresponding to one interval of power consumption data through the time query command.
The obtaining module 10 is further configured to search a target time index corresponding to the query power consumption data in the mapping relationship.
It is easy to understand that, based on the first embodiment of the present invention, for example: the user enters a time interval corresponding to a power consumption data interval from the first power consumption data to the second power consumption data to be inquired, a time index interval corresponding to the first power consumption data and the second power consumption data can be obtained, and the time interval is deduced according to the time index interval. For example: the time index corresponding to the first electrical data is 1680, and the time index corresponding to the second electrical data is 1728. Therefore, the time index interval corresponding to the time interval to be queried by the user is 1680 to 1728.
And the decompression module is used for performing byte decompression on the target time index according to the preset reference time and the ammeter recording period to obtain a target time node and sending the target time node to the user.
It is easy to understand that, based on the above calculation method, details are not repeated here, and the time intervals corresponding to the time index intervals 1680 to 1728 can be obtained by decompression from 0 at 2 month and 5 days at 2020 to 0 at 2 month and 6 days at 2020.
According to the device provided by the embodiment of the invention, the time index is decompressed to the time data, so that the method can ensure that the date and the time can be calculated from the time index and the time index can also be calculated from the date and the time, convenience is provided for reading the data of the electric meter, the storage space is saved, and the retrieval efficiency is improved.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the method for storing data of an intelligent electric meter provided in any embodiment of the present invention, and are not described herein again.
Further, it is to 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 or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g., Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal smart meter (which may be a mobile phone, a computer, a server, or a network smart meter, etc.) 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. A method for storing data of a smart meter is characterized by comprising the following steps:
acquiring power consumption data and a recording time node corresponding to the power consumption data;
reading preset reference time and an ammeter recording period;
performing byte compression on the recording time node according to the preset reference time and the ammeter recording period to obtain a time index;
and associating the electricity utilization data with the time index and then storing.
2. The method according to claim 1, wherein the step of performing byte compression on the recording time node according to the preset reference time and the meter recording period to obtain a time index specifically comprises:
calculating a date-time difference value between the preset reference time and the recording time node;
converting the date and time difference value into time division data;
and carrying out byte compression on the recording time node according to the time division data and the ammeter recording period to obtain a time index.
3. The method for storing the data of the intelligent electric meter according to claim 2, wherein the step of performing byte compression on the recording time node according to the time division data and the electric meter recording period to obtain a time index comprises the following steps:
according to the time division data and the ammeter recording period, byte compression is carried out on the recording time node through a first calculation formula to obtain a time index;
wherein the first calculation formula is:
N=(T/t)*H
n is a time index, H is time division data, T is an ammeter recording period, and T is a preset reference period.
4. The method for storing the data of the smart meter according to claim 1, wherein the step of associating and storing the electricity consumption data and the time index specifically comprises:
and establishing a mapping relation between the electricity utilization data and the time index, and storing the mapping relation.
5. The method for storing data of a smart meter according to claim 4, wherein after the step of establishing a mapping relationship between the electricity consumption data and the time index and storing the mapping relationship, the method further comprises:
receiving a data query instruction input by a user, and reading a query time node contained in the data query instruction;
performing byte compression on the query time node according to the preset reference time and the ammeter recording period to obtain a query time index;
and searching the target electricity utilization data corresponding to the query time index in the mapping relation, and sending the target electricity utilization data to the user.
6. A smart meter data storage device, the device comprising:
the acquisition module is used for acquiring power consumption data and a recording time node corresponding to the power consumption data;
the reading module is used for reading preset reference time and an ammeter recording period;
the compression module is used for carrying out byte compression on the recording time node according to the preset reference time and the ammeter recording period so as to obtain a time index;
and the storage module is used for associating and storing the electricity utilization data with the time index.
7. The smart meter data storage device of claim 6, wherein the compression module comprises:
the calculation submodule is used for calculating the date-time difference value between the preset reference time and the recording time node;
the conversion submodule is used for converting the date and time difference value into time division data;
and the compression submodule is used for carrying out byte compression on the recording time node according to the time division data and the ammeter recording period so as to obtain a time index.
8. The smart meter data storage device of claim 7, wherein the compression submodule comprises:
the compression unit is used for carrying out byte compression on the recording time node through a first calculation formula according to the time division data and the ammeter recording period so as to obtain a time index;
wherein the first calculation formula is:
N=(T/t)*H
n is a time index, H is time division data, T is an ammeter recording period, and T is a preset reference period.
9. The smart meter data storage device of claim 6, wherein the storage module is further configured to establish a mapping relationship between the electricity consumption data and the time index, and store the mapping relationship.
10. The smart meter data storage device of claim 9, wherein said device further comprises:
the receiving module is used for receiving a data query instruction input by a user and reading a query time node contained in the data query instruction;
the compression module is further used for carrying out byte compression on the query time node according to the preset reference time and the ammeter recording period so as to obtain a query time index;
and the output module is used for searching the target electricity utilization data corresponding to the query time index in the mapping relation and sending the target electricity utilization data to the user.
CN202010648875.8A 2020-07-07 2020-07-07 Intelligent ammeter data storage method and device Pending CN111796775A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010648875.8A CN111796775A (en) 2020-07-07 2020-07-07 Intelligent ammeter data storage method and device
PCT/CN2020/113960 WO2022007169A1 (en) 2020-07-07 2020-09-08 Intelligent electric meter data storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010648875.8A CN111796775A (en) 2020-07-07 2020-07-07 Intelligent ammeter data storage method and device

Publications (1)

Publication Number Publication Date
CN111796775A true CN111796775A (en) 2020-10-20

Family

ID=72809669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010648875.8A Pending CN111796775A (en) 2020-07-07 2020-07-07 Intelligent ammeter data storage method and device

Country Status (2)

Country Link
CN (1) CN111796775A (en)
WO (1) WO2022007169A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113406375A (en) * 2021-07-08 2021-09-17 宁夏隆基宁光仪表股份有限公司 Intelligent ammeter system sharing storage and display device and sharing method thereof
CN113835635A (en) * 2021-09-23 2021-12-24 宁夏隆基宁光仪表股份有限公司 Intelligent electric meter data cross storage method
CN114115736A (en) * 2021-11-22 2022-03-01 北京煜邦电力技术股份有限公司 Electric quantity data processing method, device, equipment and medium
CN114996245A (en) * 2022-04-07 2022-09-02 济南大学 Data compression method applied to cement production big data
US11906330B1 (en) * 2022-08-17 2024-02-20 Itron, Inc. Efficient compression of sensor data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778203A (en) * 2015-02-10 2015-07-15 武汉阿迪克电子股份有限公司 Load record blocked index storage and inquiry method in cost controlled intelligent electric energy meter
CN108563711A (en) * 2018-03-28 2018-09-21 山东昭元信息科技有限公司 A kind of time series data storage method based on timing node
CN109614447A (en) * 2018-10-15 2019-04-12 国网新疆电力有限公司阿克苏供电公司 A kind of intelligent electric meter divides the storage method, querying method and device of freezing data

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106940625B (en) * 2017-03-15 2020-07-17 四川创能海博科技有限公司 Data storage method of intelligent electric meter
CN110880938A (en) * 2018-09-06 2020-03-13 云丁智能科技(北京)有限公司 Data acquisition method and device
CN109639284A (en) * 2018-11-30 2019-04-16 宁波三星智能电气有限公司 A kind of the time data compression method and its decompressing method of intelligent electric meter
US20190278503A1 (en) * 2019-05-29 2019-09-12 Intel Corporation Nvram memory module with hard write throttle down
CN111143239B (en) * 2019-12-27 2021-08-13 南方电网电力科技股份有限公司 Frozen electric quantity data compression storage method and decompression method for intelligent electric meter

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778203A (en) * 2015-02-10 2015-07-15 武汉阿迪克电子股份有限公司 Load record blocked index storage and inquiry method in cost controlled intelligent electric energy meter
CN108563711A (en) * 2018-03-28 2018-09-21 山东昭元信息科技有限公司 A kind of time series data storage method based on timing node
CN109614447A (en) * 2018-10-15 2019-04-12 国网新疆电力有限公司阿克苏供电公司 A kind of intelligent electric meter divides the storage method, querying method and device of freezing data

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113406375A (en) * 2021-07-08 2021-09-17 宁夏隆基宁光仪表股份有限公司 Intelligent ammeter system sharing storage and display device and sharing method thereof
CN113835635A (en) * 2021-09-23 2021-12-24 宁夏隆基宁光仪表股份有限公司 Intelligent electric meter data cross storage method
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
CN114996245A (en) * 2022-04-07 2022-09-02 济南大学 Data compression method applied to cement production big data
US11906330B1 (en) * 2022-08-17 2024-02-20 Itron, Inc. Efficient compression of sensor data
US20240060795A1 (en) * 2022-08-17 2024-02-22 Itron, Inc. Efficient compression of sensor data

Also Published As

Publication number Publication date
WO2022007169A1 (en) 2022-01-13

Similar Documents

Publication Publication Date Title
CN111796775A (en) Intelligent ammeter data storage method and device
CA2895893C (en) Searchable data archive
JP7279266B2 (en) Methods and apparatus for storing and querying time series data, and their servers and storage media
CN101405728B (en) Relational database architecture with dynamic load capability
JP6667931B2 (en) Method and device for recognizing time information from audio information
CN103778148A (en) Life cycle management method and equipment for data file of Hadoop distributed file system
CN112100219B (en) Report generation method, device, equipment and medium based on database query processing
US8854239B2 (en) Data processing apparatus and method
CN101159795A (en) Calling list rearrangement method and device
CN111813840B (en) Data processing method, equipment and storage medium
CN112613271A (en) Data paging method and device, computer equipment and storage medium
CN102867023B (en) Method for storing and reading grid data and device
CN110502543B (en) Equipment performance data storage method, device, equipment and storage medium
CN115994144A (en) Data storage method and device, storage medium and electronic equipment
CN112578188B (en) Method, device, computer equipment and storage medium for generating electric quantity waveform
CN111444155B (en) Log text processing method and device, electronic equipment and computer storage medium
CN110704397A (en) Data query method and device based on elastic search
McMorran et al. ZCIM: A compressed, modular CIM data exchange format
EP2767911A1 (en) Data storage and retrieval
CN112835908B (en) Time sequence data storage method, system, storage device and storage medium
CN116362453A (en) Power consumption data processing method and system
CN116526455A (en) Park power load prediction method and system
CN117725072A (en) Task record processing method and device, storage medium and electronic equipment
CN111078650A (en) File storage method
Schroeder Accidental Pluralism: America and the Religious Politics of English Expansion, 1497–1662. By Evan Haefeli

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: 20201020

RJ01 Rejection of invention patent application after publication