Method and apparatus for feature extraction of time series and generation of synthetic time series based on extracted features
By approximating the time series and extracting its coefficients as features, the problems of low imbalanced data efficiency and unrealistic synthetic time series in the prior art are solved, low-dimensional, interpretable feature extraction and realistic synthetic time series generation are realized, and the performance and data efficiency of the machine learning model are improved.
Patent Information
- Application Number
- CN202510165214.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-02-16
- Filing Date
- 2025-02-14
- Publication Date
- 2025-08-19
AI Technical Summary
The existing time series feature extraction methods are inefficient and difficult to interpret when processing unbalanced data in the manufacturing process, the generated synthetic time series is not realistic enough, and the data demand is high.
By approximating the time series with spline functions and extracting its coefficients as features, combining the modification of spline coefficients to generate a synthetic time series, using the interpretability of splines and low-dimensional representation of the features, a realistic synthetic time series is generated.
Low-dimensional, interpretable feature extraction is realized to generate realistic synthetic time series, improving the performance and data efficiency of machine learning models, especially the classification and exception recognition capabilities under unbalanced data sets.
Smart Images

Figure CN120508796A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for determining descriptive features of a time series and its use for generating a synthetic time series that is as realistic as possible. Background Art
[0002] For time series of repeatable processes, in particular manufacturing processes, descriptive statistics of the time series instances can be extracted as features.
[0003] Feature extraction is a well-known method, particularly in the field of machine learning and data analysis, in which relevant features are identified and extracted from raw data. These features are used to create more informative datasets that can be used for various tasks such as classification, forecasting, regression, anomaly detection, prediction, or clustering.
[0004] Feature extraction aims to reduce data complexity (often referred to as “data dimensionality”) while retaining as much relevant information as possible. This helps improve the performance and efficiency of machine learning algorithms and simplifies the analysis process.
[0005] Generally speaking, a feature is an attribute that characterizes a data point or sequence of data points. Relevant features have an impact on or are correlated with the application of the model.
[0006] Manufacturing processes often produce time series data with strongly imbalanced label distributions. For example,
[0007] There are usually significantly more processes / components marked as “OK” than those marked as “NOK”. Classification and anomaly recognition models trained based on such time series tend to overrepresent Time series augmentation is a method used to reduce this imbalance. Known methods for time series augmentation aim to generate new synthetic time series by using specialized generative adversarial network (GAN) architectures.
[0008] However, these methods are very data intensive and they struggle to replicate the smoothness of real data. They mainly work very well for static classical time series (after correcting for potential drift and seasonality).
[0009] Advantages of the present invention
[0010] A method is proposed that enables the extraction of particularly convincing features from time series. It is thus possible to obtain a low-dimensional representation of a time series instance in which a particularly small number of features is sufficient to represent the Depending on the specific application, 282 relevant features can be used instead of the standard tsfresh setting, which achieves the same downstream performance as the 6 features according to the present invention.
[0011] Furthermore, the extracted features are interpretable, i.e., the nature of the time series can be reconstructed from these features, and each feature corresponds to a range of values of the time series within a predetermined interval. If the (tabular) downstream model can generate a score for each feature (e.g., a local or global feature importance or a marginal anomaly score for each feature), these scores can be converted back to the time domain. Since each extracted feature is associated with a spline, and each spline only covers a specific range of values, we can also map the score to this range of values. In areas where the spline supports overlap, the scores are aggregated accordingly. Thus, for example, in downstream tasks of classification, conclusions are obtained about which areas of the curve contribute to the fact that the curve was classified as such.
[0012] This method is also proposed for generating synthetic time series. Compared to comparable methods for synthetic time series generation, which are mostly based on GANs, this method has the following advantages: it requires less data (even a single observation is sufficient). Furthermore, this method is not a black box and is therefore highly interpretable. Furthermore, while GANs typically fail to generate realistic-looking time series (or require extensive hyperparameter tuning to achieve realism), this method generates realistic time series. Summary of the Invention
[0013] In a first aspect of the invention, a method according to claim 1 is proposed, which fits one or more smooth curves as closely as possible to multiple segments of a time series instance and uses the coefficients of these functions as extracted features. Specifically, it is proposed that each time series is approximated by a linear combination of (basic) splines. Splines themselves are known and can be used to approximate any continuous function as closely as desired. The coefficients of the splines are the extracted features. This is advantageous because it has been shown that these features represent the form of the time series process very well and are therefore convincing characteristics. Surprisingly, this method is particularly suitable for time series that describe repetitive processes.
[0014] It should be noted that, in addition to the commonly known time series features, these features can also be used in addition. In general, a rolling window method can also be used for the extraction to process longer, non-repeatable time series.
[0015] A time series can be understood as a plurality of sensor measurement results from a sensor over time, each of which is recorded at predetermined points in time over the time period. A time series can be a single-dimensional time series or a multi-dimensional time series. Preferably, the time series is recorded during a repeatable manufacturing process (e.g., an extrusion or screwing process). Alternatively, the time series can be recorded from a repeatable physical or chemical process, such as vehicle sensor measurements.
[0016] In a second aspect of the present invention, it is proposed to use the method of the first aspect of the present invention to generate a synthetic time series.
[0017] First, each observed time series is approximated from a real data set with the aid of a (basic) spline. Here, the coefficients of the spline according to the method of the first aspect of the invention and the residuals derived from the difference between the original time series and the approximation are stored, wherein the coefficients can also be called features according to the first aspect of the invention. According to the second aspect of the invention, it is proposed that the coefficients are modified in the coefficient space to generate a time series that is as realistic as possible. The first method of the second aspect of the invention is to add random noise to the coefficients. Here, a multivariate normal noise with zero expected value and a covariance matrix can be used, wherein the covariance matrix of the noise is proportional to the covariance matrix of the real coefficients. The second method is to use a weighted combination between two closely located observed coefficients. Subsequently, the modified coefficients according to the first method or the second method are transformed back into the time series space, preferably by converting the coefficients into splines.
[0018] To account for the roughness of the time series, the residuals of the donor instances from which the original coefficients originated are added. This preserves the characteristic features of the time series while generating new coefficients that capture these variations and roughness.
[0019] According to another aspect of the present invention, the method for generating a synthetic time series according to the second aspect of the present invention is used to expand a training dataset for training time series, wherein the expanded training dataset is used to train a machine learning model.
[0020] A method for training a machine learning model for classification or anomaly detection, in particular in a production process, is also described. The method comprises the following steps:
[0021] Providing an extended training data set of a training time series, wherein the extended training data set is extended by a synthetically generated time series according to the present method for generating a synthetic time series;
[0022] Training the machine learning model based on the expanded training dataset; and
[0023] Provide trained machine learning models for classification or anomaly identification, particularly in production processes.
[0024] Here, a reasoning method is proposed for classification or anomaly detection, in particular in production processes. The reasoning method comprises the following steps:
[0025] Provide time series data recorded by sensors; and
[0026] Classify the provided time series data and / or identify anomalies in the provided time series data using the machine learning model trained herein.
[0027] The inference method can also be used to analyze sensor data. Sensors can record environmental measurements in the form of sensor signals. These sensor signals can be one-dimensional or multi-dimensional time series, for example, from repeatable processes (e.g., extrusion or tightening procedures).
[0028] The inference methods and / or generation methods of the present invention can also be used to identify anomalies in technical systems. For example, synthetic time series can be generated to extend an existing time series dataset in order to enlarge it and / or make it more balanced (e.g., "OK" / "NOK" time series). Training a machine learning model to identify anomalies based on the extended dataset results in improved model performance compared to training based solely on the original recorded time series.
[0029] In further aspects, the invention relates to an apparatus and a computer program, each of which is set up to carry out the above-mentioned method, and to a machine-readable storage medium on which the computer program is stored. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The embodiments of the present invention are described in more detail below with reference to the accompanying drawings.
[0031] Figure 1 Schematically shows a flow chart of a first embodiment of the present invention;
[0032] Figure 2 Schematically shows a flow chart of a second embodiment of the present invention;
[0033] Figure 3 An apparatus for implementing the invention is schematically shown. DETAILED DESCRIPTION
[0034] In a production environment, many processes record measurement results over time, i.e., the sensor data recorded in a production program is aggregated into a time series. A production program can be an extrusion program, in which not only the applied force but also other sensor data such as torque, pressure, temperature, angle, etc. are recorded as a time series. These measurement curves typically have the following expected shape, around which the measurement results vary. Measurement results for NOK parts typically show different curve shapes. The present invention can be used to extract features from these time series that are used in downstream tasks, such as classification, regression, clustering, and / or anomaly detection of the produced parts.
[0035] Figure 1 shows a convincing Flowchart of a method for extracting features from a time series. In other words, a low-dimensional embedding of the time series is extracted from it. By training state-of-the-art tabular machine learning models based on these embeddings, these embeddings can be used for many different downstream tasks. However, it is also conceivable to use these features for virtual sensors, i.e., based on these features, information about the products manufactured during the recorded time series encoded in the features can be determined from synthetic sensor values.
[0036] However, it is also conceivable to use features of the time series for classification. For example, these features can be used to find anomalies in sensor data, wherein the data are classified (for example, into different error types).
[0037] However, it is also conceivable to use the features of the time series for regression, that is, to use these features to determine one or more continuous values, that is, to perform a regression analysis.
[0038] However, it is also conceivable to use the features of a time series for forecasting. In this application, these features can be used to predict future values of a given time series according to a rolling window method.
[0039] Below, in Figure 1 A method for determining the characteristics of repeatable time series instances should be given in . The method includes the following steps:
[0040] The maximum degree and number of knots for the spline approximation of the corresponding time series are selected ( S11 ). The user can predefine the degree (Grad) and number of knots to be used for the spline approximation.
[0041] The observed time steps of these time series instances are obtained (S12).
[0042] These nodes are distributed (S13) within the observed time range to define the spline used. These nodes are preferably uniformly distributed within the observed time range. These nodes implicitly define the spline used for the approximation of the time series instance.
[0043] Preferably, at each observed time step, all elementary splines are evaluated (S14). This evaluation provides the spline value at the corresponding time point.
[0044] In a preferred further development of the method, the following steps can be performed after step S14:
[0045] Learn (S15) linear regression. Here, a linear regression is learned for the time series, wherein the regression uses the evaluated spline to predict the observed value of the time series as a linear combination of the spline values. The learned regression parameters correspond to the coefficients of the spline approximation. That is, the coefficients of the spline approximation are the coefficients of the linear regression. In other words, using n basic splines f i At time point t, the time series value x is described as follows: x = a1*f1(t)+…+a n *f n (t).
[0046] The formula is determined for all observations x in the corresponding observation period t. First, the value f is calculated for all time points i (t). Then the spline coefficients are obtained from the above equation as linear regression.
[0047] The learned regression coefficients are stored as the extracted features.
[0048] Figure 2 A flow chart of a method for generating a synthetic time series is shown. In this way, according to Figure 2 The method can help to obtain a more balanced training set and thus improve the generalization ability of machine learning systems. These machine learning systems can be trained for arbitrary tasks. One advantage in this case is that according to Figure 2 Our method can also be used to supplement realistic training datasets for which recording data is difficult or expensive.
[0049] according to Figure 2 A particular advantage of the method is that it is able to generate synthetic time series that are based only on a small sample of the real time series and are therefore very data efficient.
[0050] Particularly preferably, according to Figure 2The method is used to generate synthetic data from a specific time series dataset to increase its size and / or make it more balanced (with respect to the "OK" / "NOK" time series). Training classification models on the expanded dataset can often improve their performance compared to training on real time series alone.
[0051] exist Figure 2 In a first embodiment, one or more synthetic time series are generated based on the modification of the coefficients of a spline by additive noise.
[0052] The method starts from a first step S21 , in which one or more time series are provided as real data sets.
[0053] In the subsequent step S22, the following sub-steps are performed for each time series instance of the real dataset: Figure 1 The spline coefficients are obtained by this method and stored.
[0054] After step S22, the time series instance is reconstructed again based on the stored coefficients in step S23. The differences between the time series instance and the reconstructed time series are then determined using the spline; these differences are referred to as residuals below. Furthermore, in step S23, these residuals are stored to the corresponding coefficients of the time series from the dataset.
[0055] Now comes the actual generation of the new synthetic time series. In step S24, the following sub-steps are performed for this:
[0056] First, the number of synthetic time series to be generated and optionally a temperature between 0 and 1 are predefined.
[0057] Generate noise, wherein the noise is generated by a multivariate normal distribution with zero expected value and a covariance matrix. The covariance matrix can be calculated as follows: temperature x cov(stored coefficients).
[0058] A "donor instance" is selected from the dataset, and hence a set of stored coefficients, and the noise is added to these coefficients.
[0059] The coefficients are transformed back into the time series space as a new resultant smoothed time series.
[0060] The stored "donor instance" residuals are added to the new synthetic smoothed time series.
[0061] Preferably, step S24 is repeated until a required number of synthetic time series are generated.
[0062] exist Figure 2In the second embodiment, the coefficients are modified based on a combination of coefficients of other real time series. For the second embodiment, steps S21 to S23 are the same as for the first embodiment. Instead, in step S24, the following sub-steps are now performed to generate one or more new synthetic time series:
[0063] To generate a synthetic time series, first the number of time series to be generated and a temperature between 0 and 1 are provided. Subsequently, a "donor instance" is selected, in particular randomly, from the data set in step S21 and thus the stored coefficient set associated therewith is selected.
[0064] Subsequently, additional donor instances are determined from the dataset (hereinafter referred to as the nearest neighbors of the initial donor instance). To this end, a subset of the time series can be selected from the entire dataset, or a random sample can be used. Preferably, these neighbors are a subset of the time series. Preferably, the subset is determined based on temperature. The corresponding coefficient of one of the nearest neighbors is then randomly selected. A random number a between 0.5 and 1 is then generated.
[0065] The new coefficient is determined by weighting the random number of coefficients drawn at random and the coefficient of the donor instance. Preferably, the new coefficient is calculated by the following formula:
[0066] a×donor coefficient + (1-a)×selected neighbor coefficient.
[0067] These coefficients are then transformed back as the new synthetic smoothed time series. The stored residuals of the donor instances are added to the new synthetic smoothed time series.
[0068] Preferably, step S24 is repeated until a required number of synthetic time series are generated.
[0069] according to Figure 2 The proposed method can be very useful in all cases where time series machine learning models suffer from imbalanced training data. The invention is particularly valuable for classification in production processes that provide time series sensor data (e.g., temperature, pressure, force, torque, etc.) with a significant mismatch between "OK" and "NOK" (abnormal) components. In fact, when classification models are trained primarily on "OK" instances, they tend to ignore the subtle differences between "OK" and "NOK" time series.
[0070] In optional step S25 , the generated synthetic time series may be used to be added to a training dataset or used to train a machine learning system.
[0071] Figure 3 Schematically shows the method for executing Figure 1 or 2. The method performed by the apparatus 500 may be implemented as a computer program stored on a machine-readable storage medium 54 and executed by a processor 55.
[0072] The term "computer" includes any device for executing predetermined calculation rules. These calculation rules may exist in the form of software, hardware, or even a combination of software and hardware.
Claims
1. A method for determining descriptive characteristics of a time series, wherein: The time series is recorded during a repetitive process, in particular a production process, and the method comprises the following steps: Obtaining (S11) the time series and the number of nodes and degree for spline approximation; distributing (S12) the nodes within the range of the time series; approximating (S13) the time series using a spline; and The coefficients of the spline for the knot are stored (S14) as descriptive features.
2. The method according to claim 1, wherein a linear regression of the recorded values of the time series at the corresponding nodes based on the function values of the spline for the nodes is determined (S15) respectively, and the coefficients of the regression are stored as the descriptive features. The method according to claim 2 , wherein Lasso regression is used.
4. A method according to claim 1, wherein the method is used to generate a synthetic time series, wherein a smoothed time series is reconstructed by a spline based on the stored coefficients, wherein a residual between the obtained time series and the reconstructed time series is determined, wherein noise is generated by a multivariate normal distribution, wherein modified coefficients are determined by adding the noise to the coefficients, wherein the synthetic time series is reconstructed based on the modified coefficients and the residual is added to the synthetic time series. 5 . The method according to claim 4 , wherein the noise is determined according to a multivariate normal distribution having a zero expected value and a covariance matrix related to the weighted covariances of the stored coefficients of the other time series.
6. A method according to claim 4, wherein a data set with real time series is provided, and for all time series of the data set, the coefficients are stored separately according to the method according to claim 1, wherein the coefficients of a first time series are selected, wherein the coefficients of further time series are randomly selected from the data set, and the modified coefficients are determined by weighted addition of the coefficients of the first time series and the coefficients of the random time series.
7. The method according to any one of claims 4 to 6, wherein the synthetic time series is used to train a machine learning system, in particular a machine learning system for classification or anomaly detection. 8 . A device configured to carry out the method according to claim 1 .
9. Computer program comprising instructions which, when said program is executed by a computer, cause said computer to carry out the method according to claims 1 to 7.
10. A machine-readable storage medium having stored thereon the computer program according to claim 9.