Unbalanced classification time series data oversampling method and system

Optimizing the low-dimensional representation of time series data through feature mapping and supervision comparison mechanisms, identifying and generating high-quality minority samples, solving the problem of poor sample quality in unbalanced classification of time series data, and significantly improving the performance of the classification model.

CN119691454AInactive Publication Date: 2025-03-25WUXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411877354.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-03-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In industrial production, the uneven classification of time series data causes the classifier to tend to categories with a large number of samples, and lacks the ability to identify samples of a few categories, which affects the reliability and effectiveness of the classification model. The existing oversampling methods generate poor quality samples in high-dimensional and high-noise feature spaces, ignoring the timing characteristics and inter-class relationships of the data, and lacking an effective quality control mechanism.

Method used

Map time sequence data from high-dimensional space to low-dimensional space through feature mapping, and introduce a supervisory comparison mechanism to adjust the data distribution. Identify high-quality samples of a few types of samples in low-dimensional space, generate new samples through interpolation, and verify new samples to retain high-quality samples.

Benefits of technology

It effectively improves the sampling quality, ensures the high sample quality of the input classifier, reduces the impact of noise samples on classification performance, and improves the performance of the classification model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691454A_ABST
    Figure CN119691454A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to an unbalanced classification time series data oversampling method and system.The unbalanced classification time series data oversampling method comprises the steps that feature representation extracted from unbalanced classification time series data is mapped to a low-dimensional space from a high-dimensional space, and a supervision comparison mechanism is introduced to adjust time series data distribution in the low-dimensional space; in the low-dimensional space, identifying high-quality samples in the minority class samples according to the distribution density of the time sequence data; generating a new sample through interpolation based on the high-quality sample; and verifying the new sample, and retaining the sample passing the verification to obtain the time sequence data after the oversampling processing. Compared with the prior art, the quality and balance of the time sequence data during oversampling are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for oversampling time series data of imbalanced classification. Background Art

[0002] In the industrial production process, the quality analysis of time series data is of great significance to ensure product performance and process optimization. By performing defect classification analysis on various types of time series data, abnormal patterns can be effectively identified and the root causes of problems can be traced, thereby achieving process improvement and maintenance. For example, in the engine assembly process, by analyzing the time series data of bolt tightening torque, assembly quality problems can be discovered and process optimization can be guided. However, in the actual production environment, different types of defects often show significant differences in quantity, which leads to the classifier tending to favor categories with a larger number of samples when classifying these unbalanced data, and the recognition ability of minority samples is insufficient, which seriously affects the reliability and effectiveness of the classification model in practical applications.

[0003] At present, the oversampling methods for the problem of data imbalance mainly include random oversampling and SMOTE algorithm. Although these methods have alleviated the problem of data imbalance to a certain extent, they still have obvious shortcomings. First, most existing methods directly sample in the original feature space, while industrial time series data usually has the characteristics of high dimension and high noise. Direct sampling in such a feature space is likely to generate samples of poor quality. Secondly, existing methods often ignore the time series characteristics and inter-class relationships of data, and may produce false samples that do not conform to actual physical laws. In addition, there is a lack of effective quality control mechanism in the sample generation process, and the representativeness and effectiveness of the generated samples cannot be guaranteed. The above problems seriously restrict the performance improvement of the classification model. Summary of the invention

[0004] In order to overcome the defect of poor data quality obtained by sampling on unbalanced time series data described in the above-mentioned prior art, the present invention provides a method and system for oversampling time series data with unbalanced classification.

[0005] In order to achieve the above technical effects, the technical solution of the present invention is as follows:

[0006] A method for oversampling time series data with imbalanced classification includes the following steps:

[0007] The feature representation extracted from the imbalanced classified time series data is mapped from the high-dimensional space to the low-dimensional space, and a supervised comparison mechanism is introduced to adjust the distribution of the time series data in the low-dimensional space;

[0008] In the low-dimensional space, high-quality samples among minority class samples are identified according to the distribution density of the time series data;

[0009] Generate new samples through interpolation based on the high-quality samples; verify the new samples, retain the samples that pass the verification, and obtain time series data after oversampling processing.

[0010] The present invention also proposes a time series data oversampling system for imbalanced classification, the system comprising:

[0011] The feature mapping module maps the feature representation extracted from the imbalanced classified time series data from the high-dimensional space to the low-dimensional space, and introduces a supervised comparison mechanism to adjust the distribution of the time series data in the low-dimensional space;

[0012] A high-quality sample search module: used to identify high-quality samples among minority class samples in the low-dimensional space according to the distribution density of time series data;

[0013] New sample generation module: used to generate new samples through interpolation based on the high-quality samples; verify the new samples, retain the samples that pass the verification, and obtain the time series data after oversampling processing.

[0014] The present invention also proposes a method for oversampling engine bolt tightening fault data with uneven classification, comprising the following steps:

[0015] Collect unevenly classified engine bolt tightening failure data;

[0016] The unbalanced classified time series data oversampling method is applied to oversample the unbalanced classified engine bolt tightening fault data to obtain the engine bolt tightening fault data after the fault types are balanced.

[0017] The present invention also proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for oversampling time series data with imbalanced classification as described in the present invention when executing the computer program.

[0018] Compared with the prior art, the present invention has the following beneficial effects:

[0019] The present invention realizes the conversion from high-dimensional to low-dimensional space through feature mapping, and introduces a supervised comparison mechanism to optimize the data distribution in the low-dimensional space, thereby avoiding direct sampling of data in the original high-dimensional feature space; secondly, the present invention identifies high-quality minority class samples as sampling seed points by analyzing the distribution density of samples in the low-dimensional space, thereby improving the representativeness of the generated samples; subsequently, by evaluating and screening the quality of the generated new samples, the sample quality of the input classifier is ensured, and the influence of noise samples on the classification performance is effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1This is a flow chart of the method for oversampling time series data with imbalanced classification according to Example 1.

[0021] Figure 2 This is an architecture diagram of the time series data oversampling system for imbalanced classification according to Example 2. DETAILED DESCRIPTION

[0022] The accompanying drawings are only used for illustrative purposes and are not to be construed as limiting the present invention;

[0023] It is understandable to those skilled in the art that some well-known descriptions may be omitted in the drawings.

[0024] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0025] Example 1

[0026] This embodiment proposes a method for oversampling time series data with unbalanced classification, such as Figure 1 , which is a flow chart of the method for oversampling time series data with unbalanced classification according to this embodiment.

[0027] The method for oversampling time series data with imbalanced classification proposed in this embodiment includes the following steps:

[0028] The feature representation extracted from the imbalanced classified time series data is mapped from the high-dimensional space to the low-dimensional space, and a supervised comparison mechanism is introduced to adjust the distribution of the time series data in the low-dimensional space;

[0029] In the low-dimensional space, high-quality samples among minority class samples are identified according to the distribution density of the time series data;

[0030] Generate new samples through interpolation based on the high-quality samples; verify the new samples, retain the samples that pass the verification, and obtain time series data after oversampling processing.

[0031] In this embodiment, the time series data is mapped from the original high-dimensional feature space to the low-dimensional feature space through feature mapping, and a supervised comparison mechanism is introduced to optimize the data distribution in the low-dimensional space. This method effectively avoids the "dimensionality disaster" problem faced by direct sampling in the original high-dimensional feature space, and also reduces the noise interference that is prevalent in the high-dimensional space. Secondly, in the low-dimensional feature space, the present invention identifies high-quality samples in minority class samples by analyzing the distribution density of samples, ensuring the representativeness and reliability of high-quality samples, and significantly improving the quality of subsequent generated samples; after generating new samples, a verification mechanism is also introduced to evaluate and screen the quality of the newly generated samples, ensuring that the samples finally input into the classifier are of high quality. The present invention effectively improves the sampling quality through this multi-layer mechanism from feature mapping, high-quality sample selection to new sample verification.

[0032] In an optional embodiment, the step of mapping the feature representation extracted from the imbalanced classified time series data from the high-dimensional space to the low-dimensional space includes:

[0033] Performing unsupervised learning on the time series data based on an autoencoder;

[0034] The time series data is compressed into a low-dimensional space and its approximate value is reconstructed by the autoencoder after learning.

[0035] In this embodiment, unsupervised learning based on the autoencoder extracts potential features, retains key information, and enhances the data representation capability; by reducing the dimensionality of the features, noise and redundancy can be effectively removed, thereby improving the versatility and efficiency of the model.

[0036] In an optional embodiment, the step of introducing a supervised comparison mechanism to adjust the distribution of time series data in the low-dimensional space includes:

[0037] Generate an embedded representation for the time series data in the low-dimensional space, and calculate the similarity between the time series data;

[0038] The embedded representations of samples of the same category are aggregated, and the embedded representations of samples of different categories are separated, and optimized based on the supervised contrast loss function, which is expressed as follows:

[0039]

[0040] Among them, f(x) is the embedded representation of sample x, sim(f(x i ),f(x j )) is the sample x i and x j The similarity between them; P is the set of positive sample pairs, τ is the temperature parameter used to control the smoothness of the similarity, N is the total number of samples, x k represents the kth sample.

[0041] In this embodiment, the embedded representation in the low-dimensional space is optimized by supervised contrast loss, and the separability of samples of the same type is significantly enhanced by bringing the embedded representations of samples of the same type closer and pulling the representations of samples of different types farther apart, thereby improving the discrimination ability of the model. In addition, by using similarity metrics as loss functions to smooth the training process, the robustness and generalization ability of the model are enhanced, and noise interference is reduced.

[0042] In an optional embodiment, the step of identifying high-quality samples in minority class samples according to the distribution density of time series data includes:

[0043] For any minority class sample, calculate the sum of the distances of its l nearest samples, and take the derivative of the sum of the distances as the current sample density;

[0044] The density of all minority class samples is averaged; samples with a sample density greater than the average are regarded as high-quality samples.

[0045] Specifically, for each minority class sample x, calculate its distance to its k nearest neighbors Density(x), which is expressed as follows:

[0046]

[0047] Among them, dist(x, x i ) is sample x to the i-th sample x i distance.

[0048] Calculate the average density of all minority class samples as the set threshold, the expression is as follows:

[0049]

[0050] Among them, D i Table 1 is the density of the i-th minority class sample, n is the number of minority class samples, is the average value of the density of the samples of several classes.

[0051] In this embodiment, by comparing and screening the average density, the selection of high-quality samples can be made more accurate, the interference of noise samples can be avoided, and the learning ability of the model for minority class samples can be improved. High-quality samples can improve the representativeness of minority class samples and the quality of training data.

[0052] In an optional embodiment, the step of verifying the new sample includes:

[0053] Use unsupervised clustering algorithm to perform cluster analysis on new sample data and obtain clustering results;

[0054] Based on the clustering results, the similarity between the new sample and its neighbor samples in the feature space is calculated, and the new samples whose similarity is lower than the preset threshold are removed.

[0055] In this embodiment, cluster analysis is performed on new samples through an unsupervised clustering algorithm, and new samples are screened based on the consistency test of sample distribution in the feature space, which can remove abnormal samples or noise data and ensure the quality and reliability of new samples. Among them, cluster analysis improves the structured expression ability of data and helps to more accurately evaluate the correlation between new samples and neighboring samples.

[0056] In an optional embodiment, the step of calculating the similarity between the new sample and its neighbor samples in the feature space based on the clustering result includes:

[0057] For any new sample, calculate the j time series of its nearest neighbors in all time series data, compare the label of the current new sample with the labels of the j time series, and obtain the similarity.

[0058] In this embodiment, by checking the distribution consistency based on label comparison, new samples that are more consistent with the existing data distribution can be effectively screened out, thereby improving the quality and representativeness of the data set. Specifically, by setting a similarity threshold, noise samples and abnormal samples are removed while retaining useful data, reducing the interference of low-quality data on model training, and enhancing the robustness and generalization ability of the model.

[0059] In an optional embodiment, the oversampling method further includes: classifying the oversampled time series data using a support vector machine model.

[0060] In this embodiment, a support vector machine model is introduced for classification after the oversampling process, which effectively utilizes the balanced data set generated by the oversampling and improves the classifier's recognition ability for minority class samples.

[0061] Example 2

[0062] This embodiment proposes an unbalanced classification time series data oversampling system, and applies the unbalanced classification time series data oversampling method proposed in Embodiment 1. Figure 2 , which is a schematic diagram of the architecture of the time series data oversampling system with unbalanced classification according to the present embodiment.

[0063] This embodiment proposes a time series data oversampling system for imbalanced classification, including:

[0064] The feature mapping module maps the feature representation extracted from the imbalanced classified time series data from the high-dimensional space to the low-dimensional space, and introduces a supervised comparison mechanism to adjust the distribution of the time series data in the low-dimensional space;

[0065] A high-quality sample search module: used to identify high-quality samples among minority class samples in the low-dimensional space according to the distribution density of time series data;

[0066] New sample generation module: used to generate new samples through interpolation based on the high-quality samples; verify the new samples, retain the samples that pass the verification, and obtain the time series data after oversampling processing.

[0067] It can be understood that the system of this embodiment corresponds to the method of the above-mentioned embodiment 1, and the options in the above-mentioned embodiment 1 are also applicable to this embodiment, so they will not be described repeatedly here.

[0068] Example 3

[0069] This embodiment proposes a method for oversampling engine bolt tightening fault data with uneven classification, comprising the following steps:

[0070] Collect unevenly classified engine bolt tightening failure data;

[0071] The method for oversampling the unbalanced classified time series data proposed in Example 1 is applied to oversample the unbalanced classified engine bolt tightening fault data to obtain the engine bolt tightening fault data after the fault types are balanced.

[0072] As an exemplary illustration, the engine bolt tightening fault data classified as imbalanced is the torque data returned by the sensor on the tightening gun.

[0073] Specifically, during the engine assembly process, different types of faults may occur due to differences in operator techniques; among them, insufficient or overtightened bolt torque is more common, while bolt stripping is relatively rare. Therefore, collecting the torque data returned by the sensor on the tightening gun will obtain a time series data with uneven classification of fault types.

[0074] Furthermore, the engine bolt tightening fault data after fault type balancing is classified through a support vector machine model to separate different types of bolt tightening faults.

[0075] Example 4

[0076] This embodiment proposes a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, wherein when the computer-readable instructions are executed by the processor, the processor executes the steps of the method for oversampling time series data with imbalanced classification proposed in Embodiment 1.

[0077] The terms used in the drawings are for illustrative purposes only and should not be construed as limiting this patent.

[0078] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A method for oversampling time series data with unbalanced classification, characterized in that: The following steps are involved: The feature representation extracted from the imbalanced classified time series data is mapped from the high-dimensional space to the low-dimensional space, and a supervised comparison mechanism is introduced to adjust the distribution of the time series data in the low-dimensional space; In the low-dimensional space, high-quality samples among minority class samples are identified according to the distribution density of the time series data; Generate new samples through interpolation based on the high-quality samples; verify the new samples, retain the samples that pass the verification, and obtain time series data after oversampling processing.

2. The method for oversampling time series data with unbalanced classification according to claim 1, characterized in that: The step of mapping the feature representation extracted from the unbalanced classified time series data from the high-dimensional space to the low-dimensional space comprises: Performing unsupervised learning on the time series data based on an autoencoder; The time series data is compressed into a low-dimensional space and its approximate value is reconstructed by the autoencoder after learning.

3. The method for oversampling time series data with unbalanced classification according to claim 1, characterized in that: The step of introducing a supervised comparison mechanism to adjust the distribution of time series data in the low-dimensional space includes: Generate an embedded representation for the time series data in the low-dimensional space, and calculate the similarity between the time series data; The embedded representations of samples of the same category are aggregated, and the embedded representations of samples of different categories are separated, and optimized based on the supervised contrast loss function, which is expressed as follows: Among them, f(x) is the embedded representation of sample x, sim(f(x i ),f(x j )) is the sample x i and x j The similarity between them; P is the set of positive sample pairs, τ is the temperature parameter used to control the smoothness of the similarity, N is the total number of samples, x k represents the kth sample.

4. The method for oversampling time series data with unbalanced classification according to claim 1, characterized in that: The step of identifying high-quality samples in minority class samples according to the distribution density of time series data includes: For any minority class sample, calculate the sum of the distances of its l nearest samples, and take the derivative of the sum of the distances as the current sample density; The density of all minority class samples is averaged; samples with a sample density greater than the average are regarded as high-quality samples.

5. The method for oversampling time series data with imbalanced classification according to claim 1, characterized in that: The steps of verifying the new sample include: Use unsupervised clustering algorithm to perform cluster analysis on new sample data and obtain clustering results; Based on the clustering results, the similarity between the new sample and its neighbor samples in the feature space is calculated, and the new samples whose similarity is lower than the preset threshold are removed.

6. The method for oversampling time series data with imbalanced classification according to claim 5, characterized in that: The step of calculating the similarity between the new sample and its neighbor samples in the feature space based on the clustering result includes: For any new sample, calculate the j time series of its nearest neighbors in all time series data, compare the label of the current new sample with the labels of the j time series, and obtain the similarity.

7. The method for oversampling time series data with imbalanced classification according to claim 1, characterized in that: The oversampling method further includes: classifying the oversampled time series data using a support vector machine model.

8. A time series data oversampling system for imbalanced classification, applied to the time series data oversampling method for imbalanced classification according to any one of claims 1 to 7, characterized in that: The system comprises: The feature mapping module maps the feature representation extracted from the imbalanced classified time series data from the high-dimensional space to the low-dimensional space, and introduces a supervised comparison mechanism to adjust the distribution of the time series data in the low-dimensional space; A high-quality sample search module: used to identify high-quality samples among minority class samples in the low-dimensional space according to the distribution density of time series data; New sample generation module: used to generate new samples through interpolation based on the high-quality samples, verify the new samples, retain the samples that pass the verification, and obtain the time series data after oversampling processing.

9. A method for oversampling engine bolt tightening fault data with uneven classification, characterized in that: The following steps are involved: Collect unevenly classified engine bolt tightening failure data; The method for oversampling unbalanced classified time series data according to any one of claims 1 to 7 is applied to oversample the unbalanced classified engine bolt tightening fault data to obtain engine bolt tightening fault data after fault types are balanced.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for oversampling time series data with imbalanced classification according to any one of claims 1 to 7 is implemented.