A method for mining similarity information of time series data based on integrated model
By adopting an integrated model in time sequence data mining, combined with the hidden Marcov classifier and conditional variable division self -encoder, the problem of loss of time sequence data distribution of similar information in the existing technology has been solved. Data classification and learning effect.
Patent Information
- Application Number
- CN202111438131.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-29
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-11-29
AI Technical Summary
The existing time series data mining algorithms lose similarity information of data distribution, resulting in poor learning effects, a large gap between the real distribution and learning distribution, and lack of algorithms that effectively utilize time series distribution information.
An ensemble model-based method is used, combining the hidden Markov classifier and the conditional variational autoencoder based on Wasserstein distance to learn to mine the similarity information of time series data and integrate the discrete information and continuity information of time series data.
Effective classification time sequence data, improve learning effects and operating efficiency, can handle parallel processing, reduce the consumption of computing resources, and improve the robustness of the model.
Smart Images

Figure CN114139624B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data mining and machine learning, and in particular relates to a method for mining similarity information of time series data based on an integrated model. Background Art
[0002] In time series data mining, similarity information is critical information and one of the starting points of data mining. However, in the current mining of time series data, many algorithms have lost the similarity information of data distribution and only calculate similarity from the perspective of data. This similarity mining that relies solely on the data perspective is a kind of information loss. This loss will cause some features implicitly contained in the time series data to be lost, which will affect the learning effect and cause a large gap between the learned distribution and the true distribution. At present, there is a lack of algorithms that utilize time series distribution information. Distribution similarity is one of the key research issues in statistics, but in mining time series data information, mining distribution similarity has not been widely discussed. Summary of the invention
[0003] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a method for mining similarity information of time series data based on an integrated model. Based on the integrated model, a hidden Markov classifier for mining hidden information of time series data and a conditional variational autoencoder classifier based on Wasserstein distance for mining similar information of time series data distribution are integrated, and the integrated model is used to learn and mine time series data information to classify time series data. The present invention can not only effectively classify time series data, but also integrate the discrete information and continuous information of time series data, so that learning is more effective, parallelization is possible, and operation efficiency is higher.
[0004] In order to achieve the above object, the technical solution adopted by the present invention is:
[0005] A method for mining time series distribution similarity information integrated by a hidden Markov model and a conditional variational autoencoder based on Wasserstein distance comprises the following steps:
[0006] Step 1: Process the original time series data to obtain processed time series data. The original time series data refers to the unclassified time series data collected directly. The original time series data can be divided into one or more categories, which specifically includes the following steps:
[0007] Step 1.1: Classify the original time series data, use the Jaccard distance to measure the original time series, cluster the time series data with similar distances, and obtain the classified time series data;
[0008] Step 1.2: Use the minimum hash function to convert a certain time series data A in a certain category of the classified time series data obtained in step 1.1 into a signature vector sig(A);
[0009] Step 1.3: After obtaining sig(A) from step 1.2, divide sig(A) into different segments, each of which has a segment mark.
[0010] Step 1.4: Repeat steps 1.1 to 1.3 for all classified time series data in step 1.1, so as to obtain the segmentation marks of all classified time series data, determine the similarity of the classified time series data based on the same segmentation marks, delete the data with different segmentation marks, complete the data preprocessing, and obtain the processed time series data.
[0011] Step 2: Establish a basic classification layer, input the processed time series data into several weak classifiers in the basic classification layer for preliminary classification; the basic classification layer includes two models, namely, a hidden Markov weak classifier obtained by using a hidden Markov model and a conditional variational autoencoder weak classifier obtained by using a conditional variational autoencoder based on Wasserstein distance; the basic classification layer outputs a new data set with the same size as the input data, which specifically includes the following steps:
[0012] Step 2.1: Input the processed time series data obtained in step 1 into the hidden Markov classification model of the basic classification layer, use the forward-backward algorithm and the Baum-Welch algorithm to solve the parameters, and use the Viterbi algorithm for decoding to obtain a hidden Markov weak classifier. The specific steps for solving the parameters include the following:
[0013] Step 2.1.1: For a processed time series data O = {o1, o2, o3…, o T}Use the forward-backward algorithm to calculate the occurrence probability P(O|λ) of the processed time series data in the hidden Markov classifier λ=(A,B,π). T represents the value of the processed time series data from time 1 to time T, A represents the hidden state transition probability matrix, B represents the observed state generation probability matrix, the observed state refers to the processed time series data value, and π represents the initial probability distribution of the hidden state;
[0014] Step 2.1.2: For D processed time series data {(O1), (O2), ..., (O D )} The parameters A, B, π of the hidden Markov classifier λ are calculated using the Baum-Welch algorithm. i ), i=1,2,…D represents the i-th processed time series data;
[0015] Step 2.1.3: Use the Viterbi algorithm on the hidden Markov classifier λ = (A, B, Π) to calculate the processed time series O = {o1, o2, o3..., o T The most likely hidden state sequence in Represents the value o of the processed time series data O at time i i The hidden state of .
[0016] Step 2.2: Input the processed time series data obtained in step 1 into the conditional variational autoencoder of the basic classification layer, use the Sinkhorn approximation algorithm to calculate the Wasserstein distance of the time series data, and obtain the conditional variational autoencoder weak classifier. The construction of the conditional variational autoencoder weak classifier includes the following steps:
[0017] Step 2.2.1: Sample a certain type of data from the processed time series data to obtain a time series data sample O, and output the statistics μ, σ of the normal distribution through the neural network encoder 2 , where μ represents the mean of the normal distribution, σ 2 represents the variance of the normal distribution;
[0018] Step 2.2.2: Sample the standard normal distribution N(0,1) to obtain a sample ∈. For the output μ,σ of the neural network encoder in step 2.2.1 2 And sample ∈ to calculate formula 1 to get
[0019]
[0020] in, Subordinate to the normal distribution N(μ,σ 2 );
[0021] Step 2.2.3: Data with the same dimensions as the time series data after the neural network decoder output and processing
[0022] Step 2.2.4: Use Wasserstein distance to measure the processed time series data sample O and the neural network decoder output data The distance is taken as part of the optimization target error ε. Multiple iterations are performed to optimize the optimization target and obtain a trained neural network decoder. The calculation of Wasserstein distance includes the following steps:
[0023] Step 2.2.4.1: Introduce the entropy regularization term to the processed time series data sample O and the neural network decoder output data Perform dimensionality reduction and smoothing processing, and the entropy regularization function is: Among them, p(x) represents the distribution function of the processed time series data, p(x k ) indicates that the time series data after processing at time k is x k The probability of
[0024] Step 2.2.4.2: Use the Sinkhorn approximation algorithm to calculate the Wasserstein distance to simplify the calculation. Combined with the entropy regularization function in step 2.2.4.1, the calculation formula for the Wasserstein distance is Formula 2:
[0025]
[0026] in, Represents the processed time series data O and the neural network decoder output data The Wasserstein distance, It means that at time n, from Transfer to n The cost function of
[0027] Step 2.2.4.3: Integrate the Wasserstein distance into the optimization target error ε, and the expression of the optimization target is obtained as formula 3;
[0028]
[0029] in, Indicated by The reconstruction error of reconstruction O is calculated as shown in Formula 4.
[0030]
[0031] in, The result of reconstructing O is The probability of
[0032] Step 2.2.5: Input the processed time series data into the neural network encoder and the trained neural network decoder in step 2.2.4, and output the generated time series data that is nearly consistent with the distribution of the processed time series data.
[0033] Step 3: Establish an integrated fusion layer, use the output of the basic classification layer as the input of the integrated fusion layer, and train the secondary learner by fusing several weak classifiers in the basic classification layer for integrated learning to obtain the final integrated model, which specifically includes the following steps;
[0034] Step 3.1: Input the processed time series data into the two weak classifiers in the basic classification layer, and collect the output data as an integrated training data set. The number of data categories in the integrated training data set is consistent with the number of data categories in the processed time series data.
[0035] Step 3.2: Construct a secondary learner. Use the integrated training data set collected in step 3.1 as the training data of the secondary learner so that the secondary learner learns the output of the basic classification layer. The process of constructing the secondary learner includes the following steps:
[0036] Step 3.2.1: Use the support vector machine classifier as a secondary learner to build a support vector machine for classification between any two types of samples. Therefore, if the number of data categories in the integrated training data set is k, then it is necessary to build A support vector machine classifier;
[0037] Step 3.2.2: Input the integrated training dataset The support vector machine classifiers are trained. After the training, for samples of unknown categories, the classification categories of each support vector machine classifier are counted. The category with the most votes is the category of the unknown category sample, and the category is used as the output;
[0038] Step 3.3: Use the output of the secondary learner as the final output of the integrated fusion layer.
[0039] Step 4: Use the obtained integrated model to mine the similarity information of time series data.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] 1) The present invention can extract similarity features of time series data based on latent variables, integrate discrete information and continuous information of time series and use them for data mining, thus filling the gap in current time series data mining methods.
[0042] 2) The present invention introduces a conditional variational autoencoder based on Wasserstein distance, changes the KL divergence used for measurement in the original model to Wasserstein distance, and uses the Sinkhorn algorithm for approximate calculation, so that the latent variables can fit a wider range of data distribution and save computing resources.
[0043] 3) The present invention introduces integrated learning and uses the Stacking fusion model optimization algorithm to integrate the hidden Markov model for mining the hidden state information of the time series and the conditional variational autoencoder model based on the Wasserstein distance for digitizing the similarity information of the time series, thereby reducing redundancy and allowing the base learners to complement each other, thereby improving the accuracy of classification and operating efficiency.
[0044] 4) The present invention can be used for time series data anomaly detection and traffic flow data prediction. For time series data anomaly detection, the normal time series can be used as training data to input into the integrated model for learning, and then the data to be detected can be input into the model for classification to determine whether the data to be detected is abnormal data. This method can process in real time and can provide timely warnings. For traffic flow data prediction, the consistent traffic flow data is first marked and input into the integrated model for learning. After the learning is completed, the data to be detected is input to determine whether the traffic flow at this time is likely to be congested. This can improve the defect of other methods in predicting emergencies in a timely manner and increase the robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is the overall structure diagram of the present invention. DETAILED DESCRIPTION
[0046] The embodiments of the present invention are described in detail below with reference to the accompanying drawings and examples.
[0047] like Figure 1 As shown in the figure, a method for mining similarity information of time series data based on an integrated model is constructed to construct an input layer, a basic classification layer and an integrated fusion layer. After the original data is input into the input layer, sample data is obtained after data preprocessing. The basic classification layer includes two weak classifiers, namely a hidden Markov weak classifier and a conditional variational autoencoder weak classifier based on Wasserstein distance. The processed time series data is input into the two weak classifiers in parallel for learning and classification. After input into the hidden Markov weak classifier, n hidden Markov weak classifiers λ1, λ2, …, λ are trained and learned for each type of data. n , input the processed time series data into all classifiers to obtain n probabilities p1, p2, ..., p n , take the category label with the maximum value among all the results as the final classification result of the hidden Markov weak classifier. While using the hidden Markov weak classifier, input the processed time series data into the conditional variational autoencoder weak classifier based on Wasserstein distance for learning and training, sample x is sampled from the input, and x is passed through the neural network encoder to obtain the normal distribution N(μ,σ 2 ) sufficient statistics: mean μ and variance σ2 ; Then by N(μ,σ 2 ) is sampled to obtain z, which is output by the neural network decoder In this way, the trained neural network decoder is used to generate new samples with the same distribution from the known samples x. Finally, the outputs of the two weak classifiers are used as the input of the integrated fusion layer. This integrated algorithm can combine information from two directions during data mining, so that the model can mine more information and have stronger learning ability; at the same time, the base learners can be trained in parallel, and the operation efficiency is higher.
[0048] refer to Figure 1 Taking mining time series data as an example, the present invention includes the following steps:
[0049] Step 1: Preprocess the original time series data to obtain processed time series data. The original time series data refers to the unclassified time series data collected directly. The original time series data can be divided into one or more categories, which specifically includes the following steps:
[0050] Step 1.1: Classify the original time series data, use the Jaccard distance to measure the original time series, cluster the time series data with similar distances, and obtain the classified time series data;
[0051] Step 1.2: Use the minimum hash function to convert a certain time series data A in a certain category of the classified time series data obtained in step 1.1 into a signature vector sig(A);
[0052] Step 1.3: After obtaining sig(A) from step 1.2, divide sig(A) into different segments, each of which has a segment mark.
[0053] Step 1.4: Repeat steps 1.1 to 1.3 for all classified time series data in step 1.1, so as to obtain the segmentation marks of all classified time series data, determine the similarity of the classified time series data based on the same segmentation marks, delete the data with different segmentation marks, complete the data preprocessing, and obtain the processed time series data.
[0054] Step 2: Establish a basic classification layer, input the processed time series data into several weak classifiers in the basic classification layer for preliminary classification; the basic classification layer includes two models, namely, a hidden Markov weak classifier obtained by using a hidden Markov model and a conditional variational autoencoder weak classifier obtained by using a conditional variational autoencoder based on Wasserstein distance; the basic classification layer outputs a new data set with the same size as the input data, which specifically includes the following steps:
[0055] Step 2.1: Input the processed time series data obtained in step 1 into the hidden Markov classification model of the basic classification layer, use the forward-backward algorithm and the Baum-Welch algorithm to solve the parameters, and use the Viterbi algorithm for decoding to obtain a hidden Markov weak classifier. The specific steps for solving the parameters include the following:
[0056] Step 2.1.1: For a processed time series data O = {o1, o2, o3…, o T}Use the forward-backward algorithm to calculate the occurrence probability P(O|λ) of the processed time series data in the hidden Markov classifier λ=(A,B,π). T represents the value of the processed time series data from time 1 to time T, A represents the hidden state transition probability matrix, B represents the observed state generation probability matrix, the observed state refers to the processed time series data value, and π represents the initial probability distribution of the hidden state;
[0057] Step 2.1.2: For D processed time series data {(O1), (O2), ..., (O D )} The parameters A, B, π of the hidden Markov classifier λ are calculated using the Baum-Welch algorithm. i ), i=1,2,…D represents the i-th processed time series data;
[0058] Step 2.1.3: Use the Viterbi algorithm on the hidden Markov classifier λ = (A, B, Π) to calculate the processed time series O = {o1, o2, o3..., o T The most likely hidden state sequence in Represents the value o of the processed time series data O at time i i The hidden state of .
[0059] Step 2.2: Input the processed time series data obtained in step 1 into the conditional variational autoencoder of the basic classification layer, use the Sinkhorn approximation algorithm to calculate the Wasserstein distance of the time series data, and obtain the conditional variational autoencoder weak classifier. The construction of the conditional variational autoencoder weak classifier includes the following steps:
[0060] Step 2.2.1: Sample a certain type of data from the processed time series data to obtain a time series data sample O, and output the statistics μ, σ of the normal distribution through the neural network encoder 2 , where μ represents the mean of the normal distribution, σ 2 represents the variance of the normal distribution;
[0061] Step 2.2.2: Sample the standard normal distribution N(0,1) to obtain a sample ∈. For the output μ,σ of the neural network encoder in step 2.2.1 2 And sample ∈ to calculate formula 1 to get
[0062]
[0063] in, Subordinate to the normal distribution N(μ,σ 2 );
[0064] Step 2.2.3: Data with the same dimensions as the time series data after the neural network decoder output and processing
[0065] Step 2.2.4: Use Wasserstein distance to measure the processed time series data sample O and the neural network decoder output data The distance is taken as part of the optimization target error ε. Multiple iterations are performed to optimize the optimization target and obtain a trained neural network decoder. The calculation of Wasserstein distance includes the following steps:
[0066] Step 2.2.4.1: Introduce the entropy regularization term to the processed time series data sample O and the neural network decoder output data Perform dimensionality reduction and smoothing processing, and the entropy regularization function is: Among them, p(x) represents the distribution function of the processed time series data, p(x k ) indicates that the time series data after processing at time k is x k The probability of
[0067] Step 2.2.4.2: Use the Sinkhorn approximation algorithm to calculate the Wasserstein distance to simplify the calculation. Combined with the entropy regularization function in step 2.2.4.1, the calculation formula for the Wasserstein distance is Formula 2:
[0068]
[0069] in, Represents the processed time series data O and the neural network decoder output data The Wasserstein distance, It means that at time n, from Transfer to n The cost function of
[0070] Step 2.2.4.3: Integrate the Wasserstein distance into the optimization target error ε, and the expression of the optimization target is obtained as formula 3;
[0071]
[0072] in, Indicated by The reconstruction error of reconstruction O is calculated as shown in Formula 4.
[0073]
[0074] in, The result of reconstructing O is The probability of
[0075] Step 2.2.5: Input the processed time series data into the neural network encoder and the trained neural network decoder in step 2.2.4, and output the generated time series data that is nearly consistent with the distribution of the processed time series data.
[0076] Step 3: Establish an integrated fusion layer, use the output of the basic classification layer as the input of the integrated fusion layer, and train the secondary learner by fusing several weak classifiers in the basic classification layer for integrated learning to obtain the final integrated model, which specifically includes the following steps;
[0077] Step 3.1: Input the processed time series data into the two weak classifiers in the basic classification layer, and collect the output data as an integrated training data set. The number of data categories in the integrated training data set is consistent with the number of data categories in the processed time series data.
[0078] Step 3.2: Construct a secondary learner. Use the integrated training data set collected in step 3.1 as the training data of the secondary learner so that the secondary learner learns the output of the basic classification layer. The process of constructing the secondary learner includes the following steps:
[0079] Step 3.2.1: Use the support vector machine classifier as a secondary learner to build a support vector machine for classification between any two types of samples. Therefore, if the number of data categories in the integrated training data set is k, then it is necessary to build A support vector machine classifier;
[0080] Step 3.2.2: Input the integrated training dataset The support vector machine classifiers are trained. After the training, for samples of unknown categories, the classification categories of each support vector machine classifier are counted. The category with the most votes is the category of the unknown category sample, and the category is used as the output;
[0081] Step 3.3: Use the output of the secondary learner as the final output of the integrated fusion layer.
[0082] Step 4: Use the obtained integrated model to mine the similarity information of time series data.
[0083] The following is a specific application case of the present invention in website identification: Using the time series data of five website traffic as experimental data, the network identification is performed by mining the similarity of the time series data through an integrated model to confirm the category to which the time series data of website traffic of unknown categories belongs.
[0084] In this example, the original time series data is a time series with a length of 2525 and a width of 1024. The length represents the number of acquisition moments contained in the time series data of this example, and the width represents the website traffic corresponding to each acquisition moment. The original time series data contains the traffic time series data of 5 websites. First, the original time series data is preprocessed. In this example, the local sensitive hashing algorithm is selected to delete part of the data. Therefore, on the basis of the minimum hash processing data, each signature vector is divided into six segments, and the data with the highest similarity as much as possible is retained, and the data with lower similarity is deleted to reduce the interference of noise. Subsequently, 200 of the time series data of each type of website are selected as the original time series data to obtain the processed time series data. Next, the processed time series data is input into the step 2 of the present invention according to the category to construct the basic classification layer. Next, the processed time series data is input into the hidden Markov weak classifier of step 2.1 of the present invention for hidden information mining. In this example, the input size is 1024*1. At the same time, the processed time series data is input in parallel into the conditional variational autoencoder weak classifier based on Wasserstein distance in step 2.2 of the present invention to learn the distribution of the input time series data. In this example, the size of the input data is 1024*1. It is worth noting that, as described in step 2.2.1, it is necessary to ensure that the sample distribution is uniform during sampling, so the number of processed time series data collected for each category is the same. Then the sampled time series data is learned according to steps 2.2.2 to 2.2.5 of the present invention. After the learning is completed, the output of the basic classification layer is used as the input of the integrated fusion layer, and the input is learned according to step 3 of the present invention. After waiting for the integrated fusion layer to complete the learning, the integrated fusion layer can be used for website identification. The traffic time series data of the unknown website is input into the integrated fusion layer, and the output classification obtained is the category of the unknown website.
[0085] The present invention can also be used in other industrial scenarios, such as traffic flow prediction. It should be noted that traffic flow prediction is a regression problem rather than a classification problem, so the output of the integrated model needs to be slightly modified, relying on the conditional variational autoencoder based on the Wasserstein distance to learn the distribution of traffic flow data and output the predicted traffic flow at a certain moment. The specific steps are: first, the original time series data is the traffic flow time series data of a certain place, the length of the original time series data represents the number of moments contained in the time series, and the width represents the traffic flow at a certain moment. Secondly, the original time series data is preprocessed to obtain the processed time series data. Next, the processed time series data is input into the basic classification layer for category information mining to obtain output data. Next, the moment output by the basic classification layer is used as the input of the secondary learner in the integrated fusion layer to learn the traffic flow output by the basic classification layer, the output of the secondary learner is the traffic flow, and the output of the secondary learner is used as the output of the integrated fusion layer. Finally, the moment to be predicted is input into the integrated fusion layer, and the output obtained is the predicted traffic flow. In this way, prediction is performed by mining the similarity information of the traffic flow time series data.
[0086] At the same time, the present invention can also be used for time series data of other dimensions, such as identifying the source of speech. The speech time series data includes three dimensions: pronunciation time, pronunciation duration, and pronunciation interval, which has one more dimension than the website traffic time series data and traffic flow time series data in the above case. The speech time series data can be directly input into the basic classification layer for classification learning, and then the output of the basic classification layer is used as the input of the integrated fusion layer for classification learning. Finally, the speech time series data of unknown categories is used as the input of the integrated fusion layer, and the output category is the category of the speech time series data of unknown categories. In this way, the similarity of speech time series data from the same source can be used to identify the source of speech.
Claims
1. A method for mining similarity information of time series data based on an integrated model for traffic flow prediction, characterized in that: The steps include: Step 1: Collect original time series data, process the original time series data, and divide it into one or more categories. The original time series data is the traffic flow time series data of a certain place. The length of the original time series data represents the number of moments included in the time series, and the width represents the traffic flow at a certain moment. Step 2: Establish a basic classification layer, input the processed time series data into several weak classifiers in the basic classification layer for preliminary classification; the basic classification layer includes two models, namely, a hidden Markov weak classifier obtained by using a hidden Markov model and a conditional variational autoencoder weak classifier obtained by using a conditional variational autoencoder based on Wasserstein distance; the basic classification layer outputs a new data set with the same size as the input data; The establishment of the basic classification layer specifically includes the following steps: Step 2.1: Input the processed time series data into the hidden Markov classification model of the basic classification layer, use the forward-backward algorithm and the Baum-Welch algorithm to solve the parameters, and use the Viterbi algorithm for decoding to obtain the hidden Markov weak classifier; The construction of the hidden Markov weak classifier specifically includes the following steps: Step 2.1.1: For a processed time series data O = {o1, o2, o3…, o T }Use the forward-backward algorithm to calculate the occurrence probability P(O|λ) of the processed time series data in the hidden Markov classifier λ=(A,B,π); where o1, o2, o3…, o T represents the value of the processed time series data from time 1 to time T, A represents the hidden state transition probability matrix, B represents the observed state generation probability matrix, the observed state refers to the processed time series data value, and π represents the initial probability distribution of the hidden state; Step 2.1.2: For D processed time series data {(O1), (O2), ..., (O D )} The parameters A, B, π of the hidden Markov classifier λ are calculated using the Baum-Welch algorithm; where (O i ), i=1,2,…D represents the i-th processed time series data; Step 2.1.3: Use the Viterbi algorithm on the hidden Markov classifier λ = (A, B, Π) to calculate the processed time series O = {o1, o2, o3..., o T The most likely hidden state sequence in i=1,2,3,…,T represents the value o of the processed time series data O at time i i The hidden state Step 2.2: Input the processed time series data into the conditional variational autoencoder of the basic classification layer, use the Sinkhorn approximation algorithm to calculate the Wasserstein distance of the time series data, and obtain the conditional variational autoencoder weak classifier; Among them, constructing the conditional variational autoencoder weak classifier specifically includes the following steps: Step 2.2.1: Sample a certain type of data from the processed time series data to obtain a time series data sample O, and output the statistics μ, σ of the normal distribution through the neural network encoder 2 , where μ represents the mean of the normal distribution, σ 2 represents the variance of the normal distribution; Step 2.2.2: Sample the standard normal distribution N(0,1) to obtain a sample ∈, and perform the neural network encoder output μ, σ in step 2.2.
1. 2 And sample ∈ to calculate formula 1 to get in, Subordinate to the normal distribution N(μ,σ 2 ); Step 2.2.3: After being output and processed by the neural network decoder, data with the same dimension as the time series data is obtained Step 2.2.4: Use Wasserstein distance to measure the processed time series data sample O and the neural network decoder output data The distance is taken as part of the optimization target error ε, and the optimization target is optimized through multiple iterations to obtain a trained neural network decoder; Calculating the Wasserstein distance specifically includes the following steps: Step 2.2.4.1: Introduce the entropy regularization term to the processed time series data sample O and the neural network decoder output data Perform dimensionality reduction and smoothing processing, and the entropy regularization function is: Among them, p(x) represents the distribution function of the processed time series data, p(x k ) indicates that the time series data after processing at time k is x k The probability of Step 2.2.4.2: Use the Sinkhorn approximation algorithm to calculate the Wasserstein distance to simplify the calculation. Combined with the entropy regularization function in step 2.2.4.1, the calculation formula for the Wasserstein distance is Formula 2: in, Represents the processed time series data O and the neural network decoder output data The Wasserstein distance, It means that at time n, from Transfer to n The cost function of Step 2.2.4.3: Integrate the Wasserstein distance into the optimization target error ε, and the expression of the optimization target is obtained as formula 3; in, Indicated by The reconstruction error of reconstruction O is calculated as formula 4; in, The result of reconstructing O is The probability of Step 2.2.5: Input the processed time series data into the neural network encoder and the trained neural network decoder in step 2.2.4, and output the generated time series data that is nearly consistent with the distribution of the processed time series data; Step 3: Establish an integrated fusion layer, use the output time of the basic classification layer as the input of the secondary learner in the integrated fusion layer to learn the traffic flow output by the basic classification layer, and train the secondary learner by integrating several weak classifiers in the basic classification layer to obtain the final integrated model; wherein, constructing the integrated fusion layer includes the following steps: Step 3.1: Input the processed time series data into the two weak classifiers in the basic classification layer, and collect the output data as the integrated training data set. The number of data categories in the integrated training data set is consistent with the number of data categories in the processed time series data. Step 3.2: Construct a secondary learner, use the collected integrated training data set as the training data of the secondary learner, and make the secondary learner learn the output of the basic classification layer; Step 3.3: Use the output of the secondary learner as the final output of the integrated fusion layer. The output of the secondary learner is the traffic flow. Step 4: Use the obtained integrated model to mine the similarity information of time series data, input the time to be predicted into the integrated fusion layer, and the output is the predicted traffic flow.
2. The method for mining similarity information of time series data based on an integrated model according to claim 1, characterized in that: The step 1 specifically comprises the following steps: Step 1.1: Classify the original time series data, use the Jaccard distance to measure the original time series, cluster the time series data with similar distances, and obtain the classified time series data; Step 1.2: Use the minimum hash function to convert a certain time series data A in a certain category of the classified time series data into a signature vector sig(A); Step 1.3: Divide sig(A) into different segments, each of which has a segment mark; Step 1.4: Repeat steps 1.2 to 1.4 for all classified time series data to obtain the rank tags of all classified time series data. Determine the similarity of the classified time series data based on the same rank tags, delete the data with different rank tags, and complete the data processing.
3. The method for mining similarity information of time series data based on an integrated model according to claim 1, characterized in that: The step 3.2 of constructing a secondary learner comprises the following steps: Step 3.2.1: Use the support vector machine classifier as the secondary learner to build a support vector machine for classification between any two types of samples. The number of data categories in the integrated training data set is k, so you need to build A support vector machine classifier; Step 3.2.2: Input the integrated training dataset A support vector machine classifier is trained. After the training, for samples of unknown categories, the classification categories of each support vector machine classifier are counted, and the category with the most votes is the category of the unknown category sample, and the category is used as the output.
Citation Information
Patent Citations
Multi-dimensional time series abnormity detection method and system
CN112163020A
Anomaly detection apparatus, method, and program
US20210256312A1