A waveform data recording method and device for power grid frequency abnormal events
By employing pre-sampling caching and segmented downsampling rate methods, combined with a RAM-Dataflash-EEPROM storage architecture, the contradiction between high sampling rate and low storage usage in power grid frequency anomaly event recording data is resolved. This enables the tracing and efficient storage of historical data prior to faults, supporting power grid fault analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG REALLIN ELECTRON CO LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies cannot balance high sampling rates and low storage requirements in recording waveform data of abnormal power grid frequency events, resulting in the inability to transmit fault information in a timely manner and inaccurate fault type identification. Furthermore, they lack the ability to trace historical data prior to the occurrence of the fault.
A pre-sampling caching mechanism is adopted to continuously collect and cache data when the power grid is operating normally. When an anomaly is triggered, the sampling rate is reduced in stages and the data is saved to non-volatile memory. Combined with a three-level storage architecture of RAM-Dataflash-EEPROM, high-precision sampling and long-term recording are achieved, and data interaction is realized through the Modbus protocol.
It enables the tracing of historical data prior to the fault, improves storage efficiency, ensures high-precision sampling and long-term recording, solves the problems of data transmission bottlenecks and unreasonable resource allocation, and supports power grid fault analysis and management.
Smart Images

Figure CN121597598B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system monitoring and data recording technology, specifically to a method and apparatus for recording waveform data of abnormal power grid frequency events. Background Technology
[0002] With the expansion of new energy grid connection, grid frequency fluctuations have increased significantly. After large-scale distributed photovoltaic (PV) grid connection, when grid faults occur, the output power of PV inverters exhibits rapid changes and long durations. To accurately capture grid fault information, high-quality fault recording data must meet the dual requirements of high sampling rate and long delay.
[0003] Existing waveform recorders generally use a fixed sampling frequency. When high-quality waveform data is required, a high sampling rate scheme is typically used, which can accurately record transient processes such as voltage drops and current surges at the moment a fault occurs, and can analyze higher harmonic characteristics. However, this high sampling rate scheme generates a huge amount of data storage when recording long-delay data on the order of minutes. Due to the narrow bandwidth of distribution network carrier communication, it is impossible to transmit large amounts of data, resulting in fault information not being transmitted to the dispatch center in a timely manner.
[0004] To reduce data storage, some solutions opt for low sampling rates. While this reduces storage pressure, the low sampling frequency can easily lose details of high-frequency signals. It can only analyze the effective and peak values of current and voltage, failing to capture transient changes during power grid short circuits. This makes it difficult to identify key fault characteristics such as harmonic components, voltage drops or rises, thus affecting the accuracy of fault type identification and fault location.
[0005] Furthermore, existing technologies have the following shortcomings: First, they only record the time when frequency anomalies occur or use fixed time windows, lacking the ability to save historical data before the fault occurs, and thus failing to trace the fault evolution mechanism. Second, they fail to dynamically adjust the sampling strategy according to the characteristics of different stages of the fault process, resulting in unreasonable resource allocation. Third, the data interaction mechanism with external systems is simple, event management lacks flexibility, and is not conducive to centralized management and control of large-scale equipment.
[0006] Chinese patent document CN110794255B discloses a method and system for predicting distribution network faults. By extracting the lead time, data density, downsampled waveform, and local waveform features from historical waveform data, and inputting them into a prediction model composed of a deep convolutional neural network and a long short-term memory network, it achieves early warning of distribution network faults and plays a proactive role in preventing risks. However, this solution focuses on fault prediction rather than a complete record of the fault process, and requires a large amount of historical data to train a complex neural network model. It has high hardware resource requirements and is difficult to deploy on resource-constrained embedded platforms. It also cannot solve the contradiction between high sampling rate and low storage usage of fault waveform data.
[0007] Chinese patent document CN120801901A discloses a method, apparatus, equipment, and storage medium for processing fault waveform data. It adopts a phased variable sampling rate strategy, which detects harmonics and records them at a high sampling rate during the fault occurrence stage, appropriately reduces the sampling rate during the fault development stage, and dynamically adjusts the sampling frequency according to changes in electrical quantities during the fault change stage. This achieves a data compression effect of more than 95% and effectively solves the problem of limited carrier communication bandwidth. However, this scheme does not involve a pre-sampling mechanism before the fault occurs and lacks the ability to trace historical data before the event is triggered. Summary of the Invention
[0008] The purpose of this invention is to provide a method and apparatus for recording waveform data of abnormal power grid frequency events that can achieve historical data tracing before a fault, balance high-precision sampling and long-term recording under limited storage resources, and significantly improve storage efficiency.
[0009] To achieve the above objectives, the present invention provides the following technical solution:
[0010] A method for recording waveform data of power grid frequency anomaly events includes the following steps:
[0011] S1: Under the preset normal operation of the power grid, continuously collect power grid electrical parameter data and cache it in volatile memory to form a rolling time window of data with a preset cache duration;
[0012] S2: Detect whether the power grid frequency exceeds the preset threshold and continues for a preset duration. If so, trigger the abnormal event flag.
[0013] S3: When the abnormal event flag is triggered, read the rolling time window data cached in the volatile memory, segment the data according to the time distance from the trigger time and process it with different downsampling rates, and save the processed data to the non-volatile memory.
[0014] S4: After the event is triggered, continue to collect power grid electrical parameter data, and save the data to the non-volatile memory after processing with decreasing downsampling rates according to the time progress.
[0015] S5: After saving the event data in the non-volatile memory, record the readable identifier of the event;
[0016] S6: Respond to the data reading request from the external device through the communication interface, transmit the corresponding waveform data according to the readable identifier, and delete the readable identifier after the transmission is completed.
[0017] Furthermore: In S1, the three-phase voltage and three-phase current data of the power grid are collected with a sampling period of 5ms-20ms, and the buffering time is 20-30 seconds.
[0018] Further: In S3, the data of the first time period before the event is triggered is processed with a first downsampling rate, and the data of the second time period before the event is triggered is processed with a second downsampling rate. The first time period is earlier than the second time period, and the first downsampling rate is lower than the second downsampling rate.
[0019] Furthermore: the first time period is 15 seconds to 25 seconds, and the sampling interval corresponding to the first downsampling rate is 2 seconds to 6 seconds; the second time period is 3 seconds to 7 seconds, and the sampling interval corresponding to the second downsampling rate is 30 milliseconds to 70 milliseconds.
[0020] Further: In S4, the third downsampling rate is used during the third time period after the event is triggered, the fourth downsampling rate is used during the fourth time period, and the fifth downsampling rate is used during the fifth time period. The third downsampling rate, the fourth downsampling rate, and the fifth downsampling rate decrease sequentially, and the third time period, the fourth time period, and the fifth time period are arranged sequentially and their durations increase sequentially.
[0021] Furthermore: the third time period is 50 seconds to 70 seconds, and the sampling interval corresponding to the third downsampling rate is 30 milliseconds to 70 milliseconds; the fourth time period is 3 minutes to 5 minutes, and the sampling interval corresponding to the fourth downsampling rate is 0.8 seconds to 1.2 seconds; the fifth time period is 4 minutes to 6 minutes, and the sampling interval corresponding to the fifth downsampling rate is 2 seconds to 6 seconds.
[0022] Furthermore, in S3 and S4, the sampled data is grouped into fixed groups, and a save operation is performed when the amount of data after grouping meets the size of the page erase unit of the non-volatile memory.
[0023] Furthermore: the volatile memory is a random access memory, and the non-volatile memory includes a data flash memory and a electrically erasable programmable read-only memory, wherein the data flash memory is used to store waveform data, and the electrically erasable programmable read-only memory is used to store an event mapping table.
[0024] Furthermore, in step S5, the read request is responded to in chronological order of the events, with the earliest event data being transmitted first.
[0025] A waveform data recording device for power grid frequency anomaly events, comprising:
[0026] The data acquisition module is used to continuously collect electrical parameter data of the power grid under normal operating conditions.
[0027] The cache management module is used to receive the data collected by the data acquisition module and cache it in volatile memory to form a rolling time window;
[0028] The event detection module is used to detect whether the power grid frequency exceeds a preset threshold and continues for a preset duration based on the power grid frequency data collected by the data acquisition module; if so, an event flag is triggered.
[0029] The data processing module is used to read the rolling time window data from the cache management module when the event is triggered, according to the event flag of the event detection module, segment the data according to the time distance from the trigger time and process it with different downsampling rates, and process the data continuously collected by the data acquisition module after the event is triggered with decreasing downsampling rates according to the time distance from the trigger time.
[0030] The storage control module is used to save the data processed by the data processing module to a non-volatile memory, and record the readable identifier of the corresponding event after saving is completed;
[0031] The communication interface module is used to respond to data reading requests from external devices based on the readable identifier recorded by the storage control module, transmit waveform data stored in the non-volatile memory, and delete the corresponding readable identifier after the transmission is completed.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] I. This invention uses a pre-sampling caching mechanism to start normal sampling and save historical data for 25 seconds before the event is triggered, filling the gap in traditional technology that cannot trace the fault evolution process and providing a complete time-series basis for power grid fault mechanism analysis.
[0034] Second, this invention adopts a five-stage variable sampling rate strategy, which maintains high-precision sampling during critical periods before and after a fault occurs, and gradually reduces the sampling rate in the later stages of the event, so that the recording time of a single event can reach more than 10 minutes. Compared with the fixed sampling rate scheme, the storage efficiency is improved by several times, and a balance between high sampling rate and low memory usage is achieved under limited hardware resources.
[0035] Third, this invention resolves the contradiction between fast sampling and slow storage by using a three-level storage architecture of RAM-Dataflash-EEPROM in coordination, combined with packet reassembly and page-aligned writing technology. At the same time, the Modbus event mapping table management mechanism enables automated data interaction and dynamic reclamation of storage space, ensuring long-term stable operation of the system. Attached Figure Description
[0036] Figure 1 A flowchart of a waveform data recording method for a power grid frequency anomaly event provided by the present invention;
[0037] Figure 2 A schematic diagram of the structure of a waveform data recording device for abnormal power grid frequency events provided by the present invention;
[0038] Figure 3 A flowchart of the continuous data sampling process provided by the present invention;
[0039] Figure 4 A flowchart of the event triggering confirmation process provided by the present invention;
[0040] Figure 5 A flowchart of the pre-sampling data saving process provided by the present invention;
[0041] Figure 6 A flowchart of the post-sampling buffer data processing procedure provided by the present invention;
[0042] Figure 7 A flowchart of the event query and reading process provided by the present invention. Detailed Implementation
[0043] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] In the description of this invention, it should be noted that EEPROM is an electrically erasable programmable read-only memory, characterized by slow read / write speed and small capacity, but it supports independent erasure and writing on a byte-by-byte basis, making it suitable for storing small amounts of frequently updated data; DataFlash is a data flash memory, characterized by a non-volatile memory with fast read / write speed and large capacity, but it needs to be erased page by page (usually 4096 bytes) before writing; RAM is a random access memory, characterized by being used as a high-speed cache for chips, with access speeds much faster than EEPROM and DataFlash, but it is a volatile memory, and data will be lost after power failure; downsampling specifically refers to averaging multiple high-sampling-rate data points to obtain data point values with lower sampling rates.
[0045] Example 1
[0046] like Figure 1 As shown, this invention provides a method for recording waveform data of abnormal power grid frequency events, comprising the following steps:
[0047] S1: Under the preset normal operation of the power grid, continuously collect power grid electrical parameter data and cache it in volatile memory to form a rolling time window of data with a preset cache duration;
[0048] S2: Detect whether the power grid frequency exceeds the preset threshold and continues for a preset duration. If so, trigger the abnormal event flag.
[0049] S3: When the abnormal event flag is triggered, read the rolling time window data cached in the volatile memory, segment the data according to the time distance from the trigger time and process it with different downsampling rates, and save the processed data to the non-volatile memory.
[0050] S4: After the event is triggered, continue to collect power grid electrical parameter data, and save the data to the non-volatile memory after processing with decreasing downsampling rates according to the time progress.
[0051] S5: After saving the event data in the non-volatile memory, record the readable identifier of the event;
[0052] S6: Respond to the data reading request from the external device through the communication interface, transmit the corresponding waveform data according to the readable identifier, and delete the readable identifier after the transmission is completed.
[0053] In one specific implementation of this embodiment, three-phase voltage and three-phase current data of the power grid are collected with a sampling period of 5ms to 20ms, and a buffer duration of 20 to 30 seconds. The sampling period can be adjusted according to the power grid frequency and data accuracy requirements; in a 50Hz power grid, a 10ms sampling period means collecting two points per cycle. The buffer duration determines the size of the pre-sampling time window; a 25-second buffer can record a sufficiently long period of historical data before a fault occurs.
[0054] In one specific implementation of this embodiment, data from a first time period prior to the event trigger is processed using a first downsampling rate, and data from a second time period prior to the event trigger is processed using a second downsampling rate. The first time period is earlier than the second time period, and the first downsampling rate is lower than the second downsampling rate. The earlier the time, the further away from the time of the fault, and a lower sampling rate is used to save storage space; the closer the time, the higher the sampling rate is maintained to capture pre-fault signs.
[0055] In one specific implementation of this embodiment, the first time period is 15 to 25 seconds, and the sampling interval corresponding to the first downsampling rate is 2 to 6 seconds; the second time period is 3 to 7 seconds, and the sampling interval corresponding to the second downsampling rate is 30 to 70 milliseconds. The first 20 seconds are downsampled at a 4-second sampling rate to obtain 5 data points, and the last 5 seconds are downsampled at a 50-ms sampling rate to obtain 100 data points, thus preserving waveform details near the fault location while compressing the amount of data at the far end.
[0056] In one specific implementation of this embodiment, the sampling rate is downsampled at a third rate during the third time period after the event is triggered, at a fourth rate during the fourth time period, and at a fifth rate during the fifth time period. The third, fourth, and fifth downsampled rates decrease sequentially, and the third, fourth, and fifth time periods are arranged sequentially with increasing durations. In the initial stage after a fault, the electrical quantities change drastically, requiring a high sampling rate. As the system gradually stabilizes over time, the sampling rate can be reduced, and the increasing duration ensures complete recording and recovery of the entire process.
[0057] In one specific embodiment of this example, the third time period is 50 to 70 seconds, and the sampling interval corresponding to the third downsampling rate is 30 to 70 milliseconds; the fourth time period is 3 to 5 minutes, and the sampling interval corresponding to the fourth downsampling rate is 0.8 to 1.2 seconds; the fifth time period is 4 to 6 minutes, and the sampling interval corresponding to the fifth downsampling rate is 2 to 6 seconds. The 60 seconds of stage 3 records the fault development process at a sampling rate of 50 ms, the 4 minutes of stage 4 records the intermediate changes at a sampling rate of 1 second, and the 5 minutes of stage 5 records the recovery phase at a sampling rate of 4 seconds, with a total recording time exceeding 10 minutes.
[0058] In one specific embodiment of this example, the sampled data is grouped into fixed groups. When the amount of data after grouping meets the page erase unit size of the non-volatile memory, a save operation is performed. Every 200 sample points are grouped together and reassembled. The Dataflash page size is 4096 bytes. By unpacking and grouping the data, the data is aligned to the page boundary, avoiding data loss due to write interruption, and improving save efficiency and data integrity.
[0059] In one specific embodiment of this example, the volatile memory is random access memory (RAM), and the non-volatile memory includes data flash memory (Dataflash) and electrically erasable programmable read-only memory (EEPROM). Dataflash stores waveform data, and EEPROM stores the event mapping table. RAM acts as a high-speed cache, offering fast access speeds but data loss upon power failure. Dataflash has a large capacity and fast read / write speeds, but requires page-by-page erasure before writing. EEPROM supports independent byte-by-byte erasure and writing, making it suitable for storing small amounts of frequently updated event mapping table data. This three-tiered storage architecture achieves high-speed sampling, large-capacity storage, and flexible management.
[0060] In one specific implementation of this embodiment, read requests are responded to in chronological order of event occurrence, with the earliest event data being transmitted first. When the host computer queries, the meter prioritizes reading the oldest event, employing a first-in, first-out (FIFO) strategy to ensure dynamic reclamation of Dataflash space, preventing storage space exhaustion and guaranteeing long-term stable system operation.
[0061] Example 2
[0062] like Figure 2 As shown, the present invention also provides a waveform data recording device for abnormal power grid frequency events, including a data acquisition module, a buffer management module, an event detection module, a data processing module, a storage control module, and a communication interface module.
[0063] The data acquisition module is used to continuously collect electrical parameter data of the power grid under normal operating conditions.
[0064] The cache management module is used to receive the data collected by the data acquisition module and cache it in volatile memory to form a rolling time window;
[0065] The event detection module is used to detect whether the power grid frequency exceeds a preset threshold and continues for a preset duration based on the power grid frequency data collected by the data acquisition module; if so, an event flag is triggered.
[0066] The data processing module is used to read the rolling time window data from the cache management module when the event is triggered, according to the event flag of the event detection module, segment the data according to the time distance from the trigger time and process it with different downsampling rates, and process the data continuously collected by the data acquisition module after the event is triggered with decreasing downsampling rates according to the time distance from the trigger time.
[0067] The storage control module is used to save the data processed by the data processing module to a non-volatile memory, and record the readable identifier of the corresponding event after saving is completed;
[0068] The communication interface module is used to respond to data reading requests from external devices based on the readable identifier recorded by the storage control module, transmit waveform data stored in the non-volatile memory, and delete the corresponding readable identifier after the transmission is completed.
[0069] Example 3
[0070] like Figures 3-7 The diagram illustrates a waveform data recording method for abnormal power grid frequency events provided in this embodiment. Through a five-stage event recording design, data before and after abnormal power grid fluctuations are recorded separately, and different sampling rates are used for data acquisition to ensure accurate recording and tracing of power grid waveform data. When power grid frequency fluctuations occur, complete waveform data can be provided, facilitating analysis and fault tracing.
[0071] The method mainly includes the following six steps: presampled data caching, event trigger confirmation, presampled data saving, postsampled cached data processing, postsampled data saving, and event reading.
[0072] 1. Pre-sampling data caching: After the meter is connected to the power supply, it performs real-time sampling every 10ms with high task priority to acquire the frequency and power data of the three phases of the power grid (including active power and reactive power of phases A, B, and C). The collected data is called a "sampling point packet" and is cached in RAM. The data is stored in two stages: "pre-sampling" is completed after 25 seconds. After completion, if an abnormal event condition is triggered, "post-sampling" will begin; if no event is triggered, the new sampled data will overwrite the oldest data in RAM.
[0073] 2. Event Trigger Confirmation: If the power grid frequency exceeds the set threshold and continues for more than 4 seconds, a frequency anomaly flag will be triggered.
[0074] 3. Presampled Data Saving: Once a frequency anomaly flag is detected, the presampled data for this stage will begin to be saved. Using 10ms sampling point packets in RAM, the data for the first 20 seconds is downsampled at a 4s sampling rate (as "Stage 1" data) to reduce the data volume; the data for the last 5 seconds is downsampled at a 50ms sampling rate (as "Stage 2" data), reducing storage pressure while preserving waveform details. The data is reassembled into "sampling point packet groups" (every 200 sampling point packets form a group) and saved to the Dataflash in batches. Simultaneously, the Dataflash's page erase mechanism requires erasure every 4096 bytes written. To avoid write interruptions, data saving will be done using a "packet splitting" method to avoid crossing page boundaries, ensuring data integrity.
[0075] 4. Post-sampling buffer data processing: Post-sampling begins when the frequency anomaly flag is triggered. The meter continues sampling every 10ms, but sampling is not interrupted during data storage. In the post-sampling stage, the data is downsampled according to different sampling rates:
[0076] Phase 3: Sample for 60 seconds, then downsample at a sampling rate of 50ms;
[0077] Phase 4: Sampling for 4 minutes, followed by downsampling at a 1-second sampling rate;
[0078] Phase 5: Sampling for 5 minutes, followed by downsampling at a 4-second sampling rate;
[0079] Every 30 seconds of sampling, the data storage queue will unpack the data and prepare to save it.
[0080] 5. Post-sampled data saving: The post-sampled data saving process is similar to that of pre-sampled data saving. Every 30 seconds, the cached data is split and placed into a saving queue. The main loop periodically checks the saving queue and saves the data in batches to the Dataflash. Once the data saving in stage 5 is complete, the "readable flag" of the event is updated in the event mapping table in the EEPROM.
[0081] 6. Event Reading: Event data can be read via the Modbus protocol. The host computer sends an event query request to the meter via RS485. After receiving the request, the meter checks the "readable queue." If there are events waiting to be read in the queue, it will respond with an affirmative reply. Subsequently, the host computer can request to read data from the meter. After the data is read, the meter will delete the "readable flag" of the corresponding event from the event mapping table of the EEPROM.
[0082] This embodiment begins routine sampling of power grid data before the event occurs, ensuring that relevant data can be retained after the event. By recording power grid fluctuations before the event, detailed pre-anomaly data can be provided, offering reliable data support for power grid optimization.
[0083] This embodiment introduces a multi-stage, flexible sampling rate event recording method. The sampling rate is higher before and after the event to capture detailed power grid waveform data at abnormal moments; while during a certain period after the event, the sampling frequency is reduced according to a preset sampling rate adjustment to save storage resources, thereby making more efficient use of hardware storage space.
[0084] This embodiment effectively reduces the method's demand on chip hardware resources by reusing RAM cache. Data is saved by packaging, reorganizing, and filling DataFlash pages, improving data storage efficiency. Simultaneously, an EEPROM mapping table manages data addresses in DataFlash, enhancing the operability and convenience of data storage and retrieval.
[0085] In this embodiment, when the host computer sends a read request via the Modbus protocol, it will prioritize reading the oldest event data. After the read is complete, the meter will automatically delete the read event records, simplifying the event data management process and improving the efficiency of data reading.
[0086] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent transformations or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for recording waveform data of abnormal power grid frequency events, characterized in that: Includes the following steps: S1: Under the preset normal operation of the power grid, continuously collect power grid electrical parameter data and cache it in volatile memory to form a rolling time window of data with a preset cache duration. The power grid electrical parameters include the power grid frequency. S2: Detect whether the power grid frequency exceeds the preset threshold and continues for a preset duration. If so, trigger the abnormal event flag. S3: When the abnormal event flag is triggered, read the rolling time window data cached in the volatile memory, segment the data according to the time distance from the trigger time and process it with different downsampling rates, and save the processed data to the first non-volatile memory. S4: After the event is triggered, continue to collect power grid electrical parameter data, and save the data to the first non-volatile memory after processing with decreasing downsampling rate according to the time progress. S5: After saving the event data in the first non-volatile memory, record the readable identifier of the event and record the readable identifier in the event mapping table of the second non-volatile memory; S6: Respond to the data reading request from the external device through the communication interface, transmit the corresponding waveform data according to the readable identifier, and delete the readable identifier after the transmission is completed; In S3 and S4, the sampled data is grouped into fixed groups, and a save operation is performed when the amount of data after grouping meets the size of the page erase unit of the non-volatile memory. The volatile memory is a random access memory, the first non-volatile memory includes a data flash memory, and the second non-volatile memory includes a electrically erasable programmable read-only memory, wherein the data flash memory is used to store waveform data, and the electrically erasable programmable read-only memory is used to store an event mapping table.
2. The waveform data recording method for power grid frequency anomaly events according to claim 1, characterized in that: In S1, the three-phase voltage and three-phase current data of the power grid are collected with a sampling period of 5ms-20ms, and the buffering time is 20-30 seconds.
3. The waveform data recording method for power grid frequency anomaly events according to claim 1, characterized in that: In step S3, the data in the first time period before the event is triggered is processed with a first downsampling rate, and the data in the second time period before the event is triggered is processed with a second downsampling rate. The first time period is earlier than the second time period, and the first downsampling rate is lower than the second downsampling rate.
4. The waveform data recording method for power grid frequency anomaly events according to claim 3, characterized in that: The first time period is 15-25 seconds, and the sampling interval corresponding to the first downsampling rate is 2-6 seconds; the second time period is 3-7 seconds, and the sampling interval corresponding to the second downsampling rate is 30-70 milliseconds.
5. The waveform data recording method for power grid frequency anomaly events according to claim 1, characterized in that: In S4, the third downsampling rate is used during the third time period after the event is triggered, the fourth downsampling rate is used during the fourth time period, and the fifth downsampling rate is used during the fifth time period. The third downsampling rate, the fourth downsampling rate, and the fifth downsampling rate decrease sequentially, and the third time period, the fourth time period, and the fifth time period are arranged sequentially and their durations increase sequentially.
6. The waveform data recording method for power grid frequency anomaly events according to claim 5, characterized in that: The third time period is 50 seconds to 70 seconds, and the sampling interval corresponding to the third downsampling rate is 30 milliseconds to 70 milliseconds; the fourth time period is 3 minutes to 5 minutes, and the sampling interval corresponding to the fourth downsampling rate is 0.8 seconds to 1.2 seconds; the fifth time period is 4 minutes to 6 minutes, and the sampling interval corresponding to the fifth downsampling rate is 2 seconds to 6 seconds.
7. The waveform data recording method for power grid frequency anomaly events according to claim 1, characterized in that: In step S5, read requests are responded to in chronological order of event occurrence, with the earliest event data being transmitted first.
8. A waveform data recording device for a power grid frequency anomaly event that implements the method of any one of claims 1-7, characterized in that, include: The data acquisition module is used to continuously acquire electrical parameter data of the power grid under normal operating conditions, including the power grid frequency; The cache management module is used to receive the data collected by the data acquisition module and cache it in volatile memory to form a rolling time window; The event detection module is used to detect whether the power grid frequency exceeds a preset threshold and continues for a preset duration based on the power grid frequency data collected by the data acquisition module; if so, an event flag is triggered. The data processing module is used to read the rolling time window data from the cache management module when the event is triggered, according to the event flag of the event detection module, segment the data according to the time distance from the trigger time and process it with different downsampling rates, and process the data continuously collected by the data acquisition module after the event is triggered with decreasing downsampling rates according to the time distance from the trigger time. The storage control module is used to save the data processed by the data processing module to the first non-volatile memory, and after saving, record the readable identifier of the corresponding event and record the readable identifier to the event mapping table of the second non-volatile memory; The communication interface module is used to respond to data reading requests from external devices based on the readable identifier recorded by the storage control module, transmit waveform data stored in the first non-volatile memory, and delete the corresponding readable identifier after the transmission is completed.