Self-verification method for frozen data storage function of smart electric energy meter
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2026-08-11
AI Technical Summary
[0005]本申请的目的在于提供一种智能电能表冻结数据存储功能的自主验证方法,以解决现有技术中存在的现有测试台体完成多条数据冻结的耗时较长的技术问题
[0016] A second aspect of this application provides a readable storage medium storing a meter freeze verification program, which, when executed, implements an autonomous verification method for the frozen data storage function of a smart meter as described above.
Smart Images

Figure CN120578347B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electricity metering technology, and in particular to an independent verification method for the frozen data storage function of a smart electricity meter. Background Technology
[0002] During operation, smart meters need to record and store metering data at specific times or during special operations. Freezing types include minute-based freezes, hourly freezes, daily freezes, monthly freezes, settlement day freezes, daily time-segment table switching freezes, and time zone table switching freezes, among others. Different freeze types have different freeze periods, different lists of associated objects, and different storage depths, resulting in different storage lengths and the number of records stored per record. When storing these frozen records on an external FLASH chip, various freeze types require zoned storage management. Once a designated partition is full, record rollback is required. After the meter has been running for a period, each storage partition has stored a significant amount of data. Whether data storage is error-free, whether data is overwritten, and whether the rollback mechanism executes correctly after a storage partition is full need to be verified through testing.
[0003] The most common testing method is manual testing. This involves periodically setting a timer on the smart meter using a host computer to accelerate the arrival of a specific freeze time, thus quickly simulating the meter's data freeze condition. Then, the accuracy of the data is determined by reading records of various freeze types. This method is relatively inefficient, and when there are thousands or even tens of thousands of frozen data entries, it is impossible for a human to read and judge all of them, inevitably leading to oversights.
[0004] To avoid human error, automated testing platforms can be used. These platforms simulate voltage and current, then periodically set a timer for the smart meter to freeze its data, and then read the frozen data for analysis. However, this method has drawbacks, namely, it is time-consuming. When the frozen data items are large, the platform may not be able to generate enough test data. Summary of the Invention
[0005] The purpose of this application is to provide an autonomous verification method for the data freezing function of smart meters, in order to solve the technical problem that existing test benches take a long time to freeze multiple data entries. The various technical effects of the preferred technical solutions provided in this application are detailed below.
[0006] To achieve the above objectives, this application provides the following technical solutions:
[0007] The first aspect of this application provides an autonomous verification method for the frozen data storage function of a smart energy meter, comprising: determining multiple virtual freeze times based on a preset virtual duration according to instruction information; when the virtual freeze time is reached, determining whether the virtual freeze time meets a preset time condition; if it does, generating special data for the virtual freeze time, performing freeze processing, and obtaining a freeze record corresponding to the virtual freeze time; wherein the freeze record includes at least one freeze type; traversing each freeze type, verifying each freeze record corresponding to the freeze type, and obtaining a verification result.
[0008] In some embodiments, reaching the virtual freeze time includes: starting from the current time, when the next actual freeze time is reached after a preset actual time, synchronously adding the preset virtual time to the virtual freeze time corresponding to the current time, and reaching the next virtual freeze time, wherein the current time is the starting time or the current actual freeze time, and the preset actual time is less than the preset virtual time.
[0009] In some embodiments, the freeze record includes the freeze type, freeze sequence number, virtual freeze time, and multiple associated object data. The autonomous verification method for the frozen data storage function of the smart energy meter further includes: sequentially locating the byte positions of the freeze type, freeze sequence number, virtual freeze time, and multiple associated object data in the special data, and parsing the byte data at the byte positions to obtain the freeze record.
[0010] In some embodiments, generating special data for the virtual freeze time and performing freeze processing includes: replacing the lowest byte data of the associated object data with a feature check code, wherein the feature check code is the algebraic sum of all byte data of the freeze type, the freeze sequence number, and the virtual freeze time; performing cyclic redundancy check on the entire freeze record to obtain a cyclic redundancy check code; and adding the feature check code and the cyclic redundancy check code to the freeze record.
[0011] In some embodiments, verifying each of the frozen records corresponding to the frozen type includes: reading the frozen record of any frozen type and verifying the frozen record; after verifying all the frozen records of the frozen type one by one, jumping to another frozen type to continue verification.
[0012] In some embodiments, verifying the frozen record includes: reading the cyclic redundancy check code of the frozen record to perform data integrity verification; determining whether the frozen type, the frozen sequence number, and the virtual frozen time of the frozen record meet the expected requirements; determining whether the feature check code of the frozen record is correct; if all are correct, then jumping to the next frozen record; if there is an error, then obtaining the error information of the frozen record as the verification result.
[0013] In some embodiments, the preset time conditions include midnight and the hour, and the freeze types include minute freeze, hour freeze, hour freeze, day freeze, settlement day freeze, instantaneous freeze, time zone table switching freeze, and time period table switching freeze.
[0014] In some embodiments, the autonomous verification method for the data storage freezing function of the smart energy meter further includes: performing minute freezing when the virtual freezing time is an integer multiple of the minute freezing period; performing minute freezing and hour freezing respectively when the virtual freezing time is the hour; performing minute freezing, hour freezing, and day freezing respectively when the virtual freezing time is midnight; and performing settlement day freezing when the virtual freezing time is the settlement day.
[0015] In some embodiments, the freezing depth, freezing period, and data length of each of the freezing types are different.
[0016] A second aspect of this application provides a readable storage medium storing a meter freeze verification program, which, when executed, implements an autonomous verification method for the frozen data storage function of a smart meter as described above.
[0017] Implementing one of the technical solutions described in this application has the following advantages or beneficial effects: In this application, multiple virtual freeze times are determined based on a preset virtual duration. Special data is generated and frozen for virtual freeze times that meet the preset time conditions to obtain freeze records. Subsequently, the freeze records for each freeze type are verified to obtain verification results. In this case, frozen data generated over a long period can be simulated based on the preset virtual duration, significantly reducing testing time compared to existing technologies. Furthermore, since data freezing is performed using virtual freeze times and preset virtual durations, it helps verify the data storage situation of the electricity meter during its long-term operation, further verifying the storage reliability of the electricity meter. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0019] Figure 1 This is a flowchart illustrating the autonomous verification method for the frozen data storage function of a smart energy meter according to an embodiment of this application.
[0020] Figure 2 This is a schematic diagram of the freeze record storage structure according to an embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, various exemplary embodiments described below will be referenced to the accompanying drawings, which form part of the exemplary embodiments and depict various exemplary embodiments that may be adopted to implement this application. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. It should be understood that they are merely examples of processes, methods, and apparatuses consistent with some aspects of this application disclosed as detailed in the appended claims, and other embodiments may be used, or structural and functional modifications may be made to the embodiments listed herein without departing from the scope and spirit of this application.
[0022] In the description of this application, it should be understood that the terms "center," "longitudinal," "lateral," etc., indicate the orientation or positional relationship based on the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the referred element must have a specific orientation, or be constructed and operated in a specific orientation. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. The term "multiple" means two or more. The terms "connected" and "linked" should be interpreted broadly, for example, they can be fixed connections, detachable connections, integral connections, mechanical connections, electrical connections, communication connections, direct connections, indirect connections through an intermediate medium, and can be the internal connection of two elements or the interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more of the related listed items. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0023] To illustrate the technical solutions described in this application, specific embodiments are provided below, showing only the parts related to the embodiments of this application.
[0024] like Figures 1 to 2 As shown, this application provides an autonomous verification method for the frozen data storage function of a smart energy meter, including the following steps (steps S1 to S3):
[0025] S1. Based on the instruction information, determine multiple virtual freeze times according to the preset virtual duration.
[0026] The self-verification method proposed in this application can be applied to scenarios involving the verification of frozen data in smart meters. A smart meter may include a measurement unit, a data processing unit, and a communication unit, and can be used for energy metering, information storage and processing, real-time monitoring, automatic control, and information interaction.
[0027] Smart meters can communicate with a host computer and receive commands from it. Based on these commands, the smart meter can initiate a data freezing process and a verification process. The smart meter can use the current moment as the start time for the data freezing process and obtain the end time from the command information. That is, data freezing occurs from the start time to the end time. After the data freezing process is complete, the verification process begins. The end time can be a specific future time.
[0028] S2. When the virtual freeze time is reached, determine whether the virtual freeze time meets the preset time conditions. If it does, generate special data for the virtual freeze time, perform freeze processing, and obtain the freeze record corresponding to the virtual freeze time; wherein the freeze record includes at least one freeze type.
[0029] In some embodiments, reaching the virtual freeze time may include: starting from the current time, when the next actual freeze time is reached after a preset actual time, synchronously adding a preset virtual time to the virtual freeze time corresponding to the current time, and reaching the next virtual freeze time, wherein the current time is the starting time or the current actual freeze time, and the preset actual time is less than the preset virtual time.
[0030] Specifically, the electricity meter can use an internal virtual counter to accelerate time from the starting moment. After a preset actual duration, the first actual freeze moment is reached. At this point, the preset virtual duration is synchronously added to the starting moment, reaching the first virtual freeze moment. The actual freeze moment and the virtual freeze moment correspond. Subsequently, after another preset actual duration, the second actual freeze moment is reached from the first actual freeze moment. At this point, the virtual counter also synchronously adds the preset virtual duration to the first virtual freeze moment, obtaining the second virtual freeze moment, and so on, until the end moment is reached. At this point, multiple virtual freeze moments can be determined. The starting moment can be the nearest whole minute to the start of the data freezing process.
[0031] In some embodiments, the preset actual duration and preset virtual duration can remain unchanged or be adjusted according to actual needs. For example, the preset actual duration can be 10 milliseconds, and the preset virtual duration can be 60 seconds, which means the time is accelerated by 6000 times. The cutoff time can be set according to the virtual freeze time or the actual freeze time. Assuming that the start time is 0:00, the cutoff time can be the virtual freeze time after n preset virtual durations of 60 seconds, or it can be the actual freeze time after n preset actual durations of 10 milliseconds. Furthermore, the first virtual freeze time and the first actual freeze time can also be the start time, and the cutoff time can be the last virtual freeze time and the last actual freeze time. Thus, it is possible to compress frozen data that requires many years of operation of smart meters to the minute level, to verify the data storage status of the meter after decades of operation within tens of seconds, and it can also be used for long-term stability storage testing of FLASH chips.
[0032] In some embodiments, the freeze record may include a freeze type, a freeze sequence number, a virtual freeze time, and multiple associated object data. The freeze type can be represented by 1 byte, and the associated object can be a dynamically configured data structure in the DL698 protocol, used to define data objects (such as electrical energy, event records, load curves, etc.). Through the associated object, the energy meter can automatically perform data acquisition, storage, or reporting according to preset rules, without relying on real-time commands from the master station.
[0033] In some embodiments, the autonomous verification method for the frozen data storage function of a smart energy meter may further include: sequentially locating the byte positions of the freeze type, freeze sequence number, virtual freeze time, and multiple associated object data in special data, and parsing the byte data at the byte positions to obtain the freeze record. Specifically, the special data generated at the virtual freeze time can be identified according to the frame structure of the applicable protocol, and the data identifier and data field can be extracted before the location operation is performed.
[0034] In some embodiments, generating special data for the virtual freeze moment and performing freeze processing may include: replacing the lowest byte data of the associated object data with a feature checksum, wherein the feature checksum is the algebraic sum of all byte data at the freeze type, freeze sequence number, and virtual freeze moment; performing cyclic redundancy check on the entire freeze record to obtain a cyclic redundancy check code; and adding the feature checksum and the cyclic redundancy check code to the freeze record. The dual verification mechanism of feature checksum + CRC ensures the accuracy of data verification.
[0035] The following is an example of generating a feature checksum: For example, if the freeze type is 0xA1 (1 byte), the freeze sequence number is 0x0001 (2 bytes), and the freeze time is 0x07E4051F (4 bytes), then the feature checksum can be 0xA1+0x00+0x01+0x07+0xE4+0x05+0x1F=0xF2.
[0036] In some embodiments, preset time conditions may include midnight and the hour, and freeze types may include minute freeze, hourly freeze, hourly freeze, daily freeze, settlement day freeze, instantaneous freeze, time zone table switching freeze, and time period table switching freeze. Each freeze type can be associated with multiple freeze records. In some embodiments, when the virtual freeze time is an integer multiple of the minute freeze period, minute freeze is performed; when the virtual freeze time is the hour, minute freeze and hourly freeze can be performed separately; when the virtual freeze time is midnight, minute freeze, hourly freeze, and daily freeze can be performed separately; when the virtual freeze time is the settlement day, settlement day freeze is performed. That is, some freeze records corresponding to different freeze types may be the same. The electricity meter allocates different sizes of space to store freeze records for various freeze types. The freeze depth, freeze period, and data length of different freeze types may be different. For example, minute freeze needs to be able to store 35,040 freeze records, and minute freeze is configured with 10 associated objects; hourly freeze needs to be able to store 254 freeze records, and hourly freeze is configured with 3 associated objects.
[0037] S3. Iterate through each type of freeze, verify each freeze record corresponding to the freeze type, and obtain the verification results.
[0038] In some embodiments, verifying each frozen record corresponding to a frozen type may include: reading frozen records of any frozen type and verifying the frozen records; after verifying all frozen records of a frozen type one by one, jumping to another frozen type to continue verification. For example, multiple frozen records corresponding to a minute-based frozen type can be verified, and after verification is completed, jumping to an hourly frozen type to continue verification.
[0039] In some embodiments, verifying a frozen record may include: reading the cyclic redundancy check (CR) code of the frozen record to perform data integrity verification; determining whether the frozen type, frozen sequence number, and virtual frozen time of the frozen record meet the expected requirements; determining whether the feature check code of the frozen record is correct; if all are correct, proceeding to the next frozen record; if an error occurs, obtaining the error information of the frozen record as the verification result. Specifically, the CR code, frozen type, frozen sequence number, virtual frozen time, and feature check code of the frozen record can be verified sequentially, or partially or entirely in parallel. After the verification of a frozen record is completed, the next frozen record of the same frozen type can be verified, and so on. Furthermore, the misalignment information of the frozen record can be printed, thereby facilitating operators to obtain information more intuitively.
[0040] The self-verification method for the frozen data storage function of smart energy meters proposed in this application can rely on the energy meter's internal verification system, thereby breaking through the dependence on external devices.
[0041] In this application, multiple virtual freeze times are determined based on a preset virtual duration. Special data is generated and frozen for virtual freeze times that meet the preset time conditions to obtain freeze records. Subsequently, the freeze records for each freeze type are verified to obtain verification results. In this approach, frozen data generated over a long period can be simulated based on the preset virtual duration, significantly reducing testing time compared to existing technologies. Furthermore, since data freezing is performed using virtual freeze times and preset virtual durations, it helps verify the data storage situation of the electricity meter during its long-term operation, further verifying the meter's storage reliability.
[0042] Those skilled in the art will understand that all or part of the features / steps of the above-described method embodiments can be implemented by a method, a data processing system, or a meter freezing verification program. These features can be implemented without hardware, entirely in software, or a combination of hardware and software. The aforementioned meter freezing verification program can be stored in one or more readable storage media. When the meter freezing verification program is executed (e.g., by a processor), it performs the steps of the autonomous verification method embodiments, including the above-described smart meter frozen data storage function. The aforementioned storage media capable of storing program code includes: FLASH chips.
[0043] The above description is merely a preferred embodiment of this application. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of this application. Furthermore, under the teachings of this application, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of this application. Therefore, this application is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of this application.
Claims
1. An independent verification method for the frozen data storage function of a smart energy meter, characterized in that, include: Based on the instruction information, multiple virtual freeze times are determined according to a preset virtual duration; When the virtual freeze time is reached, it is determined whether the virtual freeze time meets the preset time conditions. If it does, special data for the virtual freeze time is generated, and the freeze process is performed to obtain the freeze record corresponding to the virtual freeze time; wherein the freeze record includes at least one freeze type. Iterate through each of the aforementioned freeze types, verify each of the freeze records corresponding to the aforementioned freeze type, and obtain the verification results; Reaching the virtual freeze time includes: starting from the current time, when the next actual freeze time is reached after a preset actual time, the preset virtual time is synchronously added to the virtual freeze time corresponding to the current time to reach the next virtual freeze time, wherein the current time is the starting time or the current actual freeze time, and the preset actual time is less than the preset virtual time.
2. The self-verification method for the frozen data storage function of a smart energy meter according to claim 1, characterized in that, The freeze record includes the freeze type, freeze sequence number, virtual freeze time, and multiple associated object data. The autonomous verification method for the frozen data storage function of the smart energy meter further includes: sequentially locating the byte positions of the freeze type, freeze sequence number, virtual freeze time, and multiple associated object data in the special data, and parsing the byte data at the byte positions to obtain the freeze record.
3. The self-verification method for the frozen data storage function of a smart energy meter according to claim 2, characterized in that, The specific data for generating the virtual freeze time, and the freezing process, includes: The lowest byte of the associated object data is replaced using a feature check code, wherein the feature check code is the algebraic sum of all bytes of data at the freeze type, the freeze sequence number, and the virtual freeze time. Perform cyclic redundancy check on the entire frozen record to obtain the cyclic redundancy check code; Add the feature check code and the cyclic redundancy check code to the frozen record.
4. The self-verification method for the frozen data storage function of a smart energy meter according to claim 3, characterized in that, The verification of each frozen record corresponding to the frozen type includes: reading the frozen record of any frozen type and verifying the frozen record; after verifying all frozen records of the frozen type one by one, jumping to another frozen type to continue verification.
5. The self-verification method for the frozen data storage function of a smart energy meter according to claim 4, characterized in that, The verification of the frozen record includes: reading the cyclic redundancy check code of the frozen record to perform data integrity verification; determining whether the frozen type, frozen sequence number, and virtual frozen time of the frozen record meet the expected requirements; determining whether the feature check code of the frozen record is correct; if all are correct, then jump to the next frozen record; if there is an error, then obtain the error information of the frozen record as the verification result.
6. The self-verification method for the frozen data storage function of a smart energy meter according to claim 1, characterized in that, The preset time conditions include midnight and the hour, and the freeze types include minute freeze, hour freeze, hour freeze, day freeze, settlement day freeze, instantaneous freeze, time zone table switching freeze, and time period table switching freeze.
7. The self-verification method for the frozen data storage function of a smart energy meter according to claim 6, characterized in that, The autonomous verification method for the data freezing function of the smart energy meter further includes: performing minute freezing when the virtual freezing time is an integer multiple of the minute freezing period; performing minute freezing and hour freezing respectively when the virtual freezing time is the hour; performing minute freezing, hour freezing and day freezing respectively when the virtual freezing time is midnight; and performing settlement day freezing when the virtual freezing time is the settlement day.
8. The self-verification method for the frozen data storage function of a smart energy meter according to claim 1, characterized in that, The freezing depth, freezing period, and data length are different for each of the aforementioned freezing types.
9. A readable storage medium, characterized in that, The storage medium stores a meter freeze verification program, which, when executed, implements the autonomous verification method for the frozen data storage function of the smart energy meter as described in any one of claims 1-8.
Citation Information
Patent Citations
Data recording and freezing data recovery method for abnormity of calendar clock of electric energy meter
CN109239426A
Electric energy meter flying diagnosis method and high-speed power line carrier module
CN110927655A