High-frequency time series data compression method and device based on improved symbolic aggregate approximation
By combining the improved elephant herd optimization algorithm and Gaussian mixture model, the problem of insufficient compression ratio and data restoration capability of the symbolic aggregation approximation method in high-frequency time series data compression is solved, achieving a lower compression ratio and better data restoration effect.
Patent Information
- Application Number
- CN202211043071.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-29
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-08-29
AI Technical Summary
Existing symbolic aggregation approximation methods suffer from low compression ratios and insufficient data restoration capabilities in high-frequency time-series data compression, especially when the data varies greatly, resulting in large decompression errors.
A Gaussian segmentation model with an improved elephant herd optimization algorithm is used to divide the time series, and a Gaussian mixture model with improved peak density initialization is used for clustering. The cluster centers are then converted into symbolic representations using the SAX method, and finally, the data is cut to obtain compressed data.
It achieves a lower compression ratio and better data restoration capability, reduces errors after decompression, and improves the accuracy of data representation.
Smart Images

Figure CN115514376B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of time series compression, in particular to a high-frequency time series data compression method based on improved symbolic aggregate approximation. BACKGROUND
[0002] Time series compression is an important research in time series related research. Due to the rapid development of science and technology, intelligentization penetrates into all aspects of production, manufacturing, monitoring and other work, and a company, a platform or a system needs to generate data every moment. The data generated not only has a large data acquisition device basis, but also has a high acquisition frequency, complex and diverse data types, and certain correlation between data. Therefore, an efficient compression method is needed to realize the storage of time series data.
[0003] The compression method of time series has relatively mature research results and constantly updated research results. It includes lossless compression model and lossy compression model. Most of the compression methods of time series are concentrated in the aspect of lossy compression. Among them, the representation method of sequence is the main means, including discrete Fourier transform, discrete wavelet transform, singular value decomposition, piecewise linear representation and symbolic method.
[0004] Keogh et al. introduced a new dimension reduction technology, namely piecewise aggregate approximation (PAA), to solve the similarity search problem of large time series database. On this basis, many developments and improvements have been made, including adaptive piecewise constant approximation (APCA). It is worth mentioning that the symbolic aggregate approximation (SAX) method, which introduces the division of equal probability interval of Gaussian distribution and symbol transformation on the basis of PAA method, provides a new direction for data representation and compression. SAX belongs to the category of symbolic method, which has the characteristics of simplicity, rapidity and wide application range, but also has certain defects. Moreover, there are few methods to establish a compression model based on the correlation between time series. Therefore, it is a problem worth exploring to combine the two to realize the compression of time series data. SUMMARY
[0005] The present application aims to at least solve one of the technical problems in the related art to some extent.
[0006] To achieve the above object, the first aspect of the present application provides a high-frequency time series data compression method based on improved symbolic aggregate approximation, comprising the following steps: step S101, using a Gaussian segmentation model based on improved image group optimization algorithm to divide the time series to obtain multiple segmentation points and multiple time series segments; step S102, using a Gaussian mixture model based on improved peak density initialization to cluster the multiple time series segments to obtain multiple cluster centers, module variance and cluster labels; step S103, performing equidistant segmentation on each cluster center again according to the proportion of the module variance; step S104, converting each segment mean of each class center into a symbolic representation using the SAX method, and the first character of each class is a capital letter; step S105, cutting the same symbolic representation of the same class to retain the first capital letter, and finally obtaining time series value compression data.
[0007] The second object of the present application is to provide a high-frequency time series data compression device based on improved symbolic aggregate approximation.
[0008] The third object of the present application is to provide a high-frequency time series data decompression method based on improved symbolic aggregate approximation.
[0009] The fourth object of the present application is to provide a high-frequency time series data decompression device based on improved symbolic aggregate approximation.
[0010] To achieve the above object, the first aspect of the present application provides a high-frequency time series data compression method based on improved symbolic aggregate approximation, comprising the following steps: step S101, using a Gaussian segmentation model based on improved image group optimization algorithm to divide the time series to obtain multiple segmentation points and multiple time series segments; step S102, using a Gaussian mixture model based on improved peak density initialization to cluster the multiple time series segments to obtain multiple cluster centers, module variance and cluster labels; step S103, performing equidistant segmentation on each cluster center again according to the proportion of the module variance; step S104, converting each segment mean of each class center into a symbolic representation using the SAX method, and the first character of each class is a capital letter; step S105, cutting the same symbolic representation of the same class to retain the first capital letter, and finally obtaining time series value compression data.
[0011] The high-frequency time series data compression method based on improved symbolic aggregate approximation of the embodiment of the present application, by using a segmented Gaussian model to segment the time series, improves the random segmentation feature of the SAX method; the Gaussian clustering of the time series segment realizes feature extraction and dimension reduction of the SAX method, and obtains lower compression rate and better data restoration capability.
[0012] In addition, the high-frequency time series data compression method based on improved symbolic aggregate approximation according to the above embodiment of the present application can also have the following additional technical features:
[0013] Further, in an embodiment of the present application, the Gaussian segmentation model based on improved image group optimization algorithm in step S101 is:
[0014] The disturbance is added to the tribe update operator of the initial image group optimization algorithm to obtain:
[0015]
[0016] Wherein, x i,jx i j represents the position of the j elephant in the i tribe, x i j represents the position of the j elephant in the i tribe, x i j represents the position of the j elephant in the i tribe, x i j represents the position of the j elephant in the i tribe, Levy(λ) represents a variation mechanism, and round represents a rounding operation on the value in the parentheses.
[0017] The tribe classification operator of the initial elephant swarm optimization algorithm is adjusted to obtain:
[0018]
[0019] wherein, x i j represents the updated position of the j elephant in the i tribe, min x i j represents the updated position of the j elephant in the i tribe, max x i j represents the updated position of the j elephant in the i tribe, round represents a rounding operation, T represents a time series length, and rand represents a random number.
[0020] Further, in an embodiment of the present application, the step S101 specifically comprises: initializing parameters and a population based on an improved elephant swarm optimization algorithm; calculating fitness values of all time series segments in the time series by using a segmented Gaussian module, starting iteration, until a preset maximum iteration number is reached, outputting an optimal position and a fitness value, otherwise sorting the fitness values of all time series segments, and reserving a number of good time series segments; executing a tribe update operator based on the improved elephant swarm optimization algorithm, updating positions and patriarch positions of all time series segments, until positions of time series segments in all tribes are updated; executing a tribe separation operator based on the improved elephant swarm optimization algorithm, updating positions and fitness values of a number of poor time series segments, until poor time series segments in all tribes are separated; sorting the fitness values of all time series segments to obtain a number of poor time series segments that need to be separated, updating positions of the reserved time series segments to the time series segments that need to be separated, and calculating fitness values to update an optimal patriarch position, i.e., an optimal segmentation point in all time series segments.
[0021] Further, in one embodiment of the present application, the step S101 specifically comprises: initializing parameters and population of the improved swarm optimization algorithm; calculating fitness values of all time series segments in the time series by using a piecewise Gaussian module, starting iteration, until reaching a preset maximum iteration number, outputting optimal position and fitness value, otherwise sorting fitness values of all time series segments, and reserving several good time series segments; executing a colony update operator based on the improved swarm optimization algorithm, updating positions of all time series segments and positions of the elders, until all time series segments in the colony are updated in position; executing a colony separation operator based on the improved swarm optimization algorithm, updating positions and fitness values of several poor time series segments, until all poor time series segments in the colony are separated; sorting fitness values of all time series segments to obtain several poor time series segments that need to be separated, updating positions of the reserved time series segments to the time series segments that need to be separated, and calculating fitness values to update the optimal elder position, i.e. the optimal segmentation point in all time series segments.
[0022] Further, in one embodiment of the present application, the step S102 specifically comprises: initializing the improved peak density clustering algorithm to obtain initialization values of a time series Gaussian mixture model mean , initialization values of each sub-model coefficient , and initialization values of each sub-model variance .
[0023] Inputting a preset maximum iteration number, a preset threshold, the plurality of segmentation points, and the plurality of time series segments;
[0024] Iteratively executing an E step of the EM algorithm to calculate time series segment S k belonging to the mthsub-model probability Iteratively executing an M step of the EM algorithm to calculate updated mean values of each cluster Updated variance Updated coefficient
[0025] Judging whether a difference between log-likelihood function values before and after two times is less than the preset threshold, or whether a variance of a sub-model of the Gaussian mixture model is 0, if yes, ending iteration, and outputting parameter mean values corresponding to the optimal cluster variance coefficient , and probability , otherwise, judging whether it is less than the preset maximum iteration number, if yes, continuing iteration, if not, ending iteration, and outputting parameter mean values corresponding to the optimal cluster variance coefficient , and probability
[0026] Further, in one embodiment of the present application, the specific process of initializing the improved peak density clustering algorithm is as follows: adjusting the local density formula according to all time series segments to calculate the local density; calculating the relative distance of the time series segment without the maximum local density ρ(S j ) and the relative distance of the time series segment with the maximum local density ρ(S j ); normalizing the local density and the relative distance and calculating the product of the local density and the relative distance as a clustering evaluation criterion for descending arrangement; selecting the time series segment far from zero value and taking the mean value thereof as the initialization value of the time series Gaussian mixture model mean value ; and taking the sequence number as the clustering number; calculating the initial value of each sub-model coefficient according to the clustering number and initializing each sub-model variance as a unit matrix.
[0027] Further, in one embodiment of the present application, the specific solving formula of the iterative EM algorithm is as follows:
[0028]
[0029]
[0030]
[0031]
[0032] wherein, p is the probability of the mthsub-model, α m is the sub-model coefficient, x t is the time series, S k is a certain time series segment, φ is the simplified log-likelihood function of each time series segment, θ m is the model parameter, is the updated mean value of each cluster, is the updated variance of each cluster, μ m is the original mean value of each cluster, is the updated coefficient of each cluster.
[0033] Further, in one embodiment of the present application, the step S103 is specifically as follows:
[0034] When the preset segmentation number w is allocated according to the proportion of the variance of each class, the segmentation number of each class is determined, and the formula is as follows:
[0035]
[0036] wherein M is the number of clusters, c j is the variance of sub-model j, v j is the number of partitions of class j;
[0037] The cluster centers of each class are equally partitioned according to the number of partitions.
[0038] To achieve the above object, the second aspect of the present application proposes a high-frequency time series data compression device based on improved symbolic aggregate approximation, comprising: a division module for dividing time series using a Gaussian partitioning model based on an improved image swarm optimization algorithm to obtain multiple partition points and multiple time series segments; a clustering module for clustering the multiple time series segments using a Gaussian mixture model based on improved peak density initialization to obtain multiple cluster centers, sub-module variance, and cluster labels; an equal partitioning module for re-equal partitioning each cluster center according to the proportion of the sub-module variance; a transformation module for converting each segment mean of each class center into a symbolic representation using the SAX method, with the first character of each class being a capital letter; a cutting module for cutting the same symbolic representation of the same class, retaining the first capital letter, and finally obtaining time series value compression data.
[0039] The high-frequency time series data compression device based on improved symbolic aggregate approximation of the present application uses a segmented Gaussian model to divide time series, improves the random partitioning feature of the SAX method, uses Gaussian clustering of time series segments to realize feature extraction and dimension reduction of the SAX method, and obtains lower compression rate and better data restoration capability.
[0040] To achieve the above object, the third aspect of the present application proposes a high-frequency time series data decompression method based on improved symbolic aggregate approximation, comprising the following steps: step S201, scanning time series value compression data to identify capital letters to obtain symbolic representation of each cluster center; step S202, calculating the length of the sequence segment of each cluster center to determine the partition point; step S203, restoring the symbolic representation of each sequence segment according to the partition point to further obtain the symbolic representation of the entire time series; and step S204, performing inverse transformation on each symbol using the SAX method to obtain the time series.
[0041] The high-frequency time series data decompression method based on improved symbolic aggregate approximation of the present application uses a segmented Gaussian model to divide time series, improves the random partitioning feature of the SAX method, uses Gaussian clustering of time series segments to realize feature extraction and dimension reduction of the SAX method, and obtains lower compression rate and better data restoration capability.
[0042] To achieve the above object, the fourth aspect of the present application provides a high-frequency time series data decompression device based on improved symbolic aggregate approximation, comprising: a scanning and identifying module for scanning time series value compression data, identifying capital letters, and obtaining a symbolic representation of each cluster center; a determination of segmentation point module for calculating the length of a sequence segment of each cluster center and determining a segmentation point; a restoration of symbolic module for restoring the symbolic representation of each sequence segment according to the segmentation point, and further obtaining a symbolic representation of the entire time series; and an inverse transformation module for performing inverse transformation on each symbol by using the SAX method to obtain a time series.
[0043] The high-frequency time series data decompression device based on improved symbolic aggregate approximation of the embodiment of the present application improves the random segmentation feature of the SAX method by segmenting the time series by using the segmented Gaussian model; and realizes feature extraction and dimension reduction of the SAX method by using Gaussian clustering of the time series segment, thereby obtaining a lower compression rate and better data restoration capability.
[0044] Additional aspects and advantages of the present application will be made apparent from the following description of the application, which will be understood in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0045] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description, taken in conjunction with the accompanying drawings, in which:
[0046] Figure 1 is a flowchart of a high-frequency time series data compression method based on improved symbolic aggregate approximation according to an embodiment of the present application;
[0047] Figure 2 is a flowchart of time series Gaussian segmentation based on an improved symbolic aggregate approximation algorithm according to an embodiment of the present application;
[0048] Figure 3 is a flowchart of Gaussian mixture model time series segment clustering based on improved peak density initialization according to an embodiment of the present application;
[0049] Figure 4 is a flowchart of high-frequency time series data compression based on improved symbolic aggregate approximation according to an embodiment of the present application;
[0050] Figure 5 is a structural schematic diagram of a high-frequency time series data compression device based on improved symbolic aggregate approximation according to an embodiment of the present application;
[0051] Figure 6 is a flowchart of a high-frequency time series data decompression method based on improved symbolic aggregate approximation according to an embodiment of the present application;
[0052] Figure 7 is a flow chart of a decompression process of time series values based on improved symbolic aggregate approximation according to an embodiment of the present application;
[0053] Figure 8 is a structural schematic diagram of a high-frequency time series data decompression device based on improved symbolic aggregate approximation according to an embodiment of the present application. DETAILED DESCRIPTION
[0054] Embodiments of the present application are described in detail below with reference to examples illustrated in the accompanying drawings, in which the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.
[0055] It should be noted that the SAX method has good data expression and compression effect for time series compression, but also has a large defect. Although the SAX method can divide the time series into different segments to obtain different compression rates, the equal division sequence cannot guarantee that the segmented sequence has similar characteristics. If the data variation is large, the mean of the segment sequence is insufficient to describe the characteristics of the segment. Moreover, even if the data compression rate is low, the error after decompression is large. Therefore, the SAX method needs to be further improved in time series representation and compression. The present application proposes a high-frequency time series data compression method and device based on improved symbolic aggregate approximation and a high-frequency time series data decompression method and device based on improved symbolic aggregate approximation.
[0056] The high-frequency time series data compression method and device based on improved symbolic aggregate approximation and the high-frequency time series data decompression method and device based on improved symbolic aggregate approximation according to embodiments of the present application will be described below with reference to the accompanying drawings. First, the high-frequency time series data compression method based on improved symbolic aggregate approximation according to embodiments of the present application will be described with reference to the accompanying drawings.
[0057] Figure 1 is a flow chart of a high-frequency time series data compression method based on improved symbolic aggregate approximation according to an embodiment of the present application.
[0058] As shown in Figure 1 , the high-frequency time series data compression method based on improved symbolic aggregate approximation includes the following steps:
[0059] In step S101, the time series is divided using a high-frequency time series data compression method based on improved symbolic aggregate approximation.
[0060] That is, the time series is divided using a high-frequency time series data compression method based on improved symbolic aggregate approximation to ensure that the obtained sequence segments have certain characteristics.
[0061] Specifically, we first solve the piecewise Gaussian model, that is, solve equation (1):
[0062]
[0063] in, is a simplified log-likelihood function, K+1 represents the number of segments, |S k | indicates fragment S k The sequence length, that is, the number of sequence values, ∑ k is the covariance, λ is the regularization coefficient, This is an optimization problem, so the improved elephant group algorithm is used to find the optimal solution.
[0064] Furthermore, regarding individual updates, the tribe update operator in the herd optimization algorithm only considers the influence of the tribe leader on the elephants within the tribe, while ignoring the influence of the best elephants in the group on the individuals. Furthermore, the search capability needs to be improved. Therefore, the present invention improves the tribe update operator as follows:
[0065] By adding perturbations to the tribe update operator of the initial elephant group optimization algorithm, we get:
[0066]
[0067] Among them, x i,j represents the position of the jth elephant of tribe i, The elephant with the best fitness function value among all elephants is called the elder; It represents the influence of the chief of tribe i on the individual elephants, and adds a certain degree of disturbance; The term "represents the influence of the optimal elders of the group on individual elephants. A certain degree of disturbance is also added. The main influences on individual elephants come from the clan leader (the clan leader is the optimal split point in each tribe in the time series) and the elder (the optimal split point in all tribes in the time series). Therefore, the influencing parameters are divided into α and 1-α to represent the influencing parameters. Considering some other unexpected factors, Levy (λ) is added to represent the mutation mechanism, making it easier for the algorithm to jump out of local extreme points. Round indicates that the values in the brackets are rounded to ensure that the split points of the time series are integers.
[0068] The above-mentioned improvement of the tribe update operator takes into account the influence of both local and global optimal values, and fully utilizes the characteristic of Levy flight that rain and dew are evenly distributed over long and short distances. It not only allows individual elephants to move closer to the optimal direction, but also expands the optimization range, makes it easier to escape from local extreme values, and accelerates convergence.
[0069] It is to be noted that the update of the clan leader is expressed as follows:
[0070]
[0071] wherein
[0072]
[0073] wherein, n i represents the number of elephants in the tribe i, including the clan leader; represents the center position or the mean position of the tribe i; the updated position of the best elephant in the tribe i, that is, the new position of the clan leader of the tribe i; β∈[0, 1] represents the new position of the clan leader the degree of influence of the center position of the tribe i, and α is also an influence parameter.
[0074] Then, for the optimization operation suitable for the integer position, the tribe classification operator of the initial elephant group optimization algorithm is adjusted as follows:
[0075]
[0076] wherein, is the updated position of the elephant difference of the i tribe, x min is the minimum value of the elephant selectable position, x max is the maximum value of the elephant selectable position, round is the rounding operation, T is the length of the time series, and rand is a random number.
[0077] Since the segmentation point of the piecewise Gaussian model is left-closed and right-open, the internal segmentation point T of the time series with the length of T can be obtained, that is, the integer position is selected from 2, …, T.
[0078] Then, in order to speed up the algorithm to converge to the optimal solution, in addition to the separation operation of updating the position of the individual with the worst fitness function value in each tribe, the entire elephant group can be sorted after the operation of the tribe update operator and the tribe separation operator, and a certain number of individuals with the worst fitness function value can be selected for separation, and the position of the individual is updated to the position of the excellent individual reserved in the last iteration, and finally the improved elephant group optimization algorithm is obtained.
[0079] As Figure 2 shown in the following table 1, finally the improved elephant group algorithm is applied to the piecewise Gaussian model to obtain the basic steps of the time series Gaussian segmentation based on the improved elephant group algorithm:
[0080] Initialize the parameters and population based on the improved elephant group optimization algorithm;
[0081] The fitness values of all time series segments in the time sequence are calculated by using the segmented Gaussian module, iteration is started until the preset maximum iteration number is reached, and the optimal position and fitness value are output, otherwise, the fitness values of all time series segments are sorted, and several good time series segments are reserved;
[0082] The tribe update operator based on the improved elephant swarm optimization algorithm is executed to update the positions of all time series segments and the position of the chief, until the positions of the time series segments in all tribes are updated;
[0083] The tribe separation operator based on the improved elephant swarm optimization algorithm is executed to update the positions and fitness values of several poor time series segments, until the poor time series segments in all tribes are separated;
[0084] The fitness values of all time series segments are sorted to obtain several poor time series segments that need to be separated, the positions of the reserved time series segments are updated to the time series segments that need to be separated, and the fitness values are calculated to update the optimal elder position, that is, the optimal segmentation point in all time series segments.
[0085] Table 1 basic flow of time series Gaussian segmentation based on improved elephant swarm optimization algorithm
[0086]
[0087]
[0088] In step S102, a plurality of time series segments are clustered using a Gaussian mixture model based on improved peak density initialization to obtain a plurality of clustering centers, a module variance and a clustering label.
[0089] That is, the sub-sequences obtained by segmentation are taken as objects, and the time series segment Gaussian clustering model based on improved peak density initialization is used to cluster the sub-sequences.
[0090] Specifically, the Gaussian clustering of the time series segment assumes that the time series segments S1, S2, …, S K+1 obtained by Gaussian segmentation are mutually independent and respectively subject to respective Gaussian distributions, and the new class obtained by similar segment clustering is subject to a large-range Gaussian distribution. Therefore, the embodiment of the present application uses a Gaussian mixture model to describe all time segments, which has the following expression form:
[0091]
[0092] Wherein, α m ≥0 represents the coefficient of the module, and has M represents the number of clusters; θ=(α m ; θ m) = (a m ; μ m ,∑ m |m = 1,2, …, M) represent the parameters of model (6); P(S|θ) represents the probability distribution of time series segments S1, S2, …, S K+1 φ(S|θ m ) represents the Gaussian distribution of time series segments under parameters θ m = (μ m ,∑ m ), which is the mth sub-model of model (6), and has the following expression:
[0093]
[0094] The Gaussian mixture model of the time series has hidden variables, which are defined as follows:
[0095]
[0096] k = 1,2, …·, K+1; m = 1,2, …, M
[0097] Then, the EM algorithm is used to estimate the Gaussian mixture model parameters of the time series segments, and the derivation is as follows:
[0098]
[0099]
[0100]
[0101]
[0102] wherein, is the probability of the mth sub-model, a m is the sub-model coefficient, x t is the time series, S k is a certain time series segment, φ is the simplified log-likelihood function of each time series segment, θ m is the model parameter, is the updated mean value of each cluster, is the updated variance of each cluster, μ m is the original mean value of each cluster, is the updated coefficient of each cluster.
[0103] The EM algorithm is sensitive to initial values and may not be able to escape from local extrema once it falls into them. For Gaussian clustering of time series, the mean variance and coefficient need to be initialized. The sub-model coefficient The initialization of the cluster result of the time series Gaussian mixture model has no influence, and therefore the embodiment of the application uses uniform distribution for initialization, as shown in the following formula:
[0104]
[0105] Wherein, M represents the cluster number.
[0106] In order to weaken the influence of variance on clustering, a unit matrix is used for initialization. The most important thing is to initialize the mean value, improve the peak density clustering algorithm, and initialize the mean value.
[0107] For time series segments S j and S k , the Bhattacharyya distance is defined as
[0108]
[0109] The smaller the Bhattacharyya distance D B (S j , S k ) is, the more similar the time series segments S j and S k are. The Bhattacharyya distance of the time series segment S j and all time series segments is
[0110]
[0111] The smaller the Bhattacharyya distance D B (S j , S) is, the more similar the sequence segment S j is to most time series segments, and is suitable for being a cluster center. However, the data point with higher local density is more suitable for being a cluster center, and therefore D B (S j , S) is not suitable for being the local density of the data point directly, and therefore the local density is defined as follows:
[0112]
[0113] The relative distance δ(S j ) of the time series segment S j can be represented as
[0114]
[0115]
[0116]
[0117] Wherein, formula (13) is used to calculate the local density ρ(Sj ) of the time series segment S j The relative distance of the maximum local density ρ(S j ) of the time series segment S j The relative distance d ji Represents a time series segment S j With S i The Euclidean distance to the mean of the Gaussian distribution it follows.
[0118] The normalization of the maximum and minimum values is used, and the product of local density and relative distance is calculated as the clustering criterion, as shown below:
[0119]
[0120] η′(S j )=ρ′(S j )×δ′(S j ), j=1,2,…,K+1 (16)
[0121] According to the calculated η′(S j ) values, sort them in descending order, draw their change graph, and select several time series segments S far away from 0 value m (m=1, 2, ..., M) Assuming that M pieces are selected, these segments are clustered into M categories.
[0122] The Gaussian mixture model-based clustering process for time series segments yields the cluster centers for each class, the variance of the Gaussian mixture model, and a label indicating the class to which the segment belongs. This cluster label requires additional storage and plays a crucial role in representing the entire time series and decompressing it. Since only the cluster centers represent the corresponding subsequences, only the cluster center data needs to be retained during compression.
[0123] like Figure 3 As shown in Figure 2 and Table 2 below, the basic process of clustering time series segments based on the Gaussian mixture model is:
[0124] Initialize the improved peak density clustering algorithm to obtain the mean of the time series Gaussian mixture model Initialization value of each sub-model coefficient The initialization value and variance of each sub-model Initialization value;
[0125] Input preset maximum number of iterations, preset threshold, multiple split points and multiple time series segments;
[0126] Iteratively execute the E steps of the EM algorithm to calculate the time series segment S k The probability of belonging to the mth sub-model M-step of EM algorithm is iteratively executed to calculate the updated mean value of each cluster updated variance updated coefficient
[0127] whether the difference between the log-likelihood function values before and after the two times is less than a preset threshold value, or whether the variance of the sub-model of the Gaussian mixture model is 0, if yes, the iteration is ended, and the parameter mean value corresponding to the optimal clustering is output variance coefficient and probability On the contrary, whether it is less than a preset maximum iteration number is judged, if yes, the iteration is continued, if not, the iteration is ended, and the parameter mean value corresponding to the optimal clustering is output variance coefficient and probability
[0128] Table 2 basic flow of time series segment clustering based on Gaussian mixture model
[0129]
[0130] In step S103, each cluster center is again equally divided according to the proportion of the sub-module variance.
[0131] Specifically, the clustering condition of each cluster is judged according to the variance of each cluster, the greater the variance, the stronger the fluctuation, and the greater the number of partitions should be allocated, when the preset segmentation number w, according to the proportion of the variance of each class, the number of partitions of each class is determined, the formula is:
[0132]
[0133] wherein M is the number of clusters, c j is the variance of the sub-model j, v j is the number of partitions of class j;
[0134] According to the number of partitions, the cluster centers of each class are equally divided, as follows:
[0135]
[0136] wherein, indicates the mean value of the center of class j on v j segment.
[0137] In step S104, the SAX method is used to convert each segment mean value of each class center into symbolic representation, and the first character of each class is a capital letter.
[0138] Specifically, since the symbols for each cluster are connected together, the first symbol for each cluster center is converted to uppercase letters to distinguish between different clusters. Since the number of partitions of a commonly used Gaussian distribution and other probability intervals is generally 3-8, using lowercase letters for symbolic representation in the SAX method is sufficient. Therefore, it is appropriate to use uppercase letters to distinguish the beginning of a cluster center in the embodiment of the present invention.
[0139] In step S105 , identical symbol representations of the same category are cut, and the first capital letter is retained, thereby finally obtaining time series value compressed data.
[0140] Specifically, since each cluster center is subdivided, when the data changes slowly, it is likely to fall into the same interval when converted to SAX symbolic representation, so clipping is required. In this case, only the symbolic representation of the first capital letter of the cluster is retained.
[0141] Therefore, if Figure 4 As shown in FIG and Table 3 below, the basic process of high-frequency time series data compression based on improved symbol aggregation approximation.
[0142] Table 3 Basic process of high-frequency time series data compression based on improved symbol aggregation approximation
[0143]
[0144] In addition, the embodiment of the present invention proposes a high-frequency time series data decompression method based on improved symbol aggregation approximation according to the high-frequency time series data compression method based on improved symbol aggregation approximation, specifically as follows Figure 5 、 6 As shown in Table 4 below, the following steps are included: Step S201, scanning the compressed data of the time series value, identifying uppercase characters, and obtaining the symbolic representation of each cluster center; Step S202, calculating the length of the sequence segment of each cluster center and determining the segmentation point; Step S203, restoring the symbolic representation of each sequence segment according to the segmentation point, and then obtaining the symbolic representation of the entire time series; Step S204, performing an inverse transformation on each symbol using the SAX method to obtain the time series.
[0145] Table 4 Basic process of high-frequency time series data decompression based on improved symbol aggregation approximation
[0146]
[0147] The above steps can realize the decompression process for the entire time series. It should be noted that Step 1 and Step 2 have no sequence relationship and can be performed simultaneously or sequentially. In Step 3.3, the current segment length and the number of cluster center symbols are assumed to be l and n, respectively. The length of each symbol is calculated as the mean value, i.e. l / n, and then each symbol is expanded to a continuous l / n symbols, which realizes the complete symbol representation of each sequence.
[0148] The improved symbol aggregation approximation-based high-frequency time series data compression method proposed in the embodiments of the application is simulated and analyzed.
[0149] (1) First, determine the evaluation index for time series compression experiment. To illustrate the compression effect, the indicators of compression ratio, mean square error, root mean square error and mean absolute error are used. Among them, the compression ratio evaluates the compression effect, and the other three evaluate the decompression effect. The expression forms are as follows:
[0150]
[0151] Among them, CR is the ratio of the size of the compressed data to the size of the original data w. The smaller the compression ratio, the better the compression effect.
[0152]
[0153] Among them, MSE represents the mean square error, x t represents the true time series data, represents the decompressed data, and T represents the number of sequence values of the current time series. The mean square error is an index for describing the fitting effect. The smaller the index, the stronger the data restoration ability of the decompressed data, and the better the compression effect.
[0154]
[0155] Among them, RMSE represents the root mean square error, which is the root operation of the mean square error MSE. Therefore, the smaller the index, the better the compression effect of the data.
[0156]
[0157] Among them, MAE represents the mean absolute error. Similarly, the index describes the difference between the decompressed data and the original data. The smaller the value, the smaller the difference between the decompressed data and the original data, and the better the compression effect.
[0158] (ii) In order to compare the practicability of the compression module, three comparison models are selected: SAX method, SAX+segmentation method and SAX+segmentation+clustering method, wherein,
[0159] The SAX method is used for comparison to show the improvement effect and further illustrate the applicability of the method proposed in the embodiment of the application, because the model proposed in the embodiment of the application is improved in view of the defects of the SAX method, i.e., unable to identify data features and random segmentation leading to poor decompression effect.
[0160] The SAX+segmentation method is based on the Gaussian segmentation of the improved Gauss swarm optimization algorithm proposed in the embodiment of the application to segment the time series, which can indeed extract some features of the data, and comparison with the method can illustrate whether the method proposed in the embodiment of the application can achieve a better compression effect.
[0161] The SAX+segmentation+clustering method is also based on segmentation and clustering, and the clustering center of each class is used as the representation of each sequence segment in the class. Compared with the SAX+segmentation method using the mean value of the segmented sequence segment itself, the SAX+segmentation+clustering method has a smaller compression rate in theory and will produce a larger error after decompression. Therefore, this method is needed to illustrate the effect of the clustering center resegmentation and cutting operation based on the embodiment of the application on the compression effect.
[0162] (iii) Verification and analysis using Gesture data set
[0163] The first dimension data of the Gesture data set with a length of 400 and 1300 are used to illustrate the compression strategy proposed.
[0164] The SAX method is related to the number of segments and the value of α. Different combinations of the number of segments and the value of α will produce different compression effects and decompression results. In order to illustrate the compression effect of the method proposed in the embodiment of the application, different numbers of segments will be selected for data with different lengths, and three numbers of segments are selected, one of which is the number of segments obtained based on Gaussian segmentation of the time series, and the other two are greater and less than the number of segments obtained based on Gaussian segmentation. Therefore, for the first dimension data of the Gesture data set with a length of 400, the number of segments is selected as 5, 20 and 3, and for the long time series data with a length of 1300, the number of segments is selected as 15, 50 and 10; the value of α is selected as three values 3, 5 and 8 in a commonly used range.
[0165] Tables 5 to 8 are compression and decompression evaluations of the time series values of the first dimension data of Gesture of length 400, wherein Tables 5 to 7 respectively represent the compression and decompression evaluation results of the method proposed in the embodiment of the present invention and the SAX method when the number of segmentation segments is 5, 20, and 3. Tables 9 to 12 are compression and decompression evaluations of the time series values of the first dimension data of Gesture of length 1300, wherein Tables 9 to 11 respectively represent the compression and decompression evaluation results of the method proposed in the embodiment of the present invention and the SAX method when the number of segmentation segments is 15, 50, and 10. Tables 8 and 12 represent the evaluation results under the SAX+segmentation method and the SAX+segmentation+clustering method, and these two methods are not affected by the number of segments, but are related to the α value. These 8 tables all show the compression and decompression effects when the α values are 3, 5, and 8, respectively.
[0166] Table 5 Compression results of time series values of the first dimension of Gesture data with a length of 400 when the number of segments is 5
[0167]
[0168] Table 6 Compression results of time series values of the first dimension of Gesture data with a length of 400 when the number of segments is 20
[0169]
[0170] Table 7 Compression results of time series values of the first dimension of Gesture data with a length of 400 when the number of segments is 3
[0171]
[0172] Table 8 Compression results of time series values of the first dimension of Gesture data with a length of 400
[0173]
[0174] For short sequences, whether the number of segments is 5, 20 or 3, 15 or 10, and whether the value of a is 3, 5 or 8, as shown in Tables 6 to 11, the method proposed in the embodiments of the present application can have smaller MSE, RMSE and MAE values after decompression while maintaining the same compression rate as the SAX method, which shows that the method proposed in the embodiments of the present application can achieve higher fitting and greater restoration of the original data after decompression. For long sequences, whether the number of segments is 15, 50 or 10, and whether the value of a is 3, 5 or 8, as shown in Tables 9 to 11, the method proposed in the embodiments of the present application not only has a lower compression rate than the SAX method, but also can have smaller MSE, RMSE and MAE index evaluation values after decompression, which shows that the method proposed in the embodiments of the present application can achieve greater compression and greater restoration of the original data, and therefore, the compression effect of the method proposed in the embodiments of the present application is better than that of the SAX method.
[0175] Compared with the SAX+segmentation method and the SAX+segmentation+clustering method, the former is based on the segmentation of time series fragments for compression, and the latter is based on the clustering of the former, and therefore, the latter has a lower compression rate, as shown in Tables 8 and 12. For short sequences, when a = 3, the SAX+segmentation method and the SAX+segmentation+clustering method have the same evaluation index values after decompression, and when a = 5 and 8, the three index values of the SAX+segmentation method are a little smaller. For long sequences, the MSE, RMSE and MAE index values of the SAX+segmentation method are all a little smaller than those of the SAX+segmentation+clustering method under the three values of a. This shows that whether the sequence is short or long, the SAX+segmentation+clustering method achieves higher compression by sacrificing the restoration ability of data, and whether the method can achieve the same restoration ability as the SAX+segmentation method depends on the data itself and the value of a. Therefore, the two methods have different focuses. However, the compression rates of the two methods are fixed and unchanged.
[0176] The method proposed in the embodiments of the present application is compared with the SAX+segmentation method. For short sequences, as shown in Tables 6 and 8, under the condition of the same compression rate, the method proposed in the embodiments of the present application has smaller MSE, RMSE and MAE values, which shows that it can better fit the original time series data and has better compression effect. In addition, when the number of segments is 3, the compression rate of the method proposed in the embodiments of the present application is lower, and when a = 3, the three index values can reach the same level as those of the SAX+segmentation method, although the three index values are a little larger than those of the latter when a = 5 and 8, the method proposed in the embodiments of the present application can achieve better fitting under the condition of the same compression rate and the same fitting effect under the condition of a lower compression rate at some values of a, which is sufficient to show that the method proposed in the embodiments of the present application is stronger than the SAX+segmentation method and is worth using.
[0177] For long time series, as shown in Tables 9 to 12, when the segment number is 15, the compression ratio and the three evaluation indexes of the method proposed in the embodiment of the present application are lower than those of the SAX+segmentation method when α=5, and the index values are higher but the compression ratio is lower when α=3 and 8; when the segment number is 50, the values of the four indexes of the method proposed in the embodiment of the present application are higher than those of the SAX+segmentation method when α=3, and although the compression ratio is higher, the values of the other three indexes are lower than those of the latter when α=5 and 8. When the segment number is 10, the values of the MSE, RMSE and MAE indexes of the proposed method are larger than those of the latter, but the compression ratio is lower.
[0178] In summary, compared with the SAX+segmentation method, the method proposed in the embodiment of the present application has a lower compression ratio while ensuring a good data restoration capability.
[0179] The method proposed in the embodiment of the present application is compared with the SAX+segmentation+clustering method. For short sequences, when the compression ratio is the same, as shown in Tables 8 and 9, the values of the other three indexes of the two methods are the same; when the compression ratio is higher, the values of the other three indexes of the method proposed in the embodiment of the present application are lower. For long sequences, when the segment number is 15 and α=3, and when the segment number is 10 and α=3 and 5, the two methods have the same index values. For other segment numbers and α, the method proposed in the embodiment of the present application has a higher compression ratio and lower values of the other three indexes. Therefore, compared with the SAX+segmentation+clustering method, the method proposed in the embodiment of the present application has a lower compression ratio while having a better data restoration capability.
[0180] Table 9 Compression results of the Gesture first-dimensional data time series values with a length of 1300 when the segment number is 15
[0181]
[0182] Table 10 Compression results of the Gesture first-dimensional data time series values with a length of 1300 when the segment number is 50
[0183]
[0184] Table 11 Compression results of the Gesture first-dimensional data time series values with a length of 1300 when the segment number is 10
[0185]
[0186] Table 12 Compression results of the Gesture first-dimensional data time series values with a length of 1300
[0187]
[0188]
[0189] In addition, compared with the fixed compression rate characteristics of the two methods, the method proposed in the embodiment of the application can adjust the compression rate. For short sequences, when the segment number is 20 and 3, the compression rate obtained is different from that obtained when the segment number is 5, and the same effect is also obtained for long sequences. The greater the segment number, the higher the compression rate, the smaller the segment number, the lower the compression rate, and the fitting error is small. Under the tolerable fitting error, a strategy with a higher compression ratio can be selected.
[0190] In summary, in general, the method proposed in the embodiment of the application is more suitable for compressing Gesture data. It has both the high data restoration capability of the SAX+segmentation method and the low compression rate of the SAX+segmentation+clustering method. Moreover, if the lowest compression rate is desired, the segment number can be set as the clustering number, so the method has certain adaptability. Therefore, the method has certain applicability.
[0191] (IV) Verification and analysis of the PSCADA data set
[0192] The la data in the PASCADA data set is used, and the data with lengths of 100 and 1500 are respectively used.
[0193] Similarly, since the SAX method is related to the segment number and the alpha value, in order to illustrate the compression effect of the method proposed in the embodiment of the application on data with certain periodicity, three segment numbers are selected for data with different lengths. For short time sequences with a length of 100, one of the segment numbers is 6, which is obtained in the second chapter, and the other two segment numbers are 10 and 4, which are on both sides of 6. For long time sequences, 109, 50 and 150 are selected as the segment numbers, and 109 is the segment number obtained in the third chapter. The alpha value is selected as three values 3, 5 and 8 in a commonly used range.
[0194] Tables 13 to 15 are the compression evaluation and decompression evaluation of the time sequence values of the la data with a length of 100, and Tables 16 to 18 are the compression evaluation and decompression evaluation of the time sequence values of the la data with a length of 1500. The six tables respectively show the evaluation results under different segment numbers, different alpha values and different methods. The method proposed in the embodiment of the application makes the short sequences have the same compression effect when the segment numbers are 6, 4 and 10, and the long sequences have the same compression effect when the segment numbers are 109, 50 and 150, so only Tables 13 and 16 are shown, respectively. Similarly, the SAX+segmentation method and the SAX+segmentation+clustering method are not affected by the segment number, but are related to the alpha value, as shown in Tables 15 and 18.
[0195] Table 13 Compression results of la data time series values with length 100 under the proposed method and SAX method
[0196]
[0197] Table 14 Compression results of la data time series values with length 100 under SAX method
[0198]
[0199] Table 15 Compression results of la data time series values with length 100
[0200]
[0201] For short sequences, when the number of segments is 6, no matter the value of a is 3, 5 or 8, the proposed method can achieve smaller compression ratio while keeping the same MSE value, RMSE value and MAE value as SAX method, as shown in Table 13, which shows that the proposed method can store data in smaller space. In addition, when the number of segments is 10 and 4, the proposed method has lower compression ratio and smaller MSE, RMSE and MAE index values than SAX method under the corresponding value of a, which can significantly show that the proposed method has better compression effect than SAX method. SAX method has lower compression ratio and the smallest other evaluation values when the number of segments is 6, because la data with length 100 has certain periodicity, and the number of segments at this time divides the periodicity of the data, and the other two numbers of segments destroy the characteristics of the data itself, so the compression effect is poor.
[0202] For long sequences, no matter the number of segments is 109, 0 or 150, and the value of a is 3, 5 or 8, the compression ratio and MSE, RMSE and MAE index values obtained by the proposed method are lower than those of SAX method, which shows that for longer la data, the proposed method can still obtain lower compression ratio and higher data restoration ability. The reason why SAX method cannot have its own lowest compression ratio and best other three index values when the optimal number of segments is 109 is that the time series at this time has certain periodicity, but the periodicity is not so strong, and there may be some data outside the period between the periods, which leads to the division of different periods of data into the same segment when the method divides the sequence segments, so the data restoration ability becomes poor, but the proposed method greatly reduces this disadvantage, so the compression effect is better.
[0203] In summary, the compression ratio and decompression effect of the SAX method have great relationship with the number of segments, the value of α and the characteristics of the data itself, and the method proposed in the embodiment of the application can better extract the characteristics of the data and compress the data by using the characteristics, so that a good compression effect can be obtained.
[0204] Table 16 Compression results of la data time series values with length 1500 under the proposed method and the SAX method
[0205]
[0206] Table 17 Compression results of la data time series values with length 1500 under the SAX method
[0207]
[0208] Table 18 Compression results of la data time series values with length 1500
[0209]
[0210] Compared with the SAX+segmentation method and the SAX+segmentation+clustering method, the compression ratio of the former is higher than that of the latter, which is consistent with the theory, as shown in Tables 15 and 18. For short sequences, the values of the three indicators of the two methods are the same when α = 3 and 5, and the values of the three indicators of the SAX+segmentation method are slightly smaller when α = 8; for long sequences, the values of MSE, RMSE and MAE are the same under the three values of α. Based on the above performance, it is shown that the SAX+segmentation method focuses more on the restoration ability of the data, and the SAX+segmentation+clustering method focuses more on a lower compression ratio, and is related to the characteristics of the data itself. When the data is relatively stable, the SAX+segmentation+clustering method is better than the SAX+segmentation method.
[0211] The method proposed in the embodiment of the application is compared with the SAX+segmentation method. For short sequences, as shown in Tables 13 and 15, when α = 3 and 5, the method proposed in the embodiment of the application can achieve the same values of the indicators of MSE, RMSE and MAE as the latter, but the compression ratio is smaller; and when α = 8, although the values of the three indicators are slightly larger than those of the latter, the compression ratio is much lower. For long sequences, as shown in Tables 16 and 18, the method proposed in the embodiment of the application and the latter have the same values of the indicators of MSE, RMSE and MAE, but the compression ratio is smaller. Therefore, the method proposed in the embodiment of the application can achieve the effect of having the same data restoration ability while having a lower compression ratio, and having a slightly worse data restoration ability while still having a very low compression ratio.
[0212] The method provided in the embodiment of the application is compared with the SAX+segmentation+clustering method. The compression ratio and the three index values obtained by the two methods are the same, whether the sequence is short or long. This is because the data has little change.
[0213] Based on the above, the method provided in the embodiment of the application combines the high data restoration capability of the SAX+segmentation method and the low compression ratio advantage of the SAX+segmentation+clustering method.
[0214] In summary, according to the high-frequency time series data compression method based on the improved symbolic aggregate approximation provided in the embodiment of the application, the characteristics of the time series itself can be well cut out by segmentation, and the time series segments with similar characteristics can be divided into a category by clustering, thereby realizing dimension reduction and compression of the time series data. The combination of segmentation, clustering and the SAX method can realize compression of the data again. The experiment shows that the method provided in the embodiment of the application can simultaneously achieve the level of low compression ratio and high data restoration capability, or one of the levels.
[0215] Secondly, the high-frequency time series data compression device based on the improved symbolic aggregate approximation provided in the embodiment of the application is described with reference to the accompanying drawings.
[0216] Figure 7 The high-frequency time series data compression device based on the improved symbolic aggregate approximation is an embodiment of the application.
[0217] As shown in Figure 7 The device 10 includes a division module 101, a clustering module 102, an equidistant segmentation module 103, a transformation module 104 and a cutting module 105.
[0218] The division module 101 is configured to divide the time series by using a Gaussian segmentation model based on an improved swarm optimization algorithm to obtain a plurality of segmentation points and a plurality of time series segments. The clustering module 102 is configured to cluster the plurality of time series segments by using a Gaussian mixture model based on improved peak density initialization to obtain a plurality of clustering centers, a sub-module variance and a clustering label. The equidistant segmentation module 103 is configured to perform equidistant segmentation on each clustering center again according to the proportion of the sub-module variance. The transformation module 104 is configured to convert each segment mean of each class center into a symbolic representation by using the SAX method, and the first character of each class is a capital letter. The cutting module 105 is configured to cut the same symbolic representation of the same class, retain the first capital letter, and finally obtain time series value compression data.
[0219] It should be noted that the foregoing explanation and description of the high-frequency time series data compression method based on the improved symbolic aggregate approximation also apply to the device of the embodiment, which will not be described here again.
[0220] According to the high-frequency time series data compression device based on the improved symbolic aggregate approximation method, the characteristics of the time series can be well cut out by segmentation, the time series segments with similar characteristics can be divided into a class by clustering, thereby realizing dimension reduction and compression of the time series data, and the segmentation and clustering can be combined with the SAX method to realize compression of the data again. Experiments show that the method provided in the embodiment of the application can simultaneously achieve a level of lower compression rate and higher data restoration capability, or achieve one of the levels.
[0221] The high-frequency time series data decompression device based on the improved symbolic aggregate approximation method is described according to the embodiment of the application with reference to the accompanying drawings.
[0222] Figure 8 is a structural schematic diagram of the high-frequency time series data decompression device based on the improved symbolic aggregate approximation method according to an embodiment of the application.
[0223] As shown in Figure 8 , the device 20 includes a scanning and identifying module 201, a determination segmentation point module 202, a restoration symbolization module 203, and an inverse transformation module 204.
[0224] The scanning and identifying module 201 is configured to scan the time series value compression data, identify the capital letters, and obtain the symbol representation of each cluster center. The determination segmentation point module 202 is configured to calculate the length of the sequence segment of each cluster center and determine the segmentation point. The restoration symbolization module 203 is configured to restore the symbolization representation of each sequence segment according to the segmentation point, and further obtain the symbol representation of the entire time series. The inverse transformation module 204 is configured to perform inverse transformation on each symbol by using the SAX method to obtain the time series.
[0225] It should be noted that the foregoing explanation and description of the high-frequency time series data decompression method based on the improved symbolic aggregate approximation method also apply to the device of the embodiment, which will not be described here again.
[0226] According to the high-frequency time series data decompression device based on the improved symbolic aggregate approximation method, the characteristics of the time series can be well cut out by segmentation, the time series segments with similar characteristics can be divided into a class by clustering, thereby realizing dimension reduction and compression of the time series data, and the segmentation and clustering can be combined with the SAX method to realize compression of the data again. Experiments show that the method provided in the embodiment of the application can simultaneously achieve a level of lower compression rate and higher data restoration capability, or achieve one of the levels.
[0227] In addition, the terms "first", "second", etc. are used only for the purpose of description, and should not be understood as indicating or implying relative importance or a specific number of the technical features indicated. Therefore, the features defined as "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise explicitly and specifically limited.
[0228] In the description of the present application, the description referring to the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Also, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples, without contradiction.
[0229] Although the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above-described embodiments within the scope of the present application.
Claims
1. A high-frequency time series data compression method based on improved symbol aggregation approximation, characterized in that: The following steps are involved: Step S101, using a Gaussian segmentation model based on an improved elephant herd optimization algorithm to divide the time series, to obtain multiple segmentation points and multiple time series segments; Step S102, clustering the multiple time series segments using a Gaussian mixture model based on improved peak density initialization to obtain multiple cluster centers, module variances, and cluster labels; Step S103, performing equidistant segmentation on each cluster center again according to the proportion of the sub-module variance; Step S104, using the SAX method to convert the mean of each segment of each cluster center into a symbolic representation, with the first character of each cluster being an uppercase letter; Step S105 , cutting the same symbol representations of the same category, retaining the first capital letter, and finally obtaining time series value compressed data.
2. The high-frequency time series data compression method based on improved symbol aggregation approximation according to claim 1 is characterized in that: The Gaussian segmentation model based on the improved elephant swarm optimization algorithm in step S101 is: By adding perturbations to the tribe update operator of the initial elephant group optimization algorithm, we get: Among them, x i,j represents the position of the jth elephant of tribe i, The elephant with the best fitness function value among all elephants is called the elder; represents the influence of the chief of tribe i on the individual elephant, and α represents the influence parameter; represents the influence of the optimal elder of the group on the individual elephants, 1-α represents the influence parameter; Levy(λ) represents the variation mechanism; round represents the rounding operation of the value in the brackets; Adjusting the tribe classification operator of the initial elephant group optimization algorithm yields: in, is the updated position of the elephant of tribe i, x min is the minimum value of the elephant's optional position, x max is the maximum value of the elephant's optional position, round is the rounding operation, T is the length of the time series, and rand is a random number.
3. The high-frequency time series data compression method based on improved symbol aggregation approximation according to claim 1, characterized in that: The step S101 specifically includes: Initialize the parameters and population based on the improved elephant herd optimization algorithm; The fitness values of all time series segments in the time series are calculated using a segmented Gaussian module, and iteration is started until a preset maximum number of iterations is reached, and the optimal position and fitness value are output. Otherwise, the fitness values of all time series segments are sorted, and a number of good time series segments are retained; Executing the tribe update operator based on the improved elephant herd optimization algorithm to update the positions of all time series segments and the position of the tribe leader until the positions of the time series segments in all tribes are updated; Executing the tribe separation operator based on the improved elephant herd optimization algorithm, updating the positions and fitness values of a plurality of poor time series segments, until the poor time series segments in all tribes are separated; Sort the fitness values of all time series segments to obtain several poor time series segments that need to be separated, update the positions of the retained time series segments to the time series segments that need to be separated, and calculate the fitness values to update the optimal elder position, that is, the optimal segmentation point among all time series segments.
4. The high-frequency time series data compression method based on improved symbol aggregation approximation according to claim 1, characterized in that: The step S102 specifically includes: Initialize the improved peak density clustering algorithm to obtain the mean of the time series Gaussian mixture model Initialization value of each sub-model coefficient Initialization value and variance of each sub-model Initialization value; Input a preset maximum number of iterations, a preset threshold, the plurality of segmentation points, and the plurality of time series segments; Iteratively execute the E steps of the EM algorithm to calculate the time series segment S k The probability of belonging to the mth sub-model Iterate the M steps of the EM algorithm to calculate the updated mean of each cluster Update variance Update coefficient Determine whether the difference between the two log-likelihood function values is less than the preset threshold, or whether the variance of the sub-model of the Gaussian mixture model is 0. If so, end the iteration and output the parameter mean corresponding to the optimal clustering variance coefficient and the probability Otherwise, it is determined whether it is less than the preset maximum number of iterations. If so, the iteration is continued; if not, the iteration is terminated and the parameter mean corresponding to the optimal cluster is output. variance coefficient and the probability 5. The high-frequency time series data compression method based on improved symbol aggregation approximation according to claim 4 is characterized in that: The specific process of initializing the improved peak density clustering algorithm is as follows: Adjust the local density formula based on all time series segments to calculate the local density; Calculate the local density ρ(S j ) of the time series segments, and calculate the local density ρ(S j )’s relative distances between time series segments; Normalizing the local density and the relative distance, and calculating the product of the local density and the relative distance as a clustering evaluation criterion for descending arrangement; Select the time series segments far from zero and use their mean as the mean of the time series Gaussian mixture model The initialization value of , and the number of sequences is used as the number of clusters; Calculate the coefficient of each sub-model according to the number of clusters The initial value of each sub-model variance Initialized to the identity matrix.
6. The high-frequency time series data compression method based on improved symbol aggregation approximation according to claim 4, characterized in that: The specific solution formula in the iterative execution of the EM algorithm is: in, is the probability of the mth sub-model, α m is the model coefficient, x t is the time series, S k is a time series segment, φ is the simplified log-likelihood function of each time series, θ m are model parameters, is the updated mean for each cluster, The updated variance for each cluster, μ m is the original mean of each cluster, is the update coefficient for each cluster.
7. The high-frequency time series data compression method based on improved symbol aggregation approximation according to claim 1, characterized in that: The step S103 is specifically as follows: When the number of segments w is preset, it is allocated according to the proportion of variance of each class to determine the number of segments for each class. The formula is: Among them, M is the number of clusters, c j is the variance of model j, v j is the number of splits of class j; The cluster centers of each class are equally divided according to the number of divisions.
8. A high-frequency time series data compression device based on improved symbol aggregation approximation, characterized in that: include: A partitioning module is used to partition the time series using a Gaussian segmentation model based on an improved elephant group optimization algorithm to obtain multiple segmentation points and multiple time series segments; A clustering module, configured to cluster the multiple time series segments using a Gaussian mixture model initialized based on improved peak density to obtain multiple cluster centers, sub-module variances, and cluster labels; An equidistant segmentation module, used to perform equidistant segmentation on each cluster center again according to the proportion of the variance of the sub-modules; The conversion module is used to convert the mean of each segment of each class center into a symbolic representation using the SAX method, with the first character of each class being an uppercase letter; The shearing module is used to shear the same symbol representation of the same category, retaining the first capital letter, and finally obtaining the compressed data of time series values.
9. A high-frequency time series data decompression method based on improved symbol aggregation approximation, characterized in that: The following steps are involved: Step S201, scanning the compressed data of time series values, identifying uppercase characters, and obtaining a symbolic representation of each cluster center; Step S202, calculating the length of the sequence segments of each cluster center and determining the segmentation point; Step S203, restoring the symbolic representation of each sequence segment according to the segmentation point, thereby obtaining the symbolic representation of the entire time series; Step S204: Perform inverse transformation on each symbol using the SAX method to obtain a time series.
10. A high-frequency time series data decompression device based on improved symbol aggregation approximation, characterized in that: include: The scanning and recognition module is used to scan the compressed data of time series values, recognize uppercase characters, and obtain the symbolic representation of each cluster center; A segmentation point determination module is used to calculate the sequence segment length of each cluster center and determine the segmentation point; A symbolic restoration module, configured to restore the symbolic representation of each sequence segment according to the segmentation points, thereby obtaining the symbolic representation of the entire time series; The inverse transformation module is used to perform inverse transformation on each symbol using the SAX method to obtain a time series.
Citation Information
Patent Citations
Method and system for compressing and reconstructing data of wireless sensor network based on symbolic aggregate approximation
CN105744562A
Power distribution and utilization data compression and fusion method and device
CN111930725A