A method, device, computer equipment and storage medium for processing frozen data

By obtaining and counting the relevant time and data number on the instrument side, determining and comparing the target freezing number, the problem of data loss caused by missing the data freezing time point after time calibration is solved, and data integrity and accuracy are achieved.

CN119620962BActive Publication Date: 2025-04-22ZHEJIANG CHINT WATER TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510163345.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-04-22
Estimated Expiration
2045-02-14

AI Technical Summary

Technical Problem

The instrument side is prone to losing frozen data during time synchronization and data freezing, especially after time calibration, the time point in data freezing may be missed.

Method used

By obtaining the starting freezing time and the number of frozen data in the current statistical period, counting the relevant values ​​based on the preset freezing period, determining the first target freezing number of the current time, and comparing it with the actual freezing number. If it is greater than, the data corresponding to the current time will be frozen to avoid data loss.

Benefits of technology

It effectively avoids the problem of missing the data freezing time point after time calibration, resulting in data loss. By freezing the data corresponding to the current time, the frozen data in the current statistical cycle is supplemented.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119620962B_ABST
    Figure CN119620962B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of instruments, and discloses a method, device, computer equipment and storage medium for processing frozen data. The method comprises: when the time of the instrument end is calibrated, obtaining the starting freezing time and the number of frozen data in the current statistical period; based on the preset freezing period, counting the first number of freezing periods included from the starting time of the current statistical period to the starting freezing time, and the second number of freezing periods included from the starting time of the current statistical period to the current time; based on the first number and the second number, determining the first target freezing number of the frozen data at the current time; if the first target freezing number is greater than the number of frozen data, freezing the data corresponding to the current time to obtain the frozen data at the current time. By freezing the data corresponding to the current time, the frozen data in the current statistical period is supplemented, thereby avoiding the loss of frozen data at the instrument end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of instrument technology, and in particular to a method, device, computer equipment and storage medium for processing frozen data. Background Art

[0002] At present, the time synchronization and data freezing process at the meter end often face the problem of data loss. If the time at the meter end slows down, it needs to be calibrated according to the time at the station end. The calibrated time may miss a time point for data freezing, resulting in the loss of a frozen data at the meter end. Therefore, how to process the frozen data to avoid the loss of frozen data at the meter end is an urgent problem to be solved. Summary of the invention

[0003] In view of this, the present invention provides a method, an apparatus, a computer device and a storage medium for processing frozen data to solve the problem of how to process frozen data to avoid the loss of frozen data at the instrument end.

[0004] In a first aspect, the present invention provides a method for processing frozen data, the method comprising:

[0005] When the time on the meter end is calibrated, the starting freezing time and the number of frozen data in the current statistical period are obtained; the above starting freezing time is the time of the first frozen data preset in the above current statistical period;

[0006] Based on the preset freezing period, the first number of the freezing period from the start time of the current statistical period to the start freezing time, and the second number of the freezing period from the start time of the current statistical period to the current time are counted; the start freezing time is the time of the first freezing of data preset in the current statistical period;

[0007] Based on the first number and the second number, determining a first target freezing number of the frozen data at the current time;

[0008] If the first target frozen number is greater than the frozen data number, the data corresponding to the current time is frozen to obtain the frozen data at the current time.

[0009] In an optional implementation manner, after determining the first target number of frozen data at the current time based on the first number and the second number, the method further includes:

[0010] If the first target frozen number is smaller than the frozen data number, the last frozen data is determined from the frozen data in the current statistical period;

[0011] Delete the last frozen data from the instrument.

[0012] In an optional implementation, after obtaining the starting freezing time and the number of frozen data in the current statistical period, the method further includes:

[0013] Get the above current statistical period;

[0014] Based on the current statistical period and the freezing period, determining a second target freezing number for the current statistical period;

[0015] If the number of frozen data is greater than or equal to the second target frozen number, the first target frozen number is reset to zero.

[0016] In an optional embodiment, the above-mentioned starting freezing time includes: the number of hours of the above-mentioned starting freezing time and the number of minutes of the above-mentioned starting freezing time;

[0017] The above-mentioned freezing period based on the preset freezing period, counting the first number of the freezing period between the start time of the current statistical period and the start freezing time, includes:

[0018] Determine the first number according to the number of minutes of the freezing cycle, the number of hours of the starting freezing time, the number of minutes of the starting freezing time, and a first preset relationship;

[0019] The first preset relationship is:

[0020] N1=(A×(60 / E))+B / E

[0021] Among them, N1 is the first number mentioned above, A is the number of hours of the above-mentioned starting freezing time, E is the number of minutes of the above-mentioned freezing period, B is the number of minutes of the above-mentioned starting freezing time, 60 / E is the rounded result of 60 divided by E, and B / E is the rounded result of B divided by E.

[0022] In an optional implementation manner, the current time includes: the hours of the current time and the minutes of the current time;

[0023] Based on the preset freezing period, the second number of the freezing period between the start time of the current statistical period and the start freezing time is counted, including:

[0024] Determine the second number according to the number of minutes of the freezing period, the number of hours of the current time, the number of minutes of the current time, and a second preset relationship;

[0025] The second preset relationship is:

[0026] N2=(C×(60 / E))+D / E

[0027] Among them, N2 is the second number mentioned above, C is the hour of the above current time, E is the minute of the above freezing period, D is the minute of the above current time, 60 / E is the rounded result of 60 divided by E, and D / E is the rounded result of D divided by E.

[0028] In an optional implementation manner, determining the first target frozen number of the frozen data at the current time based on the first number and the second number includes:

[0029] If the first number is less than or equal to the second number, the first target frozen number is determined according to the first number, the second number, and a third preset relationship;

[0030] The third preset relationship is:

[0031] F=N2-N1+1

[0032] Among them, F is the first target frozen number mentioned above, N2 is the second number mentioned above, and N1 is the first number mentioned above.

[0033] In an optional implementation manner, determining the first target frozen number of the frozen data at the current time based on the first number and the second number includes:

[0034] If the first number is greater than the second number, the first target frozen number is determined according to the first number, the second number, and a fourth preset relationship;

[0035] The fourth preset relationship is:

[0036] F=(K×(60 / E))-(N1-N2-1)

[0037] Among them, F is the first target frozen number mentioned above, N2 is the second number mentioned above, N1 is the first number mentioned above, and K is the current statistical period mentioned above.

[0038] In a second aspect, the present invention provides a frozen data processing device, the device comprising:

[0039] The acquisition module is used to acquire the starting freezing time and the number of frozen data in the current statistical period when the time of the instrument end is calibrated; the above starting freezing time is the time of the first frozen data preset in the above current statistical period;

[0040] A statistical module, for counting the first number of the freezing period from the start time of the current statistical period to the start freezing time, and the second number of the freezing period from the start time of the current statistical period to the current time, based on a preset freezing period; the start freezing time is the time of the first freezing of data preset in the current statistical period;

[0041] A determination module, configured to determine a first target frozen number of the frozen data at the current time based on the first number and the second number;

[0042] The comparison module is used for comparing and if the first target frozen number is greater than the frozen data number, freezing the data corresponding to the current time to obtain the frozen data at the current time.

[0043] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the method for processing frozen data of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for processing frozen data according to the first aspect or any corresponding embodiment thereof.

[0045] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method for processing frozen data in the first aspect or any corresponding embodiment thereof.

[0046] The embodiment provided by the present invention has the following effects: based on obtaining the starting freezing time and the number of frozen data, the preset freezing period, determining the first target freezing number of the frozen data at the current time, comparing that the first target freezing number is greater than the number of frozen data, determining that the current time lacks frozen data, and then freezing the data corresponding to the current time to obtain the frozen data at the current time, thereby avoiding missing a time point for freezing data after calibrating the time of the instrument end, resulting in the loss of frozen data at the instrument end, and by freezing the data corresponding to the current time, supplementing the frozen data in the current statistical period, avoiding the loss of frozen data at the instrument end. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 is a schematic diagram of a scenario of a method for processing frozen data according to an embodiment of the present invention;

[0049] Figure 2 is one of the flow charts of a method for processing frozen data according to an embodiment of the present invention;

[0050] Figure 3 is a second flowchart of a method for processing frozen data according to an embodiment of the present invention;

[0051] Figure 4 is a schematic diagram of a processing device for freezing data according to an embodiment of the present invention;

[0052] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0054] According to an embodiment of the present invention, an embodiment of a method for processing frozen data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0055] Figure 1 is a schematic diagram of a scenario of a method for processing frozen data according to an embodiment of the present invention. Figure 1 As shown, the station end is connected to multiple meter ends, such as meter end 1, meter end 2, and meter end 3. The multiple meter ends are respectively connected to corresponding devices, such as device 1, device 2, and device 3.

[0056] The instrument end is used to collect the frozen data of the equipment according to the statistical cycle and the freezing cycle, and store the frozen data in the instrument end or synchronize it to the station end. Specifically, after each statistical cycle is completed, the frozen data in the statistical cycle is synchronized to the station end. The instrument end receives the time calibration instruction from the station end and calibrates the time of the instrument end.

[0057] During calibration, the time on the instrument side may be calibrated from 11:59:59 to 12:00:01. If 12:00:00 is the time point at which data should be frozen sequentially according to the freezing cycle, one frozen data is lost when the time on the instrument side is calibrated.

[0058] In this embodiment, a method for processing frozen data is provided, which can be used for any instrument end. Figure 2 is one of the flowcharts of a method for processing frozen data according to an embodiment of the present invention, the method comprising:

[0059] Step S201, when the time of the meter end is calibrated, the starting freezing time and the number of frozen data in the current statistical period are obtained.

[0060] The starting freezing time is the time of the first freezing of data preset in the current statistical period. The meter end may be a water meter, an electricity meter, a gas meter, etc. The statistical period may be 24 hours, and the number of frozen data in the current statistical period may be the number of frozen data that has been frozen, collected and stored in the meter end in the current statistical period.

[0061] One way to obtain the information is to extract a preset start freezing time from a storage device at the meter end, or to find the freezing time corresponding to the first frozen data in the current statistical period as the start freezing time. The number of frozen data corresponding to the current statistical period stored in the storage device is used as the number of frozen data in the current statistical period.

[0062] Step S202, based on the preset freezing period, counting the first number of freezing periods from the start time of the current statistical period to the start freezing time, and the second number of freezing periods from the start time of the current statistical period to the current time.

[0063] The freezing period is the interval between each data freezing in the current statistical period, and the starting freezing time is the preset time for the first data freezing in the current statistical period.

[0064] For example, if the statistical period is 24 hours, the start time is 0 o'clock, the freeze period is half an hour, the start freeze time is 2 o'clock, and the current time is 12 o'clock, then the first number of the freeze period from 0 o'clock to 2 o'clock is 4, and the second number of the freeze period from 0 o'clock to 12 o'clock is 24.

[0065] Step S203: determining a first target number of frozen data at the current time based on the first number and the second number.

[0066] The first target number of frozen items is the number of data items that should be frozen at the current time. Continuing with the above parameters, the first number is 4, the second number is 24, and one data item has been frozen at the start freezing time. The first target number of frozen items at the current time of 12 o'clock should be 24-4+1=21.

[0067] Step S204, if the first target frozen number is greater than the frozen data number, the data corresponding to the current time is frozen to obtain the frozen data of the current time.

[0068] Among them, if the number of first target freezes is greater than the number of frozen data, it means that a frozen data is lost at the current time. Taking the above-mentioned calibration of the instrument time from 11:59:59 to 12:00:01 and missing the freezing time of 12 o'clock as an example, the data corresponding to the calibrated 12:00:01 (that is, the current time) can be frozen and stored in the freezing device at the instrument end to obtain the frozen data of the current time.

[0069] The present invention provides a method for processing frozen data, which obtains a starting freezing time and a number of frozen data, a preset freezing period, determines a first target freezing number of frozen data at the current time, compares that the first target freezing number is greater than the number of frozen data, determines that frozen data is missing at the current time, and then freezes the data corresponding to the current time to obtain the frozen data at the current time, thereby avoiding missing a time point for freezing data after calibrating the time of an instrument end, resulting in a loss of frozen data at the instrument end. By freezing the data corresponding to the current time, the frozen data in the current statistical period is supplemented, thereby avoiding the loss of frozen data at the instrument end.

[0070] In an optional implementation manner, in order to further handle the situation of repeated freezing of data, after step S203, the following step is further included:

[0071] If the first target frozen number is less than the frozen data number, the last frozen data is determined from the frozen data in the current statistical period; and the last frozen data is deleted from the instrument end.

[0072] In this embodiment, the purpose is to further solve the problem that when the time of the meter end is calibrated forward, the frozen data is repeated beyond the time point of the frozen data, resulting in two frozen data corresponding to one time point. Take the time of the meter end calibrated from 12:00:01 to 11:59:59 as an example. After calibration, the data at 12 o'clock will be frozen again when it reaches 12 o'clock, resulting in two frozen data corresponding to 12 o'clock. Therefore, after determining that the first target frozen number is less than the number of frozen data, the last frozen data can be deleted from the meter end.

[0073] The method provided in this embodiment avoids errors or inconsistencies that may be caused by duplicate data in the system by automatically detecting and deleting duplicate frozen data, thereby improving the stability and maintainability of the entire system and reducing the need for manual intervention.

[0074] In an optional embodiment, Figure 3 This is a second flowchart of the method for processing frozen data according to an embodiment of the present invention. After step S201, it also includes:

[0075] Step S301, obtaining the current statistical period.

[0076] The current statistical cycle can be a statistical start time and a cycle duration, or a statistical start time and a statistical end time. The current statistical cycle can be pre-set in a storage device at the meter end, and extracted from the storage device when it is needed.

[0077] Step S302: Determine a second target frozen number of the current statistical period based on the current statistical period and the freezing period.

[0078] The second target number of frozen items is the total number of data that should be frozen in the current statistical period. For example, if the current statistical period is 24 hours, the freezing period is half an hour, and the starting freezing time is the starting time of the statistical period, the second target number of frozen items in the current statistical period can be determined to be 48.

[0079] Step S303: If the number of frozen data is greater than or equal to the second target frozen number, the first target frozen number is reset to zero.

[0080] The first target frozen number is reset to zero to avoid continuing to store the next frozen data in the current statistical period after the target frozen number has been reached. The next statistical period can be started after the first target frozen number is reset to zero.

[0081] The method provided in this embodiment significantly improves the accuracy, efficiency and system stability of the data freezing process by accurately controlling the amount and time of frozen data, automated adjustment mechanism, flexible configuration capability, and optimization of storage and resources, making the entire data processing flow more efficient, reliable and predictable, thereby meeting complex data statistical requirements and improving system performance.

[0082] In an optional implementation, in order to further accurately determine the first number, the starting freezing time includes: the number of hours of the starting freezing time and the number of minutes of the starting freezing time.

[0083] The step S202 includes: determining the first number according to the number of minutes of the freezing cycle, the number of hours of the starting freezing time, the number of minutes of the starting freezing time, and a first preset relationship.

[0084] The first preset relationship is:

[0085] N1=(A×(60 / E))+B / E

[0086] Among them, N1 is the first number mentioned above, A is the number of hours of the above-mentioned starting freezing time, E is the number of minutes of the above-mentioned freezing period, B is the number of minutes of the above-mentioned starting freezing time, 60 / E is the rounded result of 60 divided by E, and B / E is the rounded result of B divided by E.

[0087] In this embodiment, taking the starting freezing time as 2:05 as an example, the hours A of the starting freezing time is 2, the minutes B of the starting freezing time is 05, the freezing period is half an hour, and the minutes E is 30, then 60 / E is 2, B / E is 0, and N1 is 4.

[0088] The method provided in this embodiment accurately decomposes the start freezing time into hours and minutes, so that the system can perform accurate calculations based on the specific start time and freezing period, avoid freezing data errors caused by time ambiguity, and improve the accuracy of data freezing. The hours and minutes of the start freezing time are combined with the minutes of the freezing period, and through the first preset relationship, it can be ensured that the operations of starting freezing at different time points can be accurately reflected in the freezing task, which improves the predictability of the system, ensures the accuracy and efficiency of data processing, and optimizes the utilization of system resources.

[0089] In an optional implementation, in order to further accurately determine the second number, the current time includes: the hours of the current time and the minutes of the current time;

[0090] The step S202 includes: determining the second number according to the number of minutes of the freezing period, the number of hours of the current time, the number of minutes of the current time, and a second preset relationship.

[0091] The second preset relationship is:

[0092] N2=(C×(60 / E))+D / E

[0093] Among them, N2 is the second number mentioned above, C is the hour of the above current time, E is the minute of the above freezing period, D is the minute of the above current time, 60 / E is the rounded result of 60 divided by E, and D / E is the rounded result of D divided by E.

[0094] In this embodiment, taking the current time as 12:59 as an example, the hour C of the current time is 12, the minute D of the starting freezing time is 59, the freezing period is half an hour, and the minute E is 30, then 60 / E is 2, D / E is 1, and N2 is 25.

[0095] The method provided in this embodiment accurately decomposes the current time into hours and minutes, so that the system can perform accurate calculations based on the specific current time and the freezing period, avoiding freezing data errors caused by time ambiguity and improving the accuracy of data freezing. The hours and minutes of the current time are combined with the minutes of the freezing period, and through the first preset relationship, it can be ensured that the freezing operations starting at different time points can be accurately reflected in the freezing task, which improves the predictability of the system, ensures the accuracy and efficiency of data processing, and optimizes the utilization of system resources.

[0096] In an optional implementation, the step S203 includes: if the first number is less than or equal to the second number, determining the first target frozen number according to the first number, the second number, and a third preset relationship.

[0097] The third preset relationship is:

[0098] F=N2-N1+1

[0099] Among them, F is the first target frozen number mentioned above, N2 is the second number mentioned above, and N1 is the first number mentioned above.

[0100] In this embodiment, when the first number is less than or equal to the second number, the difference between the second number and the first number plus one is directly used as the first target frozen number. For example, the start time of the current statistical period is 0 o'clock, the start freezing time is 2 o'clock, the current time is 12 o'clock, and the freezing period is half an hour. The first number N1 is 4, the second number N2 is 24, and the first target frozen number F is 21.

[0101] The method provided in this embodiment uses the third preset relationship to accurately calculate the number of frozen items when determining that the first number is less than or equal to the second number, thereby simplifying the calculation process and improving work efficiency. It has high flexibility and adaptability, can adjust the freezing interval according to different settings, and has low computational complexity, reducing resource consumption. The method is simple and clear, easy to maintain and modify, ensures the consistency and reliability of the system, and is widely applicable to various application scenarios such as data freezing and time interval selection, helping the system to run efficiently and stably.

[0102] In an optional implementation, the step S203 includes: if the first number is greater than the second number, determining the first target frozen number according to the first number, the second number, and a fourth preset relationship.

[0103] The fourth preset relationship is:

[0104] F=(K×(60 / E))-(N1-N2-1)

[0105] Among them, F is the first target frozen number mentioned above, N2 is the second number mentioned above, N1 is the first number mentioned above, and K is the current statistical period mentioned above.

[0106] In this embodiment, when the first number is greater than the second number, it may be that the current time is the second day after the start freezing time. For example, if the start time of the current statistical period is 11 o'clock, the start freezing time is 13 o'clock, the current time is 2 o'clock the next day, the freezing period is half an hour, the number of minutes E is 30, and the current statistical period K is 24 hours, the first number N1 is 26, the second number N2 is 4, and the first target frozen number F is 27.

[0107] The method provided in this embodiment uses the fourth preset relationship to accurately calculate the number of frozen items when determining that the first number is greater than the second number, thereby simplifying the calculation process and improving work efficiency. It has high flexibility and adaptability, can adjust the freezing interval according to different settings, and has low computational complexity, reducing resource consumption. The method is simple and clear, easy to maintain and modify, ensures the consistency and reliability of the system, and is widely applicable to various application scenarios such as data freezing and time interval selection, helping the system to run efficiently and stably.

[0108] The present invention provides a processing device for freezing data. Figure 4 is a schematic diagram of a processing device for freezing data according to an embodiment of the present invention, the device comprising:

[0109] The acquisition module 401 is used to acquire the starting freezing time and the number of frozen data in the current statistical period when the time of the meter end is calibrated; the above starting freezing time is the time of the first freezing data preset in the above current statistical period.

[0110] The statistical module 402 is used to count the first number of the freezing period from the start time of the current statistical period to the start freezing time, and the second number of the freezing period from the start time of the current statistical period to the current time based on the preset freezing period; the start freezing time is the time of the first freezing data preset in the current statistical period.

[0111] The determination module 403 is used to determine a first target frozen number of the frozen data at the current time based on the first number and the second number.

[0112] The comparison module 404 is used for comparing and if the first target frozen number is greater than the frozen data number, freezing the data corresponding to the current time to obtain the frozen data at the current time.

[0113] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0114] The frozen data processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0115] The embodiment of the present invention also provides a computer device having the above Figure 4 The frozen data processing device is shown.

[0116] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0117] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include an integrated circuit. The integrated circuit may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0118] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0119] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0120] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0121] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0122] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0123] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0124] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for processing frozen data, characterized in that: The method comprises: When the time of the meter end is calibrated, the starting freezing time and the number of frozen data in the current statistical period are obtained; the starting freezing time is the time of the first frozen data preset in the current statistical period; Based on the preset freezing period, the first number of the freezing period from the start time of the current statistical period to the start freezing time, and the second number of the freezing period from the start time of the current statistical period to the current time are counted; the start freezing time is the time of the first freezing of data preset in the current statistical period; Determine a first target freezing number of the frozen data at the current time based on the first number and the second number; If the first target frozen number is greater than the frozen data number, the data corresponding to the current time is frozen to obtain the frozen data at the current time.

2. The method according to claim 1, characterized in that After determining the first target frozen number of the frozen data at the current time based on the first number and the second number, the method further includes: If the first target frozen number is less than the number of frozen data, determining the last frozen data from the frozen data in the current statistical period; The last frozen data is deleted from the meter terminal.

3. The method according to claim 1, characterized in that After obtaining the starting freezing time and the number of frozen data in the current statistical period, it also includes: Obtain the current statistical period; Based on the current statistical period and the freezing period, determining a second target freezing number of the current statistical period; If the number of frozen data is greater than or equal to the second target frozen number, the first target frozen number is reset to zero.

4. The method according to any one of claims 1 to 3, characterized in that: The starting freezing time includes: the number of hours of the starting freezing time and the number of minutes of the starting freezing time; The step of counting the first number of the freezing period from the start time of the current statistical period to the start freezing time based on the preset freezing period includes: Determine the first number according to the number of minutes of the freezing cycle, the number of hours of the starting freezing time, the number of minutes of the starting freezing time, and a first preset relationship; The first preset relationship is: N1=(A×(60 / E))+B / E Among them, N1 is the first number, A is the number of hours of the starting freezing time, E is the number of minutes of the freezing period, B is the number of minutes of the starting freezing time, 60 / E is the rounded result of 60 divided by E, and B / E is the rounded result of B divided by E.

5. The method according to any one of claims 1 to 3, characterized in that: The current time includes: the hours of the current time and the minutes of the current time; Based on a preset freezing period, counting the second number of the freezing period from the start time of the current statistical period to the start freezing time includes: Determine the second number according to the number of minutes of the freezing period, the number of hours of the current time, the number of minutes of the current time, and a second preset relationship; The second preset relationship is: N2=(C×(60 / E))+D / E Among them, N2 is the second number, C is the hour of the current time, E is the minute of the freezing period, D is the minute of the current time, 60 / E is the rounded result of 60 divided by E, and D / E is the rounded result of D divided by E.

6. The method according to any one of claims 1 to 3, characterized in that: The determining, based on the first number and the second number, a first target frozen number of the frozen data at the current time includes: If the first number is less than or equal to the second number, the first target frozen number is determined according to the first number, the second number, and a third preset relationship; The third preset relationship is: F=N2-N1+1 Among them, F is the first target frozen number, N2 is the second number, and N1 is the first number.

7. The method according to any one of claims 1 to 3, characterized in that: The determining, based on the first number and the second number, a first target frozen number of the frozen data at the current time includes: If the first number is greater than the second number, the first target frozen number is determined according to the first number, the second number, and a fourth preset relationship; The fourth preset relationship is: F=(K×(60 / E))-(N1-N2-1) Among them, F is the first target frozen number, N2 is the second number, N1 is the first number, and K is the current statistical period.

8. A frozen data processing device, characterized in that: The device comprises: The acquisition module is used to acquire the starting freezing time and the number of frozen data in the current statistical period when the time of the meter end is calibrated; the starting freezing time is the time of the first frozen data preset in the current statistical period; A statistical module, for counting the first number of the freezing period from the start time of the current statistical period to the start freezing time, and the second number of the freezing period from the start time of the current statistical period to the current time, based on a preset freezing period; the start freezing time is the time of freezing data for the first time preset in the current statistical period; A determination module, configured to determine a first target frozen number of the frozen data at the current time based on the first number and the second number; The comparison module is used for comparing and if the first target frozen number is greater than the frozen data number, freezing the data corresponding to the current time to obtain the frozen data at the current time.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the frozen data processing method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for processing frozen data according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Freeze data storage method of electric energy meter based on FLASH pre-erasing technology and electric energy meter

    CN114356792A

  • Automatic test method, storage medium and electronic equipment

    CN116008901A