A time series data enhancement method for industrial time series imbalanced data

Through dynamic time warping and weighted average technology, new industrial time series data samples are generated, which solves the problems of data enhancement methods in the existing technology that destroy the original features and poor model generalization ability, and improves the prediction effect of industrial time series data.

CN116028815BActive Publication Date: 2024-08-23JIANGSU UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310011120.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-05
Publication Date
2024-08-23
Estimated Expiration
2043-01-05

AI Technical Summary

Technical Problem

When existing technologies process industrial time series data, data enhancement methods easily destroy original features, and methods based on statistical models are complex and unsuitable for industrial time series data, resulting in model overfitting and poor generalization capabilities.

Method used

By dividing the unbalanced time series data into near-majority class and near-minority class data sets, dynamic time warping (DTW) is used to calculate the distance matrix, generate new samples, and amplify the data through weighted average and random differences to form a balanced data set.

Benefits of technology

It effectively reduces the impact of data enhancement on sample class boundaries, improves the generalization ability of the model, improves the prediction effect of industrial time series data, and is suitable for time series data sets in other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116028815B
    Figure CN116028815B
Patent Text Reader

Abstract

The invention discloses a time series data enhancement method for industrial unbalanced data. By averaging the Euclidean distance, the minority class data is divided into a near majority class data set n-maj and a near minority class data set n-min, and data enhancement is performed respectively; DTW alignment calculation is used, and then the DTW distance matrix between the data sets to be enhanced is established to find K nearest neighbor sequences of the sequence to be enhanced; the sequence to be enhanced is aligned with the DTW of the K nearest neighbor sequences to obtain a temporary alignment sequence, and a weighted average is performed based on the DTW distance and the temporary alignment sequence to generate a diversity sample, and for the near minority class data set, random noise is added, the sample space is expanded, and the sample features that meet the distribution of the original data set are enriched. Since the imbalance of the original data class is improved, the evaluation index on the industrial time series imbalance data can be improved by combining machine learning and deep learning models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the industrial field and a machine learning method, and in particular to a time series data enhancement method for industrial time series imbalance data using a machine learning method. Background Art

[0002] In the industrial field, it is usually difficult to obtain a large amount of interpretable abnormal data due to the rarity, confidentiality, incompleteness and poor interpretability of abnormal time series samples. Therefore, how to detect anomalies in industrial time series data based on a small number of abnormal time series samples is a hot topic for experts in related fields. The mainstream method to solve the problem of imbalanced time series data is to use existing data sets for data enhancement to enrich the number of samples and features of the original data. The existing typical solutions mainly include time domain and frequency domain transformation, decomposition-based, machine learning-based and memory model modeling methods.

[0003] Methods based on the time domain, frequency domain, and a mixture of the two mainly slice, scale, add noise, and perform other operations on abnormal data in the time domain or frequency domain to generate new abnormal data; in addition to basic methods, there are also advanced statistical model methods. For example, patent CN202011564567.3 discloses describing the time series distribution by fitting the dependence of the value of time t on the value of the previous time step, and then generating new time series samples through basic disturbances. In addition, there are methods based on interpolation and extrapolation; patent CN202110670088.8 discloses using the Euclidean distance between samples and using SMOTE to generate samples based on the Euclidean distance between samples. However, the above methods are not completely suitable for time series data in the industrial field, and there are the following problems:

[0004] (1) Simple and direct synthetic data can easily confuse sample boundaries, which may make it difficult for the model to learn data near the sample boundaries;

[0005] (2) Since most industrial time series data are discrete time series data, the duration of anomalies is short, and the overall time step of such data is short, basic methods such as slicing and window perturbation are likely to destroy the original characteristics of time series data;

[0006] (3) Most statistical model-based methods have complex and numerous parameters and require a large amount of raw data for training. In addition, industrial time series abnormal data are highly random, so this type of method is not suitable for industrial time series data sets. Summary of the invention

[0007] Purpose of the invention: The present invention aims to provide a time series data enhancement method that solves the problems of model overfitting and poor generalization ability and improves the prediction effect of various classifiers on industrial unbalanced time series data.

[0008] Technical solution: The time series data enhancement method for industrial unbalanced data described in the present invention comprises the following steps:

[0009] S1. Divide the unbalanced time series dataset into a minority class dataset M = {m1, m2, ..., m m}, where m i represents the ith subsequence; the majority class data set N = {n1, n2, ..., n n}, where n j represents the jth subsequence; sets the neighbor sample number parameter K; determines the total number of samples num that need to be generated;

[0010] S2, according to the size of the average Euclidean distance D1, D2, divide M into the near majority class data set N-Maj, the number of samples is n_maj; the near minority data set N-Min, the number of samples is n-min;

[0011] S3, calculate the DTW distances between the subsequences of N-Maj and form a DTW distance matrix E3; calculate the DTW distances between the subsequences of N-Min and form a DTW distance matrix E4; determine the number of sequences that need to be generated for N-Maj as num1, and determine the number of sequences that need to be generated for N-Min as num2;

[0012] S4, randomly select a subsequence a in N-Maj p , through the corresponding element position of E3, filter a p The K nearest neighbor subsequences of the p1 , a p2 , ..., a pK};

[0013] S4.1, through a p and P = {a p1 , a p2 , ..., a pK}, and obtain the temporary alignment sequence set C p ={a p-avg1 , a p-avg2 , ..., a p-avgK};

[0014] S4.2. According to subsequence a p and its neighbor sequence set C p , determine the distance weight set W;

[0015] S4.3: According to the distance weight set W, the temporary alignment sequence set C p Calculate the weighted average to form a new average sequence a p-avg ;

[0016] S4.4. The new average sequence a p-avg Add it to N-Maj, perform DTW calculation with each subsequence in N-Maj, and update the DTW distance matrix E3;

[0017] S4.5, repeat steps S4 to S4.4 until num1 new data are generated;

[0018] S5. Randomly select the qth subsequence b in N-Min q , filter b by the corresponding element position of E4 q The K nearest neighbor subsequences of q1 , b q2 , ..., b qK};

[0019] S5.1, through b q and Q = {b q1 , b q2 , ..., b qK}, and obtain the temporary alignment sequence set C q = {b q-avg1 , b q-avg2 , ..., b q-avgK};

[0020] S5.2. According to subsequence b q and its neighbor sequence set C q , determine the distance weight set W;

[0021] S5.3. According to the distance weight set W, a weighted average is calculated for the temporary alignment sequence set to form an average sequence b q-avg ;

[0022] S5.4, in b q-avg Add sample random differences rand_diff at each time step to form a new sequence b q-new ;

[0023] S5.5, the newly generated sequence b q-new Add it to N-Min, perform DTW calculation with each subsequence in N-Min, and update the DTW distance matrix E4 and N-Min at the same time;

[0024] S5.6, repeat steps S5 to S5.5 until num2 new data are generated;

[0025] S6. Merge N-Min and N-Maj to form a new minority class dataset M′. Merge the new dataset M′ with N to form a balanced dataset.

[0026] Furthermore, in step S2, D1 represents subsequence m i The average Euclidean distance to the K nearest neighbor subsequences in the minority class dataset M; D2 represents the subsequence m i With the majority class dataset N = {n1, n2, ..., n n The average Euclidean distance of the K nearest neighbor sequences in};

[0027] When D1>D2, the subsequence mi is stored in the near majority class dataset N-Mai;

[0028] When D1≤D2, the subsequence mi is stored in the nearest minority data set N-Min.

[0029] Furthermore, in steps S4 and S5, the element positions corresponding to E3 and E4 are used to select a p The K nearest neighbor subsequences of the p1 , a p2 , ..., a pK} and b q The K nearest neighbor subsequences of q1 , b q2 , ..., b qK}.

[0030] Furthermore, in step S4.2, for subsequence a p Perform DTW regular alignment with the subsequences in the neighbor sequence set P, and obtain the subsequence a according to the optimal matching path obtained during the DTW calculation process. p The temporary alignment sequence set C that is optimally aligned with the neighbor sequence set P p ={a p-avg1 , a p-avg2 , ..., a p-avgK}; Through sequence b q The DTW optimal alignment with the neighbor sequence set Q is obtained to obtain the temporary alignment sequence set C q = {b q-avg1 , b q-avg2 , ..., b q-avgK}.

[0031] Further, in steps S4.3 and S5.3, according to subsequence a p With C p The corresponding DTW distance in E3 determines the weight set; the initial weight of the weight set W is ω0, the number of weights is K+1, and the sum is 1. The weight set W is:

[0032] W=[ω0,ω1,ω2,...,ω K ]

[0033]

[0034]

[0035] Among them, ω j represents the jth weight in the weight set, 1≤j≤K; e j represents the DTW distance between a subsequence and its jth neighbor sequence; f j represents a coefficient inversely proportional to the distance, and ρ is a configuration parameter.

[0036] Similarly, in S5.2, according to subsequence b q With the neighbor sequence set C q The DTW distance corresponding to the subsequence in E4 determines the weight set.

[0037] Further, in step S5.4, for the new sequence b generated by N-Min q-avg , add a random difference rand_diff to its value at each time step; the random difference of each new sequence is determined by the subsequence b in step S5 q and the neighbor sequence set Q = {b q1 , b q2 , ..., b qK}decided, that is, b q-avg The random difference that needs to be added to the value at each time step is determined by b q =(x q,1 , x q,2 , ..., x q,1 ) and the neighbor sequence set Q = {b q1 , b q2 , ..., b qK The average difference of all subsequences in} at the same time step is obtained to form rand_diff(r) of length t:

[0038]

[0039] Among them, b qi The neighbor sequence set Q = {b q1 , b q2 , ..., b qK}. b qi (r) and b q (r) is b qi and b q The value at different time steps, 1≤r≤t.

[0040] In bq-avg At all time steps, add random differences to get b q-new :

[0041] b q-new (r) = b q-avg (r)+rand_diff(r).

[0042] Beneficial effect: Compared with the prior art, the present invention has the following significant advantages: 1. The present invention divides minority class data into near majority class data set N-Maj and near minority class data set N-Min by averaging Euclidean distance, and performs data enhancement respectively, thereby effectively reducing the impact of data enhancement on sample class boundaries; 2. The present invention establishes a DTW distance matrix between the data sets to be enhanced through DTW alignment calculation to find K nearest neighbor sequences of the sequence to be enhanced, aligns the sequence to be enhanced with the DTW of the K nearest neighbor sequences, obtains a temporary alignment sequence, and generates diversity samples by weighted averaging based on DTW distance weights and temporary alignment sequences, and adds random differences to the near minority class data set, expands the sample space, improves the imbalance of the original data class, and improves the generalization ability of the model; 3. The present invention improves the prediction effect of various classifiers on industrial unbalanced time series data; 4. The present invention can also be used for time series data sets in other fields, and can effectively solve the problem of model learning difficulties when sample data is insufficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a flow chart of the present invention;

[0044] Figure 2 It is the overall classification framework when the present invention is combined with the machine learning model;

[0045] (a) and (b) in Figure 3 are the effects of time series current data after being enhanced by NDWA data. DETAILED DESCRIPTION

[0046] The present invention will be further described below in conjunction with the accompanying drawings.

[0047] like Figure 1As shown, a time series data enhancement method for industrial unbalanced data, namely a time series data enhancement method based on dynamic time warping NDWA (Nearest DTW Weighted Average), includes the following steps: based on the input industrial abnormal time series data, firstly, the minority class data M is divided into the near majority class data set N-Maj and the near minority class data set N-Min by the average Euclidean distance. For the two types of data sets, temporary DTW aligned samples are generated respectively, and then new abnormal samples are obtained by distance weight distribution at the same time. Then, for the N-Min data, the data diversity is improved by adding different random sample differences, and the newly synthesized time series data is added to the original data set to participate in the data enhancement process, so that the data volume of abnormal data and normal data reaches data balance, which solves the problems of model overfitting and poor generalization ability, and effectively improves the prediction effect of various classifiers on industrial unbalanced time series data.

[0048] The specific process is as follows:

[0049] Step S1: Divide the unbalanced time series dataset into a minority class dataset M and a majority class dataset N, where the minority class dataset M = {m1, m2, ..., m m}, the number is m, and the length of the subsequence is t. The majority class data set N = {n1, n2, ..., n n}, the number is n, and the amount of data to be expanded is num. Set the number of neighbors K to 3 and the baseline weight parameter ω0 to 0.5.

[0050] Step S2: From the first subsequence m1 of M = (x 1,1 , x 1,2 , ..., x 1,t ), calculate the Euclidean distance between each subsequence in the minority class dataset M and other subsequences, and store them as the Euclidean distance matrix E1. At the same time, calculate the Euclidean distance between each sequence in the minority class dataset M and each subsequence in the majority class dataset N, and store them as the Euclidean matrix E2. E1 and E2 are as follows:

[0051]

[0052]

[0053] Traverse the minority class data set M, calculate the three closest Euclidean distances between each subsequence and the subsequence of the minority class data set, accumulate and average, and get the average Euclidean distance D1; similarly, calculate the three closest Euclidean distances between each subsequence and the subsequence of the majority class data set, accumulate and average, and get the average Euclidean distance D2.

[0054] If D1>D2, store the data as the majority class dataset N-Maj;

[0055] If D1≤D2, store the data as the near minority class dataset N-Min.

[0056] Until every subsequence in the minority class dataset M is classified, the majority class dataset N-Maj = {a1, a2, ..., a n-maj} and the minority class dataset N-Min={b1,b2,...,b n-min}.

[0057] Step S3: For N-Maj and N-Min, where the number of N-Maj is n_maj and the number of N-Min is n_min, starting from the first subsequence of each, calculate the DTW distance between each subsequence and other sequences in the respective data sets, and form a distance matrix.

[0058] The DTW distance matrix E3 of N-Maj is as follows:

[0059]

[0060] The DTW distance matrix E4 of N-Min is as follows:

[0061]

[0062] Calculate the number of sequences that need to be generated in N-Maj as num1, rounded down:

[0063]

[0064] Calculate the number of sequences that need to be generated in the N-Min dataset as num2:

[0065] num2=num-num1

[0066] Step S4: Screen the neighbor sequence set and randomly select subsequence a p , and determine a p The smallest element other than 0 in the corresponding position in E3, and then determine the corresponding element position of N-Maj according to the smallest DTW distance p The neighbor sequence set P = {a p1 , a p2 , a p3}.

[0067] Step S4.1: DTW regularization and alignment to obtain subsequence a p and the neighbor sequence set P = {a p1 , a p2 , a p3 Temporary alignment sequence set C p ={ap-avg1 , a p-avg2 , a p-avg3}. Take subsequence a p For example, a p =(x p,1 , x p,2 , ..., x p,t ) and the neighbor sequence Perform DTW alignment. Because DTW alignment may produce one-to-one, one-to-many, or many-to-one mapping relationships, C p The elements in will have different numbers of alignment values ​​at different time steps, where the temporary alignment data C p Middle p-avg1 The shape is:

[0068]

[0069] Step S4.2: According to subsequence a p and its neighbor sequence set P = {a p1 , a p2 , a p3}, determine the DTW distance about a p The distance weight set W; the initial weight ω0 of the weight set is 0.5, and the number of weights is 4.

[0070] About a p The weight set W is:

[0071] W = [0.5, ω1, ω2, ω3]

[0072]

[0073]

[0074] Among them, ω j represents the jth weight in the weight set except ω0, 1≤j≤3; e j Indicates a p The DTW distance between itself and the jth neighbor sequence; f j Represents a coefficient that is inversely proportional to the distance.

[0075] Step S4.3: Follow the steps about a p The distance weight set W for a p =(x p,1 , x p,2 , ..., x p,t ) and C p Calculate the weighted average to form the average sequence set a p-avg ; First calculate the temporary alignment dataset C p The average sequence set

[0076] Specifically, C p-avg The average sequence in the sequence set is:

[0077]

[0078] In the above sequence, the denominator of each element is the number of elements at each time step in the temporal alignment sequence.

[0079] Secondly, weighted summation is performed according to the distance weight to obtain the newly generated time series a p-avg :

[0080]

[0081] in, The average series The first element in The average series The tth element in The average series The first element in The average series The tth element in .

[0082] Step S4.4: Sequence a p-avg It is added to the majority class dataset N-Maj, and DTW calculation is performed with each subsequence in N-Maj, while E3 is updated; this further improves the selection range of the nearest neighbors, which not only increases the diversity of the original samples, but also expands the exploration space of the samples, thereby improving the detection effect of the model.

[0083] Step S4.5: Repeat steps S4 to S4.4 until num1 pieces of data are generated.

[0084] Step S5: Screen the neighbor sequence set and randomly select N-Min subsequence b q , and determine b based on the DTW distance in E4 q The neighbor sequence set Q = {b q1 , b q2 , b q3}.

[0085] Step S5.1: DTW regularization and alignment to obtain subsequence b q and the neighbor sequence set Q = {b q1 , b q2 , b q3 Temporary alignment sequence set C q = {b q-avg1 , b q-avg2 , b q-avg3}. Take subsequence bq For example, b q =(x q,1 , x q,2 , ..., x q,t )and Perform DTW regular alignment and temporarily align data C q Medium q-avg1 The shape is:

[0086]

[0087] Step S5.2: According to subsequence b q Its neighbor sequence set Q = {b q1 , b q2 , b q3}, determine the DTW distance about b q Weight set W; the initial weight ω0 of the weight set is 0.5, and the number of weights is 4.

[0088] About b q The weight set W is:

[0089] W = [0.5, ω1, ω2, ω3]

[0090]

[0091]

[0092] Among them, ω j represents the jth weight in the weight set except ω0, 1≤j≤3; e j Indicates b q The DTW distance between itself and the jth neighbor sequence; f j Represents a coefficient that is inversely proportional to the distance.

[0093] Step S5.3: Follow the instructions about b q The distance weight set W for b q =(x q,1 , x q,2 , ..., x q,t ) and C q Calculate the weighted average to form the average sequence set b q-avg ; Similarly, according to the distance weight set W q First, calculate the temporary alignment dataset C q The average sequence set

[0094] Specifically, the average sequence in the sequence set is:

[0095]

[0096] In the above sequence, the denominator of each element is the number of elements at each time step in the temporal alignment sequence.

[0097] Secondly, weighted summation is performed according to the distance weight to obtain the newly generated time series b q-avg :

[0098]

[0099] in, The average series The first element in The average series The tth element in The average series The first element in The average series The tth element in .

[0100] Step S5.4: For the average sequence b q-avg , for b q-avg Add random differences of samples rand_diff at each time step to form a sequence b q-new ; where rand_diff of each new sequence is composed of subsequence b in step S5 q With b q The neighbor sequence set Q = {b q1 , b q2 , ..., b qK}determine, specifically, b q-avg The random difference that needs to be added to the value at each time step is determined by b q =(x q,1 , x q,2 , ..., x q,1 ) and the neighbor sequence set Q = {b q1 , b q2 , ..., b qx The average difference of all subsequences in} at the same time step is obtained, and the random difference is:

[0101]

[0102] Among them, b qi Q = {b q1 , b q2 , b q3}. b qi (r) and b q (r) is b qi and b q values ​​at different time steps; rand_diff(r) is a random difference of length t composed at different time steps.

[0103] In b q-avg At each time step, add a random difference:

[0104] b q-new (r) = b q-avg (r)+rand_diff(r)

[0105] Among them, for b q-avg Add random differences to the elements at each time step in the sequence b q-new .

[0106] Step S5.5: Sequence b q-new It is added to the minority class dataset N-Min, and DTW calculation is performed with each subsequence in N-Min, while E4 is updated; this further improves the selection range of the nearest neighbors, which not only increases the diversity of the original samples, but also expands the exploration space of the samples, thereby improving the detection effect of the model.

[0107] Step S5.6: Repeat steps S5 to S5.5 until num2 pieces of data are generated.

[0108] Step S6: Merge N-Min and N-Maj to form a new data set M′, and merge the new data set M′ with N to form a balanced data set.

[0109] Figure 2 It is the overall classification framework when the present invention is combined with a machine learning model. The original data set is first divided into a training set and a test set. The training set is used to generate new samples and train classifiers, and the test set is used to finally verify the prediction effect of the classifier. We use the above-mentioned NDWA data enhancement method to perform data amplification on the training set to generate a certain number of new samples. After the data enhancement is completed, the data is merged to form a training set, which is input into the constructed classification model for training. After the training is completed, the model fitting effect is tested on the test set. The above model can be a traditional machine learning model or a constructed neural network classifier.

[0110] Figure 3 is the current data of the industrial anchor chain welding sensor. The upper area is a minority class of abnormal current samples. Through the NDWA data enhancement method, a new current data is synthesized in the lower area. It can be seen from the figure that the data enhancement method of the present invention can effectively generate new abnormal samples, which not only retains the effective features of the original data, but also increases the diversity of samples and enriches the number of samples in the original data set.

[0111] Table 1 is a classification task test experiment of the data enhancement method on the sensor data set of the UCR open source data set. In terms of comparison methods, we selected mainstream data enhancement methods such as SMOTE, ADASYN, BLSMOTE, and DTWSMOTE to reflect the superiority of NDWA. In terms of classification models, the present invention selected the random forest model (RF) and support vector machine classification (SVM). Here, the original data set is adjusted according to the class imbalance of 1:5. The number of neighbors K configured during the test is 3, and the benchmark weight is 0.5. During the experiment, the model parameters all use the default parameters. As shown in Table 1, the values ​​in the table are the F1 values ​​of the test set. It can be seen that compared with the mainstream methods, the training set after NDWA data enhancement can obtain the highest F1 value on the model, indicating that the data enhancement method NDWA can effectively improve the prediction effect of industrial sensor data on different models, and also has a certain improvement effect on other data sets.

[0112] Table 1

[0113]

Claims

1. A time series data enhancement method for industrial time series unbalanced data, characterized in that: The following steps are involved: S1. Divide the unbalanced time series dataset into minority class datasets M = {m1,m2,...,m m }, where m i represents the ith subsequence; the majority class data set N = {n1, n2, ..., n n }, where n j represents the jth subsequence; sets the neighbor sample number parameter K; determines the total number of samples num that need to be generated; S2, according to the size of the average Euclidean distance D1, D2, divide M into the near majority class data set N-Maj, the number of samples is n_maj; the near minority data set N-Min, the number of samples is n_min; S3, calculate the DTW distances between the subsequences of N-Maj and form a DTW distance matrix E3; calculate the DTW distances between the subsequences of N-Min and form a DTW distance matrix E4; determine the number of sequences that need to be generated for N-Maj as num1, and determine the number of sequences that need to be generated for N-Min as num2; S4, randomly select a subsequence a in N-Maj p , through the corresponding element position of E3, filter a p The K nearest neighbor subsequences of the p1 ,a p2 ,...,a pK }; S4.1, through a p and P = {a p1 ,a p2 ,...,a pK }, and obtain the temporary alignment sequence set C p ={a p-avg1 ,a p-avg2 ,...,a p-avgK }; S4.

2. According to subsequence a p and its neighbor sequence set C p , determine the distance weight set W; S4.3: According to the distance weight set W, the temporary alignment sequence set C p Calculate the weighted average to form a new average sequence a p-avg ; S4.

4. The new average sequence a p-avg Add it to N-Maj, perform DTW calculation with each subsequence in N-Maj, and update the DTW distance matrix E3; S4.5, repeat steps S4 to S4.4 until num1 new data are generated; S5. Randomly select the qth subsequence b in N-Min q , filter b by the corresponding element position of E4 q The K nearest neighbor subsequences of q1 ,b q2 ,...,b qK }; S5.1, through b q and Q = {b q1 ,b q2 ,...,b qK }, and obtain the temporary alignment sequence set C q = {b q-avg1 ,b q-avg2 ,...,b q-avgK }; S5.

2. According to subsequence b q and its neighbor sequence set C q , determine the distance weight set W; S5.

3. According to the distance weight set W, a weighted average is calculated for the temporary alignment sequence set to form an average sequence b q-avg ; S5.4, in b q-avg Add sample random differences rand_diff at each time step to form a new sequence b q-new ; S5.5, the newly generated sequence b q-new Add it to N-Min, perform DTW calculation with each subsequence in N-Min, and update the DTW distance matrix E4 and N-Min at the same time; S5.6, repeat steps S5 to S5.5 until num2 new data are generated; S6. Merge N-Min and N-Maj to form a new minority class dataset M'. Merge the new dataset M' with N to form a balanced dataset.

2. According to claim 1, the time series data enhancement method for industrial time series imbalance data is characterized in that: In step S2, D1 represents subsequence m i The average Euclidean distance to the K nearest neighbor subsequences in the minority class dataset M; D2 represents the subsequence m i With the majority class data set N = {n1,n2,...,n n The average Euclidean distance of the K nearest neighbor sequences in}; When D1>D2, subsequence m i Stored in the majority class dataset N-Maj; When D1≤D2, the subsequence m i Store up to a few datasets N-Min.

3. According to claim 1, the time series data enhancement method for industrial time series imbalance data is characterized in that: In steps S4 and S5, the element positions corresponding to E3 and E4 are used to select a p The K nearest neighbor subsequences of the p1 ,a p2 ,...,a pK } and b q The K nearest neighbor subsequences of q1 ,b q2 ,...,b qK }.

4. According to claim 1, the time series data enhancement method for industrial time series imbalance data is characterized in that: In step S4.2, for subsequence a p Perform DTW regular alignment with the subsequences in the neighbor sequence set P, and obtain the subsequence a according to the optimal matching path obtained during the DTW calculation process. p The temporary alignment sequence set C that is optimally aligned with the neighbor sequence set P p ={a p-avg1 ,a p-avg2 ,...,a p-avgK }; Through sequence b q The DTW optimal alignment with the neighbor sequence set Q is obtained to obtain the temporary alignment sequence set C q = {b q-avg1 ,b q-avg2 ,...,b q-avgK }.

5. The time series data enhancement method for industrial time series imbalance data according to claim 1 is characterized in that: In steps S4.3 and S5.3, according to subsequence a p With C p The corresponding DTW distance in E3 determines the weight set; the initial weight of the weight set W is ω0, the number of weights is K+1, and the sum is 1. The weight set W is: W=[ω0,ω1,ω2,...,ω K ] Among them, ω j represents the jth weight in the weight set, 1≤j≤K; e j represents the DTW distance between a subsequence and its jth neighbor sequence; f j represents a coefficient inversely proportional to the distance, and ρ is a configuration parameter; Similarly, in S5.2, according to subsequence b q With the neighbor sequence set C q The DTW distance corresponding to the subsequence in E4 determines the weight set.

6. The time series data enhancement method for industrial time series imbalance data according to claim 1, characterized in that: In step S5.4, for the new sequence b generated by N-Min q-avg , add a random difference rand_diff to its value at each time step; the random difference of each new sequence is determined by the subsequence b in step S5 q and the neighbor sequence set Q = {b q1 ,b q2 ,...,b qK }decided, that is, b q-avg The random difference that needs to be added to the value at each time step is determined by b q =(x q,1 ,x q,2 ,...,x q,t ) and the neighbor sequence set Q = {b q1 ,b q2 ,...,b qK The average difference of all subsequences in} at the same time step is obtained to form rand_diff(r) of length t: Among them, b qi The neighbor sequence set Q = {b q1 ,b q2 ,...,b qK }; b qi (r) and b q (r) is b qi and b q The value at different time steps, 1≤r≤t; In b q-avg At all time steps, add random differences to get b q-new : b q-new (r)=b q-avg (r)+rand_diff(r)。