Electric energy meter record query method, electric energy meter and computer readable storage medium

The method repairs damaged binary search data in electric energy meters by using adjacent normal data, ensuring the binary search can proceed, thus maintaining the integrity of the search functionality and enabling accurate record retrieval.

CN112800052BActive Publication Date: 2024-12-24WASION GROUP HLDG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110005314.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-04
Publication Date
2024-12-24
Estimated Expiration
2041-01-04

AI Technical Summary

Technical Problem

Existing electric energy meters cannot perform binary search when their operating data is damaged, rendering the entire index table invalid and preventing any record search.

Method used

An electric energy meter record query method that repairs damaged binary search data by using normal frozen data near the damaged data points, ensuring the binary search can continue by repairing the damaged equinox data based on the normal frozen data.

Benefits of technology

Maintains the integrity of the binary search list by repairing damaged data, allowing the electric energy meter to continue functioning and accurately retrieve records despite data corruption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112800052B_ABST
    Figure CN112800052B_ABST
Patent Text Reader

Abstract

The present invention proposes an electric energy meter record query method, electric energy meter and computer-readable storage medium, the method comprising the following steps: upon receiving a search instruction, obtaining minute frozen data of the electric energy meter; searching the search data corresponding to the search instruction in the minute frozen data by binary search, and in the search process, before each binary search operation is performed, performing a time damage check on the binary point data of the operation; when the time damage check fails, obtaining normal frozen data near the damaged binary point data, and repairing the damaged binary point data according to the normal frozen data, so as to continue to perform the binary search operation according to the repaired binary point data. The damaged frozen data is repaired by the normal frozen data, thereby improving the frozen data of the electric energy meter, and then continuing to use the binary search method to match the unit frozen data to be searched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data analysis, and in particular to an electric energy meter record query method, an electric energy meter and a computer-readable storage medium. Background Art

[0002] The existing electric energy meter establishes an index for the electric energy meter operation data frozen in minutes to quickly find the required operation data. Binary search is a method for quickly querying data; and binary search is essentially a search based on an ordered linked list. The data that can be binary searched forms an ordered linked list queue based on a key element of the data itself. The key element of the data itself is stored in the storage space of each node, that is, the information in the record data itself is its index. This leads to a problem. If a record data is wrong, the entire index table will be invalid, which will cause all records to be unable to be searched. Therefore, when the operation data recorded by the electric energy meter is damaged, binary search cannot be applied. Summary of the invention

[0003] The main purpose of the present invention is to propose an electric energy meter record query method, an electric energy meter and a computer-readable storage medium, aiming to solve the problem in the prior art that when the operating data recorded by the electric energy meter is damaged, the binary search cannot be applied.

[0004] To achieve the above object, the present invention provides an electric energy meter record query method, the method comprising:

[0005] When receiving the search instruction, obtaining the minute freezing data of the electric energy meter;

[0006] Searching for the search data corresponding to the search instruction in the minute frozen data by binary division, and performing a time damage check on the binary point data of the operation before each binary division operation is performed during the search process;

[0007] When the time damage check fails, normal frozen data near the damaged equinox data is obtained, and the damaged equinox data is repaired according to the normal frozen data, so as to continue to perform the binary operation according to the repaired equinox data.

[0008] Optionally, the step of obtaining normal frozen data near the damaged equinox data includes:

[0009] Taking the damaged equinox data as a starting point, sequentially acquiring unit frozen data around the damaged equinox data in a direction away from the damaged equinox data;

[0010] When the acquired unit freezing data is damaged, the next unit freezing data is acquired;

[0011] When the acquired unit frozen data is not damaged, the unit frozen data is used as normal frozen data, and the step of repairing the damaged bisection point data according to the normal frozen data is performed.

[0012] Optionally, the step of repairing the damaged equinox data according to the normal frozen data includes:

[0013] Obtaining the sequence number of the normally frozen data and the sequence number of the damaged equinox data;

[0014] Calculate the repair difference of the sequence number of the damaged equinox data minus the sequence number of the normal frozen data;

[0015] The recording time of the normally frozen data is obtained, and the recording time plus the product of the repair difference and the preset time is used as the recording time of the damaged equinox data.

[0016] Optionally, before the step of obtaining the minute freezing data of the electric energy meter when the search instruction is received, the step further includes:

[0017] Obtain the operation data of the electric energy meter and the current system time at every preset time interval;

[0018] The current system time is used as the recording time, and the recording time is associated with the operation data of the electric energy meter as the unit freezing data.

[0019] The unit frozen data is stored in the minute frozen data.

[0020] Optionally, the step of storing the unit frozen data in the minute frozen data includes:

[0021] Get the current record count of the running data, and determine whether the current record count is greater than the preset record count;

[0022] If the current number of records is greater than the preset number of records, a first difference is calculated by subtracting the preset number of records from the current number of records, the unit frozen data whose sequence number is the first difference minus 1 is deleted, and the unit frozen data at the current moment is stored in the record space corresponding to the unit frozen data whose sequence number is the first difference minus 1, and the result of subtracting 1 from the current number of records is used as the sequence number of the unit frozen data at the current moment;

[0023] If the current number of records is less than or equal to the preset number of records, the result of subtracting 1 from the current number of records is used as the sequence number of the unit frozen data at the current moment.

[0024] Optionally, the step of freezing the data at the minute by binary search to search for the search data corresponding to the search instruction comprises:

[0025] Obtaining the target record time in the search instruction;

[0026] Acquire the starting point data and the end point data of the minute frozen data, and obtain the bisection point data of the minute frozen data according to the starting point data and the end point data;

[0027] When the recording time of the equinox data is greater than the target recording time, the end point data is updated according to the equinox data, and the steps are performed: obtaining the equinox data of the minute frozen data according to the start point data and the end point data;

[0028] When the recording time of the equinox data is less than the target recording time, the starting point data is updated according to the equinox data, and the steps are performed: obtaining the equinox data of the minute frozen data according to the starting point data and the end point data;

[0029] When the recording time of the bisection point data is equal to the target recording time, the median data is used as the search data.

[0030] Optionally, the step of obtaining the starting point data and the ending point data of the minute freezing data includes:

[0031] Obtaining the cumulative number of records of the operating data, and calculating a second difference value obtained by subtracting the preset number of records from the cumulative number of records;

[0032] Determine whether the second difference is greater than 0;

[0033] If yes, the unit frozen data having the same serial number as the second difference is used as the starting point data, and the unit frozen data having the same serial number as the current record number minus 1 is used as the end point data;

[0034] If not, the unit frozen data with a serial number of 0 is used as the starting point data, and the unit frozen data with a serial number equal to the current record number minus 1 is used as the end point data.

[0035] Optionally, after the step of searching the search data corresponding to the search instruction in the minute frozen data by binary search, the method further comprises:

[0036] Determining whether the search data is damaged;

[0037] If the search data is damaged, a data damage message is sent to the user;

[0038] If the search data is not damaged, the search data is sent to the user.

[0039] To achieve the above objectives, the present invention also provides an electric energy meter, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program, when executed by the processor, implements the steps of the electric energy meter record query method as described above.

[0040] To achieve the above object, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the electric energy meter record query method as described above are implemented.

[0041] The present invention proposes an electric energy meter record query method, electric energy meter and computer-readable storage medium. When receiving a search instruction, the minute frozen data of the electric energy meter is obtained; the search data corresponding to the search instruction is searched in the minute frozen data by binary search, and in the search process, before each binary search operation is performed, the binary point data of the operation is checked for time damage; when the time damage check fails, normal frozen data near the damaged binary point data is obtained, and the damaged binary point data is repaired according to the normal frozen data, so as to continue to perform the binary search operation according to the repaired binary point data. The damaged frozen data is repaired by the normal frozen data, so as to improve the frozen data of the electric energy meter, and then the unit frozen data to be searched is matched by the binary search method. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flow chart of the first embodiment of the method for querying electric energy meter records according to the present invention;

[0043] Figure 2 This is a detailed flow chart of step S30 of the second embodiment of the electric energy meter record query method of the present invention;

[0044] Figure 3 It is a schematic diagram of the module structure of the electric energy meter of the present invention. DETAILED DESCRIPTION

[0045] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0046] The present invention provides an electric energy meter record query method, referring to Figure 1 , Figure 1 This is a flow chart of a first embodiment of a method for querying electric energy meter records according to the present invention. The method comprises the following steps:

[0047] Step S10, when receiving the search instruction, obtaining the minute freezing data of the electric energy meter;

[0048] The search instruction is sent by the user through the operation terminal. Minute freezing refers to freezing and storing at a preset storage interval. If the preset time is 15 minutes, storage is performed every 15 minutes, so that the recording time of each newly generated frozen data is 15 minutes longer than the recording time of the previous frozen data. The minute freezing data includes multiple unit freezing data, each unit freezing data has the same recording length, and each unit freezing data includes the corresponding recording time, voltage data, current data, and power data.

[0049] The minute freezing data is an ordered linked list based on recording time.

[0050] Step S20, searching the minute frozen data for search data corresponding to the search instruction by binary division, and in the search process, before each binary division operation is performed, performing a time damage check on the binary point data of the operation;

[0051] The principle of binary search is to compare the user request time with the time of the corresponding record of the intermediate record. If the request time is greater than the corresponding record time of the intermediate record, a further binary search is performed between the intermediate record and the most recent record. If the request time is less than the corresponding record time of the intermediate record, a further binary search is performed between the earliest record and the intermediate record.

[0052] The two-point data is the middle unit frozen data in the minute frozen data currently being searched.

[0053] During the operation of the electric energy meter, the minute frozen data in the electric energy meter may be damaged due to excessive rewriting times, magnetic field interference or power failure of the electric energy meter. Before performing the binary operation, the binary point data needs to be checked for time damage. When the frozen data of a unit is damaged, its time data cannot be read. At this time, it is considered damaged and the time damage check fails.

[0054] Step S30, when the time damage check fails, obtain normal frozen data near the damaged equinox data, and repair the damaged equinox data according to the normal frozen data, so as to continue to perform the binary operation according to the repaired equinox data.

[0055] Since minute freezing refers to freezing and storing at a preset storage interval, the recording time of two consecutive units of frozen data must be separated by a preset time. Therefore, as long as normal frozen data that has a positional relationship with the damaged equinox data is obtained, the recording time of the damaged equinox data can be repaired based on the normal frozen data.

[0056] This embodiment repairs the damaged frozen data by using the normal frozen data, thereby improving the frozen data of the electric energy meter, and then continues to use the binary search method to match the unit frozen data to be found.

[0057] Further, see Figure 2 In the second embodiment of the electric energy meter record query method of the present invention proposed based on the first embodiment of the present invention, the step of obtaining the normal frozen data near the damaged equinox data in step S30 includes the following steps:

[0058] Step S31, starting from the damaged equinox data, sequentially acquiring unit frozen data around the damaged equinox data in a direction away from the damaged equinox data;

[0059] Step S32, when the acquired unit frozen data is damaged, acquiring the next unit frozen data;

[0060] Step S33, when the acquired unit frozen data is not damaged, the unit frozen data is used as normal frozen data, and the step of repairing the damaged bisection point data according to the normal frozen data is performed.

[0061] The step of repairing the damaged equinox data according to the normal frozen data in step S30 includes the following steps:

[0062] Step S34, obtaining the sequence number of the normally frozen data and the sequence number of the damaged equinox data;

[0063] Step S35, calculating the repair difference of the sequence number of the damaged equinox data minus the sequence number of the normal frozen data;

[0064] Step S36, obtaining the recording time of the normal frozen data, and adding the recording time to the product of the repair difference and the preset time as the recording time of the damaged equinox data.

[0065] According to the characteristics of minute freezing, the two unit freezing data before and after the minute freezing always have a time sequence relationship. The recording time of the previous unit freezing data is at least one preset time less than the recording time of the next unit freezing data, and the recording time of the next unit freezing data is at least one preset time greater than the recording time of the previous unit freezing data.

[0066] When the equinox data is damaged, the recording time of the previous unit frozen data of the damaged equinox data is obtained, that is, the unit frozen data with a serial number equal to the serial number of the damaged equinox data minus 1, and the recording time of the damaged equinox data is repaired to the sum of the recording time of the unit frozen data and the preset time according to the recording time of the previous unit frozen data; for example, when the recording time of the previous unit frozen data is 11:30 and the preset time is 15 minutes, the recording time of the damaged equinox data is repaired to 11:45; it can be understood that the recording time of the damaged equinox data can also be repaired according to the recording time of the subsequent unit frozen data of the damaged equinox data, and the repair method is changed to repairing the recording time of the damaged equinox data to the difference between the recording time of the unit frozen data and the preset time; for example, when the recording time of the subsequent unit frozen data is 12:00 and the preset time is 15 minutes, the recording time of the damaged equinox data is repaired to 11:45.

[0067] If the previous unit frozen data is also damaged, continue to search for the unit frozen data until an undamaged unit frozen data is found, and repair the recording time of the damaged equinox data according to the unit frozen data. Specifically, the recording time of the damaged equinox data = the recording time of the unit frozen data + (preset time * (sequence number of the damaged equinox data - sequence number difference of the unit frozen data)); for example, the sequence number of the damaged equinox data is 100, the sequence number of the unit frozen data is 95, the recording time of the unit frozen data is 10:30, and the preset time is 15 minutes, then the recording time of the damaged equinox data is repaired to 10:30 + (15 * (100-95)) = 11:45.

[0068] If the recording time of the damaged equinox data cannot be calculated based on the unit frozen data before the damaged equinox data, the unit frozen data after the damaged equinox data is obtained. If the latter unit frozen data is also damaged, the unit frozen data is continued to be searched backward until an undamaged unit frozen data is found, and the recording time of the damaged equinox data is repaired according to the unit frozen data. The specific repair method is the same as the above. For example, the serial number of the damaged equinox data is 100, the serial number of the unit frozen data is 105, the recording time of the unit frozen data is 13:00, and the preset time is 15 minutes. Then the recording time of the damaged equinox data is repaired to 13:00+(15*(100-105))=11:45.

[0069] It is understandable that the order of the forward search and the backward search can be freely selected as needed, and this embodiment does not limit this.

[0070] In the process of repairing damaged equinox data, if it is found that the unit frozen data nearby is damaged, these unit frozen data are marked as damaged data at the same time. If the equinox data in the subsequent binary operation happens to be the unit frozen data marked as damaged data, there is no need to verify its time data and the repair operation can be performed directly.

[0071] This embodiment can still repair the recording time of the damaged equinoctial data when the physical space corresponding to the damaged equinoctial data is damaged, so that the linked list of the entire minute frozen data is intact and maintained as a certain ordered queue rather than an unknown disordered queue, so that the entire binary search list will not be broken due to the damage of a certain unit of frozen data, resulting in the inability to perform the entire binary search, thereby causing the failure of the entire record search. This embodiment can reasonably repair the damaged equinoctial data.

[0072] Furthermore, in a third embodiment of the electric energy meter record query method of the present invention proposed based on the second embodiment of the present invention, before the step S10, the following steps are further included:

[0073] Step S40, obtaining the operation data of the electric energy meter and the current system time at every preset time interval;

[0074] Step S50: taking the current system time as the recording time, and associating the recording time with the operation data of the electric energy meter as the unit freezing data.

[0075] Step S60: storing the unit frozen data in the minute frozen data.

[0076] The step S60 comprises the steps of:

[0077] Step S61, obtaining the current record number of the operation data, and determining whether the current record number is greater than a preset record number;

[0078] Step S62, if the current record count is greater than the preset record count, a first difference is calculated by subtracting the preset record count from the current record count, the unit frozen data with a sequence number equal to the first difference minus 1 is deleted, and the unit frozen data at the current moment is stored in a record space corresponding to the unit frozen data with a sequence number equal to the first difference minus 1, and the result of subtracting 1 from the current record count is used as the sequence number of the unit frozen data at the current moment;

[0079] Step S63: If the current number of records is less than or equal to the preset number of records, the result of subtracting 1 from the current number of records is used as the sequence number of the unit frozen data at the current moment.

[0080] Storage space is allocated for different unit frozen data. The storage space is a circular queue. The queue size is the maximum number of unit frozen data that the user needs to store, that is, the preset number of records, multiplied by the byte length of a single data. The preset number of records in this embodiment adopts the industry default of 28,800. The storage space for each unit frozen data is of a fixed size, that is, the size of the unit frozen data is the same when stored, and the samples are stored continuously at the same time. When storing records, the recording time is saved in the front part of the unit frozen data; the storage adopts equal-length sequential storage, and when storing the minute freeze, the total number of unit frozen data currently stored is recorded, and a serial number is assigned to each stored unit frozen data. The serial number of the first record is 0, and the serial number of the last record is the total number of unit frozen data minus 1.

[0081] Since the storage space is a circular queue, the queue space size is 28800. When the number of unit frozen data stored exceeds 28800, the original first unit frozen data (unit frozen data with sequence number 0) will be overwritten by the newly generated unit frozen data. Therefore, when the current number of records is greater than the preset number of records, the newly generated unit frozen data needs to overwrite a stored unit frozen data; in order to ensure the continuity of the queue, the stored unit frozen data still needs to be overwritten according to the recording time; for example, the current number of records is 28802. At this time, 28802-28800=2 is used as the first difference, and the first difference is the number of overwritten stored unit frozen data. Since the queue is numbered from 0, the first difference 2-1 is used as the storage position offset of the unit frozen data.

[0082] It should be noted that when the first difference is still greater than the preset number of records, the current number of records is subtracted from an integer multiple of the preset number of records so that the obtained difference is less than the preset number of records, and the storage position offset of the unit frozen data is calculated based on the obtained difference.

[0083] This embodiment can reasonably number the unit frozen data.

[0084] Further, in a fourth embodiment of the electric energy meter record query method of the present invention proposed based on the third embodiment of the present invention, the step of searching for the search data corresponding to the search instruction in the minute frozen data by binary search in step S20 includes the steps of:

[0085] Step S21, obtaining the target record time in the search instruction;

[0086] Step S22, obtaining the starting point data and the end point data of the minute frozen data, and obtaining the bisection point data of the minute frozen data according to the starting point data and the end point data;

[0087] Step S23, when the recording time of the equinox data is greater than the target recording time, updating the end point data according to the equinox data, and executing the steps of: obtaining the equinox data of the minute frozen data according to the start point data and the end point data;

[0088] Step S24, when the recording time of the equinox data is less than the target recording time, updating the starting point data according to the equinox data, and executing the steps of: obtaining the equinox data of the minute frozen data according to the starting point data and the end point data;

[0089] Step S25, when the recording time of the equinox data is equal to the target recording time, the median data is used as search data.

[0090] The step of obtaining the starting point data and the end point data of the minute freezing data in step S22 includes:

[0091] Step S221, obtaining the cumulative number of records of the operation data, and calculating a second difference value obtained by subtracting the preset number of records from the cumulative number of records;

[0092] Step S222, determining whether the second difference is greater than 0;

[0093] Step S223: If yes, the unit frozen data with the same serial number as the second difference is used as the starting point data, and the unit frozen data with the same serial number as the current record number minus 1 is used as the end point data;

[0094] Step S224, if not, the unit frozen data with a serial number of 0 is used as the starting point data, and the unit frozen data with a serial number equal to the current record number minus 1 is used as the end point data.

[0095] When the cumulative number of records is greater than the preset number of records, it means that the unit frozen data stored in the front of the queue has been overwritten, and the unit frozen data stored in the front is recorded later than the unit frozen data stored in the back; therefore, it is necessary to find the intersection between the front storage and the back storage to confirm the earliest recorded unit frozen data and the latest recorded unit frozen data in the current queue. For example, if the preset number of records is 28,800, if the cumulative number of records is 28,803, that is, 28,803 unit frozen data have been generated, it means that there are 28,803-28,800=3 overwritten unit frozen data in the queue. Since the queue is numbered from 0, the fourth unit frozen data in the queue at this time, that is, the unit frozen data with serial number 3, is the starting data of the queue; it can be inferred that the previous unit frozen data of the unit frozen data with serial number 3, that is, the unit frozen data with serial number 28,802, is the end data of the queue.

[0096] When the cumulative number of records is less than or equal to the preset number of records, it means that the storage space has not been fully stored. Therefore, the current queue is arranged in order of record time, with the unit frozen data with serial number 0 as the starting data, and the unit frozen data with the same serial number as the current number of records minus 1 as the end data.

[0097] This embodiment can reasonably obtain the starting point data and the end point data of the minute freezing data.

[0098] Further, in a fifth embodiment of the electric energy meter record query method of the present invention proposed based on the first embodiment of the present invention, after the step of searching the search data corresponding to the search instruction in the minute frozen data by binary search in step S20, the following steps are included:

[0099] Step S26, determining whether the search data is damaged;

[0100] Step S27, if the searched data is damaged, sending data damage information to the user;

[0101] Step S28: If the search data is not damaged, the search data is sent to the user.

[0102] When the search data is damaged, although the recording time can be restored by freezing the data normally, the stored electric energy meter operation data cannot be restored. Therefore, a data damage message needs to be sent to the user to remind the user that the electric energy meter may be faulty. When the search data is not damaged, the search operation is completed by sending the search data to the user.

[0103] This embodiment can return data damage information to the user when searching for data damage, thereby avoiding returning erroneous data to the user.

[0104] Reference Figure 3 In terms of hardware structure, the electric energy meter may include components such as a communication module 10, a memory 20, and a processor 30. In the electric energy meter, the processor 30 is connected to the memory 20 and the communication module 10 respectively, and a computer program is stored in the memory 20. The computer program is executed by the processor 30 at the same time, and the steps of the above method embodiment are implemented when the computer program is executed.

[0105] The communication module 10 can be connected to an external communication device through a network. The communication module 10 can receive requests from an external communication device, and can also send requests, instructions and information to the external communication device, which can be other electric energy meters, servers or Internet of Things devices, such as televisions, etc.

[0106] The memory 20 can be used to store software programs and various data. The memory 20 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as obtaining the cumulative number of records of running data, and calculating the second difference obtained by subtracting the preset number of records from the cumulative number of records), etc.; the data storage area can include a database, and the data storage area can store data or information created according to the use of the system, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0107] The processor 30 is the control center of the electric energy meter. It uses various interfaces and lines to connect various parts of the entire electric energy meter. It executes various functions of the electric energy meter and processes data by running or executing software programs and / or modules stored in the memory 20, and calling data stored in the memory 20, so as to monitor the electric energy meter as a whole. The processor 30 may include one or more processing units; optionally, the processor 30 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 30.

[0108] although Figure 3 Although not shown, the above-mentioned electric energy meter may also include a circuit control module, which is used to connect to the power supply to ensure the normal operation of other components. Those skilled in the art will understand that Figure 3 The electric energy meter structure shown in the figure does not constitute a limitation on the electric energy meter, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0109] The present invention also provides a computer-readable storage medium on which a computer program is stored. The computer-readable storage medium may be Figure 3 The memory 20 in the electric energy meter may also be at least one of a ROM (Read-Only Memory) / RAM (Random Access Memory), a magnetic disk, and an optical disk. The computer-readable storage medium includes a number of instructions for enabling a terminal device with a processor (which may be a TV, a car, a mobile phone, a computer, a server, a terminal, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0110] In the present invention, the terms "first", "second", "third", "fourth" and "fifth" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0111] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0112] Although the embodiments of the present invention have been shown and described above, the scope of protection of the present invention is not limited thereto. It is understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art can change, modify and replace the above embodiments within the scope of the present invention, and these changes, modifications and replacements should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A method for querying electric energy meter records, characterized in that: The method comprises: When receiving the search instruction, obtaining the minute freezing data of the electric energy meter; Searching for the search data corresponding to the search instruction in the minute frozen data by binary division, and performing a time damage check on the binary point data of the operation before each binary division operation is performed during the search process; When the time damage check fails, obtaining normal frozen data near the damaged equinox data, and repairing the damaged equinox data according to the normal frozen data, so as to continue to perform the binary operation according to the repaired equinox data; The step of obtaining the normal frozen data near the damaged equinox data includes: Taking the damaged equinox data as a starting point, sequentially acquiring unit frozen data around the damaged equinox data in a direction away from the damaged equinox data; When the acquired unit freezing data is damaged, the next unit freezing data is acquired; When the acquired unit frozen data is not damaged, the unit frozen data is used as normal frozen data, and the steps are performed: repairing the damaged bisection point data according to the normal frozen data; The step of repairing the damaged bisection point data according to the normal frozen data includes: Obtaining the sequence number of the normally frozen data and the sequence number of the damaged equinox data; Calculate the repair difference of the sequence number of the damaged equinox data minus the sequence number of the normal frozen data; The recording time of the normally frozen data is obtained, and the recording time plus the product of the repair difference and the preset time is used as the recording time of the damaged equinox data.

2. The method for querying electric energy meter records according to claim 1, characterized in that: The step of obtaining the minute freezing data of the electric energy meter upon receiving the search instruction also includes: Obtain the operation data of the electric energy meter and the current system time at every preset time interval; The current system time is used as the recording time, and the recording time is associated with the operation data of the electric energy meter as unit freezing data; The unit frozen data is stored in the minute frozen data.

3. The method for querying electric energy meter records according to claim 2, characterized in that: The step of storing the unit frozen data in the minute frozen data comprises: Obtain the current record count of the operation data, and determine whether the current record count is greater than a preset record count; if the current record count is greater than the preset record count, calculate a first difference obtained by subtracting the preset record count from the current record count, delete the unit frozen data whose sequence number is the first difference minus 1, store the unit frozen data at the current moment in a record space corresponding to the unit frozen data whose sequence number is the first difference minus 1, and use the result of subtracting 1 from the current record count as the sequence number of the unit frozen data at the current moment; If the current number of records is less than or equal to the preset number of records, the result of subtracting 1 from the current number of records is used as the sequence number of the unit frozen data at the current moment.

4. The method for querying electric energy meter records according to claim 3, characterized in that: The step of freezing the data at the minute by binary search to find the search data corresponding to the search instruction comprises: Obtaining the target record time in the search instruction; Acquire the starting point data and the end point data of the minute frozen data, and obtain the bisection point data of the minute frozen data according to the starting point data and the end point data; When the recording time of the equinox data is greater than the target recording time, the end point data is updated according to the equinox data, and the steps are performed: obtaining the equinox data of the minute frozen data according to the start point data and the end point data; When the recording time of the equinox data is less than the target recording time, the starting point data is updated according to the equinox data, and the steps are performed: obtaining the equinox data of the minute frozen data according to the starting point data and the end point data; When the recording time of the bisection point data is equal to the target recording time, the median data is used as the search data.

5. The method for querying electric energy meter records according to claim 4, characterized in that: The step of obtaining the starting point data and the end point data of the minute freezing data comprises: Obtaining the cumulative number of records of the operating data, and calculating a second difference value obtained by subtracting the preset number of records from the cumulative number of records; Determine whether the second difference is greater than 0; If yes, the unit frozen data having the same serial number as the second difference is used as the starting point data, and the unit frozen data having the same serial number as the current record number minus 1 is used as the end point data; If not, the unit frozen data with a serial number of 0 is used as the starting point data, and the unit frozen data with a serial number equal to the current record number minus 1 is used as the end point data.

6. The method for querying electric energy meter records according to any one of claims 1 to 5, characterized in that: After the step of searching the search data corresponding to the search instruction by using the binary method in the minute frozen data, the following steps are included: Determining whether the search data is damaged; If the search data is damaged, a data damage message is sent to the user; If the search data is not damaged, the search data is sent to the user.

7. An electric energy meter, characterized in that: The electric energy meter comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the electric energy meter record query method as claimed in any one of claims 1 to 6 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the electric energy meter record query method according to any one of claims 1 to 6 are implemented.