An intelligent electric meter high-efficiency data compression and reliable transmission optimization method and device

CN122993886APending Publication Date: 2026-10-27FOSHAN POWER SUPPLY BUREAU GUANGDONG POWER GRID
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611119719.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明旨在提供一种智能电表高效数据压缩与可靠传输优化方法和装置,以解决上述背景技术中提到的现有智能电网数据处理和传输技术所面临的问题之一

Benefits of technology

[0057]综上,本发明提供一种智能电表高效数据压缩与可靠传输优化方法和装置,通过采用基于数据趋势预测的压缩算法对智能电表采集的数据进行压缩处理,得到被压缩且保留关键信息的智能电表数据;关键信息为用于还原原始电表采集数据的信息;基于智能电表数据生成原始数据包,并通过结合纠删码的随机线性网络编码算法对原始数据包进行线性组合生成新数据包进行传输;同时基于关键信息,利用线性代数运算对已传输的新数据包解出原始数据包;基于解出的原始数据包,利用梯度编码方法对数据进行错误检测与丢失恢复。本发明通过对智能电表采集数据进行基于数据趋势预测的压缩处理、结合纠删码与随机线性网络编码算法传输数据,并利用关键信息解包及基于梯度编码进行错误检测与丢失恢复,实现了智能电表数据的高效压缩、可靠传输及数据完整性保障,有效提升了智能电表数据处理的效率与可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122993886A_ABST
    Figure CN122993886A_ABST
Patent Text Reader

Abstract

The application provides a kind of smart meter efficient data compression and reliable transmission optimization method and device, by using the compression algorithm based on data trend prediction to the data of smart meter acquisition is compressed, obtains the smart meter data of compressed and retains key information;Through the linear combination of original data packet is generated by combining the random linear network coding algorithm of erasure code new data packet transmission;At the same time, the original data packet is solved by using linear algebra operation on the new data packet transmitted;The data of original data packet is detected and recovered by using gradient coding method.The application is based on data trend prediction to the compression processing of smart meter acquisition data, combines the transmission data of erasure code and random linear network coding algorithm, and based on gradient coding for error detection and loss recovery, realizes the efficient compression, reliable transmission and data integrity guarantee of smart meter data, effectively improves the efficiency and reliability of smart meter data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of smart grids, and specifically relates to a high-efficiency data compression and reliable transmission optimization method and apparatus for smart electricity meters. Background Art

[0002] With the rapid development of science and technology, smart grids, as an important development direction of modern power systems, are gradually becoming the mainstream of the power industry. Through advanced information technology, communication technology and automation technology, smart grids realize intelligent management and control of power systems, and improve the operation efficiency, reliability and safety of the power systems. In a smart grid, a large number of devices such as electricity meters and sensors continuously generate massive amounts of data, which play a vital role in operation monitoring, fault diagnosis, load forecasting and other aspects of the power system. Therefore, efficient data transmission and processing has become one of the key technologies for the development of smart grids.

[0003] In the data transmission link of the smart grid, the smart electricity meter, as a key data acquisition device, undertakes the important task of collecting user power consumption information and uploading it to the data center. However, as the scale of the smart grid continues to expand, the number of electricity meters increases sharply, and the data volume grows explosively. At the same time, users have increasingly higher requirements for the real-time performance and accuracy of power services, which poses higher challenges to the data transmission system of the smart grid. Existing smart grid data transmission technologies have many problems in data compression, network bandwidth utilization, data reliability and other aspects, which seriously affect the efficient operation of the smart grid.

[0004] Existing smart grid data transmission technologies have many problems. In terms of data compression, most smart electricity meters adopt simple algorithms, which have limited compression efficiency and real-time processing capability when facing large-scale grid data, cannot meet the requirements of real-time and large-scale data processing, resulting in excessive bandwidth occupation by data transmission; in terms of network bandwidth and transmission delay, the relied-upon wireless communication technologies have limited transmission rate and bandwidth, and network congestion and delay are prone to occur when multiple electricity meters upload data concurrently in dense grid areas, affecting the real-time performance and data accuracy of the system; at the level of data loss and error detection, the simple error detection and correction mechanisms of existing smart electricity meters are difficult to ensure data reliability in extreme noise or large-scale fault scenarios, and have high computational overhead, which affects the processing speed of massive data in large-scale power grids. Summary of the Invention

[0005] In view of this, the present invention aims to provide a high-efficiency data compression and reliable transmission optimization method and apparatus for smart electricity meters, so as to solve one of the problems faced by the existing smart grid data processing and transmission technologies mentioned in the above background art.

[0006] To achieve the above objective, the technical solution provided by the present invention is as follows:

[0007] In a first aspect, the present invention provides a method for optimizing efficient data compression and reliable transmission of smart meters, comprising the following steps:

[0008] A compression algorithm based on data trend prediction is used to compress the data collected by smart meters to obtain compressed smart meter data that retains key information; the key information is used to reconstruct the original data collected by the meters.

[0009] The original data packet is generated based on the smart meter data, and a new data packet is generated by linearly combining the original data packet with erasure coding using a random linear network coding algorithm. At the same time, based on key information, the original data packet is deciphered from the transmitted new data packet using linear algebra operations.

[0010] Based on the decoded original data packets, gradient coding method is used to perform error detection and data loss recovery.

[0011] Furthermore, in the step of compressing the data collected by smart meters using a compression algorithm based on data trend prediction, the compression algorithm based on data trend prediction is a prediction-based arithmetic coding algorithm, and the corresponding compression steps include:

[0012] Based on the data collected by smart meters, a pre-built autoregressive model is used to make predictions and calculate the prediction error;

[0013] The prediction error is probabilistically modeled, and based on the probability distribution of the prediction error, arithmetic coding is used to encode the prediction error.

[0014] The encoded data after encoding is used as smart meter data that is compressed while retaining key information.

[0015] Furthermore, the autoregressive model is a p-order autoregressive model. The construction process of a p-order autoregressive model includes:

[0016] Acquire historical data collected by smart meters;

[0017] Determine the order of the model;

[0018] Based on historical data and the selected order, the least squares method is used to estimate the model parameters;

[0019] When the model's fitting error to historical data reaches its minimum, a p-order autoregressive model is obtained.

[0020] Furthermore, the step of generating new data packets by linearly combining the original data packets using a random linear network coding algorithm incorporating erasure coding for transmission includes:

[0021] For the original data packet, linear erasure coding is used to generate redundant data packets, and the set of original data packets and redundant data packets is transmitted.

[0022] By using relay nodes to perform random linear network coding on the set, the data packets in the set are linearly combined to obtain new data packets and then transmitted.

[0023] Furthermore, the steps for error detection and data loss recovery using gradient coding methods include:

[0024] A parity check matrix is ​​used to construct a check equation, and the check equation is used to determine whether the data is complete and accurate.

[0025] If not, the erroneous data is located and corrected using the encoding matrix and least squares estimation.

[0026] Secondly, the present invention provides a device for optimizing efficient data compression and reliable transmission of smart meters, comprising:

[0027] The data compression module is used to compress the data collected by the smart meter using a compression algorithm based on data trend prediction, so as to obtain compressed smart meter data that retains key information; the key information is used to restore the original data collected by the meter.

[0028] The data transmission module is used to generate raw data packets based on smart meter data, and to generate new data packets by linearly combining the raw data packets with erasure coding using a random linear network coding algorithm; at the same time, based on key information, it uses linear algebra operations to decipher the original data packets from the transmitted new data packets.

[0029] The data detection module is used to perform error detection and data loss recovery based on the decoded raw data packets using gradient coding methods.

[0030] Furthermore, in the data compression module, the compression algorithm based on data trend prediction is a prediction-based arithmetic coding algorithm, and the corresponding compression processing steps include:

[0031] Based on the data collected by smart meters, a pre-built autoregressive model is used to make predictions and calculate the prediction error;

[0032] The prediction error is probabilistically modeled, and based on the probability distribution of the prediction error, arithmetic coding is used to encode the prediction error.

[0033] The encoded data after encoding is used as smart meter data that is compressed while retaining key information.

[0034] Furthermore, in the data transmission module, the autoregressive model is a p-order autoregressive model. The construction process of the p-order autoregressive model includes:

[0035] Acquire historical data collected by smart meters;

[0036] Determine the order of the model;

[0037] Based on historical data and the selected order, the least squares method is used to estimate the model parameters;

[0038] When the model's fitting error to historical data reaches its minimum, a p-order autoregressive model is obtained.

[0039] Furthermore, in the data transmission module, a new data packet is generated by linearly combining the original data packet with erasure coding using a random linear network coding algorithm, which includes:

[0040] For the original data packet, linear erasure coding is used to generate redundant data packets, and the set of original data packets and redundant data packets is transmitted.

[0041] By using relay nodes to perform random linear network coding on the set, the data packets in the set are linearly combined to obtain new data packets and then transmitted.

[0042] Furthermore, in the data inspection module, gradient coding methods are used for error detection and data loss recovery, including:

[0043] A parity check matrix is ​​used to construct a check equation, and the check equation is used to determine whether the data is complete and accurate.

[0044] If not, the erroneous data is located and corrected using the encoding matrix and least squares estimation.

[0045] Thirdly, the present invention 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 perform the following steps:

[0046] A compression algorithm based on data trend prediction is used to compress the data collected by smart meters to obtain compressed smart meter data that retains key information; the key information is used to reconstruct the original data collected by the meters.

[0047] The original data packet is generated based on the smart meter data, and a new data packet is generated by linearly combining the original data packet with erasure coding using a random linear network coding algorithm. At the same time, based on key information, the original data packet is deciphered from the transmitted new data packet using linear algebra operations.

[0048] Based on the decoded original data packets, gradient coding method is used to perform error detection and data loss recovery.

[0049] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the following steps:

[0050] A compression algorithm based on data trend prediction is used to compress the data collected by smart meters to obtain compressed smart meter data that retains key information; the key information is used to reconstruct the original data collected by the meters.

[0051] The original data packet is generated based on the smart meter data, and a new data packet is generated by linearly combining the original data packet with erasure coding using a random linear network coding algorithm. At the same time, based on key information, the original data packet is deciphered from the transmitted new data packet using linear algebra operations.

[0052] Based on the decoded original data packets, gradient coding method is used to perform error detection and data loss recovery.

[0053] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0054] A compression algorithm based on data trend prediction is used to compress the data collected by smart meters to obtain compressed smart meter data that retains key information; the key information is used to reconstruct the original data collected by the meters.

[0055] The original data packet is generated based on the smart meter data, and a new data packet is generated by linearly combining the original data packet with erasure coding using a random linear network coding algorithm. At the same time, based on key information, the original data packet is deciphered from the transmitted new data packet using linear algebra operations.

[0056] Based on the decoded original data packets, gradient coding method is used to perform error detection and data loss recovery.

[0057] In summary, this invention provides a method and apparatus for optimizing efficient data compression and reliable transmission of smart meters. It employs a compression algorithm based on data trend prediction to compress data collected by smart meters, resulting in compressed smart meter data that retains key information. This key information is used to reconstruct the original meter data. Based on the smart meter data, an original data packet is generated, and a new data packet is generated by linearly combining the original data packet with an erasure coding algorithm. Simultaneously, based on the key information, linear algebra operations are used to decrypt the transmitted new data packet to retrieve the original data packet. Based on the decrypted original data packet, gradient coding is used to perform error detection and data loss recovery. This invention achieves efficient compression, reliable transmission, and data integrity assurance of smart meter data by performing data trend prediction-based compression on smart meter data, combining erasure coding and random linear network coding algorithms for data transmission, and using key information depackaging and gradient coding for error detection and data loss recovery. This effectively improves the efficiency and reliability of smart meter data processing. Attached Figure Description

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

[0059] Figure 1 A flowchart illustrating an optimized method for efficient data compression and reliable transmission of smart meters, provided in an embodiment of the present invention;

[0060] Figure 2 A block diagram illustrating the composition of the high-efficiency data compression and reliable transmission optimization device for smart meters provided in this embodiment of the invention;

[0061] Figure 3 This is a block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0062] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0063] The following is a brief introduction to some of the technical terms involved in this invention:

[0064] (1) Smart meter: A smart meter is an electricity metering device with two-way communication capabilities and advanced measurement functions. It can measure, record and transmit electricity usage data in real time. It can not only accurately measure the user's electricity consumption, but also interact with the power company's system to realize functions such as remote meter reading, real-time electricity price notification, load control, and fault diagnosis. Through smart meters, power companies can better manage the power system, optimize power distribution, and improve the efficiency and reliability of power grid operation. At the same time, it also provides users with more convenient electricity management and energy-saving means.

[0065] (2) Predictive Arithmetic Coding (PAC): Arithmetic coding is a lossless data compression algorithm that achieves data compression by mapping the source symbol sequence to a sub-interval within the real number interval [0,1). Predictive arithmetic coding, based on arithmetic coding, combines a prediction mechanism with existing data information to predict the symbol to be encoded. The probability estimation during the encoding process is adjusted based on the prediction result, thereby improving coding efficiency. This algorithm typically first establishes a prediction model to predict the probability distribution of the current symbol based on historical data, and then encodes the symbol according to the principles of arithmetic coding, closely integrating the prediction and encoding processes to achieve better compression results.

[0066] (3) Autoregressive Model: An autoregressive model (AR model) is a time series model. It assumes that there is a linear relationship between the current observation and the observations at several past times, that is, the current value is predicted by a linear combination of its past values.

[0067] (4) Erasure coding: This is a coding technique used for data fault tolerance and recovery. It divides the original data into multiple segments and adds redundant information to these segments using a specific coding algorithm. When some data segments are lost or damaged, the original data can be recovered using the remaining unlost segments and redundant information.

[0068] (5) Random Linear Network Coding: Random linear network coding is a coding technique used in network communication to optimize data transmission and improve network performance. In the network, intermediate nodes no longer simply forward data packets, but instead encode the received data packets using random linear combinations before forwarding them to downstream nodes. The receiving end collects a sufficient number of encoded data packets and uses linear algebra methods to decode them to recover the original data. This coding method can make full use of network bandwidth resources, improve network throughput and robustness, and has significant advantages, especially in multicast network environments, effectively reducing the number of transmissions and lowering transmission latency.

[0069] Data collected by smart meters exhibits significant time-series characteristics, displaying clear periodicity, trends, and strong temporal correlation. Predictive arithmetic coding algorithms and autoregressive models are theoretically well-suited for processing this type of data, capable of removing substantial temporal redundancy through prediction and achieving compression efficiency approaching Shannon entropy. However, in practical deployments of existing smart meters, limited by terminal hardware computing power and deployment costs, most devices still employ general lossless compression algorithms such as Huffman coding and LZW coding. These algorithms do not specifically utilize the inherent characteristics of smart meter data, failing to effectively remove redundant information and resulting in generally low compression ratios, making it difficult to cope with the ever-increasing volume of data. Some attempts to use predictive coding also suffer from drawbacks such as rigid selection of autoregressive model order and the inability to dynamically update model parameters based on user electricity consumption patterns, further limiting improvements in compression performance.

[0070] In the field of data transmission, although erasure coding and random linear network coding have been extensively studied in communications, their integrated application in smart grids is still in its early stages. Most existing smart grid data transmission systems use a traditional end-to-end store-and-forward architecture, where relay nodes only perform simple packet copying and forwarding operations, failing to fully utilize the network's multipath transmission capabilities and bandwidth resources. The application of erasure coding is also limited to static redundancy generation at the terminal side, unable to adjust redundancy based on dynamic factors such as real-time network packet loss rate and channel quality. This leads to wasted bandwidth resources when network conditions are good, and insufficient fault tolerance when network conditions are poor. While random linear network coding can significantly improve the throughput and robustness of multi-hop networks, its high computational complexity and poor compatibility with existing power communication protocols have prevented its practical application in large-scale smart meter networks.

[0071] Regarding data reliability assurance, existing smart meter systems primarily rely on Cyclic Redundancy Check (CRC) for error detection, combined with Automatic Repeat Request (ARQ) for error recovery. This simple reliability assurance mechanism can meet basic requirements in scenarios with low network packet loss rates. However, in extreme noise environments, large-scale equipment failures, or network congestion scenarios faced by smart grids, frequent retransmissions can lead to a sharp increase in transmission latency, even preventing the transmission of critical data within the specified time. Gradient coding, as an emerging fault-tolerant coding method, can achieve efficient error detection and data recovery without relying on retransmissions, but its application research in smart grid data transmission is still very limited. Furthermore, existing technologies generally design data compression, transmission coding, and reliability assurance as three independent functional modules, lacking a cross-layer joint optimization mechanism, resulting in the overall system resource utilization and performance failing to reach optimal levels.

[0072] As can be seen from the aforementioned background technology, the challenges and shortcomings of existing technologies in application are as follows:

[0073] (1) Insufficient data compression efficiency:

[0074] Existing smart meters typically employ simple compression algorithms, which can reduce data volume to some extent. However, when faced with large-scale power grid data, compression efficiency and real-time processing capabilities become bottlenecks. Especially when dealing with extremely large data volumes, the low compression efficiency of current technologies fails to meet the demands of power grid management for real-time, large-scale data processing.

[0075] (2) Network bandwidth and transmission delay issues:

[0076] Even with data compression, existing smart meters rely on existing wireless communication technologies, which still have limitations in transmission rate and bandwidth. Especially in areas with dense power grids, network congestion and latency can easily occur when multiple meters upload data concurrently, affecting the system's real-time performance and data accuracy.

[0077] (3) Data loss and error detection:

[0078] In existing systems, while most smart meters are equipped with simple error detection and correction mechanisms, these capabilities may be insufficient to fully guarantee data reliability in extreme noise environments or large-scale fault scenarios. The computational overhead of error detection and correction algorithms can affect data processing speed, especially for the massive amounts of data in large-scale power grids.

[0079] To address the aforementioned problems, this invention provides a method and apparatus for optimizing efficient data compression and reliable transmission of smart meters. Some embodiments of this invention are described below.

[0080] Please see Figure 1 This invention provides a method for optimizing efficient data compression and reliable transmission of smart meters, comprising the following steps:

[0081] S100: The data collected by the smart meter is compressed using a compression algorithm based on data trend prediction to obtain compressed smart meter data that retains key information; the key information is used to restore the original data collected by the smart meter.

[0082] Among them, compression algorithms based on data trend prediction refer to algorithms that predict current data by analyzing the trends of historical data, storing and transmitting only the difference between the actual data and the predicted value, or performing more efficient encoding based on the prediction results to achieve data compression. Prediction-based arithmetic coding algorithms are one specific implementation method. Key information refers to the information used to reconstruct the original meter readings, specifically the difference between the actual data and the predicted value.

[0083] It's important to note that smart meters continuously collect vast amounts of data, which often exhibit certain trends and patterns. Compression algorithms based on data trend prediction analyze historical data trends to predict current data. They then store and transmit only the differences between the actual and predicted values, or encode the data more efficiently based on the prediction results, thus achieving data compression while retaining key information that allows for the reconstruction of the original data. During compression, the differences between the actual and predicted values ​​are preserved as crucial information. This deviation information reflects the degree of deviation between the actual and predicted values. By combining the prediction model and the deviation information, the original meter-collected data can be reconstructed.

[0084] S200: Generates raw data packets based on smart meter data, and generates new data packets by linearly combining the raw data packets with erasure coding random linear network coding algorithm; at the same time, based on key information, it uses linear algebra operations to decipher the raw data packets from the transmitted new data packets.

[0085] Here, the original data packet refers to the data packet formed by encapsulating compressed smart meter data containing key information according to the network transmission protocol format. The new data packet refers to the data packet generated by the relay node through a random linear combination of the original data packet and redundant data packets, and is used for transmission. Linear algebra operations refer to mathematical operations such as matrix operations and vector operations based on linear algebra theory, which are used in this step to decode the original data packet from the encoded data packet.

[0086] It should be noted that this step assembles the compressed smart meter data containing key information into original data packets. Then, a randomized linear network coding algorithm is used to randomly and linearly combine the original data packets at intermediate nodes in the network to generate new data packets for transmission. This approach improves network transmission efficiency and robustness, allowing for more flexible data transmission and reducing the number of transmissions and latency. The addition of erasure coding enhances data fault tolerance. Erasure coding adds redundant information to the original data; when some data packets are lost or corrupted during transmission, the remaining data packets and the redundant information can be used to solve for the original data packets through linear algebraic operations, ensuring data integrity and recoverability.

[0087] S300: Based on the decoded raw data packets, gradient coding method is used to perform error detection and data loss recovery.

[0088] Gradient coding is a technique that uses redundant coding to achieve data error detection and data loss recovery. Originating in the field of fault-tolerant optimization in distributed computing, its core principle is to ensure the recovery of critical information when data is lost by generating redundant codes, while simultaneously achieving efficient error detection and correction. Error detection refers to the process of determining whether transmitted data contains errors caused by noise interference, malicious attacks, etc., through a specific coding mechanism. Data loss recovery refers to the process of recovering the complete original data using redundant coding information and related algorithms when some data is lost.

[0089] It should be noted that this step involves specific encoding processing of the data in the original data packet. For example, methods such as random projection can be used to compress the data, or encryption techniques can be employed to encrypt the data. This allows for the detection of errors during data transmission. If data loss or errors are detected, the lost data can be recovered based on the characteristics of the encoding and relevant algorithms. Gradient encoding can reduce the amount of data transmitted without compromising data accuracy, while simultaneously enhancing the data's resistance to interference and its error recovery capabilities.

[0090] Smart meter data is characterized by its massive volume, high real-time requirements, periodicity, trend-following nature, and extremely high accuracy requirements. This embodiment provides an optimized method for efficient data compression and reliable transmission of smart meters. By employing a compression algorithm based on data trend prediction, it uses historical data to predict future values ​​based on the periodicity and trend of smart meter data, retaining only the deviation between the actual data and the predicted value. This significantly reduces the data volume, effectively improving storage and transmission efficiency and lowering costs. To address real-time requirements, a random linear network coding algorithm with erasure coding is combined to flexibly process data packets, reduce transmission latency, and ensure timely data delivery. Considering accuracy requirements, not only does the compression algorithm retain key information for data reconstruction, but erasure coding and gradient coding also contribute to transmission fault tolerance and error recovery, respectively, ensuring data accuracy and integrity. This embodiment organically integrates multiple algorithms to achieve efficient compression and reliable transmission, significantly improving the overall performance and reliability of the smart meter system.

[0091] In the field of smart grid data compression, prediction-based arithmetic coding (PAC) is one of the better algorithms. It organically combines autoregressive prediction (AR) with arithmetic coding, exhibiting superior performance and achieving compression efficiency close to Shannon entropy when processing time-series data such as power load and power. Therefore, in one embodiment, in the step of compressing data collected by smart meters using a data trend prediction-based compression algorithm, the data trend prediction-based compression algorithm is a prediction-based arithmetic coding algorithm, and the corresponding compression steps include:

[0092] S101: Based on the data collected by the smart meter, a pre-built autoregressive model is used to make predictions and calculate the prediction error.

[0093] The prediction error, also known as the residual, refers to the difference between the predicted value of the autoregressive model and the actual data collected by the smart meter.

[0094] In this step, prediction error can be used as key information. This embodiment employs a prediction-based arithmetic coding scheme to address the problem of insufficient data compression efficiency. In this coding scheme, prediction error is a crucial factor. By predicting the data, the error between the predicted value and the actual value is obtained, i.e., the prediction error. Encoding the prediction error can more effectively reduce redundant data because the prediction error typically has a small dynamic range. Compared to directly encoding the original data, a higher compression ratio can be achieved, thereby improving bandwidth utilization and reducing network load.

[0095] The algorithm's principle mainly covers two key stages. The first stage is the prediction stage, which uses an autoregressive (AR) model. Taking data collected by smart meters as an example, let the power grid data sequence be X1, X2, ..., X...t , where X t This represents the electricity, power, or voltage data at a specific moment. Assuming the sequence satisfies a p-order autoregressive model (AR(p)), the predicted value for the current moment is calculated using the following formula:

[0096] ;

[0097] In the formula, The AR model parameters are obtained by fitting historical data, and This refers to the prediction error (residual). Because smart grid data exhibits periodicity and time correlation, using AR models can significantly reduce data uncertainty, thus minimizing the prediction error. Much smaller than the original data The information entropy H(X).

[0098] S102: Perform probabilistic modeling on the prediction error, and encode the prediction error using arithmetic coding based on the probability distribution of the prediction error.

[0099] Probabilistic modeling refers to the process of statistically analyzing the probability of prediction errors and establishing their probability distribution model. A probability distribution is a mathematical model describing the probabilistic laws governing different values ​​of a random variable (in this step, the prediction error). In this step, the probability distribution of the prediction error approximates a Laplace distribution. Arithmetic coding is a lossless data compression algorithm that achieves data compression by mapping the source symbol sequence to a subinterval within the real number interval [0,1).

[0100] The second stage is the arithmetic coding stage. This is because of prediction errors. Concentrated around zero, its probability distribution approximates a Laplace distribution, described by the following formula:

[0101] ;

[0102] Where b is a scale parameter, related to the volatility of the data. This probability distribution characteristic, highly concentrated near zero, allows arithmetic coding to efficiently encode these errors, thus achieving a higher compression ratio. The formula for updating the encoding range in arithmetic coding is:

[0103] New Interval = [L + W·F] low L+W∙F high );

[0104] Where L and W are the lower bound and width of the current encoding interval, respectively, and F... low and F highThese represent the range of error values ​​on the Cumulative Distribution Function (CDF).

[0105] S103: Use the encoded data after encoding processing as smart meter data that is compressed while retaining key information.

[0106] The coded data refers to the prediction error data after arithmetic coding, which contains key information used to reconstruct the original meter data.

[0107] The PAC algorithm offers significant advantages. It approaches the limit of Shannon entropy, and compared to Huffman coding, arithmetic coding enables finer-grained probability allocation, nearing the theoretically optimal compression ratio. It also leverages the temporal correlation of data, reducing randomness and entropy through prediction, thus improving compression efficiency. It is particularly suitable for time-series data in smart grids, significantly enhancing compression efficiency for signals with strong temporal correlations such as voltage, power, and frequency. In this embodiment, the prediction-based arithmetic coding algorithm, as a compression algorithm based on data trend prediction, is processed in steps S101 and S102. In step S103, the encoded data is used as the compressed smart meter data while retaining key information, maximizing the compression ratio, reducing data storage and transmission costs, and maintaining the ability to recover data with high accuracy. This fully demonstrates the superior performance of the PAC algorithm in smart meter data compression, laying a solid foundation for subsequent data transmission and processing.

[0108] Regarding data compression, this embodiment employs a prediction-based arithmetic coding scheme to address the issue of inefficient data compression. The high-frequency data volume in smart grids is enormous, rendering traditional compression methods inefficient. This coding scheme, leveraging a precise data compression mechanism, can accurately analyze data characteristics and effectively reduce redundant data. For example, when processing large amounts of power load data, it predicts current data by analyzing historical data, storing only the deviation between the actual data and the predicted value, and using arithmetic coding to efficiently encode this deviation, significantly improving the compression ratio and thus increasing bandwidth utilization. In large-scale data stream transmission scenarios, it can significantly reduce network load, allowing for more rational allocation and utilization of network resources.

[0109] In one embodiment, the autoregressive model is a p-order autoregressive model, and the construction process of the p-order autoregressive model includes:

[0110] 1) Obtain historical data collected by smart meters.

[0111] Historical data refers to data collected by smart meters over a period of time that includes information such as electricity consumption and power, showing how these values ​​change over time.

[0112] 2) Determine the order of the model.

[0113] The order of a model refers to the number of past observations used in an autoregressive model to predict the current value. A p-order autoregressive model uses observations from the past p time points for prediction.

[0114] 3) Based on historical data and the selected order, the least squares method is used to estimate the model parameters.

[0115] Least squares is a mathematical method for determining model parameters by minimizing the sum of squared errors between model predictions and actual observations. Model parameters are coefficients in an autoregressive model that describe the influence of past observations on current predictions; specifically, α in an AR model. i .

[0116] 4) When the model's fitting error to historical data reaches its minimum, a p-order autoregressive model is obtained.

[0117] Fitting error refers to the difference between the predicted value of an autoregressive model for historical data and the actual historical data. It is used to measure how well the model fits the historical data. A p-order autoregressive model is a specific form of autoregressive model that assumes a linear relationship between the current observation and the observations at the past p times, and predicts the current value by linearly combining its own past p values.

[0118] This embodiment acquires historical data collected by smart meters. This data contains the changing patterns of information such as electricity consumption and power over time, forming the basis for model construction. Next, the model order *p* is determined, as an appropriate order strikes a balance between capturing data patterns and avoiding overfitting or underfitting. This order can be determined using methods such as the information criterion, autocorrelation function, and partial autocorrelation function. Then, based on the selected order and historical data, the model parameters are estimated using the least squares method. This method determines the parameters by minimizing the sum of squared errors between the model's predicted values ​​and the actual observed values. Finally, the parameters are continuously adjusted until the model's fitting error to the historical data is minimized. At this point, a p-order autoregressive model that accurately describes the changing patterns of smart meter data is obtained, which can be used for subsequent processing such as prediction and compression of smart meter data.

[0119] In smart grid data transmission scenarios, network bandwidth and transmission latency are critical issues that urgently need to be addressed. A method combining forward error correction (FEC) and network coding (NC) can effectively optimize these issues. This method significantly improves data reliability, reduces latency, and increases bandwidth utilization without increasing retransmission overhead. Therefore, in one embodiment, the step of generating new data packets by linearly combining the original data packets with a random linear network coding algorithm incorporating error correction (FEC) for transmission includes:

[0120] S201: For the original data packet, use linear erasure coding to generate redundant data packets, and then transmit the set of the original data packet and the redundant data packets.

[0121] Linear erasure coding is a specific type of erasure coding, belonging to the category of forward erasure coding. It generates redundant data packets from the original data packets through a linear transformation. The receiving end only needs to receive at least the number of linearly independent encoded data packets equal to the number of original data packets to recover all the original data. Redundant data packets refer to data packets generated by linear erasure coding that contain redundant information about the original data, used to recover the original data when some original data packets are lost. The coding matrix is ​​an n×k dimensional matrix (n is the total number of encoded data packets, and k is the number of original data packets), used to generate n encoded data packets from k original data packets through a linear transformation.

[0122] In this step, linear erasure coding is used to generate redundant data packets from the original data packets, and the sets of original and redundant data packets are then transmitted. Linear erasure coding belongs to the category of forward erasure coding (FEC). Let the original data packet sequence be X={x1,x2,…,x…} k As described in the principle of forward erasure coding, n redundant data packets (n>k) are generated using linear erasure coding (such as the classic Reed-Solomon code). The transmitted encoded data packets constitute a set Y={y1,y2,…,y}. n Each encoded packet can be represented as:

[0123] ;

[0124] Where G is an n×k encoding matrix. In the complex network environment of a smart grid, data packets are easily lost. This method generates redundant data packets, ensuring that the receiving end can receive at least k different y values. i That would allow you to recover all x. j This feature avoids retransmissions due to packet loss, greatly reduces network latency, and lays the foundation for reliable data transmission.

[0125] S202: Use relay nodes to perform random linear network coding on the set, linearly combine the data packets in the set to obtain new data packets and transmit them.

[0126] In a multi-hop network environment, a relay node is a network node responsible for receiving data packets from upstream nodes and forwarding them to downstream nodes. Random linear network coding refers to the specific encoding process by which a relay node generates new data packets from the received data packets using a random linear combination.

[0127] In this step, relay nodes perform random linear network coding (RLNC) on the set, linearly combining the data packets in the set to obtain new data packets for transmission. RLNC is employed in this process. In multi-hop network environments, relay nodes play a crucial role in smart grids. When relay node R receives k data packets from set Y = {y1, y2, ..., y...} k When a data packet is generated, it will generate a new data packet z by random linear combination according to the rules of random linear network coding. i ,Right now:

[0128] ;

[0129] in These are random coefficients used for linearly combining received data packets, typically taken from the finite field GF(2^m). A finite field refers to an algebraic structure containing a finite number of elements. In this step, they are used to provide the range of values ​​for the random coefficients, ensuring the effectiveness and decodeability of the linear combination operation. This operation allows relay nodes to no longer simply copy and forward data packets, but instead perform innovative linear combination processing on the data. As long as the receiving end receives at least k linearly independent data packets, it can decode the original data X using Gaussian elimination. This greatly improves bandwidth utilization and further reduces latency caused by data packet loss. In the wireless communication environment of smart grids, this method effectively mitigates the impact of high packet loss rates on system stability and significantly improves real-time performance.

[0130] To address network bandwidth and transmission latency issues, this embodiment combines Random Linear Network Coding (RLNC) with Forward Erasure Coding (FEC). In the complex multi-hop network environment of smart grids, data transmission is susceptible to interference from various factors. Forward erasure coding provides fault tolerance for data transmission by generating redundant data packets. Even if some data packets are lost, the receiving end can recover the original data based on the remaining data packets and redundant information, avoiding retransmission. Random Linear Network Coding enables relay nodes to randomly linearly combine received data packets before forwarding them, increasing the flexibility of data transmission. Working together, these two technologies intelligently combine and transmit redundant data, reducing retransmission requirements caused by data loss or packet loss, lowering system latency, and improving bandwidth utilization, effectively meeting the high data traffic transmission demands of smart grids.

[0131] In smart grid data processing, data loss and error detection are critical issues, and gradient coding (GC) provides an effective solution. While originating from fault-tolerant optimization in distributed computing, gradient coding has demonstrated significant application value in smart grid data transmission scenarios. Its core lies in using redundant coding to ensure the recovery of critical information in the event of data loss, while simultaneously achieving efficient error detection and correction. Therefore, in one embodiment, the steps for error detection and data loss recovery using gradient coding include:

[0132] S301: Use a parity check matrix to construct a check equation, and use the check equation to determine whether the data is complete and accurate.

[0133] The parity check matrix is ​​an r×m dimensional matrix (where r is the number of redundant check bits and m is the dimension of the encoded data). Its row vectors are located in the orthogonal complement space of the encoded data and are used to construct a check equation to detect data errors. The check equation is the equation HY=0 constructed based on the parity check matrix, where Y is the encoded data. If the equation holds true after substituting the received data, then the data is error-free; otherwise, an error exists.

[0134] In this step, a parity check matrix is ​​used to construct a verification equation, and the verification equation is used to determine whether the data is complete and accurate. Assume the data vector in the smart grid is X=(x1,x2,…,x…). d This data may represent power load, frequency, or voltage data within a certain time window. Before data transmission, an m×d dimensional encoding matrix G is used to linearly transform the original data, generating redundant coded data Y, i.e.:

[0135] ;

[0136] The G matrix in the formula typically satisfies m>d, meaning it generates more redundant codes than the original data, providing assurance for subsequent data recovery. To detect errors, a parity check matrix H is introduced, which is an r×m dimensional matrix (r is the number of redundant check bits), and its row vectors are located in the orthogonal complement space of the data encoding. The check equation constructed in this step is:

[0137] ;

[0138] When the receiving end receives data, it will receive a subset of the data Y. recv Substitute into the verification equation. If no errors occur in the data packet during transmission, then HY recv =0; If data packet errors occur due to noise interference or malicious attacks during transmission, then HY recv≠0, which allows us to determine whether the data is complete and accurate, thus enabling error detection.

[0139] S302: If not, use the coding matrix and least squares estimation to locate and correct erroneous data.

[0140] Least squares estimation is a specific application of the least squares method in the field of data recovery. It recovers the original data vector by minimizing the sum of squared errors between the estimated value and the actual observation value.

[0141] If the data determined in this step is incomplete or inaccurate, i.e., if the HY equation is found to be incorrect, then this step is correct. recv If the value is not equal to 0, proceed to this step. In this step, the encoding matrix and least squares estimation are used to locate and correct erroneous data. Let Y be the subset of data received by the receiver. recv Due to data loss or errors, the row vector actually received by the receiver corresponds to a submatrix G′ of matrix G. If G′ is still a full-rank matrix, then least squares estimation can be used to recover X, i.e., the original vector X can be solved using a formula. This method ensures that even in the case of partial packet loss (such as due to network congestion or sudden packet loss), the original information can still be recovered through matrix inversion. Simultaneously, during the recovery process, by comparing with correct data and analyzing the position of erroneous data in the matrix, the erroneous data can be located, and then corrected according to the principles of gradient coding and related algorithms. This solves the data loss and error detection problems in smart grids, ensuring the accuracy and integrity of smart meter data.

[0142] To address the issues of data loss and error detection, this embodiment introduces a gradient coding-based mechanism. Traditional retransmission mechanisms are not only time-consuming but can also affect the timeliness and reliability of data transmission. The gradient coding mechanism uses data vectors as a foundation and generates redundant coded data through a coding matrix. When data is lost, if the submatrix corresponding to the subset of data received by the receiver is of full rank, the original data can be recovered using least-squares estimation. Simultaneously, a parity check matrix is ​​used to construct a check equation, which can efficiently detect whether errors exist in the data. This mechanism avoids the drawbacks of traditional retransmission mechanisms, reduces latency, and improves the reliability and efficiency of data transmission.

[0143] Based on the same inventive concept, this application also provides a smart meter efficient data compression and reliable transmission optimization device for implementing the above-mentioned smart meter efficient data compression and reliable transmission optimization method. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in the embodiments of the smart meter efficient data compression and reliable transmission optimization device provided below can be found in the limitations of the smart meter efficient data compression and reliable transmission optimization method described above, and will not be repeated here.

[0144] Please see Figure 2 This invention also provides a smart meter high-efficiency data compression and reliable transmission optimization device, comprising:

[0145] The data compression module is used to compress the data collected by the smart meter using a compression algorithm based on data trend prediction, so as to obtain compressed smart meter data that retains key information; the key information is used to restore the original data collected by the meter.

[0146] The data transmission module is used to generate raw data packets based on smart meter data, and to generate new data packets by linearly combining the raw data packets with erasure coding using a random linear network coding algorithm; at the same time, based on key information, it uses linear algebra operations to decipher the original data packets from the transmitted new data packets.

[0147] The data detection module is used to perform error detection and data loss recovery based on the decoded raw data packets using gradient coding methods.

[0148] In one embodiment, in the data compression module, the compression algorithm based on data trend prediction is a prediction-based arithmetic coding algorithm, and the corresponding compression processing steps include:

[0149] Based on the data collected by smart meters, a pre-built autoregressive model is used to make predictions and calculate the prediction error;

[0150] The prediction error is probabilistically modeled, and based on the probability distribution of the prediction error, arithmetic coding is used to encode the prediction error.

[0151] The encoded data after encoding is used as smart meter data that is compressed while retaining key information.

[0152] In one embodiment, in the data transmission module, the autoregressive model is a p-order autoregressive model, and the construction process of the p-order autoregressive model includes:

[0153] Acquire historical data collected by smart meters;

[0154] Determine the order of the model;

[0155] Based on historical data and the selected order, the least squares method is used to estimate the model parameters;

[0156] When the model's fitting error to historical data reaches its minimum, a p-order autoregressive model is obtained.

[0157] In one embodiment, in the data transmission module, a new data packet is generated by linearly combining the original data packet with an erasure coding random linear network coding algorithm, and then transmitted. This includes:

[0158] For the original data packet, linear erasure coding is used to generate redundant data packets, and the set of original data packets and redundant data packets is transmitted.

[0159] By using relay nodes to perform random linear network coding on the set, the data packets in the set are linearly combined to obtain new data packets and then transmitted.

[0160] In one embodiment, the data detection module utilizes a gradient coding method for error detection and data loss recovery, including:

[0161] A parity check matrix is ​​used to construct a check equation, and the check equation is used to determine whether the data is complete and accurate.

[0162] If not, the erroneous data is located and corrected using the encoding matrix and least squares estimation.

[0163] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0164] Reference Figure 3 This invention also provides a computer device, including: a memory and a processor, and a computer program stored in the memory. When the computer program is executed on the processor, it performs the following steps:

[0165] A compression algorithm based on data trend prediction is used to compress the data collected by smart meters to obtain compressed smart meter data that retains key information; the key information is used to reconstruct the original data collected by the meters.

[0166] The original data packet is generated based on the smart meter data, and a new data packet is generated by linearly combining the original data packet with erasure coding using a random linear network coding algorithm. At the same time, based on key information, the original data packet is deciphered from the transmitted new data packet using linear algebra operations.

[0167] Based on the decoded original data packets, gradient coding method is used to perform error detection and data loss recovery.

[0168] In one embodiment, in the step of compressing the data collected by the smart meter using a compression algorithm based on data trend prediction, the compression algorithm based on data trend prediction is a prediction-based arithmetic coding algorithm, and the corresponding compression steps include:

[0169] Based on the data collected by smart meters, a pre-built autoregressive model is used to make predictions and calculate the prediction error;

[0170] The prediction error is probabilistically modeled, and based on the probability distribution of the prediction error, arithmetic coding is used to encode the prediction error.

[0171] The encoded data after encoding is used as smart meter data that is compressed while retaining key information.

[0172] In one embodiment, the autoregressive model is a p-order autoregressive model, and the construction process of the p-order autoregressive model includes:

[0173] Acquire historical data collected by smart meters;

[0174] Determine the order of the model;

[0175] Based on historical data and the selected order, the least squares method is used to estimate the model parameters;

[0176] When the model's fitting error to historical data reaches its minimum, a p-order autoregressive model is obtained.

[0177] In one embodiment, the step of generating new data packets by linearly combining the original data packets using a random linear network coding algorithm incorporating erasure coding for transmission includes:

[0178] For the original data packet, linear erasure coding is used to generate redundant data packets, and the set of original data packets and redundant data packets is transmitted.

[0179] By using relay nodes to perform random linear network coding on the set, the data packets in the set are linearly combined to obtain new data packets and then transmitted.

[0180] In one embodiment, the step of using a gradient coding method for error detection and data loss recovery includes:

[0181] A parity check matrix is ​​used to construct a check equation, and the check equation is used to determine whether the data is complete and accurate.

[0182] If not, the erroneous data is located and corrected using the encoding matrix and least squares estimation.

[0183] The computer device may be a desktop computer, laptop, handheld computer, or cloud server, etc. This computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 3 The examples of computer devices are merely examples and do not constitute a limitation on computer devices. They may include more or fewer components than shown in the illustration, or combinations of certain components, or different components. For example, they may also include input / output devices, network access devices, etc.

[0184] The processor referred to can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0185] In some embodiments, the memory may be an internal storage unit of the computer device, such as a hard drive or RAM. In other embodiments, the memory may be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory may include both internal and external storage units of the computer device. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory can also be used to temporarily store data that has been output or will be output.

[0186] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, performs the following steps:

[0187] A compression algorithm based on data trend prediction is used to compress the data collected by smart meters to obtain compressed smart meter data that retains key information; the key information is used to reconstruct the original data collected by the meters.

[0188] The original data packet is generated based on the smart meter data, and a new data packet is generated by linearly combining the original data packet with erasure coding using a random linear network coding algorithm. At the same time, based on key information, the original data packet is deciphered from the transmitted new data packet using linear algebra operations.

[0189] Based on the decoded original data packets, gradient coding method is used to perform error detection and data loss recovery.

[0190] In one embodiment, in the step of compressing the data collected by the smart meter using a compression algorithm based on data trend prediction, the compression algorithm based on data trend prediction is a prediction-based arithmetic coding algorithm, and the corresponding compression steps include:

[0191] Based on the data collected by smart meters, a pre-built autoregressive model is used to make predictions and calculate the prediction error;

[0192] The prediction error is probabilistically modeled, and based on the probability distribution of the prediction error, arithmetic coding is used to encode the prediction error.

[0193] The encoded data after encoding is used as smart meter data that is compressed while retaining key information.

[0194] In one embodiment, the autoregressive model is a p-order autoregressive model, and the construction process of the p-order autoregressive model includes:

[0195] Acquire historical data collected by smart meters;

[0196] Determine the order of the model;

[0197] Based on historical data and the selected order, the least squares method is used to estimate the model parameters;

[0198] When the model's fitting error to historical data reaches its minimum, a p-order autoregressive model is obtained.

[0199] In one embodiment, the step of generating new data packets by linearly combining the original data packets using a random linear network coding algorithm incorporating erasure coding for transmission includes:

[0200] For the original data packet, linear erasure coding is used to generate redundant data packets, and the set of original data packets and redundant data packets is transmitted.

[0201] By using relay nodes to perform random linear network coding on the set, the data packets in the set are linearly combined to obtain new data packets and then transmitted.

[0202] In one embodiment, the step of using a gradient coding method for error detection and data loss recovery includes:

[0203] A parity check matrix is ​​used to construct a check equation, and the check equation is used to determine whether the data is complete and accurate.

[0204] If not, the erroneous data is located and corrected using the encoding matrix and least squares estimation.

[0205] In this embodiment, if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0206] This invention provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0207] A compression algorithm based on data trend prediction is used to compress the data collected by smart meters to obtain compressed smart meter data that retains key information; the key information is used to reconstruct the original data collected by the meters.

[0208] The original data packet is generated based on the smart meter data, and a new data packet is generated by linearly combining the original data packet with erasure coding using a random linear network coding algorithm. At the same time, based on key information, the original data packet is deciphered from the transmitted new data packet using linear algebra operations.

[0209] Based on the decoded original data packets, gradient coding method is used to perform error detection and data loss recovery.

[0210] In one embodiment, in the step of compressing the data collected by the smart meter using a compression algorithm based on data trend prediction, the compression algorithm based on data trend prediction is a prediction-based arithmetic coding algorithm, and the corresponding compression steps include:

[0211] Based on the data collected by smart meters, a pre-built autoregressive model is used to make predictions and calculate the prediction error;

[0212] The prediction error is probabilistically modeled, and based on the probability distribution of the prediction error, arithmetic coding is used to encode the prediction error.

[0213] The encoded data after encoding is used as smart meter data that is compressed while retaining key information.

[0214] In one embodiment, the autoregressive model is a p-order autoregressive model, and the construction process of the p-order autoregressive model includes:

[0215] Acquire historical data collected by smart meters;

[0216] Determine the order of the model;

[0217] Based on historical data and the selected order, the least squares method is used to estimate the model parameters;

[0218] When the model's fitting error to historical data reaches its minimum, a p-order autoregressive model is obtained.

[0219] In one embodiment, the step of generating new data packets by linearly combining the original data packets using a random linear network coding algorithm incorporating erasure coding for transmission includes:

[0220] For the original data packet, linear erasure coding is used to generate redundant data packets, and the set of original data packets and redundant data packets is transmitted.

[0221] By using relay nodes to perform random linear network coding on the set, the data packets in the set are linearly combined to obtain new data packets and then transmitted.

[0222] In one embodiment, the step of using a gradient coding method for error detection and data loss recovery includes:

[0223] A parity check matrix is ​​used to construct a check equation, and the check equation is used to determine whether the data is complete and accurate.

[0224] If not, the erroneous data is located and corrected using the encoding matrix and least squares estimation.

[0225] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0226] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0227] In the embodiments disclosed in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0228] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for optimizing efficient data compression and reliable transmission in smart meters, characterized in that, Includes the following steps: A compression algorithm based on data trend prediction is used to compress the data collected by smart meters to obtain compressed smart meter data that retains key information; the key information is used to reconstruct the original smart meter data. Based on the smart meter data, an original data packet is generated, and a new data packet is generated by linearly combining the original data packet with erasure coding using a random linear network coding algorithm; simultaneously, based on the key information, the original data packet is deciphered from the transmitted new data packet using linear algebra operations. Based on the solved original data packet, the gradient coding method is used to perform error detection and data loss recovery.

2. The method for optimizing efficient data compression and reliable transmission of smart meters according to claim 1, characterized in that, In the step of compressing the data collected by smart meters using a compression algorithm based on data trend prediction, the compression algorithm based on data trend prediction is a prediction-based arithmetic coding algorithm, and the corresponding compression steps include: Based on the data collected by smart meters, a pre-built autoregressive model is used to make predictions and calculate the prediction error; The prediction error is probabilistically modeled, and based on the probability distribution of the prediction error, the prediction error is encoded using arithmetic coding. The encoded data after encoding is used as smart meter data that is compressed while retaining key information.

3. The method for optimizing efficient data compression and reliable transmission of smart meters according to claim 2, characterized in that, The autoregressive model is a p-order autoregressive model, and the construction process of the p-order autoregressive model includes: Acquire historical data collected by smart meters; Determine the order of the model; Based on the historical data and the selected order, the least squares method is used to estimate the model parameters; The p-order autoregressive model is obtained when the model's fitting error to the historical data reaches its minimum.

4. The method for optimizing efficient data compression and reliable transmission of smart meters according to claim 1, characterized in that, The step of generating new data packets by linearly combining the original data packets using a random linear network coding algorithm incorporating erasure coding, and then transmitting them, includes: For the original data packet, linear erasure coding is used to generate redundant data packets, and the set of the original data packet and the redundant data packets are transmitted. By using relay nodes to perform random linear network coding on the set, the data packets in the set are linearly combined to obtain new data packets, which are then transmitted.

5. The method for optimizing efficient data compression and reliable transmission of smart meters according to claim 1, characterized in that, The steps for error detection and data loss recovery using gradient coding methods include: A parity check matrix is ​​used to construct a check equation, and the check equation is used to determine whether the data is complete and accurate. If not, the erroneous data is located and corrected using the encoding matrix and least squares estimation.

6. A device for optimizing efficient data compression and reliable transmission of smart meters, characterized in that, include: The data compression module is used to compress the data collected by the smart meter using a compression algorithm based on data trend prediction, so as to obtain compressed smart meter data that retains key information. The key information is used to reconstruct the original electricity meter data. The data transmission module is used to generate an original data packet based on the smart meter data, and to generate a new data packet by linearly combining the original data packet with a random linear network coding algorithm that combines erasure coding for transmission; at the same time, based on the key information, the original data packet is deciphered from the transmitted new data packet using linear algebra operations. The data detection module is used to perform error detection and data loss recovery on the decoded original data packets using a gradient coding method.

7. The smart meter high-efficiency data compression and reliable transmission optimization device according to claim 6, characterized in that, In the data compression module, the compression algorithm based on data trend prediction is a prediction-based arithmetic coding algorithm, and the corresponding compression processing steps include: Based on the data collected by smart meters, a pre-built autoregressive model is used to make predictions and calculate the prediction error; The prediction error is probabilistically modeled, and based on the probability distribution of the prediction error, the prediction error is encoded using arithmetic coding. The encoded data after encoding is used as smart meter data that is compressed while retaining key information.

8. The smart meter high-efficiency data compression and reliable transmission optimization device according to claim 7, characterized in that, In the data transmission module, the autoregressive model is a p-order autoregressive model, and the construction process of the p-order autoregressive model includes: Acquire historical data collected by smart meters; Determine the order of the model; Based on the historical data and the selected order, the least squares method is used to estimate the model parameters; The p-order autoregressive model is obtained when the model's fitting error to the historical data reaches its minimum.

9. The smart meter high-efficiency data compression and reliable transmission optimization device according to claim 6, characterized in that, In the data transmission module, a new data packet is generated by linearly combining the original data packet with erasure coding using a random linear network coding algorithm, and then transmitted. This includes: For the original data packet, linear erasure coding is used to generate redundant data packets, and the set of the original data packet and the redundant data packets are transmitted. By using relay nodes to perform random linear network coding on the set, the data packets in the set are linearly combined to obtain new data packets, which are then transmitted.

10. The smart meter high-efficiency data compression and reliable transmission optimization device according to claim 6, characterized in that, In the data detection module, gradient coding is used to perform error detection and data loss recovery, including: A parity check matrix is ​​used to construct a check equation, and the check equation is used to determine whether the data is complete and accurate. If not, the erroneous data is located and corrected using the encoding matrix and least squares estimation.