Intelligent fusion terminal data encryption compression transmission method and system

By constructing a time-domain template and spectrum feature-driven intelligent segmentation and encryption method, the problems of efficient compression and high security of data transmission in the power Internet of Things system are solved, realizing high-fidelity data transmission and secure encryption under resource-constrained conditions.

CN121217487BActive Publication Date: 2026-03-24JIANGSU SHENGDE ELECTRIC METER
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies for power Internet of Things (IoT) systems, data transmission from intelligent fusion terminals is difficult to achieve efficient compression and high-security transmission under limited computing and communication resources. Traditional methods cannot dynamically identify differences in the value of power data, leading to the loss of key signal details or excessive bandwidth consumption of non-critical data. At the same time, complex key management brings computational burden and security risks.

Method used

By constructing a time-domain template to segment data segments, identifying key data using importance factors based on energy distribution and difference, performing asymmetric compression processing, and using spectral features to generate random seeds for encryption, the system abandons the traditional complex key system and achieves intelligent data segmentation, encryption, and transmission.

Benefits of technology

It achieves high-fidelity transmission of critical data and efficient compression of non-critical data under resource constraints, ensuring transmission quality and security, and is suitable for resource-constrained intelligent converged terminal scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121217487B_ABST
    Figure CN121217487B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data information transmission, and more particularly to a kind of intelligent fusion terminal data encryption compression transmission method and system, method includes: based on the historical electric power data segment of acquisition constructs time domain template, based on time domain template segmentation the data segment of acquisition to be transmitted, obtain optimal window sequence and the difference degree corresponding to each window;Each window in optimal window sequence is compressed and encrypted, obtain final encrypted data segment, and intelligent fusion terminal exports final encrypted data segment.The present application is for high importance data, by retaining more frequency domain coefficient and higher quantization accuracy to ensure its high fidelity;For low importance data, then more aggressive compression is carried out to improve overall compression efficiency, this asymmetric processing strategy based on the value of data itself, realizes the intelligent balance between compression efficiency and information fidelity.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of data information transmission. In particular, it relates to an encryption compression transmission method and system for intelligent fusion terminal data. BACKGROUND

[0002] In the power Internet of Things system, the intelligent fusion terminal needs to continuously collect and return time domain sequence data such as voltage and current. Such data usually has the characteristics of large data volume, containing periodic change patterns, and mixed with noise. In order to improve transmission efficiency, the existing technology generally uses fixed compression algorithms (such as compression based on fixed threshold or general lossless / lossy coding) and standard encryption methods.

[0003] However, the existing scheme has obvious deficiencies: in terms of compression, the traditional method uses a "one-size-fits-all" strategy and fails to fully consider the value difference of power data under different operating conditions. For example, transient data representing faults and mutations have different importance from smooth running data, but the fixed compression method cannot dynamically identify and distinguish them, resulting in the possibility of losing the detailed features of key signals or non-key data occupying too much bandwidth. In terms of security, the traditional encryption method relies heavily on a complex external key management system, which not only brings a heavy computational burden to resource-constrained embedded terminals, but also accompanies potential security risks in the key storage, distribution and update process, making it difficult to balance security and efficiency on intelligent terminals. Therefore, the existing technology is difficult to simultaneously achieve efficient compression and high security transmission of data under limited computing and communication resources. SUMMARY

[0004] To solve the technical problem that the existing technology is difficult to simultaneously achieve efficient compression and high security transmission of data under limited computing and communication resources, the present application provides a solution in the following aspects.

[0005] In a first aspect, an encryption compression transmission method for intelligent fusion terminal data includes:

[0006] Constructing a time domain template based on the obtained historical power data segment, dividing the obtained to-be-transmitted data segment based on the time domain template to obtain an optimal window sequence and a difference degree corresponding to each window;

[0007] Compressing and encrypting each window in the optimal window sequence to obtain a final encrypted data segment, and outputting the final encrypted data segment by the intelligent fusion terminal;

[0008] The method for compressing and encrypting comprises: obtaining an amplitude spectrum of each window, calculating an importance factor and a weighted average angle of the window based on the amplitude spectrum and a difference degree of the window; for a single window, generating an amplitude sequence based on amplitude values of each frequency point in the amplitude spectrum arranged in descending order, compressing the amplitude sequence based on the importance factor and a length of the window to obtain a compressed sequence; performing amplitude-frequency conversion on the compressed sequence to obtain a compressed data sequence, scaling the compressed data sequence based on the importance factor, compressing the scaled compressed data sequence by using entropy coding to obtain a final compressed data stream; calculating a segmentation number based on the importance factor and a length of the final compressed data stream, segmenting the final compressed data stream based on the segmentation number to obtain a segmented sequence; converting the weighted average angle into a random seed by using a hash function, and randomly rearranging the segmented sequence based on the random seed to obtain an encrypted data sequence; and splicing the encrypted data sequence of each window according to an order in the optimal window sequence to generate a final encrypted data segment.

[0009] Preferably, the calculating of the importance factor of the window based on the amplitude spectrum and the difference degree of the window comprises: obtaining amplitude values of each frequency point in the amplitude spectrum of the window, calculating a ratio of a sum of squares of the amplitude values of all the frequency points to the length of the window, and performing positive correlation normalization on the obtained ratio to obtain an energy distribution value of the window; and calculating a product of the energy distribution value and the difference degree of the window to obtain the importance factor.

[0010] Preferably, the calculating of the weighted average angle of the window based on the amplitude spectrum and the difference degree of the window comprises: determining a threshold value of the amplitude spectrum of the window, taking all frequency points with an amplitude value greater than the threshold value as feature points, and obtaining coordinates of each feature point; calculating an angle between each feature point and a coordinate origin, and taking a square of the amplitude value of each feature point as a weight of the feature point; summing products of the weights and the angles of all the feature points, and dividing the obtained sum by a sum of the weights of all the feature points to obtain the weighted average angle.

[0011] Preferably, the compressing of the amplitude sequence based on the importance factor and the length of the window comprises: presetting a compression degree coefficient, calculating a product of the compression degree coefficient, the importance factor and the length of the window, and rounding up the obtained product to obtain a frequency domain coefficient number; and starting from a head end of the amplitude sequence, retaining amplitude values of the frequency domain coefficient number to obtain the compressed sequence.

[0012] Preferably, the scaling of the compressed data sequence based on the importance factor comprises: presetting a scaling reference coefficient and a compression degree parameter, calculating a product of the importance factor, the scaling reference coefficient and the compression degree parameter to obtain an accuracy control factor, and scaling the compressed data sequence based on the accuracy control factor to obtain the scaled compressed data sequence.

[0013] Preferably, after outputting the final encrypted data segment, the method further comprises: decrypting and decompressing the final encrypted data segment to obtain a time domain data sequence of each window reconstruction, calculating a distortion degree of the time domain data sequence, and when the distortion degree is greater than a preset threshold, changing a compression degree of a corresponding window and retransmitting data in the window.

[0014] Preferably, the method for calculating the distortion degree of the time domain data sequence comprises: calculating a weighted average angle of the time domain data sequence, and taking an absolute angle difference between the weighted average angle of the time domain data sequence and an original weighted average angle of a corresponding window of the time domain data sequence as the distortion degree.

[0015] Preferably, the method for constructing the time domain template based on the historical power data segments comprises: extracting a fixed-dimension feature vector from each historical power data segment, clustering all the feature vectors to obtain a preset number of clustering clusters; for a single clustering cluster, calculating an average length of historical power data segments corresponding to all the feature vectors in the clustering cluster; for historical power data segments belonging to the same clustering cluster, selecting one of the historical power data segments as a reference sequence, aligning other historical power data segments with the reference sequence, and scaling each historical power data segment after alignment to the average length; and for the historical power data segments after scaling, calculating an average value of data corresponding to each time point one by one to obtain a time domain template with the average length.

[0016] Preferably, the method for segmenting the to-be-transmitted data segment based on the time domain template comprises: obtaining a minimum average length and a maximum average length of the time domain template; creating a dynamic programming array to store a minimum cumulative difference degree; starting from a time point corresponding to the minimum average length, sequentially taking each time point as an end point of a current window; for each end point, exhaustively taking a window length within a range of the minimum and maximum average lengths; calculating a difference degree of the current window under each length based on the time domain template; for a single end point, calculating a sum of the difference degree of each current window and a minimum cumulative difference degree of a time point before a starting point of the window, taking a minimum sum value as the minimum cumulative difference degree of the end point and storing it in the dynamic programming array, and recording a corresponding window length, a matched time domain template and a difference degree; after completing the dynamic programming array, starting from the end of the dynamic programming array, inversely segmenting the to-be-transmitted data segment according to the recorded window length of each time point to obtain an optimal window sequence.

[0017] In a second aspect, an encryption and compression transmission system for intelligent fusion terminal data is provided, comprising a processor and a memory, and the memory stores computer program instructions, which, when executed by the processor, implement the encryption and compression transmission method for intelligent fusion terminal data.

[0018] The present application has the following effects:

[0019] 1、The present application constructs time domain template to intelligently segment data, so that each window corresponds to a data mode with complete physical meaning, on this basis, the importance factor integrating energy distribution and template difference degree is innovatively proposed, the importance factor can automatically identify and preferentially guarantee the transmission quality of key data such as abnormality and new fault, for high importance data, more frequency domain coefficients and higher quantization precision are reserved to ensure high fidelity, for low importance data, more aggressive compression is carried out to improve overall compression efficiency, and the asymmetric processing strategy based on the value of data itself realizes the intelligent balance between compression efficiency and information fidelity.

[0020] 2、The present application discards the traditional complex key system, and creatively uses the spectral feature (weighted average angle) of data itself as a random seed to randomly rearrange and encrypt the compressed data segment, which realizes the security idea of data as a key, has high encryption strength, and avoids the overhead and risk brought by key distribution, storage and management, at the receiving end, only the same spectral feature is used to reproduce the random sequence to complete reliable decryption, and the method is especially suitable for resource-limited and high real-time intelligent fusion terminal scene. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 It is a method flow chart of steps S1-S3 in the encryption compression transmission method of intelligent fusion terminal data according to an embodiment of the present application.

[0022] Figure 2 It is a schematic diagram of steps S20-S25 in the encryption compression transmission method of intelligent fusion terminal data according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments of the present application.

[0024] The specific embodiments of the present application will be described in detail below with reference to the drawings.

[0025] Reference Figure 1 An encryption compression transmission method of intelligent fusion terminal data includes steps S1-S3, and specifically as follows:

[0026] S1: constructing a time domain template based on the obtained historical power data segment, segmenting the obtained to-be-transmitted data segment based on the time domain template to obtain an optimal window sequence and a difference degree corresponding to each window.

[0027] A large number of historical power data segments are collected to obtain a data segment set , wherein each historical power data segment is a one-dimensional time series (such as a one-dimensional voltage sequence) with length These data segments can be triggered by events (such as faults, switching operations) or sliding window interception, so their lengths are different.

[0028] A fixed-dimensional feature vector is extracted from each historical power data segment, for example, a 10-dimensional feature vector is extracted from each historical power data segment to input the K-means clustering algorithm. The number of clusters is set, and the K-means clustering algorithm is used to cluster all feature vectors to obtain a preset number of clusters; for a single cluster, the average length of the historical power data segment corresponding to all feature vectors in the cluster is calculated, thereby obtaining the average length corresponding to each cluster.

[0029] For historical power data segments belonging to the same cluster, one of the historical power data segments is selected as a reference sequence, and the DTW (Dynamic Time Warping) algorithm is used to align other historical power data segments with the reference sequence to obtain aligned sequences. Linear interpolation is used to scale each aligned sequence to the average length; for the scaled sequence, the average value of the data corresponding to each time point is calculated one by one to obtain a time domain template with an average length.

[0030] Similarly, the time domain template corresponding to each cluster is obtained, and the minimum average length and the maximum average length among all average lengths are obtained.

[0031] The DTW algorithm eliminates phase differences through nonlinear distortion, ensures that key feature points of the waveform are aligned on the time axis, and linear interpolation unifies all sequences to the average length on the basis of high-quality alignment, preparing for subsequent point-by-point averaging and ensuring that the final generated time domain template can capture the essential shape characteristics of this type of data and has a unified standard length, laying a reliable foundation for subsequent real-time matching.

[0032] The method for segmenting the to-be-transmitted data segment based on the time domain template includes: creating a dynamic programming array for storing the minimum cumulative difference degree from the start point of the to-be-transmitted data segment to each time point.

[0033] Starting from the beginning time of the data segment to be transmitted and the time corresponding to the position of the minimum average length, each time point is sequentially taken as the end point of the current window. For each end point, all lengths of the current window within the range of the minimum and maximum average lengths are enumerated. For the current window under a single length, its window start point is obtained and the corresponding data window is extracted. The data window is scaled to the same length as the time domain template using linear interpolation. The Euclidean distance between the data window and each time domain template is calculated, and the Euclidean distance value is positively correlated and normalized. The smallest Euclidean distance value after normalization is selected as the difference of the current window under that length.

[0034] For a single endpoint, calculate the sum of the difference of the current window at each length and the minimum cumulative difference of the previous time point of the current window's starting point. Select the minimum sum as the minimum cumulative difference of the time point corresponding to the endpoint and store it in the corresponding position of the dynamic programming array. Record the length of the current window from which the minimum sum is obtained, the temporal template matched by the current window at that length, and the difference.

[0035] After obtaining the complete dynamic programming array, starting from the end of the dynamic programming array, the data segments to be transmitted are divided in reverse according to the length of the current window recorded at each time point to obtain the optimal window sequence. Each window contains its length information, the matching time domain template, and the difference degree.

[0036] It should be noted that since the time points in the data to be transmitted, before the first end point of the current window, cannot form a complete window that matches the length of the time-domain template, the minimum cumulative difference corresponding to these time points needs to be set to an infinite or invalid flag in the dynamic programming array. This avoids the problem of the last window being too long or the middle part not being covered during reverse segmentation, ensuring that the entire optimal window sequence can perfectly cover the entire data segment to be transmitted.

[0037] For ease of understanding, this embodiment provides a specific example: Let the data segment to be transmitted be... , This represents the time point corresponding to the data; the dynamic programming array is... , This is a virtual starting point, indicating that the difference is 0 before starting; the minimum average length of the time-domain template is... Maximum average length .

[0038] because and At that time, the data was too small to form a complete window that fit the time-domain template with the minimum average length. Therefore, and Set to the maximum value. Given the end point of the current window, exhaustively enumerate all lengths of the current window within the range of 3 to 5. ,only For the current window with a length of 3, obtain its starting point. ,Right now Extracting a data window from the data segment to be transmitted Calculate the Euclidean distance between this data window and each time-domain template, perform positive correlation normalization on the Euclidean distance values, and select the minimum value as the difference of the current window. ,because It is the only feasible option, so Record: Arrival Time It is the temporal template and difference calculated by using a current window of length 3 to find the minimum Euclidean distance value.

[0039] by Given the end point of the current window, exhaustively enumerate all lengths of the current window within the range of 3 to 5. : Obtain its starting point ,Right now Extracting the data window from the data segment to be transmitted The time point before the start point of this window is , If the value is extremely large, it indicates an invalid window, which is not a valid window; therefore, this choice is not advisable. Obtain its starting point ,Right now Extracting a data window from the data segment to be transmitted Calculate the Euclidean distance between this data window and each time-domain template, perform positive correlation normalization on the Euclidean distance values, and select the minimum value as the difference of the current window. The time point before the start point of this window is , Then the minimum cumulative difference is Record: Arrival time It is the temporal template and difference that are matched by calculating the minimum Euclidean distance value through a current window of length 4.

[0040] by Given the end point of the current window, exhaustively enumerate all lengths of the current window within the range of 3 to 5. : and At that time, the minimum cumulative difference corresponding to the time point before the start point of the current window. and All of these are maximum values, indicating invalidity, and therefore unacceptable. When the current window is 5, the difference degree of the current window is calculated The minimum cumulative difference degree is Record: the time point of arrival The time domain template and the difference degree matched when the minimum Euclidean distance value is calculated through a current window with a length of 5;

[0041] When the end point of the current window is , the description is omitted;

[0042] When the end point of the current window is , all lengths of the current window in the range of 3 to 5 are exhausted : The data window is extracted, and the difference degree of the current window is calculated The time point before the start point of the current window is , The cumulative difference degree is , which is calculated in the previous step and belongs to the existing legal value; similarly, When the current window is 5, the difference degree of the current window is calculated The cumulative difference degree is ; When the time point before the start point of the current window is , the cumulative difference degree is the maximum value, which is not desirable; the minimum value of and is selected as , for example is smaller, and the record: the time point of arrival is through a current window with a length of 3, and the time domain template and the difference degree matched when the minimum Euclidean distance value is calculated. The end point is omitted.

[0043] Assuming that the end point of the data segment to be transported is , the backtracking process is: obtaining the record: the length of the current window , the matched time domain template and the difference degree at , and obtaining from the end of the data segment to be transported , the record: the length of the current window , the matched time domain template and the difference degree at , and obtaining from the end point of the data segment to be transported , the end point of the previous window, and ending the backtracking.

[0044] By matching known time-domain templates, this method can automatically identify inherent, physically meaningful boundaries in the data. For example, it can accurately capture a brief voltage spike with a short window, while completely covering a smooth operating cycle with a longer window. This ensures that each segmented window corresponds as closely as possible to a complete data pattern (such as a complete oscillation cycle or a complete fault recording), providing high-quality, semantically meaningful data units for subsequent feature extraction, compression, and encryption.

[0045] S2: Compress and encrypt each window in the optimal window sequence to obtain the final encrypted data segment. The intelligent fusion terminal outputs the final encrypted data segment.

[0046] Reference Figure 2 Step S2 includes steps S20-S25, as detailed below:

[0047] S20: Obtain the amplitude spectrum of each window, and calculate the importance factor and weighted average angle of the window based on the amplitude spectrum and the difference.

[0048] Applying an FFT (Fast Fourier Transform) to each window in the optimal window sequence yields a frequency domain representation of each window. The amplitude value at each frequency point is then calculated based on this frequency domain representation, thus obtaining the amplitude spectrum of the window. It is understood that in other embodiments, the amplitude spectrum of each window can also be obtained by applying a DFT (Discrete Fourier Transform) to each window in the optimal window sequence.

[0049] The importance factor of a window is calculated based on its amplitude spectrum and dissimilarity. This involves: obtaining the amplitude values ​​of each frequency point in the amplitude spectrum of the window; calculating the ratio of the sum of squares of the amplitude values ​​of all frequency points to the window length; performing positive correlation normalization on the obtained ratio to obtain the energy distribution value of the window; and calculating the product of the energy distribution value and the dissimilarity of the window to obtain the importance factor.

[0050] The formula for calculating the energy distribution value is as follows:

[0051]

[0052] In the formula, Represents the th in the optimal window sequence Energy distribution values ​​for each window; Indicates the first The length of each window; Indicates the first The first window The amplitude value at each frequency point; indicates a positive correlation normalization processing.

[0053] The calculation formula of the importance factor is shown as follows:

[0054]

[0055] In the formula, indicates the importance factor of the i-th window; indicates the energy distribution value of the i-th window; indicates the difference degree of the i-th window.

[0056] The energy distribution in the window is described, The greater the value is, the greater the fluctuation of the data in the window is, and the more likely the abnormal signal such as burst failure corresponds to; The greater the value is, the greater the difference between the data in the window and the known type of data is, and the more likely the data is of a new type; The greater the value is, the more likely the data in the window is of a new type of abnormal data, and the more important the data is in transmission. Normal and abnormal power data often have different characteristics, and more attention should be paid to the abnormal data that have not been seen during data transmission, so as to facilitate the intelligent fusion terminal to analyze and process the new type of abnormal data.

[0057] The weighted average angle of the window is calculated based on the amplitude spectrum and the difference degree of the window, including: determining the threshold of the amplitude spectrum of the window by using the Otsu adaptive threshold method, taking all frequency points with an amplitude value greater than the threshold as feature points, and obtaining the coordinates of each feature point; calculating the angle of each feature point with the coordinate origin, taking the square of the amplitude value of each feature point as the weight of the feature point; summing the product of the weight and the angle of all feature points, and dividing the obtained sum by the sum of the weights of all feature points to obtain the weighted average angle. It can be understood that any adaptive threshold selection method that can effectively distinguish the main component of the signal from noise or background is suitable for this step, for example, in other embodiments, a threshold method based on statistical distribution can also be used: for example, the mean and standard deviation of the amplitude spectrum can be calculated, and the threshold is set to the sum of the mean and the standard deviation multiplied by a set number.

[0058] In the formula,

[0059]

[0060] In the formula,

[0061] indicates the importance factor of the i-th window; ​​​An angle formed by a connecting line between the feature point and the coordinate origin; The function can calculate the only correct angle in the range of 0-360° according to the specific quadrant of the point. The function can calculate the only correct angle in the range of 0-360° according to the specific quadrant of the point. The amplitude value corresponding to the i-th feature point of the i-th window is represented as A(i, j). The amplitude value corresponding to the i-th feature point of the i-th window is represented as A(i, j). The amplitude value corresponding to the i-th feature point of the i-th window is represented as A(i, j). The frequency value corresponding to the i-th feature point of the i-th window is represented as F(i, j). The frequency value corresponding to the i-th feature point of the i-th window is represented as F(i, j). The length of the i-th window is represented as L(i). In order to eliminate the influence of the window length L(i) on the angle calculation and map the frequency index to the range of 0-360°, facilitate the calculation of the function, and ensure the comparability of the angles of different window lengths, the function is defined as follows. In order to eliminate the influence of the window length L(i) on the angle calculation and map the frequency index to the range of 0-360°, facilitate the calculation of the function, and ensure the comparability of the angles of different window lengths, the function is defined as follows. In order to eliminate the influence of the window length L(i) on the angle calculation and map the frequency index to the range of 0-360°, facilitate the calculation of the function, and ensure the comparability of the angles of different window lengths, the function is defined as follows. In order to eliminate the influence of the window length L(i) on the angle calculation and map the frequency index to the range of 0-360°, facilitate the calculation of the function, and ensure the comparability of the angles of different window lengths, the function is defined as follows. In order to eliminate the influence of the window length L(i) on the angle calculation and map the frequency index to the range of 0-360°, facilitate the calculation of the function, and ensure the comparability of the angles of different window lengths, the function is defined as follows. In order to eliminate the influence of the window length L(i) on the angle calculation and map the frequency index to the range of 0-360°, facilitate the calculation of the function, and ensure the comparability of the angles of different window lengths, the function is defined as follows.

[0062] The calculation formula of the weighted average angle is as follows:

[0063]

[0064] In the formula, W(i, j) represents the weighted average angle of the i-th window; In the formula, W(i, j) represents the weighted average angle of the i-th window; In the formula, W(i, j) represents the weighted average angle of the i-th window; In the formula, W(i, j) represents the weighted average angle of the i-th window; In the formula, W(i, j) represents the weighted average angle of the i-th window; In the formula, W(i, j) represents the weighted average angle of the i-th window; In the formula, W(i, j) represents the weighted average angle of the i-th window; In the formula, W(i, j) represents the weighted average angle of the i-th window; In the formula, W(i, j) represents the weighted average angle of the i-th window; In the formula, W(i, j) represents the weighted average angle of the i-th window;

[0065] The angle information of all feature points is fused into a single representative weighted average angle to characterize the spectral shape trend of the entire window, which is used to guide the reconstruction of data at the receiving end.

[0066] S21: For a single window, an amplitude sequence is generated based on the descending order of the amplitude values of each frequency point in the amplitude spectrum, and a compressed sequence is obtained by compressing the amplitude sequence based on the importance factor and the length of the window.

[0067] First, based on the amplitude spectrum of a single window, the amplitude values of each frequency point are arranged in descending order to form an amplitude sequence. The compression of the amplitude sequence based on the importance factor and the length of the window includes: presetting a compression degree coefficient, calculating the product of the compression degree coefficient, the importance factor and the window length, and rounding up the obtained product to obtain the number of frequency domain coefficients; starting from the beginning of the amplitude sequence, the amplitude values of the number of frequency domain coefficients are retained to obtain a compressed sequence.

[0068] The calculation formula of the number of frequency domain coefficients is as follows:

[0069]

[0070] In the formula, Indicates the first The number of frequency domain coefficients per window; Indicates the first The importance factor of each window; Indicates the first The length of each window; This represents the compression factor, used to control the overall compression level of the data. The initial value is set to 1. In subsequent step S3, if the receiver finds that the quality of the reconstructed time-domain data sequence is generally substandard, it can send feedback to the sender, who can then increase the compression factor. Value. After receiving the instruction, the sender does not need to change the core algorithm, only adjust... This single parameter can improve the quality of all data in subsequent transmissions.

[0071] The larger or The larger, The larger the value, the more data is retained to capture important signal features; smaller or The smaller, The smaller the size, the more aggressive the compression. This ensures high-fidelity preservation of important data and efficient compression of non-critical data.

[0072] S22: Perform amplitude-frequency conversion on the compressed sequence to obtain a compressed data sequence, scale the compressed data sequence based on the importance factor, and use entropy coding to compress the scaled compressed data sequence to obtain the final compressed data stream.

[0073] Based on the compressed sequence, a scaling process is further introduced to reduce data precision, and entropy coding is combined to improve compression efficiency.

[0074] Scaling a compressed data sequence based on an importance factor includes: presetting a scaling baseline coefficient and a compression degree parameter; calculating the product of the importance factor, the scaling baseline coefficient, and the compression degree parameter to obtain a precision control factor; and scaling the compressed data sequence based on the precision control factor to obtain a scaled compressed data sequence.

[0075] The formula for calculating the precision control factor is as follows:

[0076]

[0077] In the formula, Indicates the first The precision control factor for each window is used to magnify the data; denotes a scaling reference coefficient, which can be 10 or 100, etc. basic magnification multiple; denotes an importance factor of the i-th window; denotes an importance factor of the i-th window; denotes a compression degree parameter, which is initially set to 1, and in the subsequent step S3, if the receiver finds that the quality of the reconstructed time domain data sequence does not meet the requirements (especially for the window with a high importance factor), the receiver can send feedback to the sender, and the sender can then increase the value of , thereby increasing , improving quantization accuracy, and improving fidelity in the next round of transmission.

[0078] The larger or the larger , the larger the compression data retains more bits, the more refined quantization, and the less information loss; or the smaller , the smaller , the more coarse quantization, and the higher compression ratio. The precision control factor is adaptively adjusted according to the importance factor: the window with a high importance factor uses a higher precision control factor to retain more details; the window with a low importance factor uses a lower precision control factor to increase the compression ratio.

[0079] Based on the obtained precision control factor, the compressed data sequence is scaled, that is, , wherein denotes the compressed data sequence of the i-th window, the function is a rounding function that retains integers, which is used for preprocessing for subsequent entropy coding compression. For example, the data 2.3123 and 2.3012 exist in the compressed data sequence , when , the data in the scaled compressed data sequence becomes 23 and 23; when , the data in the scaled compressed data sequence becomes 231 and 230. The scaled compressed data sequence is compressed using Huffman coding to generate a final compressed data stream, and the data length of the compressed window and the Huffman coding table are recorded for decompression processing by the data receiver. It should be noted that the Huffman coding table here is a global Huffman coding table generated for all window compressed data sequences. It can be understood that Huffman coding belongs to one of the entropy coding, and in other embodiments, arithmetic coding can also be used to compress the compressed data sequence.

[0080]

[0081] ​S23: Calculate the number of segments based on the importance factor and the length of the final compressed data stream, split the final compressed data stream based on the number of segments to obtain a segment sequence.

[0082] This step aims to adaptively and sequentially scramble the final compressed data stream to enhance the security of data transmission. The window with a high importance factor is more important, and a finer division and more complex scrambling strategy are adopted to improve the encryption strength; the window with a low importance factor simplifies the division to optimize the processing efficiency.

[0083] The importance factor of the window is multiplied by the length of the final compressed data stream, and the obtained product is rounded up to obtain the number of segments, ensuring that the number of segments is proportional to the importance of the data. Based on the number of segments, the final compressed data stream is uniformly divided to obtain a segment sequence. In actual segmentation, if the length of the final compressed data stream cannot be divided evenly, a length difference of no more than one byte is allowed between segments to ensure the integrity of the data and the balance of the segmentation.

[0084] The larger the importance factor of the window, the larger the number of segments obtained, which facilitates subsequent more complex scrambling operations, thereby enhancing the encryption security; the smaller the importance factor of the window, the smaller the number of segments obtained, and the division is coarser to optimize the processing speed.

[0085] S24: Convert the weighted average angle to a random seed using a hash function, and randomly rearrange the segment sequence based on the random seed to obtain an encrypted data sequence.

[0086] The weighted average angle is processed through a hash function to convert it into a fixed, reproducible random seed, which is then used to initialize a pseudo-random number generator. When the pseudo-random number generator is started, it will generate a deterministic, seemingly random sequence of disorder, which indicates how to completely scramble the order of data segments in the segment sequence. The formula is as follows:

[0087]

[0088] In the formula, represents the disorder sequence of the i-th window; represents the random permutation function; represents the number of segments of the i-th window; represents the standard hash function, which is used to convert the weighted average angle of the i-th window to a fixed range of random seed value, ensuring that the receiver can decrypt the data according to the weighted average angle.

[0089] ​​​The shuffling operation rearranges the data segments in the segmented sequence according to a shuffled sequence to obtain an encrypted data sequence.

[0090] Weighted average angle As a spectral shape feature of the window, the weighted average angle has uniqueness, and through hash processing, a random seed is generated to ensure the repeatability of the shuffled sequence. The same weighted average angle is used by the receiver to generate the same random seed and shuffled sequence, thereby recovering the data through inverse shuffling.

[0091] By using the features of the data itself to generate the randomness required for encryption, the "keyless" secure shuffling is achieved, while ensuring that the receiver can reliably recover the data.

[0092] S25: The encrypted data sequences of each window are spliced according to the order in the optimal window sequence to generate a final encrypted data segment.

[0093] The encrypted data sequences of each window are spliced according to the order in the optimal window sequence to generate a final encrypted data segment , and the metadata of each window is recorded, including the Huffman coding table , the importance factor , the precision control factor , the weighted average angle , the length of the final compressed data stream , and the number of segments .

[0094] The metadata of all windows are organized in a set form: The data output after the final encryption step is .

[0095] S3: The final encrypted data segment is decrypted and decompressed to obtain a time-domain data sequence reconstructed for each window, and the distortion degree of the time-domain data sequence is calculated. When the distortion degree is greater than a preset threshold, the compression degree of the corresponding window is changed and the data in the window is resent.

[0096] The receiver parses the input data, obtains the metadata set, and checks the correctness of the accepted metadata through CRC (Cyclic Redundancy Check) verification. According to the (the set of lengths of the final compressed data streams of each window) and The final encrypted data segment is divided into encrypted data sequences of each window, and then the weighted average angle of the window in the metadata is taken as a random seed to generate the same disorder sequence as the original one, and the encrypted data sequence of the window is inversely disordered to restore the segment sequence of the window, and the data segment in the segment sequence is spliced to restore the final compressed data stream of the window, and then Huffman decoding is applied to obtain the scaled compressed data sequence of the window, and the scaled compressed data sequence is divided by the precision control factor of the window to obtain the time domain data sequence of the window reconstruction, and the decryption and decompression of the final encrypted data segment are completed.

[0097] The calculation method of the distortion degree of the time domain data sequence includes: calculating the weighted average angle of the time domain data sequence, and taking the absolute angle difference between the weighted average angle of the time domain data sequence and the original weighted average angle of the corresponding window of the time domain data sequence as the distortion degree. The specific formula is as follows:

[0098]

[0099] In the formula, denotes the distortion degree of the time domain data sequence of the i-th window reconstruction; denotes the weighted average angle of the time domain data sequence of the i-th window reconstruction; denotes the original weighted average angle of the i-th window.

[0100] Each window corresponds to a preset threshold, and the calculation method of the preset threshold of a single window includes: setting a maximum angle difference base value allowed by the system, calculating the difference between 1 and the importance factor of the window, and taking the product of the obtained difference and the maximum angle difference base value as the preset threshold. The specific formula is as follows:

[0101]

[0102] In the formula, denotes the preset threshold of the i-th window; denotes the importance factor of the i-th window; denotes the maximum angle difference base value allowed by the system, which can be set as and the like.

[0103] The higher the importance factor of the window, the more important the data, and the smaller the corresponding preset threshold, which requires the weighted average angle of the reconstructed time domain data sequence to be highly matched with the original weighted average angle of the window to ensure data fidelity; the lower the importance factor of the window, the larger the preset threshold, which allows a larger error to optimize efficiency.

[0104] ​​​​​For the reconstructed time domain data sequence with distortion greater than the preset threshold, the method for changing the compression degree of the corresponding window comprises: receiving the feedback request sent by the sender to request to increase the compression degree coefficient and the compression degree parameter. After the compression degree coefficient is increased, the number of frequency domain coefficients of the window increases, and more data is retained; after the compression degree parameter is increased, the precision control factor of the window increases, the number of bits of the data retained after compression is more, and the data is more fine.

[0105] In addition, the distortion and the corresponding frequency domain coefficient number, precision control factor, importance factor, compression degree coefficient and compression degree parameter when the distortion is greater than the preset threshold in the multiple transmission processes can also be collected. The mapping relationship between the compression effect and the compression degree coefficient and the compression degree parameter is learned through a regression model. In this way, the model can select more suitable parameters to reduce the compression degree according to the real-time importance factor, so as to ensure the fidelity of the data after compression.

[0106] The application solves the core problems of intelligent fusion terminals in data compression, secure transmission and quality guarantee through intelligent segmentation, importance-aware compression, feature-driven encryption and quality feedback optimization, and has the advantages of high compression efficiency, good security, strong adaptability and outstanding engineering practical value.

[0107] The application also discloses an encryption and compression transmission system for intelligent fusion terminal data, which comprises a processor and a memory, and the memory stores computer program instructions.

[0108] The system also comprises a communication bus and a communication interface and other components familiar to those skilled in the art, the settings and functions of which are known in the art, and thus will not be described here.

[0109] It should be noted that, for those skilled in the art, without departing from the concept of the application, several modifications and improvements can be made, which all belong to the protection scope of the application. Therefore, the protection scope of the application patent should be subject to the appended claims.

Claims

1. A method for encrypted and compressed transmission of data from an intelligent fusion terminal, characterized in that, include: A time-domain template is constructed based on the acquired historical power data segments. The acquired data segments to be transmitted are segmented based on the time-domain template to obtain the optimal window sequence and the degree of difference corresponding to each window. Each window in the optimal window sequence is compressed and encrypted to obtain the final encrypted data segment, and the intelligent fusion terminal outputs the final encrypted data segment. The compression and encryption methods include: acquiring the amplitude spectrum of each window; calculating the importance factor and weighted average angle of the window based on the amplitude spectrum and the difference degree; for a single window, generating an amplitude sequence by sorting the amplitude values ​​of each frequency point in descending order based on the amplitude spectrum; compressing the amplitude sequence based on the importance factor and the length of the window to obtain a compressed sequence; performing amplitude-frequency conversion on the compressed sequence to obtain a compressed data sequence; scaling the compressed data sequence based on the importance factor; compressing the scaled compressed data sequence using entropy coding to obtain the final compressed data stream; calculating the number of segments based on the importance factor and the length of the final compressed data stream; dividing the final compressed data stream based on the number of segments to obtain a segmented sequence; converting the weighted average angle into a random seed using a hash function; randomly rearranging the segmented sequence based on the random seed to obtain an encrypted data sequence; and concatenating the encrypted data sequences of each window according to the order in the optimal window sequence to generate the final encrypted data segment. The method for constructing a time-domain template based on historical power data segments includes: extracting fixed-dimensional feature vectors from each historical power data segment; clustering all feature vectors to obtain a preset number of clusters; for a single cluster, calculating the average length of the historical power data segments corresponding to all feature vectors within that cluster; for historical power data segments belonging to the same cluster, selecting one historical power data segment as a reference sequence, aligning other historical power data segments with the reference sequence, and scaling each aligned historical power data segment to the average length; for the scaled historical power data segments, calculating the average value of the data corresponding to each time point to obtain a time-domain template with an average length. The method for segmenting data to be transmitted based on a time-domain template includes: obtaining the minimum and maximum average lengths of the time-domain template; creating a dynamic programming array to store the minimum cumulative difference; starting from the time point corresponding to the minimum average length, sequentially taking each time point as the end point of the current window; for each end point, enumerating the window lengths within the range of the minimum and maximum average lengths; calculating the difference of the current window for each length based on the time-domain template; for a single end point, calculating the sum of the difference of each current window and the minimum cumulative difference of the time point preceding the window's start point, taking the minimum sum as the minimum cumulative difference of that end point and storing it in the dynamic programming array, while simultaneously recording the corresponding window length, the matched time-domain template, and the difference; after completing the dynamic programming array, starting from the end of the dynamic programming array, reversibly segmenting the data to be transmitted according to the window length recorded at each time point to obtain the optimal window sequence.

2. The method for encrypted and compressed transmission of data in an intelligent fusion terminal according to claim 1, characterized in that, The importance factor calculation based on the amplitude spectrum and difference degree of the window includes: obtaining the amplitude value of each frequency point in the amplitude spectrum of the window, calculating the ratio of the sum of squares of the amplitude values ​​of all frequency points to the window length, performing positive correlation normalization on the obtained ratio to obtain the energy distribution value of the window; and calculating the product of the energy distribution value and the difference degree of the window to obtain the importance factor.

3. The method for encrypted and compressed transmission of data in an intelligent fusion terminal according to claim 2, characterized in that, The weighted average angle of the amplitude spectrum and difference calculation window based on the window includes: determining the threshold of the amplitude spectrum of the window, taking all frequency points with amplitude values ​​greater than the threshold as feature points, and obtaining the coordinates of each feature point; calculating the angle between each feature point and the origin, taking the square of the amplitude value of each feature point as the weight of the feature point; summing the products of the weights and angles of all feature points, and dividing the resulting sum by the sum of the weights of all feature points to obtain the weighted average angle.

4. The method for encrypted and compressed transmission of data from an intelligent fusion terminal according to claim 1, characterized in that, The compression of the amplitude sequence based on the importance factor and the window length includes: setting a compression degree coefficient, calculating the product of the compression degree coefficient, the importance factor and the window length, and rounding the product up to obtain the number of frequency domain coefficients; starting from the beginning of the amplitude sequence, retaining the amplitude value of the number of frequency domain coefficients to obtain the compressed sequence.

5. The method for encrypted and compressed transmission of data from an intelligent fusion terminal according to claim 1, characterized in that, The scaling of the compressed data sequence based on the importance factor includes: presetting a scaling reference coefficient and a compression degree parameter; calculating the product of the importance factor, the scaling reference coefficient, and the compression degree parameter to obtain a precision control factor; and scaling the compressed data sequence based on the precision control factor to obtain a scaled compressed data sequence.

6. The method for encrypted and compressed transmission of data in an intelligent fusion terminal according to claim 1, characterized in that, After outputting the final encrypted data segment, the process also includes: decrypting and decompressing the final encrypted data segment to obtain the reconstructed time-domain data sequence for each window, calculating the distortion of the time-domain data sequence, and when the distortion exceeds a preset threshold, changing the compression level of the corresponding window and resending the data within that window.

7. The method for encrypted and compressed transmission of data in an intelligent fusion terminal according to claim 6, characterized in that, The method for calculating the distortion of the time-domain data sequence includes: calculating the weighted average angle of the time-domain data sequence, and using the absolute angle difference between the weighted average angle of the time-domain data sequence and the original weighted average angle of the corresponding window of the time-domain data sequence as the distortion.

8. A smart fusion terminal data encryption and compression transmission system, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement the encrypted and compressed transmission method for intelligent fusion terminal data according to any one of claims 1-7.

Citation Information

Patent Citations

  • Data intelligent communication method for numerical control machine tool system

    CN116939047A

  • Panoramic perception data conversion method for Internet of Things

    CN120408464A