Power consumption data compression method, device, system and computer program product

By predicting the load change rate and generating differentiated reporting instructions at the power control center master station, the compression strategy of the edge terminal is dynamically adjusted, which solves the problems of poor power load data compression effect and high computational overhead in the existing technology and realizes efficient data transmission in complex environments.

CN122394567APending Publication Date: 2026-07-14GUIZHOU POWER GRID CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUIZHOU POWER GRID CO LTD
Filing Date
2026-03-24
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing power load data compression schemes are difficult to adapt to dynamic changes, resulting in poor compression performance, high computational overhead, and a lack of real-time awareness of the communication environment, which affects data transmission efficiency and reliability.

Method used

By using a load data prediction model at the power control center master station to predict the load change rate of edge terminals, differentiated electricity data reporting instructions are generated to guide edge terminals to dynamically adjust compression strategies based on the relationship between load change rate and threshold, including high-frequency or low-frequency modes and corresponding data compression algorithms, to adapt to the dynamic characteristics of load changes.

Benefits of technology

It significantly improves the compression effect of power load data, balances the computing power consumption of edge terminals with data transmission efficiency, solves the adaptability problem of fixed compression strategies, and ensures the reliability and real-time performance of data transmission in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122394567A_ABST
    Figure CN122394567A_ABST
Patent Text Reader

Abstract

The application relates to a power consumption data compression method, device, system and computer program product. The method comprises the following steps: acquiring historical load data sequence of an edge terminal in a first time period; predicting the predicted load data sequence of the edge terminal in a second time period by using a load data prediction model according to the historical load data sequence, wherein the second time period is a time period after the first time period; determining the load change rate in the second time period according to the predicted load data sequence; generating a power consumption data reporting instruction according to the size relationship between the load change rate and a load change rate threshold; and sending the power consumption data reporting instruction to the edge terminal, so that the edge terminal determines a data compression strategy according to the reporting frequency control mode indicated by the power consumption data reporting instruction, and reports the compressed power consumption data according to the data compression strategy. The method can improve the power load data compression effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, system and computer program product for compressing electrical data. Background Technology

[0002] With the deepening of the construction of new power systems, the distribution network, as the hub connecting the power system and end users, has made the intelligence level of its end-point sensing nodes crucial for improving the real-time observability of the system. The widespread deployment of measurement equipment such as smart meters and low-voltage distribution area acquisition terminals has led to an explosive growth in end-point data due to the dual increase in sampling frequency and monitoring dimensions, placing enormous pressure on the power communication network. Because power edge terminals are generally deployed in complex physical environments, they often exhibit typical characteristics such as "limited computing power, insufficient storage resources, and limited communication bandwidth." Especially in low-power wireless or power line carrier communication scenarios, the extremely precious uplink bandwidth is insufficient to handle the massive, unprocessed raw data streams.

[0003] Therefore, data compression has become a core means to reduce the volume of power distribution data and alleviate communication pressure. Currently, it is mainly divided into two technical paths: lossy compression and lossless compression. Lossless compression focuses on re-encoding bit by bit using the statistical characteristics of the data, aiming to eliminate redundancy without sacrificing accuracy. Representative algorithms include Huffman coding based on character frequency, LZ series coding (such as LZ77 and LZMA) based on dictionary search to eliminate repeating patterns, and Golomb coding suitable for geometrically distributed data. However, lossless compression typically has a low compression ratio, making it difficult to meet the extreme power-saving requirements of massive data volumes. In contrast, lossy compression achieves a higher compression ratio by sacrificing some accuracy. Widely used techniques include wavelet transform to capture signal abrupt changes through multi-resolution analysis, principal component analysis (PCA) and singular value decomposition (SVD) to reduce the correlation of multidimensional data using linear transformations, compressed sensing (CS) to reduce the amount of raw sampling by utilizing signal sparsity, and neural networks with adaptive feature extraction capabilities.

[0004] However, existing data compression schemes have gradually shown their limitations in actual operation, making it difficult to adapt to the dynamic changes in power load data, resulting in poor power load data compression performance. Summary of the Invention

[0005] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for compressing electricity load data that can improve the compression effect of electricity load data, in order to address the above-mentioned technical problems.

[0006] In a first aspect, this application provides a method for compressing electricity consumption data, including:

[0007] Obtain the historical load data sequence within the first time period reported by the edge terminal;

[0008] Based on the historical load data sequence, a load data prediction model is used to predict the predicted load data sequence of the edge terminal in a second time period, where the second time period is the period following the first time period.

[0009] Based on the predicted load data sequence, determine the load change rate within the second time period;

[0010] Based on the relationship between the load change rate and the load change rate threshold, an electricity consumption data reporting instruction is generated.

[0011] The power consumption data reporting instruction is sent to the edge terminal, so that the edge terminal determines the data compression strategy according to the reporting frequency control mode indicated by the power consumption data reporting instruction, and compresses the collected power consumption data according to the data compression strategy before reporting.

[0012] Secondly, this application also provides an electrical data compression device, comprising:

[0013] The historical load data acquisition module is used to acquire the historical load data sequence within the first time period reported by the edge terminal;

[0014] The load data prediction module is used to predict the predicted load data sequence of the edge terminal in a second time period based on the historical load data sequence and using a load data prediction model. The second time period is the time period after the first time period.

[0015] The load change rate determination module is used to determine the load change rate within the second time period based on the predicted load data sequence.

[0016] The instruction generation module is used to generate an electricity consumption data reporting instruction based on the relationship between the load change rate and the load change rate threshold.

[0017] The instruction sending module is used to send the electricity consumption data reporting instruction to the edge terminal, so that the edge terminal determines the data compression strategy according to the reporting frequency control mode indicated by the electricity consumption data reporting instruction, and reports the collected electricity consumption data after compressing it according to the data compression strategy.

[0018] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described power data compression method.

[0019] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described power data compression method.

[0020] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described power data compression method.

[0021] Sixthly, this application also provides an electricity data compression system, the system comprising a power control center master station and edge terminals, wherein:

[0022] The power control center master station acquires the historical load data sequence within a first time period reported by the edge terminal. Based on the historical load data sequence, it uses a load data prediction model to predict the predicted load data sequence of the edge terminal within a second time period, where the second time period is the period following the first time period. Based on the predicted load data sequence, it determines the load change rate within the second time period. Based on the relationship between the load change rate and a load change rate threshold, it generates an electricity consumption data reporting instruction and sends the electricity consumption data reporting instruction to the edge terminal.

[0023] The edge terminal determines a data compression strategy based on the reporting frequency control mode indicated by the power consumption data reporting instruction, and then compresses the collected power consumption data according to the data compression strategy before reporting it.

[0024] The aforementioned electricity data compression methods, devices, systems, computer equipment, computer-readable storage media, and computer program products generate differentiated electricity data reporting instructions based on forward-looking predictions of historical load data sequences and load change rate threshold determination. This deeply binds the compression strategy of the edge terminal with the dynamic characteristics of power load data, completely changing the passive situation of existing solutions that use fixed compression strategies. When the predicted load change rate exceeds the threshold, the terminal switches to a compression path adapted to drastic load fluctuations, accurately matching the time-varying characteristics of high data redundancy. When the load change rate is within the threshold, the terminal adopts a lightweight compression strategy, adapting to the data characteristics during periods of stable load. This adaptive control mechanism based on load change trends ensures that the selection of compression algorithms is no longer divorced from the fluctuation patterns of the data itself, effectively solving the core pain point that fixed solutions struggle to adapt to dynamic load changes. It significantly improves the power load data compression effect across all scenarios, while simultaneously balancing the computational overhead and data transmission efficiency of the edge terminal while ensuring compression gain. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is an application environment diagram of the power consumption data compression method in one embodiment;

[0027] Figure 2 This is a flowchart illustrating a power data compression method in one embodiment;

[0028] Figure 3 This is a flowchart illustrating the steps for determining a data compression strategy in one embodiment;

[0029] Figure 4 This is a flowchart illustrating the data decompression steps in one embodiment;

[0030] Figure 5 This is a technical architecture diagram of an electricity data compression method in one embodiment;

[0031] Figure 6 This is a flowchart illustrating the steps of the first stage in one embodiment;

[0032] Figure 7 This is a flowchart illustrating the steps of the second stage in one embodiment;

[0033] Figure 8 This is a schematic diagram of the adaptive compression and encapsulation process in one embodiment;

[0034] Figure 9 This is a flowchart illustrating the steps of the third stage in one embodiment;

[0035] Figure 10 This is a structural block diagram of an electrical data compression device in one embodiment;

[0036] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0038] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0039] With the deepening of the construction of new power systems, the distribution network, as the hub connecting the power system and end users, has made the intelligence level of its end-point sensing nodes crucial for improving the real-time observability of the system. The widespread deployment of measurement equipment such as smart meters and low-voltage distribution area acquisition terminals has led to an explosive growth in end-point data due to the dual increase in sampling frequency and monitoring dimensions, placing enormous pressure on the power communication network. Because power edge terminals are generally deployed in complex physical environments, they often exhibit typical characteristics such as "limited computing power, insufficient storage resources, and limited communication bandwidth." Especially in low-power wireless or power line carrier communication scenarios, the extremely precious uplink bandwidth is insufficient to handle the massive, unprocessed raw data streams.

[0040] Therefore, data compression has become a core means to reduce the volume of power distribution data and alleviate communication pressure. Currently, it is mainly divided into two technical paths: lossy compression and lossless compression. Lossless compression focuses on re-encoding bit by bit using the statistical characteristics of the data, aiming to eliminate redundancy without sacrificing accuracy. Representative algorithms include Huffman coding based on character frequency, LZ series coding (such as LZ77 and LZMA) based on dictionary search to eliminate repeating patterns, and Golomb coding suitable for geometrically distributed data. However, lossless compression typically has a low compression ratio, making it difficult to meet the extreme power-saving requirements of massive data volumes. In contrast, lossy compression achieves a higher compression ratio by sacrificing some accuracy. Widely used techniques include wavelet transform to capture signal abrupt changes through multi-resolution analysis, principal component analysis (PCA) and singular value decomposition (SVD) to reduce the correlation of multidimensional data using linear transformations, compressed sensing (CS) to reduce the amount of raw sampling by utilizing signal sparsity, and neural networks with adaptive feature extraction capabilities.

[0041] However, existing data compression and transmission schemes have gradually revealed their limitations in actual operation, making it difficult to adapt to the dynamic changes in power load data. First, power load data exhibits significant time-varying characteristics. The redundancy features of load curves in residential, commercial, and industrial areas differ drastically between stable and abrupt changes. Existing compression logic often uses fixed algorithm combinations, lacking real-time awareness of data characteristics. This leads to compression ratios falling short of expectations in certain scenarios, and even instances where compressed data volume exceeds the original data volume. Second, there is a lack of a balance mechanism between edge computing power allocation and compression gain. The computational overhead of high-complexity algorithms can easily cause significant computational latency on resource-constrained terminals, directly impacting the real-time performance of critical tasks such as real-time state estimation and fault location. Furthermore, due to the lack of real-time coupled analysis of physical channel quality, existing schemes struggle to dynamically adjust compression depth in complex communication environments, limiting the system's robustness under extreme conditions.

[0042] In the field of lightweight processing of smart power distribution data, existing research mainly achieves dimensionality reduction and redundancy removal by combining basic statistical coding with time-series prediction algorithms. Unterweger A. et al. proposed a compression scheme for load data, which uses normalization processing followed by differential coding (DeltaEncoding), and employs zero-order exponential Golomb coding for lossless processing of residuals. Finally, adaptive arithmetic coding is combined to further reduce data redundancy, effectively alleviating the bandwidth pressure on smart grid load data during transmission. Meanwhile, Kraus J. et al. focused on the dynamic compression of power quality trend data. By introducing a linear prediction model and differential coding, along with window size optimization techniques, they solved the space bottleneck of long-term storage of monitoring data while ensuring reconstruction accuracy.

[0043] For edge terminals with limited hardware resources, balancing computational overhead and compression gain has become a key research focus. Ringwelski M. et al., through performance comparisons of various lossless compression algorithms, proposed a strategy combining LZ-series dictionary algorithms with Huffman entropy coding, achieving a good balance between compression ratio, execution time, and terminal resource consumption. Furthermore, Yang J.H. et al. proposed a real-time compression architecture called PQB. This method uses Normalized Least Mean Square Prediction (NLMS) to preprocess D-PMU data, followed by uniform quantization and bitpacking techniques, and then uses stochastic gradient descent to adaptively update prediction parameters in real time at the edge, achieving a deep fusion of compression ratio and computational efficiency.

[0044] The existing solutions have the following problems:

[0045] 1. Poor adaptability of compression algorithms to dynamic data characteristics. Power load data exhibits strong time-varying characteristics and scenario-dependent properties, with significant differences in data redundancy characteristics across different time periods and for different power consumers. Existing compression schemes often employ a single algorithm or fixed encoding combinations, lacking the ability to identify different redundancies in real time. This results in the system's inability to accurately match the optimal compression path when faced with complex load waveforms.

[0046] 2. Compression strategies are mostly unidirectional and independent calculations on the terminal side, failing to utilize the macro-load forecasting capabilities of the master station to guide edge-side data acquisition and compression. Furthermore, the master station cannot reverse-correct terminal strategies based on deviations in decompression results, leading to system lag in response to sudden load surges.

[0047] 3. Existing technologies typically treat data compression and channel transmission as two independent processes, ignoring the drastic fluctuations in the communication environment at the end of the distribution network. In actual operation, if compression decisions do not take channel quality into account, blindly executing highly complex compression algorithms in poor channel conditions can easily lead to computational delays and transmission timeouts; conversely, in good channel conditions, insufficient compression depth can result in wasted bandwidth resources. This compression mechanism, lacking channel awareness, limits the efficiency and reliability of data reporting by terminals in complex electromagnetic environments.

[0048] 4. Due to hardware cost constraints, edge devices such as smart meters and data acquisition terminals have extremely limited computing power and memory resources in their metering chips. Existing high-performance compression algorithms consume a large number of clock cycles during operation, resulting in significant logical latency and potentially affecting the real-time performance of data acquisition due to excessive system resource consumption. Furthermore, simple algorithms struggle to maintain ideal compression performance during periods of drastic load fluctuations, leading to an irreconcilable bottleneck between "low computational overhead" and "high compression gain" in these limited terminals.

[0049] The solutions in this application are intended to solve one or more of the above-mentioned technical problems. The solutions in this application will be described in detail below with reference to the embodiments.

[0050] The power consumption data compression method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, the power control center master station 102 (hereinafter referred to as the master station) and the edge terminal 104 communicate via a network.

[0051] The power control center master station 102 can obtain the historical load data sequence within the first time period reported by the edge terminal. Based on the historical load data sequence, it uses a load data prediction model to predict the predicted load data sequence of the edge terminal within the second time period, which is the period after the first time period. Based on the predicted load data sequence, it determines the load change rate within the second time period. Based on the relationship between the load change rate and the load change rate threshold, it generates an electricity consumption data reporting instruction and sends the electricity consumption data reporting instruction to the edge terminal 104. The edge terminal 104 can determine the data compression strategy according to the reporting frequency control mode indicated by the electricity consumption data reporting instruction, and compress the collected electricity consumption data according to the data compression strategy before reporting it.

[0052] In one exemplary embodiment, such as Figure 2 As shown, a method for compressing electricity consumption data is provided, which can be applied to... Figure 1 Taking the power control center master station 102 as an example, the explanation includes the following steps 202 to 210. Wherein:

[0053] Step 202: Obtain the historical load data sequence within the first time period reported by the edge terminal.

[0054] The first time period is the time range within which the main station extracts historical load data, including two key time nodes: start time and end time. The power control center main station can accurately extract the load data for the corresponding interval based on these time nodes. The duration of the first time period can be flexibly set as needed. For example, considering the 24-hour continuous production characteristics of industrial distribution areas, the power control center main station can select the first 24 hours as the first time period.

[0055] Historical load data sequences are ordered sets of load data collected and reported by edge terminals to the power control center master station within a first time period, serving as the input data source for load forecasting models. Load data is quantitative data reflecting the magnitude and fluctuation trend of electricity load at edge terminals; for example, it can be quantitative indicators related to electrical power.

[0056] Specifically, a time-series database (such as InfluxDB) can be set up locally at the main station. This database stores historical electricity consumption data reported by edge terminals at a regular frequency for a long time. As a result, the terminal can obtain the historical load data sequence within the first time period reported by the edge terminal from this database.

[0057] For example, the main station first determines the data extraction target based on the unique identifier of the edge terminal (such as meter ID, data acquisition terminal ID), and then accurately extracts all load monitoring data of the terminal within the time interval from the time series database according to the start and end timestamps of the preset first time period. During the extraction process, the timestamp order of the data is maintained to form an ordered historical load data sequence.

[0058] For example, the main station extracts all active power data of the residential smart meter with ID 1001 from February 16, 2026 to February 22, 2026, and sorts them by timestamp to form a historical load data sequence.

[0059] Step 204: Based on the historical load data sequence, use the load data prediction model to predict the predicted load data sequence of the edge terminal in the second time period, which is the time period after the first time period.

[0060] The second time period is the target time range for the master station to predict the power load of the edge terminals. It is a continuous time interval following the first time period and is the time cycle for the edge terminals to execute the data collection, compression, and reporting strategies. The duration and sampling granularity of the second time period are adapted to the first time period. It can be set to a short cycle (such as 1 hour or 6 hours) or a long cycle (such as 24 hours or 72 hours) according to the prediction requirements. For example, if the master station sets the first time period to 2026-02-16 to 2026-02-22 (7 days), then the second time period is set to 2026-02-23 (1 day), realizing daily load prediction and scheduling for residential transformer areas.

[0061] The predicted load data sequence is an ordered set of predicted electricity load values ​​of edge terminals in the second time period, derived by the master station using the load data prediction model based on historical load data sequences. It is the core basis for subsequent load status determination.

[0062] Load data prediction models are artificial intelligence models used for load prediction, such as LSTM (Long Short-Term Memory) or GRU (Gated Recurrent Unit).

[0063] Long Short-Term Memory (LSTM) networks are an improved model of Recurrent Neural Networks (RNNs). They fundamentally address the vanishing or exploding gradient problems that occur in traditional RNNs during long-sequence training, making them suitable for capturing long-term dependencies and periodic patterns in time-series data. The core of LSTM lies in its "gating mechanism," which achieves selective memorization and forgetting of information through the synergistic action of input gates, forget gates, output gates, and cell states: the input gate controls the inclusion of new information, the forget gate determines whether to retain historical cell state information, the output gate regulates the influence of cell states on the current output, and the cell state acts as a "channel" for information transmission, maintaining the stable transmission of long-term information. In this embodiment, the LSTM model is used for macro-load forecasting at the master station. By learning the periodic characteristics of historical electricity consumption data (time-series indicators such as voltage, current, and power) (e.g., daytime peaks in residential electricity consumption and weekday patterns in industrial electricity consumption), it accurately outputs load forecast sequences for future time windows, providing data support for the subsequent determination of "rapid change periods" and "stable periods."

[0064] Specifically, the main station can determine the input data for the load data prediction model based on the historical load data sequence, and then input the input data into the load data prediction model to predict the load data sequence of the edge terminal in the second time period.

[0065] In some embodiments, the master station can first preprocess the extracted historical load data sequence, including normalization (mapping indicators of different dimensions to the [0,1] interval) and sequence construction (segmenting into a fixed-length input sequence using sliding window technology), so that the data meets the input requirements of the load data prediction model; then the preprocessed sequence is input into the already trained load data prediction model, the model uses its own gating mechanism to capture the periodic and trend characteristics of historical data, and maps these characteristics to a second time period after the first time period, outputting the predicted load index value corresponding to each sampling timestamp in the time period; finally, the master station sorts the predicted values ​​by timestamp to form a predicted load data sequence with the same sampling granularity as the historical load data sequence.

[0066] For example, the main station inputs the preprocessed historical active power sequence of the residential transformer area into the LSTM model, and the model outputs the predicted active power value of the transformer area every 15 minutes from 2026-02-23. After sorting by timestamp, a predicted load data sequence is formed.

[0067] Step 206: Determine the load change rate within the second time period based on the predicted load data sequence.

[0068] The load change rate is a characteristic indicator used to quantify the severity of electricity load fluctuations within the second time period, and it is the core quantitative basis for determining the load status. The load change rate can be the ratio of the change in load indicators between adjacent time stamps in the predicted load data sequence to the time interval. The load change rate can be obtained by calculating the instantaneous change rate of a single time stamp, or by calculating the average change rate or the maximum gradient value of the entire second time period.

[0069] Specifically, the master station can perform calculations based on the predicted load data sequence to determine the load change rate within the second time period.

[0070] In some embodiments, the master station may use a gradient calculation method to calculate the instantaneous rate of change of adjacent timestamps in the predicted load data sequence to obtain the load change rate in the second time period. For example, the instantaneous rate of change can be obtained by "change amount / time interval".

[0071] In some embodiments, to accurately reflect the overall fluctuation level within the second time period, the main station will further calculate the average of all instantaneous change rates to obtain the load change rate within the second time period.

[0072] In some embodiments, the master station can extract the maximum gradient value (slope) from the instantaneous rate of change and take its absolute value as the final load change rate, thereby eliminating the influence of the direction of load increase or decrease and retaining only the quantitative characteristics of the fluctuation degree. For example, the master station calculates the maximum instantaneous rate of change of active power in the predicted sequence of the industrial park transformer area to be 10 kW / min, and takes its absolute value as the load change rate of the second time period.

[0073] Step 208: Generate an electricity consumption data reporting instruction based on the relationship between the load change rate and the load change rate threshold.

[0074] The electricity data reporting command is a control command generated by the master station based on the comparison between the load change rate and the load change rate threshold, and sent to the edge terminal. It is used to specify the rules for electricity data collection and reporting by the edge terminal in the second time period. The electricity data reporting command can be a standardized message conforming to the power communication protocol (such as Q / GDW1376.1), containing core fields such as command identifier, reporting frequency control mode, effective time interval (second time period), and terminal unique identifier, and can be transmitted via power wireless private network / fiber downlink.

[0075] Specifically, the master station can compare the load change rate with the load change rate threshold, and thus generate an electricity consumption data reporting instruction based on the relationship between the load change rate and the load change rate threshold.

[0076] In some embodiments, the master station can compare the load change rate with the load change rate threshold. If the load change rate is greater than the load change rate threshold, it is determined that the edge terminal is in a period of rapid load change in the second time period, and a power consumption data reporting instruction containing a high-frequency mode needs to be generated. If the load change rate is less than the load change rate threshold, it is determined to be a period of stable load, and a power consumption data reporting instruction containing a low-frequency mode is generated.

[0077] When an instruction is generated, the master station encapsulates the instruction message according to the power communication protocol, including core fields such as instruction identifier, reported frequency control mode, effective time interval of the second time period, and unique identifier of the edge terminal, to ensure that the edge terminal can accurately identify and execute the instruction.

[0078] For example, the main station compares the load change rate of 1.5 kW / hour in the residential transformer area with the threshold of 2 kW / hour, determines it to be a stable period, and generates an electricity consumption data reporting instruction that includes low frequency mode, the time interval of 2026-02-23, and meter ID 1001.

[0079] Step 210: Send the electricity consumption data reporting instruction to the edge terminal so that the edge terminal can determine the data compression strategy according to the reporting frequency control mode indicated by the electricity consumption data reporting instruction, and compress the collected electricity consumption data according to the data compression strategy before reporting.

[0080] Among them, the reporting frequency control mode is the frequency rule for collecting and reporting electricity data, which is specified in the electricity data reporting instruction and executed by the edge terminal in the second time period.

[0081] The reporting frequency control mode is divided into high-frequency mode and low-frequency mode. Each mode corresponds to a reporting interval and data processing rules. For example, the edge terminal pre-stores the configuration parameters of the two modes locally and calls them directly after receiving instructions. For example, the high-frequency mode is real-time reporting without local caching; the low-frequency mode is local caching + batch reporting. After the cache reaches the threshold, it is packaged and uploaded in a unified manner. The parameters of the two modes can be pre-configured according to the characteristics of the station area.

[0082] Data compression strategies are algorithms used to compress collected electricity consumption data. They can include one or more lightweight algorithms such as differential coding, dictionary compression, and entropy coding. Differential coding algorithms can be, for example, the Delta algorithm. Dictionary compression algorithms can be, for example, any of the LZ4, LZ77, or LZMA coding algorithms. Entropy coding algorithms can be, for example, any of the Huffman coding or arithmetic coding algorithms. Differential coding is a lossless compression technique for time-series data. Its core logic is not to directly store the original data, but to calculate and store the difference (residual) between adjacent data points. Because electricity load data has a very strong temporal correlation during stable periods (data fluctuations between adjacent times are small), the absolute value of the difference is usually much smaller than the original data and is mostly concentrated in a small numerical range, which can significantly reduce data redundancy. Its processing flow is as follows: select the first data point as the baseline value, and replace each subsequent data point with the difference from the previous data point. Finally, store the baseline value and all differences. In this embodiment, differential coding is used for adaptive compression in low-frequency mode. At this time, the data timing stability is high. Redundancy can be quickly removed through this coding, and the calculation process is simple. It does not require too much computing power from the edge terminal and is suitable for scenarios where terminal resources are limited.

[0083] LZ4 encoding is a fast, lossless compression algorithm based on dictionary matching, with its core advantages being "fast compression speed, low decompression overhead, and lightweight design," making it suitable for the limited computing power and storage resources of edge terminals. Its core principle is to use a sliding window technique to find recurring strings (pattern redundancy) in the data and replace them with index pairs of "offset + length," eliminating the need to repeatedly store the same content. LZ4 simplifies the dictionary construction and lookup process, avoiding complex computational logic, and can complete compression processing in a very short time while maintaining a high compression ratio. In this application embodiment, LZ4 encoding, as a core member of the algorithm family, is used in scenarios with prominent pattern redundancy (R1): when channel quality is good, it is used in combination with Huffman coding to pursue a high compression ratio; when the channel is limited and the pattern redundancy ratio is higher, it is used alone to balance compression efficiency and computational overhead.

[0084] Huffman coding is a lossless entropy coding technique based on character frequency statistics. Its core idea is to assign shorter codes to characters with higher frequencies and longer codes to characters with lower frequencies, thereby optimizing code length to remove data redundancy. The implementation process is as follows: First, the frequency of each character (or data block) in the data is statistically analyzed. A Huffman tree (the binary tree with the shortest weighted path length) is constructed based on the frequency. Then, the path of the tree (left subtree = 0, right subtree = 1) is used as the code for the corresponding character. Since power load data exhibits uneven character distribution in different scenarios (e.g., some values ​​appear frequently during periods of abrupt change), Huffman coding can specifically compress coding redundancy (R2). In this embodiment, Huffman coding can be used alone in scenarios with significant coding redundancy, or in combination with LZ4 coding: after LZ4 removes pattern redundancy, Huffman coding further compresses coding redundancy, achieving "double redundancy removal" and improving the overall compression effect.

[0085] Electricity consumption data refers to the raw electricity monitoring data collected by edge terminals at the end of the distribution network during the second time period according to the reported frequency control mode. This data is the object of data compression strategies and is also the core business data that the main station ultimately needs to acquire. Electricity consumption data can be directly read from the metering chip by the edge terminal and includes voltage, current, active power, reactive power, etc., with a unique timestamp and terminal identifier. For example, in low-frequency mode, the raw data read from the metering chip by a residential smart meter, such as "2026-02-23 08:00 - Voltage 220V, Current 3.5A, Active Power 0.77kW," constitutes electricity consumption data.

[0086] Specifically, after the master station generates the power consumption data reporting instruction, it can send the power consumption data reporting instruction to the edge terminal. After receiving the power consumption data reporting instruction, the edge terminal can determine the data compression strategy according to the reporting frequency control mode indicated by the power consumption data reporting instruction, and then compress the collected power consumption data according to the data compression strategy before reporting it.

[0087] In some embodiments, the master station can send the generated electricity consumption data reporting instruction to the corresponding edge terminal via the downlink communication link. After receiving the electricity consumption data reporting instruction, the edge terminal can parse out the core information such as the reporting frequency control mode and the effective time interval, and update the local acquisition timer configuration. Subsequently, the edge terminal collects raw electricity consumption data from the metering chip according to the updated acquisition timer during the second time period. At the same time, the edge terminal formulates a data compression strategy according to the reporting frequency control mode, compresses the collected electricity consumption data according to the data compression strategy, and then reports it.

[0088] In some embodiments, if the reporting frequency control mode is low frequency mode, the edge terminal can directly adopt the basic compression strategy of Delta coding single algorithm; if it is high frequency mode, the edge terminal can further determine an adaptive compression strategy based on channel quality and data redundancy characteristics. Finally, the edge terminal performs lossless compression on the collected power consumption data according to the determined compression strategy, writes the algorithm identification code into the compressed data packet, and reports the data packet to the master station through the uplink communication link.

[0089] In the aforementioned electricity data compression method, based on forward-looking prediction of historical load data sequences and determination of load change rate thresholds, differentiated electricity data reporting instructions are generated. This deeply binds the compression strategy of the edge terminal with the dynamic change characteristics of the power load data, completely changing the passive situation of existing solutions that use fixed compression strategies. When the predicted load change rate exceeds the threshold, the terminal switches to a compression path adapted to drastic load fluctuations, accurately matching the time-varying characteristics of high data redundancy. When the load change rate is within the threshold, the terminal adopts a lightweight compression strategy, adapting to the data characteristics during periods of stable load. This adaptive control mechanism based on load change trends ensures that the selection of compression algorithms is no longer divorced from the fluctuation patterns of the data itself, effectively solving the core pain point that fixed solutions struggle to adapt to dynamic load changes. It significantly improves the power load data compression effect across all scenarios, while simultaneously balancing the computational overhead and data transmission efficiency of the edge terminal while ensuring compression gain.

[0090] In an exemplary embodiment, an electricity consumption data reporting instruction is generated based on the relationship between the load change rate and a load change rate threshold, including:

[0091] When the load change rate is less than the load change rate threshold, a first electricity consumption data reporting instruction is generated, and the reporting frequency control mode indicated by the first electricity consumption data reporting instruction is low-frequency mode; when the load change rate is greater than the load change rate threshold, a second electricity consumption data reporting instruction is generated, and the reporting frequency control mode indicated by the second electricity consumption data reporting instruction is high-frequency mode; when the load change rate is equal to the load change rate threshold, a third electricity consumption data reporting instruction is generated according to the reporting frequency control mode indicated by the previous electricity consumption data reporting instruction. The load change rate threshold serves as a criterion for classifying load as stable or rapidly changing. For example, an empirical value of the load change rate pre-configured based on the electricity consumption characteristics of different distribution areas (residential / industrial / commercial) can be used as the load change rate threshold, and this empirical value can be dynamically adjusted; alternatively, the load change rate threshold can also be obtained using an adaptive threshold algorithm, such as dynamically adjusting the load change rate threshold based on the regional load variance.

[0092] The first power consumption data reporting instruction is a downlink control instruction generated by the master station when it determines that the load is stable. It is used to instruct the edge terminal to perform power consumption data collection, compression and reporting operations in low-frequency mode.

[0093] The second power consumption data reporting command is a downlink control command generated by the master station when it determines that the load is fluctuating drastically. It is used to instruct the edge terminal to perform power consumption data collection, compression and reporting operations in high-frequency mode.

[0094] The third power consumption data reporting instruction is generated based on the reporting frequency control mode indicated by the previous power consumption data reporting instruction. The reporting frequency control mode indicated by the instruction is consistent with the reporting frequency control mode indicated by the previous power consumption data reporting instruction. That is, when the load change rate is equal to the load change rate threshold, the previous mode remains unchanged, thereby avoiding unnecessary mode switching.

[0095] Low-frequency mode is a low-frequency collection and reporting rule executed by the edge terminal after receiving the first instruction. It features long collection intervals, local caching, and batch reporting, and is suitable for resource conservation needs during periods of stable load.

[0096] The high-frequency mode is a high-frequency data collection and reporting rule executed by the edge terminal after receiving the second instruction. It features short collection intervals, real-time reporting, no local cache, and is suitable for real-time monitoring needs during periods of rapid load changes.

[0097] Specifically, the master station can compare the calculated load change rate for the second time period with the pre-configured load change rate threshold for the corresponding edge terminal. If the load change rate is less than the threshold, the edge terminal is determined to be in a stable load period during the second time period. The master station then generates a first power consumption data reporting command, which encapsulates core information such as a low-frequency mode identifier, the effective range of the second time period, and the terminal's unique ID, and is standardized according to the power communication protocol. If the load change rate is greater than the threshold, it is determined to be a period of rapid load change. The master station generates a second power consumption data reporting command, which encapsulates a high-frequency mode identifier and the aforementioned core information, completing the standardized encapsulation. The master station can further accurately send the corresponding command to the target edge terminal via a power wireless private network or fiber optic downlink communication link. After receiving the command, the edge terminal parses it and switches to the corresponding reporting frequency control mode.

[0098] It is understandable that when the load change rate is equal to the load change rate threshold, a third power consumption data reporting instruction is generated according to the reporting frequency control mode indicated by the previous power consumption data reporting instruction, that is, the previous mode is maintained unchanged to avoid unnecessary mode switching.

[0099] In the above embodiments, when the load change rate is less than the load change rate threshold, a first power consumption data reporting instruction indicating a low-frequency mode is generated; when the load change rate is greater than the load change rate threshold, a second power consumption data reporting instruction indicating a high-frequency mode is generated. This allows the reporting frequency to be dynamically determined as needed, saving resources when the load is stable and ensuring real-time monitoring when the load fluctuates, thereby improving the efficiency and rationality of power distribution network data transmission and scheduling.

[0100] In an exemplary embodiment, the edge terminal is further configured to: when the reported frequency control mode is low frequency mode, determine the data compression strategy as differential coding strategy; when the reported frequency control mode is high frequency mode, obtain the channel quality perception value at the current moment, and determine the data compression strategy based on the relationship between the channel quality perception value and the channel quality threshold.

[0101] Among them, the differential coding strategy is a lossless compression strategy based on differential coding. It removes temporal redundancy by storing the difference between adjacent power consumption data, with low computational overhead, and is suitable for the lightweight processing needs of edge terminals.

[0102] Channel quality perceived values ​​are used to characterize the current channel transmission quality in real time. For example, a channel quality perceived value can be a Received Signal Strength Indicator (RSSI), which is a measure of the received power of the wireless link signal read by the edge terminal from the communication module. In other embodiments, the channel quality perceived value can also be an SNR (Signal-to-Noise Ratio) or a BER (Bit Error Rate).

[0103] Channel quality thresholds are quantitative standards used to classify channel quality as good or limited, and can be dynamically adjusted as needed. In other words, different channel quality thresholds are determined for different perceived channel quality values.

[0104] Specifically, the edge terminal can parse the instructions issued by the master station. If it is a low-frequency mode, it directly determines the differential coding strategy as the power consumption data compression strategy. If it is a high-frequency mode, it first reads the channel quality perception value of the communication module at the current moment, then compares the value with the preset channel quality threshold, and determines the corresponding data compression strategy according to the relationship between the two. After the strategy is determined, the collected power consumption data is compressed according to the strategy.

[0105] In the above embodiments, when the reported frequency control mode is low frequency mode, the data compression strategy is determined to be differential coding strategy. When the reported frequency control mode is high frequency mode, the channel quality perception value at the current moment is obtained. Based on the relationship between the channel quality perception value and the channel quality threshold, the data compression strategy is determined. Thus, in low frequency mode, lightweight compression can save computing power, and in high frequency mode, the channel quality determination strategy can be combined to balance compression effect and transmission reliability.

[0106] In an exemplary embodiment, a data compression strategy is determined based on the relationship between the channel quality perceived value and the channel quality threshold, including:

[0107] When the channel quality perceived value is greater than the channel quality threshold, the data compression strategy is determined to be a combined coding strategy, which indicates that encoding is performed using at least two coding strategies.

[0108] The combined coding strategy is a joint data compression strategy based on at least two lightweight lossless coding algorithms. For example, the at least two lightweight lossless coding algorithms can be a combination of LZ4 dictionary coding and Huffman entropy coding. By collaboratively removing redundancy from different types of data through multiple algorithms, a higher compression ratio can be achieved. The coding strategy is the specific algorithm execution rule adopted by the edge terminal when performing lossless compression on the collected raw electricity consumption data.

[0109] Specifically, when the edge terminal is in high-frequency reporting mode, after obtaining the current RSSI value and comparing it with the channel quality threshold, if the RSSI value is determined to be greater than the threshold, it is determined that the current communication channel quality is good. Then, a combined coding strategy is selected as the compression strategy for the power consumption data. Subsequently, at least two coding algorithms will be called according to this strategy to encode the collected power consumption data in sequence.

[0110] In the above embodiments, when the channel quality is good, a combined coding strategy is adopted. This strategy can strip away the pattern redundancy and coding redundancy of the data through the collaborative efforts of multiple algorithms, achieving a compression ratio much higher than that of a single algorithm. This significantly reduces the data transmission volume, makes full use of the surplus channel bandwidth, and minimizes the uplink communication pressure on the distribution network without affecting transmission efficiency. At the same time, it ensures the accuracy of lossless data compression and meets the data integrity requirements of the downstream services of the main station.

[0111] In one exemplary embodiment, such as Figure 3 As shown, the data compression strategy is determined based on the relationship between the channel quality perceived value and the channel quality threshold, and also includes:

[0112] Step 302: When the channel quality perceived value is less than or equal to the channel quality threshold, obtain the mode redundancy ratio and coding redundancy ratio.

[0113] Among them, the pattern redundancy ratio is the core indicator for quantifying the degree of data pattern redundancy, denoted as R1, which is the proportion of repetitive data patterns (such as repetitive strings and similar numerical sequences) in the total data volume calculated after the edge terminal performs feature analysis on the collected power consumption data slices.

[0114] Coding redundancy ratio: The proportion of the total data volume wasted due to the uneven probability of data symbols appearing, calculated by the edge terminal based on the information theory entropy principle, is the core indicator for quantifying the degree of data coding redundancy, denoted as R2.

[0115] Step 304: When the pattern redundancy ratio is greater than or equal to the coding redundancy ratio, the data compression strategy is determined to be a dictionary coding strategy.

[0116] Step 306: When the pattern redundancy ratio is less than the coding redundancy ratio, the data compression strategy is determined to be the entropy coding strategy.

[0117] Dictionary encoding strategy: a lossless compression strategy based on dictionary matching principle. For example, the dictionary encoding strategy can adopt the LZ4 algorithm, which replaces repeated data patterns by constructing a data dictionary, efficiently removes pattern redundancy, and has moderate computational overhead.

[0118] Entropy coding strategy: a lossless compression strategy based on the probability distribution of data symbols. For example, the entropy coding strategy can use the Huffman algorithm, which accurately removes coding redundancy by assigning short codes to high-frequency symbols and long codes to low-frequency symbols, and has high computational efficiency.

[0119] Specifically, when the edge terminal is in high-frequency reporting mode, if the detected RSSI value is less than or equal to the channel quality threshold, it can be determined that the current communication channel quality is limited. Furthermore, the mode redundancy ratio and coding redundancy ratio can be obtained and compared. If the mode redundancy ratio is greater than the coding redundancy ratio, the dictionary coding strategy is determined as the current compression strategy; if the mode redundancy ratio is less than or equal to the coding redundancy ratio, the entropy coding strategy is determined as the current compression strategy, thus preparing the algorithm for subsequent data compression.

[0120] In practice, the terminal can activate the feature analysis module to pre-scan the current slice and calculate the redundancy ratio in two dimensions:

[0121] The pattern redundancy ratio R1 is calculated according to the formula "R1 = total number of bytes of repeated strings ÷ total number of bytes of slices";

[0122] Based on the entropy principle of information theory, we first statistically analyze the probability of high-frequency characters appearing in the slice and the actual number of bits in the encoding, and then calculate the theoretical entropy encoding bits using the following formula:

[0123]

[0124] Finally, the coding redundancy ratio R2 is obtained by "R2 = (actual coding length of high-frequency character - theoretical entropy coding length) ÷ actual coding length of high-frequency character".

[0125] In the above embodiments, when channel quality is limited, the edge terminal can accurately match the optimal single coding strategy by quantifying the proportion of two redundancy ratios, avoiding the high computational overhead and transmission latency caused by combined coding, maximizing the stripping of redundancy under computing power constraints, adapting to the transmission environment with limited channels, reducing the data transmission volume to reduce the risk of packet loss, ensuring both the real-time processing of the edge terminal and the success rate of data reporting at the end of the distribution network, effectively balancing computing power overhead, compression effect and transmission reliability under poor channel conditions.

[0126] In one exemplary embodiment, such as Figure 4 As shown, the above-mentioned electricity data compression method also includes a data decompression step, which includes:

[0127] Step 402: Receive the compressed data packet uploaded by the edge terminal.

[0128] Among them, compressed data packets refer to data packets formed by the edge terminal compressing electricity consumption data according to the selected data compression strategy. The compressed data packets carry a strategy identifier to identify the data compression strategy.

[0129] Step 404: Parse the compressed data packet to obtain the policy identifier of the data compression strategy.

[0130] The policy identifier is a number or field written in the header of the data packet to uniquely identify the data compression policy used this time. The master station can use this to identify the corresponding decompression algorithm.

[0131] Step 406: Based on the policy identifier, the compressed data packet is routed to the corresponding decompression engine so that the decompression engine can decompress the compressed data packet to obtain the power consumption data reported by the edge terminal.

[0132] The decompression engine is a pre-deployed decompression execution module in the main station, corresponding to each compression strategy, used to restore compressed data to the original electricity consumption data.

[0133] Specifically, the main station can receive compressed data packets uploaded by edge terminals, parse the policy identifier corresponding to the data compression policy from the header of the compressed data packet, and then route the compressed data packet to the matching decompression engine based on the identifier. The engine then completes the decompression to obtain the original electricity consumption data.

[0134] In the above embodiments, precise routing and automatic decompression are achieved through policy identification without the need for manual intervention or additional judgment. This can improve the efficiency and accuracy of data restoration, ensure the integrity and losslessness of power consumption data, and support parallel processing of multiple decompression methods, thereby improving the main station's processing capacity and stability for massive amounts of terminal-reported data.

[0135] In an exemplary embodiment, the electricity consumption data compression method of this application further includes: obtaining the real load data sequence of the second time period from the decompressed electricity consumption data; calculating the prediction deviation based on the real load data sequence and the predicted load data sequence of the second time period; and triggering the load data prediction model to perform online fine-tuning when the prediction deviation is greater than a preset tolerance threshold.

[0136] Among them, the real load data sequence is a sequence formed by sorting the real load data values ​​in the second time period from the electricity consumption data reported and decompressed from the edge terminal, which is used to reflect the actual load situation.

[0137] Prediction bias: The error between the actual load data series and the predicted load data series, used to measure the accuracy and reliability of the prediction model.

[0138] Preset tolerance threshold: The maximum allowable deviation of the model prediction, which is set in advance and used to determine whether the prediction model needs to be optimized or adjusted.

[0139] Online fine-tuning: Without shutting down the system or interrupting business operations, the parameters of the load forecasting model are updated and optimized in real time using the latest real data.

[0140] Specifically, the master station can first extract the actual load data sequence for the second time period from the decompressed electricity consumption data, and then compare it with the predicted load data sequence for the same time period to calculate the prediction deviation. The master station can further compare the prediction deviation with a preset tolerance threshold. When the deviation is greater than the preset tolerance threshold, it will automatically trigger online fine-tuning of the load data prediction model.

[0141] In the above embodiments, the prediction results are continuously verified by real data, model errors are promptly detected and corrected, the prediction model is self-optimized, the accuracy of subsequent load prediction is continuously improved, the command generation is more reasonable, the scheduling is more stable, and the reliability and intelligence level of the entire system in long-term operation are improved.

[0142] In one specific embodiment, this application also provides a method for compressing electricity consumption data. This method is applied to a collaborative architecture of "cloud-based macro-prediction - edge-adaptive compression - global closed-loop optimization," aiming to solve the problem of the high sensitivity of massive electricity consumption data transmission in smart distribution networks to bandwidth, computing power, and real-time performance. (Reference) Figure 5 The system involved in this coordination architecture consists of two core components: the power control center main station and the edge terminal equipment.

[0143] The power control center master station possesses powerful computing capabilities and a massive historical time-series database. Its core modules include an LSTM load forecasting engine, a frequency policy scheduling module, an adaptive decompression routing module, and a model closed-loop fine-tuning unit. The master station is responsible for predicting global load trends from a macro perspective and feeding back the restored measured deviations to the prediction model for continuous evolution. Edge terminal devices, including smart meters and low-voltage distribution area acquisition terminals, are deployed at the end-sensing layer of the power Internet of Things. Their core modules include an instruction parsing unit, a data acquisition timer, a physical channel sensing module, a redundancy identification module, and a multi-path compression engine.

[0144] As the system's sensing and execution unit, the edge terminal device, after receiving and parsing the frequency commands issued by the master station, first dynamically updates its local data acquisition timer to acquire raw data. In the data processing stage, the terminal does not mechanically perform compression tasks, but instead initiates a sensing mechanism: on the one hand, it acquires RSSI values ​​in real time through the physical channel sensing module to assess the current communication link quality; on the other hand, it calculates the mode redundancy and coding redundancy of data slices through redundancy identification and quantization. Based on the above sensing results, the multipath compression engine automatically competes and makes decisions among Delta differential, LZ4, and Huffman algorithms, generating lightweight data packets with specific algorithm identifiers, which are then transmitted back to the master station via the uplink channel.

[0145] The final step of the data loop is completed on the main station side. After receiving the compressed data packet, the main station uses adaptive decompression routing to distribute it to the corresponding decompression engine, accurately reconstructing the real electricity consumption data with timestamps. Subsequently, the system immediately activates the model closed-loop fine-tuning unit, aligning and comparing the decompressed measured values ​​with the predicted values ​​generated in the first stage and calculating the deviation loss. Once the deviation exceeds the system's tolerance threshold, online fine-tuning and parameter updates of the LSTM model are triggered, ensuring that the cloud-based prediction strategy can continuously evolve with changes in users' electricity consumption habits, thereby achieving efficient adaptive operation of the entire system.

[0146] The following solution describes the entire process in three stages: Stage 1: Macro load prediction and strategy generation at the main station; Stage 2: Adaptive compression at the edge terminal; Stage 3: Decompression and closed-loop optimization at the main station.

[0147] The following is combined with Figures 6 to 9 This section introduces the specific procedures for each stage.

[0148] refer to Figure 6 The first phase of the process includes the following steps:

[0149] 1. Data Acquisition: The main station periodically extracts historical load data uploaded by edge terminals within the target area from the time-series database. This data includes, but is not limited to, time series data of key indicators such as voltage, current, and active power.

[0150] 2. Data Preprocessing: To meet the input requirements of the LSTM model and improve prediction accuracy, the original data needs to be preprocessed. Preprocessing includes normalization, which maps data with different dimensions (such as voltage in volts and current in amperes) to the [0,1] interval to eliminate the influence of differences in data scale. Sequence Creation is then performed on the preprocessed data: using a sliding window technique, continuous time series data is divided into fixed-length input sequences.

[0151] 3. LSTM Model Inference: The preprocessed sequence is input into a pre-trained Long Short-Term Memory (LSTM) network model. Technical Principle: LSTM is a special type of Recurrent Neural Network (RNN) that effectively solves the gradient vanishing problem in long sequence training by introducing a "gating mechanism" (input gate, forget gate, output gate), enabling it to capture long-term dependencies and periodic patterns in electricity load data. Output: The model outputs a predicted sequence of load values ​​for a future time window.

[0152] 4. Calculation of Rate of Change Characteristics: Post-processing analysis is performed on the predicted sequence output by LSTM, focusing on assessing the stability of its trend. The average rate of change or maximum gradient value k (i.e., slope) of the predicted curve within the future time window is calculated to quantify the severity of load fluctuations.

[0153] 5. Threshold Determination: Set an empirical threshold (this threshold can be dynamically adjusted according to the characteristics of the regional power grid). Compare the absolute value of the predicted rate of change |k| calculated in step 4 with the threshold: If |k| > the threshold, it indicates that the load will fluctuate significantly in the future, and is determined as a "rapid change period". If |k| < the threshold, it indicates that the load will tend to stabilize in the future, and is determined as a "stable period".

[0154] 6. Strategy Instruction Generation: Based on the judgment results, corresponding macro-control instructions are generated: High-frequency instructions (for periods of rapid change): require the terminal to increase the sampling and reporting frequency to ensure the capture of sudden changes and guarantee real-time monitoring. Low-frequency instructions (for periods of stability): require the terminal to reduce the reporting frequency and enable local caching and long-cycle aggregation functions to save communication bandwidth and terminal power consumption.

[0155] 7. Command Issuance: The master station encapsulates the generated frequency policy command into a downlink message and sends it to the corresponding edge terminal through the power wireless private network or fiber optic network to complete the macro scheduling task for this cycle.

[0156] refer to Figure 7 The specific process for the second phase is as follows:

[0157] 1. Command Parsing and Policy Update: The edge terminal receives downlink packets from the master station and parses the frequency control commands within them. If the command is for "high-frequency mode," the interval of the local acquisition timer is adjusted to a short period; if it is for "low-frequency mode," it is adjusted to a long period.

[0158] 2. Data Acquisition: The edge terminal triggers the acquisition action according to the updated timer, and reads raw data such as voltage, current and power from the metering chip.

[0159] 3. Mode Triage Determination: The edge terminal checks the current working mode flag: if it is a high-frequency mode, it indicates that the data timeliness requirement is extremely high, and it directly jumps to step 5 to process and send immediately. If it is a low-frequency mode, it indicates that the data changes slowly, and it enters the caching process in step 4.

[0160] 4. Low-frequency buffering and threshold checking: The edge terminal stores the collected data frames into a local circular buffer. It then checks whether the amount of buffered data or the time span reaches a preset long-period threshold. If not, it silently waits for the next collection; if so, it packages the data in the buffer and proceeds to step 5 to prepare for batch transmission.

[0161] 5. The edge terminal performs adaptive compression and encapsulation of data packets based on channel quality and data characteristics.

[0162] 6. The edge terminal calls the data upload communication module and sends the final encapsulated data packet to the power master station.

[0163] The process of adaptive compression and encapsulation of data is explained as follows: Figure 8 As shown, it includes the following steps:

[0164] 1. Data Packet Readiness and Pattern Recognition: After the edge terminal completes data collection for this cycle, the data packet enters the transmission buffer. The edge terminal first reads the macro-scheduling instructions issued by the master station: if it is currently in "low-frequency mode", it is determined to be a non-high-frequency mode. If it is currently in "high-frequency mode" (the master station predicts a period of rapid load change), it enters the "full-volume adaptive channel".

[0165] 2. When the current mode is determined to be non-high frequency, the edge terminal assumes that the data has extremely high temporal stability. Action: The edge terminal skips the subsequent complex feature extraction and channel awareness steps and directly calls the differential coding algorithm.

[0166] 3. When a high-frequency mode is identified, the edge terminal considers the data characteristics to have uncertainty. The edge terminal activates the feature analysis module to pre-scan the current slice and calculate the redundancy ratio in two dimensions:

[0167] Calculate the pattern redundancy ratio according to the formula "R1 = total number of bytes of repeated string ÷ total number of bytes of slices".

[0168] Based on the principle of information - theoretic entropy value, first count the occurrence probability and actual coding bits of high - frequency characters in the slices, and then calculate the theoretical entropy coding bits according to the following formula:

[0169]

[0170] Finally, obtain the coding redundancy ratio through "R2 = (actual coding bits of high - frequency characters - theoretical entropy coding bits) ÷ actual coding bits of high - frequency characters".

[0171] 4. Real - time physical channel perception: The edge terminal reads the underlying parameters of the communication module in real - time to obtain the RSSI (Received Signal Strength Indicator) value at the current moment. RSSI reflects the bandwidth capacity and transmission success rate expectation of the current wireless link.

[0172] 5. First - level decision - making - The shunt system based on channel quality compares the RSSI value with a preset quality threshold: RSSI > threshold: Determine that the channel is good. In order to pursue the ultimate compression ratio, the edge terminal performs the "LZ4 + Huffman" combined coding. RSSI ≤ threshold: Determine that the channel is restricted or poor, and enter the second - level decision - making.

[0173] 6. Second - level decision - making - Algorithm competition based on redundancy features. Under a restricted channel, the edge terminal compares the values of R1 and R2, and selects the single algorithm with the most significant benefit: If R1 > R2: Determine that the pattern redundancy of the current data is more prominent, and execute the LZ4 coding. If R1 < R2: Determine that the uneven data distribution feature is more prominent, and execute a single Huffman coding for entropy compression.

[0174] 7. Data encapsulation and identification writing: After compression, the edge terminal writes the algorithm identification (ID) in the message header, and then encapsulates and uploads it to the master station for directional decompression and restoration according to the ID.

[0175] Reference Figure 9 , the specific process of the third stage is as follows:

[0176] 1. Data reception and protocol parsing: The master - station communication front - end machine receives the compressed data packet from the edge terminal. According to the power communication protocol (such as Q / GDW1376.1 or MQTT payload format), strip the packet header of the communication link layer and extract the payload data (Payload) of the application layer.

[0177] 2. Key Information Extraction: The terminal's unique identifier (ID) and the "Algorithm ID" unique to this technical solution are parsed from the payload data. This identifier is written by the terminal during compression in the first stage (e.g., 0x01, 0x02, or 0x03), and it determines which "key" should be used to unlock the device subsequently.

[0178] 3. Adaptive decompression routing: The main station routes the data stream to the corresponding decompression engine based on the extracted algorithm identifier code.

[0179] 4. Data Restoration and Verification: The main station performs a decompression operation, restoring the binary stream to the original electricity consumption data (voltage, current, power, etc.) with timestamps. Basic data integrity checks (such as CRC checks) are then performed to ensure that the decompressed data is consistent with the data collected by the terminal.

[0180] 5. Business Distribution and Storage: The main station stores the restored cleaned data into a time-series database (such as InfluxDB) and distributes it to downstream business systems (such as billing systems and load monitoring dashboards).

[0181] 6. Prediction Deviation Calculation (Closed-Loop Key): The main station retrieves the "predicted load value" generated by the terminal in the first stage from the database. The "measured load value" obtained from the decompression is aligned and compared with the predicted value, and the deviation index (such as mean absolute error MAE or root mean square error RMSE) is calculated.

[0182] 7. Model Closed-Loop Correction: The main station determines whether the deviation exceeds the set tolerance threshold. If the deviation exceeds the limit (prediction failure), it indicates that the macro-scheduling strategy in the first stage may have misjudged (e.g., predicting a stationary but actually abrupt change). The main station generates a "negative feedback signal," extracts the abnormal waveform data from this instance, adds it to the Hard Example Mining set, and triggers online fine-tuning or weight updates of the LSTM model to improve the prediction accuracy in the next cycle. If the deviation is within the range, it indicates that the prediction is effective, and the new data is incorporated into the historical dataset for subsequent periodic full training.

[0183] In summary, the solution in this embodiment has at least the following innovative aspects:

[0184] 1. This solution introduces quantitative analysis logic targeting data features at the edge, identifying redundancy types by extracting data features in real time. The system calculates the proportion of pattern redundancy and the proportion of coding redundancy respectively. This mechanism transforms complex and abstract data waveforms into quantifiable feature indicators, breaking the bottleneck of the disconnect between compression strategies and data content in traditional solutions.

[0185] 2. This solution constructs a closed-loop optimization architecture of "master station prediction - terminal execution - global deviation feedback". The master station uses a pre-trained Long Short-Term Memory (LSTM) network model to infer and predict historical load data from terminals within the region, identifying time-varying characteristics by capturing the periodic patterns in power data. The system calculates the gradient k of the rate of change of the prediction curve, dividing the load state into "rapid change periods" and "stable periods," and issues differentiated frequency control commands accordingly. The master station calculates the deviation between the decompressed and restored measured values ​​and the predicted values ​​in real time. When the deviation exceeds a tolerance threshold, it triggers online model fine-tuning, realizing dynamic iteration of the sampling strategy according to changes in user electricity consumption habits.

[0186] 3. To ensure data transmission reliability in complex electromagnetic environments, this solution incorporates physical channel quality into the compression decision-making process. The terminal reads the received signal strength indicator of the communication module in real time and aligns it with a preset quality threshold. When channel quality is good, the system executes a combined algorithm that pursues extremely high compression rates; while when channel quality is limited, the system actively switches to a single-algorithm competition logic based on redundancy features.

[0187] 4. To address the computational constraints of limited terminals, this solution constructs a lightweight algorithm cluster consisting of differential coding (Delta), dictionary compression (LZ4), and entropy coding (Huffman). Based on the aforementioned main station's prediction of load fluctuations and the numerical competition results of different redundancies in the data to be compressed, the system can autonomously and dynamically switch between different compression paths. While ensuring low computational overhead, it accurately removes redundant information from different dimensions, improving the compression gain of edge nodes under full-cycle load fluctuations.

[0188] The beneficial effects of this embodiment include:

[0189] 1. By using real-time quantization mode redundancy and coding redundancy, and dynamically matching differentiated compression algorithms, the problem of fixed algorithms being unable to adapt to the time-varying nature of power load data is solved, the compression effect under different scenarios is improved, and the situation where the compressed data volume exceeds the original data is avoided.

[0190] 2. The collaborative architecture of "master station prediction - terminal execution - deviation feedback" enables two-way linkage between the master station and the terminal, improving the system's response to sudden loads and allowing the sampling strategy to be dynamically adjusted and evolved according to users' electricity consumption habits.

[0191] 3. By incorporating physical channel quality into the compression decision logic, the compression strategy can be dynamically adjusted according to the channel status. This avoids wasting bandwidth resources when the channel is good and reduces the risk of transmission timeout when the channel is bad, thereby improving the reliability of data reporting in complex electromagnetic environments.

[0192] 4. The lightweight algorithm cluster is designed to adapt to the limited computing resources of edge terminals. Without affecting the real-time performance of data acquisition, it improves the compression effect during periods of load fluctuation and breaks through the bottleneck of the existing technology that it is difficult to achieve both "low computational overhead" and "high compression gain".

[0193] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0194] Based on the same inventive concept, this application also provides a data compression apparatus for implementing the aforementioned electricity data compression method. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more data compression apparatus embodiments provided below can be found in the limitations of the electricity data compression method described above, and will not be repeated here.

[0195] In one exemplary embodiment, such as Figure 10 As shown, a power data compression device 1000 is provided, comprising:

[0196] The historical load data acquisition module 1002 is used to acquire the historical load data sequence within the first time period reported by the edge terminal.

[0197] The load data prediction module 1004 is used to predict the predicted load data sequence of the edge terminal in a second time period based on the historical load data sequence and using the load data prediction model. The second time period is the time period after the first time period.

[0198] The load change rate determination module 1006 is used to determine the load change rate in the second time period based on the predicted load data sequence.

[0199] The instruction generation module 1008 is used to generate electricity data reporting instructions based on the relationship between the load change rate and the load change rate threshold.

[0200] The instruction sending module 1010 is used to send the electricity consumption data reporting instruction to the edge terminal, so that the edge terminal can determine the data compression strategy according to the reporting frequency control mode indicated by the electricity consumption data reporting instruction, and compress the collected electricity consumption data according to the data compression strategy before reporting.

[0201] In one embodiment, the instruction generation module is further configured to: generate a first electricity consumption data reporting instruction when the load change rate is less than the load change rate threshold, wherein the reporting frequency control mode indicated by the first electricity consumption data reporting instruction is a low-frequency mode; generate a second electricity consumption data reporting instruction when the load change rate is greater than the load change rate threshold, wherein the reporting frequency control mode indicated by the second electricity consumption data reporting instruction is a high-frequency mode; and generate a third electricity consumption data reporting instruction when the load change rate is equal to the load change rate threshold, based on the reporting frequency control mode indicated by the previous electricity consumption data reporting instruction.

[0202] In one embodiment, the edge terminal is further configured to: when the reported frequency control mode is low frequency mode, determine the data compression strategy as differential coding strategy; when the reported frequency control mode is high frequency mode, obtain the channel quality perception value at the current moment, and determine the data compression strategy based on the relationship between the channel quality perception value and the channel quality threshold.

[0203] In one embodiment, the edge terminal is further configured to: determine the data compression strategy as a combined coding strategy when the channel quality perception value is greater than the channel quality threshold, wherein the combined coding strategy indicates that encoding is performed using at least two coding strategies.

[0204] In one embodiment, the edge terminal is further configured to: obtain the mode redundancy ratio and the coding redundancy ratio when the channel quality perception value is less than or equal to the channel quality threshold; determine the data compression strategy as a dictionary coding strategy when the mode redundancy ratio is greater than or equal to the coding redundancy ratio; and determine the data compression strategy as an entropy coding strategy when the mode redundancy ratio is less than the coding redundancy ratio.

[0205] In one embodiment, the above-mentioned electricity data compression device further includes a data receiving module, configured to: receive compressed data packets uploaded by the edge terminal; parse the compressed data packets to obtain a policy identifier of the data compression strategy; and route the compressed data packets to the corresponding decompression engine based on the policy identifier, so that the decompression engine decompresses the compressed data packets to obtain the electricity data reported by the edge terminal.

[0206] In one embodiment, the electricity data compression device further includes a model optimization module, used to: obtain the real load data sequence of the second time period from the decompressed electricity data; calculate the prediction deviation based on the real load data sequence and the predicted load data sequence of the second time period; and trigger the load data prediction model to perform online fine-tuning when the prediction deviation is greater than a preset tolerance threshold.

[0207] Each module in the aforementioned power data compression device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0208] In some exemplary embodiments, this application also provides an electricity data compression system, the system including a power control center master station and edge terminals, wherein:

[0209] The power control center master station obtains the historical load data sequence within the first time period reported by the edge terminal. Based on the historical load data sequence, it uses the load data prediction model to predict the predicted load data sequence of the edge terminal within the second time period. The second time period is the period after the first time period. Based on the predicted load data sequence, it determines the load change rate within the second time period. Based on the relationship between the load change rate and the load change rate threshold, it generates an electricity consumption data reporting instruction and sends the electricity consumption data reporting instruction to the edge terminal.

[0210] The edge terminal determines the data compression strategy based on the reporting frequency control mode indicated by the power consumption data reporting instruction, and then compresses the collected power consumption data according to the data compression strategy before reporting it.

[0211] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores historical load data, load change rates, and other data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a power consumption data compression method.

[0212] Those skilled in the art will understand that Figure 11The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0213] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described power data compression method.

[0214] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described power data compression method.

[0215] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the above-described power data compression method.

[0216] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0217] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0218] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0219] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for compressing electrical data, characterized in that, The method includes: Obtain the historical load data sequence within the first time period reported by the edge terminal; Based on the historical load data sequence, a load data prediction model is used to predict the predicted load data sequence of the edge terminal in a second time period, where the second time period is the period following the first time period. Based on the predicted load data sequence, determine the load change rate within the second time period; Based on the relationship between the load change rate and the load change rate threshold, an electricity consumption data reporting instruction is generated. The power consumption data reporting instruction is sent to the edge terminal, so that the edge terminal determines the data compression strategy according to the reporting frequency control mode indicated by the power consumption data reporting instruction, and compresses the collected power consumption data according to the data compression strategy before reporting.

2. The method according to claim 1, characterized in that, The step of generating an electricity consumption data reporting instruction based on the relationship between the load change rate and the load change rate threshold includes: When the load change rate is less than the load change rate threshold, a first power consumption data reporting instruction is generated, and the reporting frequency control mode indicated by the first power consumption data reporting instruction is low frequency mode. When the load change rate is greater than the load change rate threshold, a second power consumption data reporting instruction is generated, and the reporting frequency control mode indicated by the second power consumption data reporting instruction is high frequency mode; When the load change rate equals the load change rate threshold, a third power consumption data reporting instruction is generated according to the reporting frequency control mode indicated by the previous power consumption data reporting instruction.

3. The method according to claim 2, characterized in that, The edge terminal is also used for: When the reporting frequency control mode is low frequency mode, the data compression strategy is determined to be differential coding strategy; When the reporting frequency control mode is high frequency mode, the channel quality perception value at the current moment is obtained, and the data compression strategy is determined based on the relationship between the channel quality perception value and the channel quality threshold.

4. The method according to claim 3, characterized in that, The step of determining the data compression strategy based on the relationship between the channel quality perceived value and the channel quality threshold includes: When the channel quality perceived value is greater than the channel quality threshold, the data compression strategy is determined to be a combined coding strategy, which indicates that encoding is performed using at least two coding strategies.

5. The method according to claim 3, characterized in that, The step of determining the data compression strategy based on the relationship between the channel quality perceived value and the channel quality threshold includes: When the channel quality perceived value is less than or equal to the channel quality threshold, obtain the mode redundancy ratio and the coding redundancy ratio. When the mode redundancy ratio is greater than or equal to the coding redundancy ratio, the data compression strategy is determined to be a dictionary coding strategy. When the mode redundancy ratio is less than the coding redundancy ratio, the data compression strategy is determined to be an entropy coding strategy.

6. The method according to claim 1, characterized in that, The method further includes: Receive compressed data packets uploaded by the edge terminal; The compressed data packet is parsed to obtain the policy identifier of the data compression strategy; Based on the policy identifier, the compressed data packet is routed to the corresponding decompression engine, so that the decompression engine decompresses the compressed data packet to obtain the power consumption data reported by the edge terminal.

7. The method according to claim 1, characterized in that, The method further includes: Obtain the actual load data sequence for the second time period from the decompressed electricity consumption data; The prediction deviation is calculated based on the actual load data sequence and the predicted load data sequence for the second time period; When the prediction deviation exceeds a preset tolerance threshold, the load data prediction model is triggered to perform online fine-tuning.

8. A power data compression device, characterized in that, The device includes: The historical load data acquisition module is used to acquire the historical load data sequence within the first time period reported by the edge terminal; The load data prediction module is used to predict the predicted load data sequence of the edge terminal in a second time period based on the historical load data sequence and using a load data prediction model. The second time period is the time period after the first time period. The load change rate determination module is used to determine the load change rate within the second time period based on the predicted load data sequence. The instruction generation module is used to generate an electricity consumption data reporting instruction based on the relationship between the load change rate and the load change rate threshold. The instruction sending module is used to send the electricity consumption data reporting instruction to the edge terminal, so that the edge terminal determines the data compression strategy according to the reporting frequency control mode indicated by the electricity consumption data reporting instruction, and reports the collected electricity consumption data after compressing it according to the data compression strategy.

9. A power data compression system, characterized in that, The system includes a power control center master station and edge terminals, wherein: The power control center master station acquires the historical load data sequence within a first time period reported by the edge terminal. Based on the historical load data sequence, it uses a load data prediction model to predict the predicted load data sequence of the edge terminal within a second time period, where the second time period is the period following the first time period. Based on the predicted load data sequence, it determines the load change rate within the second time period. Based on the relationship between the load change rate and a load change rate threshold, it generates an electricity consumption data reporting instruction and sends the electricity consumption data reporting instruction to the edge terminal. The edge terminal determines a data compression strategy based on the reporting frequency control mode indicated by the power consumption data reporting instruction, and then compresses the collected power consumption data according to the data compression strategy before reporting it.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.