HPLC double mode carrier communication memory with data optimization collection

By constructing a data stream and adaptively adjusting the sliding window size using LZ77 encoding compression, the problems of high-speed acquisition and high reliability in HPLC dual-mode carrier communication data storage are solved, achieving lossless compression and efficient storage.

CN118474206BActive Publication Date: 2026-04-17STATE GRID INTELLIGENCE TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID INTELLIGENCE TECHNOLOGY CO LTD
Filing Date
2024-05-14
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies cannot effectively meet the high-performance and high-reliability storage requirements of HPLC dual-mode carrier communication data, especially when the data volume is large, the types are diverse, and the sources are complex. Traditional storage methods cannot meet the requirements of high-speed acquisition and real-time processing, and the compression effect is poor and mostly lossy compression.

Method used

An HPLC dual-mode carrier communication memory with optimized data acquisition is used. The data acquisition module constructs a data stream, and the parameter acquisition module obtains the preset sliding window length range of LZ77 encoding. The sliding window size is adaptively adjusted to perform LZ77 encoding compression, achieving lossless compression.

Benefits of technology

It achieves lossless compression in HPLC dual-mode carrier communication while improving compression performance, meeting the high-performance and high-reliability data storage requirements of smart grid and other services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118474206B_ABST
    Figure CN118474206B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data compression storage, in particular to a HPLC dual-mode carrier wave communication memory for data optimized collection, which comprises a data collection module, which is used for collecting any type of data stream in HPLC dual-mode carrier wave communication; a parameter acquisition module, which is used for obtaining an optimal initial sliding window length when data stream is subjected to LZ77 encoding compression; a parameter optimization module, which is used for sequentially dividing all data packets in the data stream into at least two data packet sequences, and obtaining the adaptive sliding window length of each data packet sequence based on the optimal initial sliding window length; and a compression storage module, which is used for adaptively compressing the corresponding data packet sequence according to the adaptive sliding window length of each data packet sequence, obtaining a data compression packet of the data stream, and storing the data compression packet, so that the sliding window size during LZ77 encoding compression is adaptively adjusted, lossless compression is realized, and better compression effect is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data compression and storage technology, and in particular to an HPLC dual-mode carrier communication memory for optimized data acquisition. Background Technology

[0002] In existing technologies, data acquisition typically faces challenges such as large data volume, diverse data types, and complex data sources. This is especially true in HPLC dual-mode carrier communication environments, where the difficulty of data acquisition is further increased due to the characteristics of communication signals and the complexity of the network environment. At the same time, traditional data storage methods often cannot meet the high performance and high reliability requirements of HPLC dual-mode carrier communication data.

[0003] Traditional data storage methods often fail to meet the high performance and high reliability requirements of HPLC dual-mode carrier communication data. On the one hand, traditional storage methods have slow read and write speeds, which cannot meet the needs of high-speed acquisition and real-time processing of HPLC dual-mode carrier communication data. For example, Huffman coding requires statistical analysis of the data and encoding compression based on statistical characteristics. For data with high real-time requirements, the compression effect is poor. On the other hand, the compression effect of traditional storage methods is poor, and compression algorithms with good compression effects are usually lossy.

[0004] Therefore, how to perform lossless compression of HPLC dual-mode carrier communication data while achieving good compression results, so as to meet the high-performance and high-reliability data storage requirements of smart grid and other businesses, has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide an HPLC dual-mode carrier communication memory for optimized data acquisition, in order to solve the problem of how to perform lossless compression of HPLC dual-mode carrier communication data while achieving good compression effect, thereby meeting the data storage requirements of smart grid and other services for high performance and high reliability.

[0006] This invention provides an HPLC dual-mode carrier communication memory for optimized data acquisition, the HPLC dual-mode carrier communication memory comprising:

[0007] The data acquisition module is used to acquire data packets corresponding to any type of communication data in HPLC dual-mode carrier communication, forming a continuous data stream;

[0008] The parameter acquisition module is used to obtain a preset sliding window length range in LZ77 encoding based on the window data of the data stream, and to perform LZ77 encoding compression on the data stream using each sliding window length within the preset sliding window length range, so as to obtain the optimal initial sliding window length when performing LZ77 encoding compression on the data stream.

[0009] The parameter optimization module is used to divide all data packets in the data stream into at least two data packet sequences according to a preset number of consecutive data packets, and to perform LZ77 encoding compression on the data stream based on the optimal initial sliding window length to obtain the adaptive sliding window length of each data packet sequence.

[0010] The compression storage module is used to perform adaptive LZ77 encoding compression on the corresponding data packet sequence according to the adaptive sliding window length of each data packet sequence to obtain the data compressed packet of the data stream, and to store the data compressed packet for data transmission and decoding during data analysis.

[0011] Preferably, the parameter acquisition module obtains the preset sliding window length range in the LZ77 encoding based on the window data of the data stream, including:

[0012] Construct a variable window of a preset size and a search sliding window of the same size as the variable window. Starting from the first data in the data stream, use the variable window to obtain the first variable window time series data in the data stream, and obtain the search sliding window time series data after the first variable window data.

[0013] If the numerical matching degree between the timing data of the first variable window and the timing data of the search window is not 100%, the search window is slid by a preset step size. If the numerical matching degree between the timing data of the search window after sliding and the timing data of the first variable window is not 100%, the search window continues to slide until the search window slides to the last data in the data stream.

[0014] If the numerical matching degree is not 100% when the search window slides to the last data in the data stream, the variable window is slid by a preset step size to obtain the timing data of the first variable window after sliding, and the timing data of the first variable window after sliding is used as the timing data of the first variable window. If the numerical matching degree between the timing data of the first variable window after sliding and the timing data of the search window after sliding is not 100% when the timing data of the first variable window after sliding exceeds the preset proportional length of the data stream, the size of the variable window is reduced until the numerical matching degree between the timing data of the first variable window and the timing data of the search window is 100%, and the size of the corresponding reduced variable window is used as the maximum value of the preset sliding window length range in LZ77 encoding.

[0015] The maximum value and the preset minimum value are combined to form the preset sliding window length range in LZ77 encoding.

[0016] Preferably, after acquiring the search sliding window timing data after the first variable window data, the parameter acquisition module includes:

[0017] If the numerical matching degree between the first variable window timing data and the search sliding window timing data is 100%, then the size of the variable window is increased, and the increased variable window is used as the variable window. The numerical matching degree between the variable window timing data and the search sliding window timing data is obtained again until the numerical matching degree is not 100%. The size of the last variable window with a numerical matching degree of 100% is used as the maximum value of the preset sliding window length range in LZ77 encoding.

[0018] The maximum value and the preset minimum value are combined to form the preset sliding window length range in LZ77 encoding.

[0019] Preferably, the parameter acquisition module performs LZ77 encoding compression on the data stream using each slide length within the preset slide length range to obtain the optimal initial slide length for LZ77 encoding compression of the data stream, including:

[0020] For any sliding window length within the preset sliding window length range, the data stream is compressed using LZ77 encoding based on the sliding window length to obtain the corresponding compression ratio and compression rate. The compression ratio and compression rate are then normalized, and the average value between the normalized compression ratio and the normalized compression rate is used as the compression effect index of the sliding window length.

[0021] Based on the compression effect index corresponding to each sliding window length within the preset sliding window length range, the sliding window length corresponding to the largest compression effect index is taken as the optimal sliding window length when performing LZ77 encoding compression on the data stream.

[0022] Based on the optimal sliding window length of the data stream corresponding to each type of communication data in the HPLC dual-mode carrier communication, all optimal sliding window lengths are clustered to obtain cluster density centers. The optimal sliding window length closest to the cluster density center is taken as the optimal initial sliding window length when performing LZ77 encoding compression on the data stream.

[0023] Preferably, the parameter optimization module performs LZ77 encoding compression on the data stream based on the optimal initial sliding window length to obtain the adaptive sliding window length for each data packet sequence, including:

[0024] If the optimal initial sliding window length is used as the adaptive sliding window length of the first data packet sequence of the data stream, then for the first data packet sequence of the data stream, the first data packet sequence is LZ77 encoded and compressed using the adaptive sliding window length of the first data packet sequence, to obtain the compression ratio change curve and the maximum repeating character length set of the first data packet sequence.

[0025] Obtain the trend result of the compression ratio change curve of the first data packet sequence. Based on the trend result and the set of maximum repeating character lengths, obtain the adaptive sliding window length of the second data packet sequence in the data stream. Take the second data packet sequence in the data stream as the first data packet sequence and repeat the step of the adaptive sliding window length of the second data packet sequence in the data stream to obtain the adaptive sliding window length of each data packet sequence in turn.

[0026] Preferably, the parameter optimization module uses the adaptive sliding window length of the first data packet sequence to perform LZ77 encoding compression on the first data packet sequence, obtaining the compression ratio change curve and the set of maximum repeating character lengths of the first data packet sequence, including:

[0027] For any data packet in the first data packet sequence, obtain the compression ratio after LZ77 encoding compression of the data packet and the length of all repeated characters in the data packet. With the length of repeated characters as the horizontal axis and the number of repeated characters as the vertical axis, construct a statistical histogram of the length of all repeated characters in the data packet. Obtain the corresponding fitting curve and normal distribution curve based on the statistical histogram.

[0028] Obtain the similarity between the fitted curve and the normal distribution curve, and use the product between the maximum number in the statistical histogram and the similarity as the quantity filtering threshold. Select the maximum repeating character length among the repeating character lengths corresponding to the quantity filtering threshold as the maximum repeating character length corresponding to the data packet.

[0029] Based on the compression ratio of each data packet in the first data packet sequence, a compression ratio change curve of the first data packet sequence is constructed, and the maximum repeating character lengths of all data packets in the first data packet sequence are combined to form the maximum repeating character length set of the first data packet sequence.

[0030] Preferably, the parameter optimization module obtains the trend result of the compression ratio change curve of the first data packet sequence, including:

[0031] Based on the compression ratio change curve of the first data packet sequence, the compression ratio difference between two adjacent data packets is calculated respectively. The first number of compression ratio differences that are positive and greater than or equal to a preset first difference threshold is counted. If the first number exceeds the total number of compression ratio differences of a preset proportion, the trend of the compression ratio change curve of the first data packet sequence is determined to be in an upward state.

[0032] The number of compression ratio differences that are negative and less than or equal to a preset second difference threshold is counted. If the second number exceeds the total number of compression ratio differences of a preset proportion, the trend of the compression ratio change curve of the first data packet sequence is determined to be a decreasing state.

[0033] If the first quantity does not exceed the total number of compression ratio differences by a preset ratio, or the second quantity does not exceed the total number of compression ratio differences by a preset ratio, then the trend of the compression ratio change curve of the first data packet sequence is determined to be in a stable state.

[0034] Preferably, the parameter optimization module obtains the adaptive sliding window length of the second data packet sequence in the data stream based on the trend result and the set of maximum repeating character lengths, including:

[0035] If the trend result is upward, obtain the difference in sliding window length between the maximum value within the preset sliding window length range and the adaptive sliding window length of the first data packet sequence; obtain the average repeated character length and the variance of the repeated character length of the maximum repeated character length set; calculate the ratio between the maximum repeated character length and the average repeated character length in the maximum repeated character length set; and substitute the negative of the variance of the repeated character length into an exponential function with the natural constant as the base to obtain the corresponding function value.

[0036] The product of the sliding window length difference, the ratio, and the function value is used as the sliding window length increase. The sum of the adaptive sliding window length of the first data packet sequence and the sliding window length increase is rounded down, and the rounded result is used as the adaptive sliding window length of the second data packet sequence in the data stream.

[0037] Preferably, the parameter optimization module obtains the adaptive sliding window length of the second data packet sequence in the data stream based on the trend result and the set of maximum repeating character lengths, including:

[0038] If the trend result is a downward trend, obtain the average repeated character length and the variance of the repeated character length in the set of maximum repeated character lengths, calculate the ratio between the maximum repeated character length and the average repeated character length in the set of maximum repeated character lengths, and substitute the negative of the variance of the repeated character length into an exponential function with the natural constant as the base to obtain the corresponding function value.

[0039] The product of the adaptive sliding window length of the first data packet sequence, the ratio, and the function value is used as the reduction amount of the sliding window length. The result of subtracting the adaptive sliding window length of the first data packet sequence from the increase amount of the sliding window length is rounded down, and the rounded result is used as the adaptive sliding window length of the second data packet sequence in the data stream.

[0040] Preferably, the parameter optimization module obtains the adaptive sliding window length of the second data packet sequence in the data stream based on the trend result and the set of maximum repeating character lengths, including:

[0041] If the trend result is a stable state, then the adaptive sliding window length of the second data packet sequence in the data stream is equal to the adaptive sliding window length of the first data packet sequence.

[0042] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:

[0043] This invention provides a data acquisition-optimized HPLC dual-mode carrier communication storage system, comprising: a data acquisition module for acquiring data packets corresponding to any type of communication data in HPLC dual-mode carrier communication, forming a continuous data stream; a parameter acquisition module for obtaining a preset sliding window length range in LZ77 encoding based on window data of the data stream, and performing LZ77 encoding compression on the data stream using each sliding window length within the preset sliding window length range to obtain an optimal initial sliding window length for LZ77 encoding compression of the data stream; a parameter optimization module for sequentially dividing all data packets in the data stream into at least two data packet sequences according to a preset number of consecutive data packets, performing LZ77 encoding compression on the data stream based on the optimal initial sliding window length, and obtaining an adaptive sliding window length for each data packet sequence; and a compression storage module for adaptively LZ77 encoding compression on the corresponding data packet sequence according to the adaptive sliding window length of each data packet sequence to obtain a compressed data packet of the data stream, storing the compressed data packet for data transmission and decoding during data analysis. In this study, considering that LZ77 encoding is lossless and its compression effect and encoding efficiency are affected by the size of the sliding window, a large sliding window will have a longer search time, affecting the compression efficiency, while a small sliding window has a faster search time but a lower compression ratio. Therefore, by analyzing the data repeatability and compression ratio of the data stream corresponding to any type of communication data in HPLC dual-mode carrier communication, the sliding window size for LZ77 encoding compression of each data packet in the data stream is adaptively adjusted. This allows the sliding window to adaptively increase when processing long repeating data units to achieve better compression, and to adaptively decrease when processing short repeating data units to achieve fast encoding. This achieves the goal of meeting the high-performance and high-reliability data storage requirements of smart grid and other services. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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.

[0045] Figure 1 This is a structural block diagram of an HPLC dual-mode carrier communication memory for optimized data acquisition provided in Embodiment 1 of the present invention;

[0046] Figure 2 This is a schematic diagram of a chain code encoding process provided in an embodiment of the present invention. Detailed Implementation

[0047] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.

[0048] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0049] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0050] See Figure 1 This is a structural block diagram of an HPLC dual-mode carrier communication memory for optimized data acquisition provided in Embodiment 1 of the present invention, as shown below. Figure 1 As shown, the HPLC dual-mode carrier communication memory may include:

[0051] The data acquisition module 11 is used to acquire data packets corresponding to any type of communication data in HPLC dual-mode carrier communication, forming a continuous data stream.

[0052] The acquisition of HPLC (High-Speed ​​Power Line Carrier) dual-mode carrier communication data mainly involves data acquisition methods based on HPLC and other possible communication technologies (such as HRF). The following are the basic steps and data formats for HPLC dual-mode carrier communication data acquisition:

[0053] 1. Data Acquisition Steps (1) Preset Working Frequency Band: Based on the broadband power line carrier communication network, preset the working frequency bands of HPLC and HRF carriers. (2) Determine Communication Rate: Based on the channel of the broadband power line carrier communication network, determine the communication rate of the HPLC and HRF dual-mode carriers. (3) Determine Signal Cyclic Scanning Mode: Based on the dual-mode carrier communication transmission channel, determine the signal cyclic scanning mode to ensure accurate data acquisition. (4) Frame Storage Processing: Based on the broadband power line carrier communication network protocol, perform frame storage processing on the received message information. (5) Demodulation and Parameter Extraction: Obtain the first and last flag bits of the message information, demodulate the message information to obtain the specific electrical parameters of the acquisition end. (6) Monitoring and Display: Based on the data packet of the specific electrical parameters of the acquisition end, collect and monitor the equipment on the power supply side, grid side, and load side, and display it through the terminal.

[0054] 2. Data Format

[0055] The collected communication data mainly contains information about electrical parameters, which are usually in digital form and include, but are not limited to: current (A), voltage (V), power factor (PF), active power (P), reactive power (Q), frequency (Hz), phase angle (θ), and timestamp (recording the time of data acquisition).

[0056] As an example, referring to Table 1, the data acquisition device collects electrical parameters from the power supply side once per second. At the timestamp of 17:17:00 on May 10, 2023, the current is 100A, the voltage is 230V, the active power is 20kW, the reactive power is 5kvar, and the frequency is 50.01Hz. At the timestamp of 17:17:01 on May 10, 2023, the current is 102A, the voltage is 231V, the active power is 20.2kW, the reactive power is 5.1kvar, and the frequency is 50.02Hz. This example demonstrates the electrical parameters collected from the power supply side at specified time points, including current, voltage, active power, reactive power, and frequency. These electrical parameter data can be used to monitor the operating status of the power grid, analyze the performance of power equipment, and perform energy management and optimization.

[0057] Table 1 shows the data acquisition results of various communication methods using the HPLC dual-mode carrier communication network.

[0058]

[0059] In HPLC dual-mode carrier communication, communication data is transmitted in the form of data packets. Each data packet contains electrical parameter information collected over a period of time, as well as other metadata (such as timestamps, device IDs, etc.). These data packets are arranged in chronological order and can form a continuous data stream, which can be used as input data for subsequent LZ77 encoding and compression.

[0060] It should be noted that one type of electrical parameter corresponds to one data stream, such as current data stream, voltage data stream, etc.

[0061] The parameter acquisition module 12 is used to obtain a preset sliding window length range in LZ77 encoding based on the window data of the data stream, and to perform LZ77 encoding compression on the data stream using each sliding window length within the preset sliding window length range, so as to obtain the optimal initial sliding window length when performing LZ77 encoding compression on the data stream.

[0062] LZ77 encoding is a lossless encoding method that encodes sequentially, giving it a natural advantage in processing real-time time-series data. It also boasts fast decoding speeds, meeting real-time requirements. However, the compression effect and encoding efficiency of LZ77 encoding are affected by the size of the sliding window. A large sliding window results in a longer search time, impacting compression efficiency, while a small sliding window offers a faster search time but a lower compression ratio. Therefore, in this embodiment of the invention, the sliding window size during LZ77 encoding compression is adaptively adjusted based on the data correlation in the data stream. The sliding window is adaptively enlarged when processing long, repeating data units to achieve better compression, and adaptively reduced for short, repeating data units to achieve faster encoding.

[0063] Considering that LZ77 encoding is based on repeating characters, and data compression is achieved by converting repeating characters into their corresponding positions and repetition lengths in a dictionary, the sliding window length is a crucial parameter in LZ77 encoding. Since each acquisition of HPLC dual-mode carrier communication data will have some differences, the initial sliding window length for LZ77 encoding will also be different. Therefore, whenever it is necessary to compress and store any type of communication data stream in HPLC dual-mode carrier communication, it is necessary to first obtain the initial sliding window size for LZ77 encoding.

[0064] Before obtaining the initial sliding window size for LZ77 encoding of the data stream, it is necessary to obtain the preset sliding window length range in LZ77 encoding based on the window data of the data stream. The specific process is as follows:

[0065] Construct a variable window of a preset size and a search sliding window of the same size as the variable window. Starting from the first data in the data stream, use the variable window to obtain the first variable window time series data in the data stream, and obtain the search sliding window time series data after the first variable window data.

[0066] If the numerical matching degree between the timing data of the first variable window and the timing data of the search window is not 100%, the search window is slid by a preset step size. If the numerical matching degree between the timing data of the search window after sliding and the timing data of the first variable window is not 100%, the search window continues to slide until the search window slides to the last data in the data stream.

[0067] If the numerical matching degree is not 100% when the search window slides to the last data in the data stream, the variable window is slid by a preset step size to obtain the timing data of the first variable window after sliding. The timing data of the first variable window after sliding is used as the timing data of the first variable window. If the numerical matching degree between the timing data of the first variable window after sliding and the timing data of the search window after sliding is not 100% when the timing data of the first variable window after sliding exceeds the preset proportional length of the data stream, the size of the variable window is reduced until the numerical matching degree between the timing data of the first variable window and the timing data of the search window is 100%. The size of the corresponding reduced variable window is used as the maximum value of the preset sliding window length range in LZ77 encoding. The maximum value and the preset minimum value are combined to form the preset sliding window length range in LZ77 encoding.

[0068] In one implementation, a variable window and a search window are constructed for the data stream. The maximum size of the variable window is half the data volume of the data stream. The size of the variable window and the size of the search window are the same, and the size of the search window changes with the size of the variable window. Assuming the initial size of the variable window is 5, the initial size of the corresponding search window is also 5. Starting from the first data in the data stream, time-series data of length 5 for the variable window (i.e., the time-series data consisting of the first 5 data points) is acquired. Then, starting from the 6th data point, time-series data of length 5 for the search window (i.e., the time-series data consisting of the 6th to 10th data points) is constructed. The time-series data of the search window and the time-series data of the variable window are then matched against each other at the same position. If all two data points at the same position are identical, the numerical matching degree between the time-series data of the variable window and the time-series data of the search window is considered 100%. Otherwise, the numerical matching degree between the time-series data of the variable window and the time-series data of the search window is considered not 100%.

[0069] If the numerical matching degree between the variable window time series data and the search sliding window time series data is not 100%, the search sliding window is slid in the data stream with a step size of 1 to obtain the slid-up search sliding window time series data consisting of the 7th to 11th data points. After each slide, it is matched with the variable window time series data. If the numerical matching degree between the slid-up search sliding window time series data and the variable window time series data is still not 100%, it continues to slide until the search sliding window slides to the last data point in the data stream. At this point, it cannot slide further. If the numerical matching degree corresponding to the last data point in the data stream is not 100%, the variable window needs to be slid. However, if the numerical matching degree between the slid-up search sliding window time series data and the variable window time series data is 100%, it means that these 5 data points are repeated in the data stream. It is possible to determine the length of the longer repeated data. Therefore, the size of the variable window can be increased, and the analysis of the numerical matching degree between the variable window time series data and the search sliding window time series data can be restarted. See below for details.

[0070] If the numerical matching degree is not 100% when the search window slides to the last data in the data stream, the variable window needs to be slid. The specific process is as follows: the variable window is slid in a step of 1, that is, the 2nd to 6th data are combined to form the variable window time series data, and the 7th to 11th data are combined to form the search window time series data. At this time, the variable window time series data and the search window time series data are matched again. If the corresponding data matching degree is not 100%, the variable window is slid again until the variable window slides more than one-tenth of the total number of data in the data stream. If the data matching degree is still not 100%, the size of the variable window is reduced until the numerical matching degree between the search window time series data and the variable window time series data is 100%. The size of the reduced variable window is taken as the maximum value 'a' of the preset window length range in LZ77 encoding. At the same time, the preset minimum value is set to 2, so the preset window length range in LZ77 encoding is [2, a].

[0071] It should be noted that after obtaining the search sliding window time series data after the first variable window data, the process also includes the case where the numerical matching degree between the first variable window time series data and the search sliding window time series data is 100%. Therefore, after obtaining the search sliding window time series data after the first variable window data, the process includes:

[0072] If the numerical matching degree between the first variable window timing data and the search sliding window timing data is 100%, then the size of the variable window is increased, and the increased variable window is used as the variable window. The numerical matching degree between the variable window timing data and the search sliding window timing data is continued to be obtained until the numerical matching degree is not 100%. The size of the variable window corresponding to the last numerical matching degree of 100% is taken as the maximum value of the preset sliding window length range in LZ77 encoding. The maximum value and the preset minimum value are combined to form the preset sliding window length range in LZ77 encoding.

[0073] In one embodiment, the initial size of the variable window is 5, and the initial size of the search sliding window is also 5. The time-series data of the variable window (length 5) and the time-series data of the search sliding window consisting of the 6th to 10th data points are acquired. If the numerical matching degree between the variable window time-series data and the search sliding window time-series data is 100%, it indicates that these 5 data points are repeated in the data stream. Therefore, a longer repeated data length can be determined. Thus, the size of the variable window can be increased, and the analysis of the numerical matching degree between the variable window time-series data and the search sliding window time-series data can be restarted until the numerical matching degree between the variable window time-series data and the search sliding window time-series data is not 100%. Then, the previously increased variable window size is taken as the maximum value 'a' of the preset sliding window length range in LZ77 encoding. Simultaneously, a preset minimum value is set to 2, so the preset sliding window length range in LZ77 encoding is [2, a].

[0074] Furthermore, after obtaining the preset sliding window length range [2, a] in LZ77 encoding, LZ77 encoding compression is performed on the data stream using each sliding window length within the preset sliding window length range, thereby obtaining the optimal initial sliding window length when performing LZ77 encoding compression on the data stream.

[0075] Preferably, the data stream is LZ77 encoded and compressed using each sliding window length within a preset range to obtain the optimal initial sliding window length for LZ77 encoding and compression of the data stream, including:

[0076] For any sliding window length within the preset sliding window length range, the data stream is compressed using LZ77 encoding based on the sliding window length to obtain the corresponding compression ratio and compression rate. The compression ratio and compression rate are then normalized, and the average value between the normalized compression ratio and the normalized compression rate is used as the compression effect index of the sliding window length.

[0077] Based on the compression effect index corresponding to each sliding window length within the preset sliding window length range, the sliding window length corresponding to the largest compression effect index is taken as the optimal sliding window length when performing LZ77 encoding compression on the data stream.

[0078] Based on the optimal sliding window length of the data stream corresponding to each type of communication data in the HPLC dual-mode carrier communication, all optimal sliding window lengths are clustered to obtain cluster density centers. The optimal sliding window length closest to the cluster density center is taken as the optimal initial sliding window length when performing LZ77 encoding compression on the data stream.

[0079] In one embodiment, LZ77 encoding compression is performed on the data stream using each sliding window length within a preset range. Compression ratio and compression rate curves are plotted based on the selected sliding window length, with the sliding window lengths selected from smallest to largest. Each sliding window length corresponds to a compression ratio value and a compression rate value. The compression ratio and compression rate in the compression ratio and compression rate curves are normalized, and the normalized compression ratio and normalized compression rate values ​​are denoted as b and c, respectively. Then, the mean values ​​of b and c corresponding to each sliding window length are obtained. The larger the mean value, the better the effect. Therefore, the sliding window length corresponding to the maximum mean value is selected as the optimal sliding window length for the data stream, which is also the optimal sliding window length for the current data type. Similarly, the optimal sliding window lengths for other data types are obtained. All optimal sliding window lengths are clustered to obtain cluster density centers. The optimal sliding window length closest to the cluster density center is used as the final initial sliding window size, denoted as the optimal initial sliding window length for LZ77 encoding compression of the data stream.

[0080] The parameter optimization module 13 is used to divide all data packets in the data stream into at least two data packet sequences according to a consecutive preset number of data packets, and to perform LZ77 encoding compression on the data stream based on the optimal initial sliding window length to obtain the adaptive sliding window length of each data packet sequence.

[0081] After obtaining the optimal initial sliding window length for LZ77 encoding compression of the data stream, considering that the data stream is composed of a series of connected data packets, and that the compression ratio of the data stream is calculated for each data packet, before using the optimal initial sliding window length to perform LZ77 encoding compression on the data stream, all data packets in the data stream are first divided into at least two data packet sequences according to a predetermined number of consecutive data packets. The sliding window length of the next adjacent data packet sequence is adaptively adjusted based on the compression result of the previous data packet sequence to improve the compression efficiency of the next data packet sequence. Preferably, in this embodiment of the invention, every 8 data packets are grouped into a data packet sequence to obtain multiple data packet sequences. If the final number of data packets does not meet 8, the remaining data packets are still grouped into a data packet sequence.

[0082] When compressing a data stream using LZ77 encoding and an optimal initial sliding window length, starting from the first data packet sequence, the adaptive sliding window length for the second data packet sequence is obtained based on the compression result of the first data packet sequence. This adaptive sliding window length is then used to encode each data packet in the second data packet sequence using LZ77. Similarly, after obtaining the compression result of the second data packet sequence, the adaptive sliding window length for the third data packet sequence is obtained based on the compression result of the second data packet sequence. This is then used to encode each data packet in the third data packet sequence using LZ77, and so on. The process of obtaining the adaptive sliding window length for each data packet sequence is as follows:

[0083] (1) If the optimal initial sliding window length is used as the adaptive sliding window length of the first data packet sequence of the data stream, then for the first data packet sequence of the data stream, the first data packet sequence is LZ77 encoded and compressed using the adaptive sliding window length of the first data packet sequence to obtain the compression ratio change curve and the maximum repeating character length set of the first data packet sequence.

[0084] Specifically, the first data packet sequence is LZ77 encoded and compressed using the adaptive sliding window length of the first data packet sequence, resulting in a compression ratio variation curve and a set of maximum repeating character lengths for the first data packet sequence, including:

[0085] For any data packet in the first data packet sequence, obtain the compression ratio after LZ77 encoding compression of the data packet and the length of all repeated characters in the data packet. With the length of repeated characters as the horizontal axis and the number of repeated characters as the vertical axis, construct a statistical histogram of the length of all repeated characters in the data packet. Obtain the corresponding fitting curve and normal distribution curve based on the statistical histogram.

[0086] Obtain the similarity between the fitted curve and the normal distribution curve, and use the product between the maximum number in the statistical histogram and the similarity as the quantity filtering threshold. Select the maximum repeating character length among the repeating character lengths corresponding to the quantity filtering threshold as the maximum repeating character length corresponding to the data packet.

[0087] Based on the compression ratio of each data packet in the first data packet sequence, a compression ratio change curve of the first data packet sequence is constructed, and the maximum repeating character lengths of all data packets in the first data packet sequence are combined to form the maximum repeating character length set of the first data packet sequence.

[0088] In one implementation, when compressing the first data packet sequence using LZ77 encoding and an adaptive sliding window length, after the data in the first data packet of the first data packet sequence is compressed, the number of bytes in the first compressed data packet is counted. Assuming the number of bytes in a single uncompressed data packet is 2KB, the compression ratio of the current data packet is obtained based on the counted number of compressed bytes, for example, a compression ratio of 2:1. Similarly, the length of each repeating data unit (i.e., the length of repeating characters) in the first data packet is counted to obtain the length of all repeating characters in the first data packet. (Refer to...) Figure 2 This is a schematic diagram of a chain code encoding process, which includes eight steps. The chain code encoding process is existing technology; see details below. Figure 2 . Figure 2 The second element in each parenthesis within the dashed box represents the length of the repeated data unit, which is... Figure 2 The values ​​marked with rectangles within the parentheses in the dashed boxes are, for example: the second value of AB(6,2,C) in step (4) is the length of the repeating data unit (2); the second value of AB(6,2,C)(4,3,A) in step (5) is the length of the repeating data unit (2) within the first parenthesis, and the second value of AB(6,2,C)(4,3,A)(2,2,A) in step (6) is the length of the repeating data unit (2), the second value of AB(6,2,C)(4,3,A)(2,2,A) in step (7) is the length of the repeating data unit (2) within the first parenthesis, the second value of AB(6,2,C)(4,3,A)(2,2,A) in step (7). It is worth noting that the compression ratio and the acquisition of the repeating character length for each data packet are existing technologies and will not be elaborated upon here.

[0089] After obtaining the compression ratio and the length of all repeated characters in the first data packet, a statistical histogram of the length of all repeated characters in the first data packet is constructed with the length of repeated characters as the horizontal axis and the number of repeated characters as the vertical axis. The fitted curve and normal distribution curve corresponding to the statistical histogram are then obtained. The similarity F between the fitted curve and the normal distribution curve is obtained using the DTW algorithm. The greater the similarity, the more the statistical histogram conforms to a normal distribution. A more normal distribution-like histogram results in a larger quantity filtering threshold; otherwise, the quantity filtering threshold is smaller. Preferably, in this embodiment of the invention, the maximum vertical axis value is selected in the statistical histogram, denoted as S. max And the maximum ordinate value S max The product of the similarity score F and the similarity score F is used as the quantity screening threshold.

[0090] Based on the quantity filtering threshold, the number of each duplicate character length in the statistical histogram is compared with the quantity filtering threshold. Duplicate character lengths with a quantity greater than or equal to the quantity filtering threshold are marked, and the maximum duplicate character length among the marked duplicate character lengths is taken as the maximum duplicate character length of the first data packet.

[0091] Based on the method used to obtain the compression ratio and maximum repeating character length of the first data packet in the first data packet sequence, the compression ratio and maximum repeating character length of each data packet in the first data packet sequence are obtained similarly, resulting in a set of compression ratios and a set of maximum repeating character lengths. Then, the compression ratio variation curve of the compression ratio set is constructed. Thus, the compression ratio variation curve and the set of maximum repeating character lengths for the first data packet sequence are obtained.

[0092] (2) Obtain the trend result of the compression ratio change curve of the first data packet sequence. Based on the trend result and the set of maximum repeating character lengths, obtain the adaptive sliding window length of the second data packet sequence in the data stream. Take the second data packet sequence in the data stream as the first data packet sequence and repeat the step of the adaptive sliding window length of the second data packet sequence in the data stream to obtain the adaptive sliding window length of each data packet sequence in turn.

[0093] Specifically, the compression ratio change curve of a data packet sequence can be divided into three states: rising, falling, and stationary. The state between rising and falling states is considered stationary. Therefore, after obtaining the compression ratio change curve of the first data packet sequence, the trend of the compression ratio change curve of the first data packet sequence is obtained, specifically as follows:

[0094] Based on the compression ratio change curve of the first data packet sequence, the compression ratio difference between two adjacent data packets is calculated respectively. The first number of compression ratio differences that are positive and greater than or equal to a preset first difference threshold is counted. If the first number exceeds the total number of compression ratio differences of a preset proportion, the trend of the compression ratio change curve of the first data packet sequence is determined to be in an upward state.

[0095] The number of compression ratio differences that are negative and less than or equal to a preset second difference threshold is counted. If the second number exceeds the total number of compression ratio differences of a preset proportion, the trend of the compression ratio change curve of the first data packet sequence is determined to be a decreasing state.

[0096] If the first quantity does not exceed the total number of compression ratio differences by a preset ratio, or the second quantity does not exceed the total number of compression ratio differences by a preset ratio, then the trend of the compression ratio change curve of the first data packet sequence is determined to be in a stable state.

[0097] In one embodiment, firstly, based on the compression ratio change curve of the first data packet sequence, the compression ratio difference between two adjacent data packets is calculated, resulting in seven compression ratio differences. If any compression ratio difference is positive and greater than or equal to a preset first difference threshold, the compression ratio difference is marked, and the first number of marked compression ratio differences is counted. If the first number exceeds half of the total number of compression ratio differences, the trend of the compression ratio change curve of the first data packet sequence is determined to be upward. Similarly, if any compression ratio difference is negative and less than or equal to a preset second difference threshold, the compression ratio difference is marked, and the second number of marked compression ratio differences is counted. If the second number exceeds half of the total number of compression ratio differences, the trend of the compression ratio change curve of the first data packet sequence is determined to be downward. In other cases, the trend of the compression ratio change curve of the first data packet sequence is confirmed to be stable. Preferably, in this embodiment of the invention, the first difference threshold is set to 18, and the second difference threshold is set to 20, but this is not limited.

[0098] Furthermore, after LZ77 encoding compression of the first data packet sequence, the trend of the compression ratio change curve and the set of maximum repeating character lengths of the first data packet sequence are obtained, which are the compression results. Then, based on the trend of the compression ratio change curve and the set of maximum repeating character lengths of the first data packet sequence, the adaptive sliding window length of the first data packet sequence is adjusted to obtain the adaptive sliding window length of the second data packet sequence in the data stream. The specific process is as follows:

[0099] (1) If the trend result is upward, obtain the difference in sliding window length between the maximum value within the preset sliding window length range and the adaptive sliding window length of the first data packet sequence, obtain the average repeated character length and the variance of the repeated character length of the maximum repeated character length set, calculate the ratio between the maximum repeated character length and the average repeated character length in the maximum repeated character length set, and substitute the negative of the variance of the repeated character length into the exponential function with the natural constant as the base to obtain the corresponding function value;

[0100] The product of the sliding window length difference, the ratio, and the function value is used as the sliding window length increase. The sum of the adaptive sliding window length of the first data packet sequence and the sliding window length increase is rounded down, and the rounded result is used as the adaptive sliding window length of the second data packet sequence in the data stream.

[0101] In one embodiment, when the compression ratio change curve of the first data packet sequence is on the rise, it indicates that there is a lot of duplicate data in the data stream. In order to capture more duplicate data, the sliding window length can be increased to capture more duplicate data, thereby increasing the compression ratio. Therefore, based on the maximum value 'a' within the preset sliding window length range, the adaptive sliding window length of the first data packet sequence, and the set of maximum duplicate character lengths, the increase in the sliding window length of the second data packet sequence in the data stream is obtained. The result of adding the adaptive sliding window length of the first data packet sequence and the increase in the sliding window length is rounded down, and the rounded result is used as the adaptive sliding window length of the second data packet sequence in the data stream. The expression for calculating the increase in the sliding window length of the second data packet sequence is:

[0102]

[0103] Where Δa” represents the increase in the sliding window length for the second data packet sequence, a represents the maximum value within the preset sliding window length range, and Δa represents the adaptive sliding window length for the first data packet sequence. Let L represent the average length of the set of maximum repeating character lengths in the first data packet sequence, L represent the maximum repeating character length in the set of maximum repeating character lengths in the first data packet sequence, and exp() represent an exponential function with base to the natural constant. Let n represent the variance of the set of repeating character lengths in the first data packet sequence, where n represents the amount of data in the set of repeating character lengths in the first data packet sequence. i This represents the length of the i-th maximum repeating character in the set of maximum repeating character lengths for the first data packet sequence.

[0104] It should be noted that the average length of repeated characters in the set of maximum repeated character lengths of the first data packet sequence is... The larger the value, the greater the increase in the length of the sliding window; The difference in the maximum repeating character length used to characterize the first data packet sequence The smaller the value, the more the adaptive sliding window length of the first data packet sequence needs to be increased.

[0105] (2) If the trend result is a downward state, obtain the average repeated character length and the variance of the repeated character length of the set of maximum repeated character lengths, calculate the ratio between the maximum repeated character length and the average repeated character length in the set of maximum repeated character lengths, and substitute the negative of the variance of the repeated character length into the exponential function with the natural constant as the base to obtain the corresponding function value.

[0106] The product of the adaptive sliding window length of the first data packet sequence, the ratio, and the function value is used as the reduction amount of the sliding window length. The result of subtracting the adaptive sliding window length of the first data packet sequence from the increase amount of the sliding window length is rounded down, and the rounded result is used as the adaptive sliding window length of the second data packet sequence in the data stream.

[0107] In one implementation, when the compression ratio curve of the first data packet sequence is decreasing, it indicates that the number of repeated data in the data stream is decreasing, possibly due to a change in the operating state. At this point, the compression effect deteriorates, and to enable faster encoding, the sliding window length needs to be reduced. Since the compression ratio itself is relatively low, the compression speed is improved by reducing the sliding window length to enhance system cost-effectiveness. Therefore, based on the maximum value 'a' within the preset sliding window length range, the adaptive sliding window length of the first data packet sequence, and the set of maximum repeated character lengths, the reduction in the sliding window length of the second data packet sequence in the data stream is obtained. The result of subtracting the adaptive sliding window length of the first data packet sequence from the reduction in the sliding window length is then obtained. The subtracted result is rounded down, and the rounded result is used as the adaptive sliding window length of the second data packet sequence in the data stream. The expression for calculating the reduction in the sliding window length of the second data packet sequence is:

[0108]

[0109] Where Δx” represents the reduction in the sliding window length of the second data packet sequence, and Δa represents the adaptive sliding window length of the first data packet sequence. Let L represent the average length of the set of maximum repeating character lengths in the first data packet sequence, L represent the maximum repeating character length in the set of maximum repeating character lengths in the first data packet sequence, and exp() represent an exponential function with base to the natural constant. Let n represent the variance of the set of repeating character lengths in the first data packet sequence, where n represents the amount of data in the set of repeating character lengths in the first data packet sequence. i This represents the length of the i-th maximum repeating character in the set of maximum repeating character lengths for the first data packet sequence.

[0110] It should be noted that the average length of repeated characters in the set of maximum repeated character lengths of the first data packet sequence is... The larger the value, the smaller the reduction in the sliding window length; The difference in the maximum repeating character length used to characterize the first data packet sequence The larger the value, the more necessary it is to reduce the adaptive sliding window length of the first data packet sequence.

[0111] (3) If the trend result is a stable state, the adaptive sliding window length of the second data packet sequence in the data stream is equal to the adaptive sliding window length of the first data packet sequence.

[0112] In one implementation, when the compression ratio change curve of the first data packet sequence is in a stable state, it indicates that the adaptive sliding window length of the first data packet sequence is relatively appropriate and does not require significant modification. To reduce computational overhead, if the compression ratio change curve of the first data packet sequence is relatively stable, the adaptive sliding window length of the first data packet sequence is not changed, and the adaptive sliding window length of the second data packet sequence in the data stream is made equal to that of the first data packet sequence.

[0113] At this point, based on the adaptive sliding window length of the first data packet sequence, the adaptive sliding window length of the second data packet sequence is obtained. Then, the second data packet sequence is used as the first data packet sequence, and the step of obtaining the adaptive sliding window length of the second data packet sequence based on the adaptive sliding window length of the first data packet sequence is repeated. In this way, the adaptive sliding window lengths of the third data packet sequence, the fourth data packet sequence, and so on, can be obtained sequentially, until the adaptive sliding window lengths of all data packet sequences are obtained.

[0114] The compression storage module 14 is used to perform adaptive LZ77 encoding compression on the corresponding data packet sequence according to the adaptive sliding window length of each data packet sequence to obtain the data compressed packet of the data stream, store the data compressed packet, and use it to transmit and decode the stored data compressed packet during data analysis.

[0115] After obtaining the adaptive sliding window length for each data packet sequence, adaptive LZ77 encoding compression can be performed on the corresponding data packet sequence based on the adaptive sliding window length. It is worth noting that when the sliding window length changes, the sliding window length needs to be recorded. For example, if the adaptive sliding window length of the first data packet sequence is W, then the sliding window length is recorded as W before encoding compression conversion, and the corresponding encoding becomes: W (sliding window length marker): AB(6,2,C)(4,3,A)(2,2,A)D; when the sliding window length of the next stage remains unchanged, there is no need to waste extra storage space to store the sliding window length, and encoding continues; if the sliding window length is found to have changed, it needs to be recorded, such as: W (sliding window length marker): AB(6,2,C)(4,3,A)(2,2,A)D, W' (new sliding window length marker)... At this point, the compressed data of each data packet sequence in the data stream can be obtained, all the compressed data is combined into a data compressed package of the data stream, and the data compressed package is stored in the memory. When the terminal needs to analyze the HPLC dual-mode carrier communication data, the memory transmits the data compressed package in sequence. After receiving the data compressed package, the terminal decodes the data compressed package. The decoding process is the reverse process. The data compressed package is restored by using the reverse operation of the above process to obtain the initial data. According to the desired analysis effect, the initial data is analyzed.

[0116] In summary, the embodiments of the present invention include a data acquisition module for acquiring data packets corresponding to any type of communication data in HPLC dual-mode carrier communication, forming a continuous data stream; a parameter acquisition module for obtaining a preset sliding window length range in LZ77 encoding based on the window data of the data stream, and performing LZ77 encoding compression on the data stream using each sliding window length within the preset sliding window length range to obtain the optimal initial sliding window length for LZ77 encoding compression of the data stream; a parameter optimization module for dividing all data packets in the data stream into at least two data packet sequences according to a preset number of consecutive data packets, performing LZ77 encoding compression on the data stream based on the optimal initial sliding window length, and obtaining the adaptive sliding window length for each data packet sequence; and a compression storage module for performing adaptive LZ77 encoding compression on the corresponding data packet sequence according to the adaptive sliding window length of each data packet sequence to obtain a compressed data packet of the data stream, storing the compressed data packet, and transmitting and decoding the stored compressed data packet during data analysis. In this study, considering that LZ77 encoding is lossless and its compression effect and encoding efficiency are affected by the size of the sliding window, a large sliding window will have a longer search time, affecting the compression efficiency, while a small sliding window has a faster search time but a lower compression ratio. Therefore, by analyzing the data repeatability and compression ratio of the data stream corresponding to any type of communication data in HPLC dual-mode carrier communication, the sliding window size for LZ77 encoding compression of each data packet in the data stream is adaptively adjusted. This allows the sliding window to adaptively increase when processing long repeating data units to achieve better compression, and to adaptively decrease when processing short repeating data units to achieve fast encoding. This achieves the goal of meeting the high-performance and high-reliability data storage requirements of smart grid and other services.

[0117] 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, and should all be included within the protection scope of the present invention.

Claims

1. A HPLC dual mode carrier communication memory optimized for data acquisition, characterized by, The HPLC dual-mode carrier communication memory includes: The data acquisition module is used to acquire data packets corresponding to any type of communication data in HPLC dual-mode carrier communication, forming a continuous data stream; The parameter acquisition module is used to obtain a preset sliding window length range in LZ77 encoding based on the window data of the data stream, and to perform LZ77 encoding compression on the data stream using each sliding window length within the preset sliding window length range, so as to obtain the optimal initial sliding window length when performing LZ77 encoding compression on the data stream. The parameter optimization module is used to divide all data packets in the data stream into at least two data packet sequences according to a consecutive preset number of data packets, and to perform LZ77 encoding compression on the data stream based on the optimal initial sliding window length to obtain the adaptive sliding window length of each data packet sequence. The compression storage module is used to perform adaptive LZ77 encoding compression on the corresponding data packet sequence according to the adaptive sliding window length of each data packet sequence to obtain the data compressed packet of the data stream, store the data compressed packet, and use it to transmit and decode the stored data compressed packet during data analysis; The parameter acquisition module obtains the preset sliding window length range in LZ77 encoding based on the window data of the data stream, including: Construct a variable window of a preset size and a search sliding window of the same size as the variable window. Starting from the first data in the data stream, use the variable window to obtain the first variable window time series data in the data stream, and obtain the search sliding window time series data after the first variable window data. If the numerical matching degree between the timing data of the first variable window and the timing data of the search window is not 100%, the search window is slid by a preset step size. If the numerical matching degree between the timing data of the search window after sliding and the timing data of the first variable window is not 100%, the search window continues to slide until the search window slides to the last data in the data stream. If the numerical matching degree is not 100% when the search window slides to the last data in the data stream, the variable window is slid by a preset step size to obtain the timing data of the first variable window after sliding, and the timing data of the first variable window after sliding is used as the timing data of the first variable window. If the numerical matching degree between the timing data of the first variable window after sliding and the timing data of the search window after sliding is not 100% when the timing data of the first variable window after sliding exceeds the preset proportional length of the data stream, the size of the variable window is reduced until the numerical matching degree between the timing data of the first variable window and the timing data of the search window is 100%, and the size of the corresponding reduced variable window is used as the maximum value of the preset sliding window length range in LZ77 encoding. The maximum value and the preset minimum value are combined to form the preset sliding window length range in LZ77 encoding.

2. The HPLC dual mode carrier communication memory of claim 1, wherein, The parameter acquisition module, after acquiring the search sliding window timing data after the first variable window data, includes: If the numerical matching degree between the first variable window timing data and the search sliding window timing data is 100%, then the size of the variable window is increased, and the increased variable window is used as the variable window. The numerical matching degree between the variable window timing data and the search sliding window timing data is obtained again until the numerical matching degree is not 100%. The size of the last variable window with a numerical matching degree of 100% is used as the maximum value of the preset sliding window length range in LZ77 encoding. The maximum value and the preset minimum value are combined to form the preset sliding window length range in LZ77 encoding.

3. The HPLC dual mode carrier communication memory of claim 1, wherein, The parameter acquisition module uses each slide window length within the preset slide window length range to perform LZ77 encoding compression on the data stream, obtaining the optimal initial slide window length for LZ77 encoding compression of the data stream, including: For any sliding window length within the preset sliding window length range, the data stream is compressed using LZ77 encoding based on the sliding window length to obtain the corresponding compression ratio and compression rate. The compression ratio and compression rate are then normalized, and the average value between the normalized compression ratio and the normalized compression rate is used as the compression effect index of the sliding window length. Based on the compression effect index corresponding to each sliding window length within the preset sliding window length range, the sliding window length corresponding to the largest compression effect index is taken as the optimal sliding window length when performing LZ77 encoding compression on the data stream. Based on the optimal sliding window length of the data stream corresponding to each type of communication data in the HPLC dual-mode carrier communication, all optimal sliding window lengths are clustered to obtain cluster density centers. The optimal sliding window length closest to the cluster density center is taken as the optimal initial sliding window length when performing LZ77 encoding compression on the data stream.

4. The HPLC dual-mode carrier communication memory for optimized data acquisition according to claim 1, characterized in that, The parameter optimization module performs LZ77 encoding compression on the data stream based on the optimal initial sliding window length to obtain the adaptive sliding window length for each data packet sequence, including: If the optimal initial sliding window length is used as the adaptive sliding window length of the first data packet sequence of the data stream, then for the first data packet sequence of the data stream, the first data packet sequence is LZ77 encoded and compressed using the adaptive sliding window length of the first data packet sequence, to obtain the compression ratio change curve and the maximum repeating character length set of the first data packet sequence. Obtain the trend result of the compression ratio change curve of the first data packet sequence. Based on the trend result and the set of maximum repeating character lengths, obtain the adaptive sliding window length of the second data packet sequence in the data stream. Take the second data packet sequence in the data stream as the first data packet sequence and repeat the step of the adaptive sliding window length of the second data packet sequence in the data stream to obtain the adaptive sliding window length of each data packet sequence in turn.

5. The HPLC dual mode carrier communication memory of claim 4, wherein, The parameter optimization module uses the adaptive sliding window length of the first data packet sequence to perform LZ77 encoding compression on the first data packet sequence, obtaining the compression ratio change curve and the set of maximum repeating character lengths for the first data packet sequence, including: For any data packet in the first data packet sequence, obtain the compression ratio after LZ77 encoding compression of the data packet and the length of all repeated characters in the data packet. With the length of repeated characters as the horizontal axis and the number of repeated characters as the vertical axis, construct a statistical histogram of the length of all repeated characters in the data packet. Obtain the corresponding fitting curve and normal distribution curve based on the statistical histogram. Obtain the similarity between the fitted curve and the normal distribution curve, and use the product between the maximum number in the statistical histogram and the similarity as the quantity filtering threshold. Select the maximum repeating character length among the repeating character lengths corresponding to the quantity filtering threshold as the maximum repeating character length corresponding to the data packet. Based on the compression ratio of each data packet in the first data packet sequence, a compression ratio variation curve of the first data packet sequence is constructed, and the maximum repeating character lengths of all data packets in the first data packet sequence are combined to form the maximum repeating character length set of the first data packet sequence.

6. The HPLC dual mode carrier communication memory of claim 4, wherein, The parameter optimization module obtains the trend results of the compression ratio change curve of the first data packet sequence, including: Based on the compression ratio change curve of the first data packet sequence, the compression ratio difference between two adjacent data packets is calculated respectively. The first number of compression ratio differences that are positive and greater than or equal to a preset first difference threshold is counted. If the first number exceeds the total number of compression ratio differences of a preset proportion, the trend of the compression ratio change curve of the first data packet sequence is determined to be in an upward state. The number of compression ratio differences that are negative and less than or equal to a preset second difference threshold is counted. If the second number exceeds the total number of compression ratio differences of a preset proportion, the trend of the compression ratio change curve of the first data packet sequence is determined to be a decreasing state. If the first quantity does not exceed the total number of compression ratio differences by a preset ratio, or the second quantity does not exceed the total number of compression ratio differences by a preset ratio, then the trend of the compression ratio change curve of the first data packet sequence is determined to be in a stable state.

7. The HPLC dual mode carrier communication memory of claim 6, wherein, The parameter optimization module obtains the adaptive sliding window length of the second data packet sequence in the data stream based on the trend results and the set of maximum repeating character lengths, including: If the trend result is upward, obtain the difference in sliding window length between the maximum value within the preset sliding window length range and the adaptive sliding window length of the first data packet sequence; obtain the average repeated character length and the variance of the repeated character length of the maximum repeated character length set; calculate the ratio between the maximum repeated character length and the average repeated character length in the maximum repeated character length set; and substitute the negative of the variance of the repeated character length into an exponential function with the natural constant as the base to obtain the corresponding function value. The product of the sliding window length difference, the ratio, and the function value is used as the sliding window length increase. The sum of the adaptive sliding window length of the first data packet sequence and the sliding window length increase is rounded down, and the rounded result is used as the adaptive sliding window length of the second data packet sequence in the data stream.

8. The HPLC dual mode carrier communication memory of claim 6, wherein, The parameter optimization module obtains the adaptive sliding window length of the second data packet sequence in the data stream based on the trend results and the set of maximum repeating character lengths, including: If the trend result is a downward trend, obtain the average repeated character length and the variance of the repeated character length in the set of maximum repeated character lengths, calculate the ratio between the maximum repeated character length and the average repeated character length in the set of maximum repeated character lengths, and substitute the negative of the variance of the repeated character length into an exponential function with the natural constant as the base to obtain the corresponding function value. The product of the adaptive sliding window length of the first data packet sequence, the ratio, and the function value is used as the reduction amount of the sliding window length. The result of subtracting the adaptive sliding window length of the first data packet sequence from the increase amount of the sliding window length is rounded down, and the rounded result is used as the adaptive sliding window length of the second data packet sequence in the data stream.

9. The HPLC dual mode carrier communication memory of claim 6, wherein, The parameter optimization module obtains the adaptive sliding window length of the second data packet sequence in the data stream based on the trend results and the set of maximum repeating character lengths, including: If the trend result is a stable state, then the adaptive sliding window length of the second data packet sequence in the data stream is equal to the adaptive sliding window length of the first data packet sequence.

Citation Information

Patent Citations

  • Smart power grid data optimization transmission method

    CN116828070A