Training sample data processing method and device of time sequence model
By performing discrete wavelet transform and homologous perturbation on time series data, enhanced time series data samples are generated, which solves the problem that the linear interpolation method cannot adapt to the characteristics of time series data and improves the generalization ability and robustness of the model.
Patent Information
- Application Number
- CN202510876911.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-10-17
Smart Images

Figure CN120804699A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a time series model training sample data processing method and device. BACKGROUND
[0002] In the data analysis stage, data enhancement technology is one of the key means to improve the generalization ability and robustness of the model. Among them, the linear interpolation method is widely adopted when generating new data samples because of its simplicity. The basic principle of linear interpolation is to insert one or more new points between two known data points. The values of these new points are obtained by projecting the line segment connecting the two data points, thus generating new samples with smooth transitions.
[0003] However, for time series data, it has specific time correlation, stationarity and limited bandwidth characteristics, which are essential to understand the phenomenon or process behind the data. Therefore, when using the linear interpolation method to enhance the time series data, the method fails to fully consider the characteristics of the time series data, resulting in new samples generated deviating from the behavior pattern of the real data. This distortion further leads to the model failing to learn the complex dynamics and change rules of the time series data, reducing the ability of the model to identify and process real time series data.
[0004] At present, there is no effective solution to the above problems. SUMMARY
[0005] The embodiments of the present application provide a time series model training sample data processing method and device to at least solve the technical problem that the new time series data samples generated by using the linear interpolation method are difficult to adapt to the characteristics of the time series data, resulting in poor generalization ability and robustness of the finally trained time series model.
[0006] According to an aspect of the embodiments of the present application, a training sample data processing method of a time series model is provided, including: obtaining a training sample data set for training the time series model, wherein the training sample data set includes a plurality of groups of training sample data, and each group of training sample data includes time series data samples and corresponding sample labels; for each time series data sample, performing discrete wavelet transform on the time series data sample to obtain a corresponding k-order decomposition coefficient vector, and determining a flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector, wherein the k-order decomposition coefficient vector at least includes wavelet coefficient components obtained by k-level decomposition, and the flag bit is used to identify whether the data component corresponding to the wavelet coefficient component is disturbed in an enhancement process; performing enhancement on the time series data sample according to the k-order decomposition coefficient vector of the time series data sample, the k-order decomposition coefficient vectors of other time series data samples in the training sample data set, and the corresponding flag bits of each wavelet coefficient component, and taking the sample label of the time series data sample as the sample label of the enhanced time series data sample; and adding a plurality of enhanced time series data samples and corresponding sample labels to the training sample data set.
[0007] Optionally, the discrete wavelet transform on the time series data sample to obtain the corresponding k-order decomposition coefficient vector includes: in a first-level decomposition process, decomposing the time series data sample by using a preset wavelet basis function to obtain a first-level corresponding decomposition coefficient vector, wherein the decomposition coefficient vector includes wavelet coefficient components and approximation coefficient components, the wavelet coefficient components contain high-frequency information of the time series data sample, and the approximation coefficient components contain low-frequency information of the time series data sample; in a second-level to k-level decomposition process, decomposing the approximation coefficient components in the decomposition coefficient vector corresponding to the last level by using the wavelet basis function to obtain a decomposition coefficient vector corresponding to the current level; and collecting the decomposition coefficient vectors obtained in the first-level to k-level decomposition processes to obtain the k-order decomposition coefficient vector, wherein the k-order decomposition coefficient vector further includes approximation coefficient components obtained by k-level decomposition.
[0008] Optionally, the determination of the flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector includes: determining the energy of each wavelet coefficient component in the k-order decomposition coefficient vector; dividing the energy of each wavelet coefficient component by the total sum of the energies of all wavelet coefficients in the k-order decomposition coefficient vector to obtain an energy proportion of the corresponding wavelet coefficient component; and determining the flag bit of each wavelet coefficient component according to the energy proportion of each wavelet coefficient component in the k-order decomposition coefficient vector.
[0009] Optionally, the determination of the energy of each wavelet coefficient component in the k-order decomposition coefficient vector includes: for each wavelet coefficient component in the k-order decomposition coefficient vector, determining the total sum of the modulus squares of the values of the wavelet coefficients in the wavelet coefficient component, and taking the total sum as the energy of the wavelet coefficient component.
[0010] Optionally, the flag of each wavelet coefficient component is determined according to the energy proportion of each wavelet coefficient component in the k-order decomposition coefficient vector, including: sorting the energy proportions of the plurality of wavelet coefficient components in the k-order decomposition coefficient vector in ascending order, and selecting the first m wavelet coefficient components from the sorting result in sequence, wherein the energy proportion sum of the first m wavelet coefficient components is less than a preset threshold value, and m is less than the total number of wavelet coefficient components in the k-order decomposition coefficient vector; setting the flag of the first m wavelet coefficient components to an invalid value, and setting the flag of the remaining wavelet coefficient components to a valid value.
[0011] Optionally, the time series data sample is enhanced according to the k-order decomposition coefficient vector of the time series data sample, the k-order decomposition coefficient vector of other time series data samples in the training sample data set, and the corresponding flags, including: randomly sampling one other time series data sample from the training sample data set, and determining the k-order decomposition coefficient vector of the other time series data sample and the corresponding flags; for the nth wavelet coefficient component in the k-order decomposition coefficient vector of the time series data sample, calculating the product of a preset random number, the nth wavelet coefficient component in the k-order decomposition coefficient vector of the other time series data sample, and the flag corresponding to the nth wavelet coefficient component, and taking the product and the sum of the nth wavelet coefficient component in the k-order decomposition coefficient vector of the time series data sample as the nth enhanced wavelet coefficient component in the k-order decomposition coefficient vector of the time series data sample; the enhanced k-order decomposition coefficient vector corresponding to the time series data sample is composed of the n enhanced wavelet coefficient components in the k-order decomposition coefficient vector of the time series data sample; and performing inverse discrete wavelet transform on the enhanced k-order decomposition coefficient vector corresponding to the time series data sample to obtain the enhanced time series data sample.
[0012] Optionally, the enhanced k-order decomposition coefficient vector corresponding to the time series data sample is subjected to inverse discrete wavelet transform to obtain the enhanced time series data sample, including: in the kth level inverse transform process, the kth level approximation coefficient component and the kth level wavelet coefficient component in the enhanced k-order decomposition coefficient vector corresponding to the time series data sample are respectively subjected to upsampling, and the upsampled kth level approximation coefficient component and the upsampled kth level wavelet coefficient component are alternately combined, and the combined vector is filtered to obtain the new approximation coefficient component corresponding to the first level; in the k-1th level to the second level inverse transform process, the new approximation coefficient component generated by the last level inverse transform and the wavelet coefficient component of the current level are respectively subjected to upsampling, and the upsampled new approximation coefficient component generated by the last level inverse transform and the upsampled wavelet coefficient component of the current level are alternately combined, and the combined vector is filtered to obtain the new approximation coefficient component of the current level; in the first level inverse transform process, the new approximation coefficient component of the second level and the wavelet coefficient component of the first level are respectively subjected to upsampling, and the upsampled new approximation coefficient component of the second level and the upsampled wavelet coefficient component of the first level are alternately combined, and the combined vector is filtered to obtain the enhanced time series data sample.
[0013] According to another aspect of the embodiments of the present application, a training sample data processing apparatus of a time series model is further provided, including: an obtaining module, configured to obtain a training sample data set for training the time series model, wherein the training sample data set includes a plurality of groups of training sample data, and each group of training sample data includes: a time series data sample and a corresponding sample label; a determining module, configured to, for each time series data sample, perform discrete wavelet transform on the time series data sample to obtain a corresponding k-order decomposition coefficient vector, and determine a flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector, wherein the k-order decomposition coefficient vector at least includes wavelet coefficient components obtained by k-level decomposition, and the flag bit is used to identify whether the data component corresponding to the wavelet coefficient component is disturbed in the enhancement process; an enhancement module, configured to, according to the k-order decomposition coefficient vector of the time series data sample, each wavelet coefficient component in the k-order decomposition coefficient vector of other time series data samples in the training sample data set, and the corresponding flag bit, enhance the time series data sample, and take the sample label of the time series data sample as the sample label of the enhanced time series data sample; and an adding module, configured to add a plurality of enhanced time series data samples and corresponding sample labels to the training sample data set.
[0014] According to another aspect of the embodiments of the present application, a computer program product is further provided, including: a computer program, wherein the computer program is executed by a processor to implement the above-mentioned training sample data processing method of the time series model.
[0015] According to another aspect of the embodiments of the present application, an electronic device is also provided, which includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the time series model training sample data processing method described above.
[0016] In the embodiments of the present application, the k-order decomposition coefficient vector is obtained by wavelet decomposition of the time series data sample, and the flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector is determined according to the energy proportion, so as to intelligently select the data components that need to be protected in the enhancement process; the wavelet coefficient components and flag bits in the k-order decomposition coefficient vectors of other samples in the training set are combined for homologous disturbance to generate enhanced time series data samples while keeping the sample labels unchanged, so as to expand the training sample data set, so that the time series model can be exposed to more diversified data in the training process without damaging the key features of the original signal. The technical effects of enhancing the time series data while effectively preserving the time-frequency statistical characteristics of the signal are achieved, and the purposes of improving the quality of the training data of the time series model and enhancing the generalization ability and robustness of the model are achieved. Further, the technical problem that the new time series data samples generated by the linear interpolation method are difficult to adapt to the characteristics of the time series data, resulting in poor generalization ability and robustness of the finally trained time series model is solved. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings, which are included to provide a further understanding of the present application, form a part of the present application and illustrate the illustrative embodiments of the present application and the description thereof, and do not constitute improper limitations on the present application. In the drawings:
[0018] Figure 1 is a flow diagram of an optional time series model training sample data processing method according to an embodiment of the present application;
[0019] Figure 2 is a structural diagram of an optional time series model training sample data processing device according to an embodiment of the present application;
[0020] Figure 3 is a structural diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0023] In order to better understand the embodiments of the present application, first, the part of the nouns or terms appearing in the description of the embodiments of the present application are translated and explained as follows:
[0024] Discrete Wavelet Transform (DWT): a signal processing technique that analyzes the local features of a signal through multi-scale analysis, widely used in signal compression, denoising and feature extraction, etc. Specifically, the discrete wavelet transform is a discrete sampling of the scale parameter and the translation parameter of the continuous wavelet transform. In image processing, a dyadic wavelet is often used as a wavelet transform function, i.e. using an integer power of 2 to divide.
[0025] Embodiment 1
[0026] According to the embodiments of the present application, a time sequence model training sample data processing method is provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.
[0027] Figure 1 is a flowchart of a time sequence model training sample data processing method according to the embodiments of the present application, as shown in Figure 1 The method comprises the following steps:
[0028] Step S102, obtaining a training sample data set for training a time sequence model, wherein the training sample data set includes a plurality of groups of training sample data, and each group of training sample data includes time sequence data samples and corresponding sample labels.
[0029] Step S104, for each time series data sample, performing discrete wavelet transform on the time series data sample to obtain a corresponding k-order decomposition coefficient vector, and determining a flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector. Wherein, the k-order decomposition coefficient vector at least includes: the wavelet coefficient components obtained by k-level decomposition respectively, and the flag bit is used to identify whether the data component corresponding to the wavelet coefficient component is disturbed in the enhancement process.
[0030] Step S106, according to the k-order decomposition coefficient vector of the time series data sample, the k-order decomposition coefficient vectors of other time series data samples in the training sample data set, and the corresponding flag bits, enhancing the time series data sample, and taking the sample label of the time series data sample as the sample label of the enhanced time series data sample.
[0031] Step S108, adding the plurality of enhanced time series data samples and the corresponding sample labels to the training sample data set.
[0032] Based on the scheme defined by the above steps S102 to S108, it can be known that in the embodiments of the present application, the homologous disturbance data enhancement method based on discrete wavelet transform is adopted, which realizes the enhancement of time series data while effectively preserving the time-frequency statistical characteristics of time series data, prevents signal distortion, and achieves the purpose of improving the quality of time series model training data, enhancing the generalization ability and robustness of the model. Therefore, this method is especially suitable for processing time series data with stationarity and limited bandwidth characteristics, such as self-interference cancellation in wireless communication systems, speech recognition, and financial prediction, etc. scenes, which can significantly optimize the performance of the model.
[0033] The steps of the time series model training sample data processing method will be described in detail in combination with the specific implementation process.
[0034] In the technical scheme provided in the above step S102, the training sample data set is a necessary resource prepared for the training of the time series model. Wherein, the time series model is suitable for analyzing and predicting data that changes over time. Therefore, the time series model can be applied to financial market prediction, Internet of Things device monitoring, weather prediction, power system load prediction, etc. The application scenarios of the time series model are not limited.
[0035] Taking financial market forecasting as an example, the time series model can be a stock price prediction model, and the training sample data used to train the stock price prediction model includes: price sequences (including opening price, closing price, highest price, lowest price, and trading volume) of multiple stocks within a historical time period as multiple training samples, and the predicted stock price of each stock on the next trading day of the historical time period as the sample label of the corresponding training sample. Therefore, the stock price prediction model trained based on this training sample dataset can analyze the price sequence of the target stock within a preset first time period to predict the stock closing price of the stock on the next trading day within the first time period. In addition, the time series model can also be an exchange rate prediction model, and the training sample data used for the exchange rate prediction model includes: exchange rate record sequences of multiple currencies within a historical time period as multiple training samples, and the predicted exchange rate value of each currency at the next time point in the historical time period as the sample label of the corresponding training sample. Therefore, the exchange rate prediction model trained based on this training sample dataset can analyze the exchange rate record sequence of the target currency within a preset first time period to predict the expected exchange rate value of the currency on the next business day within the first time period. The above two models are merely examples of time series models related to financial market forecasting. This application does not impose any specific restrictions on the types of time series models related to financial market forecasting.
[0036] Taking IoT device monitoring as an example, the time series model can be an IoT device state prediction model, and the training sample data used to train the IoT device state prediction model includes: using the operating state sequence (including current, voltage, speed, etc.) and environmental parameter sequence (including temperature, pressure, gas concentration, and other environmental parameters) of multiple IoT devices in a historical time period as multiple training samples, and using the operating state (such as normal operating state, fault state) of each IoT device at the next time point in the historical time period as the sample label of the corresponding training sample. Therefore, the IoT device state prediction model trained based on this training sample data set can analyze the operating state sequence and environmental parameter sequence of the IoT device to be analyzed in a preset first time period to predict the operating state of the IoT device at the next time point in the first time period.
[0037] Taking weather prediction as an example, the time series model can be a rainfall prediction model, and the training sample data used to train the rainfall prediction model includes: taking the meteorological data sequence (including air temperature, humidity, wind speed), satellite remote sensing data sequence and radar reflectivity data sequence of each region in a historical time period as a plurality of training samples, and taking the rainfall probability of each region in the next time period of the historical time period as the sample label of the corresponding training sample. Therefore, the rainfall prediction model trained based on the training sample data set can analyze the meteorological data sequence, satellite remote sensing data sequence and radar reflectivity data sequence of a certain region in a preset first time period, to predict the rainfall probability of the region in the next time period of the first time period.
[0038] Taking power system load prediction as an example, the time series model can be a small cell power load prediction model, and the training sample data used to train the small cell power load prediction model includes: taking the power consumption sequence (i.e. the power consumption sequence recorded by hour or day) of each small cell in a historical time period as a plurality of training samples, and taking the power consumption prediction value of each small cell in the next time period of the historical time period as the sample label of the corresponding training sample. Therefore, the small cell power load prediction model trained based on the training sample data set can analyze the power consumption sequence of a certain small cell in a preset first time period, to predict the power consumption prediction value of the small cell in the next time period of the first time period.
[0039] For the training sample data set used to train the time series model, since each training sample data in the training sample data set is time series data, if a new training sample is generated by linear interpolation or the like, the new training sample is difficult to adapt to the stationarity, limited bandwidth and other characteristics of time series data, which can easily cause signal distortion and affect the model training effect.
[0040] Therefore, the embodiment of the present application provides a time series data sample enhancement method based on homologous disturbance. For each time series data sample, the enhancement method is specifically as follows:
[0041] First step: perform discrete wavelet transform on the time series data sample to obtain the corresponding k-order decomposition coefficient vector.
[0042] Specifically, in the technical solution provided in the first step, the method can include:
[0043] Firstly, in the first-level decomposition process, the time series data sample is decomposed by using a preset wavelet basis function (such as Haar, Daubechies, Symlets, Coiflets, Morlet, etc.) to obtain a first-level corresponding decomposition coefficient vector. Among them, the high-pass filter of the wavelet basis function is used to perform convolution operation on the time series data sample to capture the transient or high-frequency information therein, and then the high-frequency information after convolution is down-sampled (i.e. one of every two sampling points is retained) to obtain the wavelet coefficient (also known as detail coefficient). At the same time, the low-pass filter of the wavelet basis function is used to perform convolution operation on the time series data sample to capture the low-frequency information therein, and similarly, the low-frequency information after convolution is down-sampled (i.e. one of every two sampling points is retained) to obtain the approximation coefficient component. Therefore, the plurality of decomposition coefficients in the decomposition coefficient vector includes: the wavelet coefficient component and the approximation coefficient component, the wavelet coefficient component contains the high-frequency information of the time series data sample, and the approximation coefficient component contains the low-frequency information of the time series data sample.
[0044] Then, in the second-level to k-level decomposition process, the approximation coefficient component obtained in the previous level decomposition is used as the input for each level decomposition. Therefore, the approximation coefficient component in the decomposition coefficient vector corresponding to the previous level is decomposed by using the same wavelet basis function to obtain the decomposition coefficient vector corresponding to the current level. Among them, a new set of wavelet coefficients and an approximation coefficient component are generated in each decomposition process, and with the increase of the level, the wavelet coefficients can capture more local features, and the approximation coefficient component retains the overall trend of the input.
[0045] After multiple iterations of decomposition, the decomposition coefficient vectors obtained in the first-level to k-level decomposition processes are summarized to obtain a k-order decomposition coefficient vector of the time series data sample. Among them, the plurality of decomposition coefficients in the k-order decomposition coefficient vector includes: the wavelet coefficient components obtained in each level decomposition and the approximation coefficient component obtained in the k-level decomposition. Therefore, the k-order decomposition coefficient vector can be denoted as 1,i ,f 2,i ,…f 2k,i =DWT(X i ,k), where DWT represents one-dimensional discrete wavelet transform, X i represents the i-th time series data sample, k represents the decomposition order, f n,i =[w 1,i ,w 2,i ,…,w L,i ], n∈[1,2,…,2 k ], where L represents the total number of wavelet coefficients in the wavelet coefficient component, L=Len(X i ) / 2 k , Len(X i ) represents the data length of the i-th time series data sample.
[0046] It should be noted that in the above decomposition process, the selection of the wavelet basis function is determined in combination with the input time series data sample. For example, the Haar wavelet performs well in signal mutation point detection, and the Daubechies wavelet has better effect in signal smoothing processing.
[0047] Second step: Determine the flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector. The flag bit is used to identify whether the data component corresponding to the wavelet coefficient component is disturbed in the enhancement process.
[0048] Specifically, in the technical solution provided in the above second step, the method can include:
[0049] First, determine the energy of each wavelet coefficient component in the k-order decomposition coefficient vector.
[0050] Wherein, for each wavelet coefficient component in the k-order decomposition coefficient vector, first determine the sum of the modulus square of the value of each wavelet coefficient in the wavelet coefficient component, and take the sum as the energy of the wavelet coefficient component. Therefore, the expression of the energy of the nth wavelet coefficient component can be written as:
[0051] Next, divide the energy of each wavelet coefficient component by the total energy of all wavelet coefficients in the k-order decomposition coefficient vector to obtain the energy proportion of the corresponding wavelet coefficient component. Therefore, the expression of the energy proportion of each wavelet coefficient component in the k-order decomposition coefficient vector can be written as:
[0052] Finally, determine the flag bit of each wavelet coefficient component according to the energy proportion of each wavelet coefficient component in the k-order decomposition coefficient vector.
[0053] Wherein, the setting of the flag bit can be realized by the following method: first, sort the energy proportions of the plurality of wavelet coefficient components in the k-order decomposition coefficient vector in ascending order, and from the sorting result, select the first m decomposition coefficients whose energy proportion sum is less than a preset threshold value in turn, wherein m is less than the total number of wavelet coefficient components in the k-order decomposition coefficient vector; set the flag bit of the first m wavelet coefficient components to an invalid value, and set the flag bit of the remaining wavelet coefficient components to a valid value.
[0054] The above setting process can be understood as: the energy proportions Pf n Sort from small to large, and take the sum of the first m energy proportions as Pfsum(m). By comparing Pfsum(m) with the total energy of the k-order decomposition coefficient vector, if Pfsum(m) is less than the total energy, the flag bit of the first m wavelet coefficient components is set to an invalid value, and the flag bit of the remaining wavelet coefficient components is set to a valid value. mfind the value of m that satisfies the condition Pfsum(m)≤α<Pfsum(m+1) with the preset filtering threshold value a, and set the energy proportion Pf n The smallest first m wavelet coefficient components correspond to an invalid value (such as 0), which indicates that the components corresponding to these wavelet coefficient components will be protected from disturbance in the subsequent data enhancement process; and the remaining wavelet coefficient components are marked as valid values (such as 1), which means that the components corresponding to these wavelet coefficient components can be disturbed for data enhancement.
[0055] For example, if the time series data sample X i is subjected to one-dimensional Haar discrete wavelet transform, and k = 2, then four wavelet coefficient components f1, f2, f3, and f4 can be obtained, each coefficient having f n,i = [w 1,i , w 2,i , w 3,i ], n ∈ [1, 2, 3, 4]. By determining the energy proportion of each wavelet coefficient component and sorting, the value of m can be determined. If m = 0, it means that the time series data sample signal exists on each wavelet coefficient component and no component filtering is performed; if m = 1, it means that the main energy of the time series data sample is mainly concentrated in the largest three wavelet coefficient components, and the wavelet coefficient component with the smallest energy proportion is filtered; if m = 2, it means that the main energy of the time series data sample signal is mainly concentrated in the largest two wavelet coefficient components, and the two wavelet coefficient components with the smallest energy proportion are filtered; if m = 3, it means that the main energy of the time series data sample signal is mainly concentrated in the wavelet coefficient component with the largest energy proportion, and the three wavelet coefficient components with the smallest energy proportion are filtered.
[0056] Step 3: According to the k-order decomposition coefficient vector of the time series data sample, the wavelet coefficient components in the k-order decomposition coefficient vector of other time series data samples in the training sample data set, and the corresponding flag bits, the time series data sample is enhanced.
[0057] Specifically, in the technical solution provided in the above third step, the method can include:
[0058] First, a random other time series data sample (which is different from the time series data sample currently being processed) is sampled from the training sample data set, and the wavelet coefficient components in the k-order decomposition coefficient vector of the other time series data sample and the corresponding flag bits are determined.
[0059] Then, for the nth wavelet coefficient component in the kth decomposition coefficient vector of the time series data sample, the product of the preset random number, the nth wavelet coefficient component in the kth decomposition coefficient vector of the other time series data sample and the flag corresponding to the nth wavelet coefficient component is calculated, and the product and the sum of the nth wavelet coefficient component in the kth decomposition coefficient vector of the time series data sample are taken as the nth enhanced wavelet coefficient component in the kth decomposition coefficient vector of the time series data sample. Therefore, the expression of the nth enhanced wavelet coefficient component in the kth decomposition coefficient vector of the ith time series data sample can be written as: where λ represents a random number subject to a normal distribution N(0, σ 2 ), f n,p represents the nth wavelet coefficient component in the kth decomposition coefficient vector of the pth other time series data sample, and fl n,p represents the flag of the nth wavelet coefficient component in the kth decomposition coefficient vector of the pth other time series data sample.
[0060] Then, the enhanced kth decomposition coefficient vector corresponding to the time series data sample is composed of the n enhanced wavelet coefficient components in the kth decomposition coefficient vector of the time series data sample, and is denoted as
[0061] Finally, the enhanced kth decomposition coefficient vector corresponding to the time series data sample is subjected to inverse discrete wavelet transform to obtain the enhanced time series data sample. Therefore, the enhanced time series data sample
[0062] where the specific process of the inverse discrete wavelet transform is as follows: in the kth inverse transform process, the kth level approximation coefficient component and the kth level wavelet coefficient component in the enhanced kth decomposition coefficient vector corresponding to the time series data sample are respectively up-sampled (i.e. zero is inserted between every two coefficients), and the up-sampled kth level approximation coefficient component and the up-sampled kth level wavelet coefficient component are alternately combined (i.e. one approximation coefficient is followed by one detail coefficient, which is followed by the next approximation coefficient, and so on), and then the combined vector is filtered by using the low-pass filter and the high-pass filter corresponding to the wavelet basis function to obtain the new approximation coefficient component corresponding to the first level.
[0063] In the k-2th to 2th inverse transform processes, the same inverse transform process as the above first level is also used, that is, the new approximation coefficient component generated by the last inverse transform and the wavelet coefficient component of the current level are respectively up-sampled, the up-sampled new approximation coefficient component generated by the last inverse transform and the up-sampled wavelet coefficient component of the current level are alternately combined, and the combined vector is filtered to obtain the new approximation coefficient component of the current level.
[0064] The above inverse transformation process is repeated until the first level. In the inverse transformation process of the first level, the new approximation coefficient component of the second level and the wavelet coefficient component of the first level are respectively up-sampled, and the up-sampled new approximation coefficient component of the second level and the up-sampled wavelet coefficient component of the first level are alternately combined, and the combined vector is filtered to obtain enhanced time series data samples.
[0065] In the above homologous disturbance enhancement method based on discrete wavelet transform, the time-frequency characteristics of the signal are particularly considered. Through wavelet transform, the data can be analyzed and disturbed in both time and frequency domains, ensuring that the enhanced time series data samples not only maintain correlation in the time domain but also maintain the statistical characteristics of the original signal in the frequency domain, avoiding distortion problems that may occur in traditional data enhancement techniques, and particularly preventing the introduction of out-of-band noise, maintaining the inherent stationarity and bandwidth limitation characteristics of the data. Secondly, the wavelet coefficient screening mechanism based on energy proportion avoids excessive disturbance of noise components with low energy proportion in the signal, thereby effectively preventing signal distortion while enhancing data diversity, ensuring that the enhanced data set accurately reflects the statistical properties of the original data.
[0066] Furthermore, the sample label of the time series data sample is taken as the sample label of the enhanced time series data sample, so as to add the plurality of enhanced time series data samples and the corresponding sample labels to the training sample data set to obtain an enhanced training sample data set.
[0067] Finally, the enhanced training sample data set and the original training sample data set are combined to form a new training data set for training the time series model. In this way, the model can be exposed to more diversified data forms, including different noise patterns and signal variants, during the training process, so that the model can exhibit stronger adaptability and stability when facing complex and variable time series data, that is, the robustness of the model is improved.
[0068] Embodiment 2
[0069] According to the embodiments of the present application, a time series model training sample data processing device for implementing the time series model training sample data processing method in Embodiment 1 is also provided, as shown in Figure 2 The time series model training sample data processing device at least includes an acquisition module 22, a determination module 24, an enhancement module 26, and an adding module 28, wherein:
[0070] The acquisition module 22 is configured to acquire a training sample data set for training a time series model, wherein the training sample data set includes a plurality of groups of training sample data, and each group of training sample data includes a time series data sample and a corresponding sample label.
[0071] The determining module 24 is configured to, for each time series data sample, perform a discrete wavelet transform on the time series data sample to obtain a corresponding k-order decomposition coefficient vector, and determine a flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector, wherein the k-order decomposition coefficient vector at least includes k-order decomposition wavelet coefficient components obtained by the time series data sample, and the flag bit is used to identify whether the data component corresponding to the wavelet coefficient component is disturbed in the enhancement process.
[0072] The enhancing module 26 is configured to enhance the time series data sample according to the k-order decomposition coefficient vector of the time series data sample, each wavelet coefficient component in the k-order decomposition coefficient vector of other time series data samples in the training sample data set, and the corresponding flag bit, and take the sample label of the time series data sample as the sample label of the enhanced time series data sample.
[0073] The adding module 28 is configured to add the plurality of enhanced time series data samples and the corresponding sample labels to the training sample data set.
[0074] The functions of each module of the time series model training sample data processing device will be described below in combination with a specific implementation process.
[0075] As an optional implementation, for each time series data sample, the determining module 24 can determine the flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector corresponding to the time series data sample according to the following steps:
[0076] First step: performing a discrete wavelet transform on the time series data sample to obtain a corresponding k-order decomposition coefficient vector.
[0077] Specifically, in the technical solution provided in the first step, the method can include:
[0078] First, in the first-order decomposition process, the time series data sample is decomposed by using a preset wavelet basis function to obtain a first-order corresponding decomposition coefficient vector. Wherein, the high-pass filter of the wavelet basis function is used to perform convolution operation on the time series data sample to capture the transient or high-frequency information therein, and then the high-frequency information after convolution is down-sampled (i.e. one of every two sampling points is retained) to obtain wavelet coefficients (also known as detail coefficients). At the same time, the low-pass filter of the wavelet basis function is used to perform convolution operation on the time series data sample to capture the low-frequency information therein, and then the low-frequency information after convolution is down-sampled (i.e. one of every two sampling points is retained) to obtain approximation coefficient components. Therefore, the plurality of decomposition coefficients in the decomposition coefficient vector includes wavelet coefficient components and approximation coefficient components, the wavelet coefficient components contain high-frequency information of the time series data sample, and the approximation coefficient components contain low-frequency information of the time series data sample.
[0079] Then, in the second-level to the k-level decomposition process, each level decomposition takes the approximation coefficient component obtained in the previous level decomposition as input. Therefore, the approximation coefficient component in the decomposition coefficient vector corresponding to the previous level is decomposed using the same wavelet basis function to obtain the decomposition coefficient vector corresponding to the current level. In each decomposition process, a set of new wavelet coefficients and an approximation coefficient component are generated, and as the level increases, the wavelet coefficients can capture more local features, and the approximation coefficient component retains the overall trend of the input.
[0080] After multiple iterations of decomposition, the decomposition coefficient vectors obtained in the first-level to the k-level decomposition process are aggregated to obtain the k-order decomposition coefficient vector of the time series data sample. The plurality of decomposition coefficients in the k-order decomposition coefficient vector includes: the wavelet coefficient components obtained in each level decomposition and the approximation coefficient component obtained in the k-level decomposition.
[0081] Second step: determine the flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector. The flag bit is used to identify whether the data component corresponding to the wavelet coefficient component is disturbed in the enhancement process.
[0082] Specifically, in the technical solution provided in the above second step, the method can include:
[0083] First, determine the energy of each wavelet coefficient component in the k-order decomposition coefficient vector.
[0084] For each wavelet coefficient component in the k-order decomposition coefficient vector, first determine the sum of the modulus squares of the values of the wavelet coefficients in the wavelet coefficient component, and take the sum as the energy of the wavelet coefficient component.
[0085] Then, divide the energy of each wavelet coefficient component by the total energy of all wavelet coefficients in the k-order decomposition coefficient vector to obtain the energy proportion of the corresponding wavelet coefficient component.
[0086] Finally, determine the flag bit of each wavelet coefficient component according to the energy proportion of each wavelet coefficient component in the k-order decomposition coefficient vector.
[0087] The setting of the flag bit can be realized by the following method: first, sort the energy proportions of the plurality of wavelet coefficient components in the k-order decomposition coefficient vector in ascending order, and from the sorting result, select the first m decomposition coefficients whose energy proportion sum is less than a preset threshold value in turn, where m is less than the total number of wavelet coefficient components in the k-order decomposition coefficient vector; set the flag bit of the first m wavelet coefficient components to an invalid value, and set the flag bit of the remaining wavelet coefficient components to a valid value.
[0088] As an optional implementation, for each time series data sample, the enhancement module 26 can perform enhancement processing on the time series data sample according to the following steps:
[0089] First, a random other time series data sample is sampled from the training sample data set, and each wavelet coefficient component in the k-order decomposition coefficient vector of the other time series data sample and the corresponding flag bit are determined.
[0090] Next, for the nth wavelet coefficient component in the k-order decomposition coefficient vector of the time series data sample, the product of the preset random number, the nth wavelet coefficient component in the k-order decomposition coefficient vector of the other time series data sample, and the flag bit corresponding to the nth wavelet coefficient component is calculated, and the sum of the nth enhanced wavelet coefficient component in the k-order decomposition coefficient vector of the time series data sample and the nth wavelet coefficient component in the k-order decomposition coefficient vector of the other time series data sample is taken as the nth enhanced wavelet coefficient component in the k-order decomposition coefficient vector of the time series data sample.
[0091] Then, the n enhanced wavelet coefficient components in the k-order decomposition coefficient vector of the time series data sample form the enhanced k-order decomposition coefficient vector corresponding to the time series data sample.
[0092] Finally, the enhanced k-order decomposition coefficient vector corresponding to the time series data sample is subjected to inverse discrete wavelet transform to obtain an enhanced time series data sample.
[0093] Specifically, the specific process of the above inverse discrete wavelet transform includes:
[0094] In the kth level inverse transform process, the kth level approximation coefficient component and the kth level wavelet coefficient component in the enhanced k-order decomposition coefficient vector corresponding to the time series data sample are respectively up-sampled (i.e., zero is inserted between every two coefficients), and the up-sampled kth level approximation coefficient component and the kth level wavelet coefficient component are alternately combined (i.e., one approximation coefficient is followed by one detail coefficient, which is followed by the next approximation coefficient, and so on), and then the combined vector is filtered by using the low-pass filter and the high-pass filter corresponding to the wavelet basis function to obtain new approximation coefficient components corresponding to the first level.
[0095] In the k-2th level to the 2th level inverse transform process, the same inverse transform process as the above first level is used, i.e., the new approximation coefficient component generated by the last level inverse transform and the current level wavelet coefficient component are up-sampled, the up-sampled new approximation coefficient component generated by the last level inverse transform and the up-sampled current level wavelet coefficient component are alternately combined, and the combined vector is filtered to obtain new approximation coefficient components of the current level.
[0096] The above inverse transformation process is repeated until the first level. In the inverse transformation process of the first level, the new approximation coefficient component of the second level and the wavelet coefficient component of the first level are respectively up-sampled, and the up-sampled new approximation coefficient component of the second level and the up-sampled wavelet coefficient component of the first level are alternately combined, and the combined vector is filtered to obtain enhanced time series data samples.
[0097] Further, the adding module 28 can add the plurality of enhanced time series data samples and the corresponding sample labels to the training sample data set to obtain an enhanced training sample data set. The enhanced training sample data set can be combined with the training sample data set obtained by the obtaining module 22 to form a new training data set, so as to train the time series model, thereby ensuring that the model can access more diversified data forms, including different noise patterns and signal variants, during the training process, so that the model can exhibit stronger adaptability and stability when facing complex and variable time series data, that is, the robustness of the model is improved.
[0098] It should be noted that each module in the time series model training sample data processing apparatus in the embodiments of the present application corresponds to each implementation step of the time series model training sample data processing method in Embodiment 1. Since Embodiment 1 has been described in detail, the details not embodied in this embodiment can be referred to Embodiment 1, and will not be described in detail here.
[0099] Embodiment 3
[0100] According to the embodiments of the present application, a computer program product is also provided, which includes a computer program. When the computer program is executed by a processor, the time series model training sample data processing method in Embodiment 1 is implemented.
[0101] According to the embodiments of the present application, a non-volatile storage medium is also provided, which includes a stored computer program. The device in which the non-volatile storage medium is located executes the time series model training sample data processing method in Embodiment 1 by running the computer program.
[0102] According to the embodiments of the present application, a processor is also provided, which is used to run a computer program. When the computer program is run, the time series model training sample data processing method in Embodiment 1 is executed.
[0103] According to the embodiments of the present application, an electronic device is also provided, which includes a memory and a processor. The memory stores a computer program, and the processor is configured to execute the time series model training sample data processing method in Embodiment 1 by the computer program.
[0104] Specifically, the computer program runs to implement the following steps: obtaining a training sample data set for training a time series model, wherein the training sample data set includes multiple groups of training sample data, and each group of training sample data includes: time series data samples and corresponding sample labels; for each time series data sample, performing discrete wavelet transform on the time series data sample to obtain a corresponding k-order decomposition coefficient vector, and determining the flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector, wherein the k-order decomposition coefficient vector at least includes: the wavelet coefficient components obtained by k-level decomposition respectively, and the flag bit is used to identify whether the data component corresponding to the wavelet coefficient component is disturbed in the enhancement process; according to the k-order decomposition coefficient vector of the time series data sample, the k-order decomposition coefficient vectors of other time series data samples in the training sample data set, and the corresponding flag bits of each wavelet coefficient component, the time series data sample is enhanced, and the sample label of the time series data sample is used as the sample label of the enhanced time series data sample; and adding multiple enhanced time series data samples and corresponding sample labels to the training sample data set.
[0105] As an optional implementation, the electronic device can exist in the form of a mobile terminal, a computer terminal, or a similar computing device. Figure 3 A hardware structure block diagram of an electronic device for implementing a time series model training sample data processing method is shown. As shown in Figure 3 , the electronic device 30 can include one or more (in the figure, 302a, 302b, …, 302n are used to show) processors 302 (the processor 302 can include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA, etc.), a memory 304 for storing data, and a transmission device 306 for communication function. In addition, it can also include: display, input / output interface (I / O interface), universal serial bus (USB) port (which can be included as one of the ports in the bus), network interface, power supply and / or camera. Those skilled in the art can understand that, Figure 3 The structure shown is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the electronic device 30 can also include more or less components than Figure 3 shown, or have a different configuration than Figure 3 shown.
[0106] It should be noted that the one or more processors 302 and / or other data processing circuitry described above can be referred to herein generically as "data processing circuitry". The data processing circuitry can be embodied in whole or in part as software, hardware, firmware, or any combination thereof. Furthermore, the data processing circuitry can be a single standalone processing module, or it can be incorporated in whole or in part within any one of the other elements of the electronic device 30. As referred to in the embodiments herein, the data processing circuitry acts as a processor to control, for example, the selection of the variable resistance terminal path connected to the interface.
[0107] The memory 304 can be used to store software programs and modules for applications, such as program instructions / data storage means corresponding to the training sample data processing method of the timing model in the embodiments herein. The processor 302 can execute various functions and data processing by running the software programs and modules stored in the memory 304, i.e. implement the vulnerability detection method of the application program described above. The memory 304 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 304 can further include a memory remotely arranged with respect to the processor 302, which can be connected to the electronic device 30 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0108] The transmission device 306 is configured to receive or send data via a network. Examples of the network include, but are not limited to, a wireless network provided by a communication provider of the electronic device 30. In one example, the transmission device 306 includes a network adapter (NIC), which can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 306 can be a radio frequency (RF) module, which is configured to communicate with the Internet in a wireless manner.
[0109] The display can be, for example, a touch screen type liquid crystal display (LCD), which can enable a user to interact with the user interface of the electronic device 30.
[0110] The above-mentioned embodiment numbers are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0111] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0112] In several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented by other ways. Among them, the above-described device embodiments are only schematic, for example, the division of units can be a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, units or modules, which can be electrical or other forms.
[0113] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e. they can be located in one place or distributed to multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0114] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0115] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0116] The above is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.
Claims
1. A method for processing training sample data of a time series model, characterized in that: include: Obtaining a training sample data set for training a time series model, wherein the training sample data set includes multiple groups of training sample data, and each group of the training sample data includes: a time series data sample and a corresponding sample label; For each of the time series data samples, a discrete wavelet transform is performed on the time series data sample to obtain a corresponding k-order decomposition coefficient vector, and a flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector is determined, wherein the k-order decomposition coefficient vector includes at least: wavelet coefficient components obtained by each k-level decomposition, and the flag bit is used to identify whether the data component corresponding to the wavelet coefficient component is disturbed during the enhancement process; According to the k-order decomposition coefficient vector of the time series data sample, each wavelet coefficient component in the k-order decomposition coefficient vector of other time series data samples in the training sample data set and the corresponding flag bits, the time series data sample is enhanced, and the sample label of the time series data sample is used as the sample label of the enhanced time series data sample; Adding a plurality of enhanced time series data samples and corresponding sample labels to the training sample dataset.
2. The method according to claim 1, characterized in that Performing discrete wavelet transform on the time series data sample to obtain the corresponding k-order decomposition coefficient vector, including: In the first-level decomposition process, the time series data sample is decomposed using a preset wavelet basis function to obtain a decomposition coefficient vector corresponding to the first level, wherein the decomposition coefficient vector includes: a wavelet coefficient component and an approximation coefficient component, and the wavelet coefficient component contains high-frequency information of the time series data sample, and the approximation coefficient component contains low-frequency information of the time series data sample; In the decomposition process from the 2nd level to the kth level, the approximation coefficient components in the decomposition coefficient vector corresponding to the previous level are decomposed using the wavelet basis function to obtain the decomposition coefficient vector corresponding to the current level; The decomposition coefficient vectors obtained from the 1st to kth level decomposition processes are summarized to obtain the kth-order decomposition coefficient vector, wherein the kth-order decomposition coefficient vector also includes: an approximation coefficient component obtained from the kth-level decomposition.
3. The method according to claim 1, characterized in that Determining the flag bit of each wavelet coefficient component in the k-th order decomposition coefficient vector includes: Determining the energy of each wavelet coefficient component in the k-th order decomposition coefficient vector; Dividing the energy of each wavelet coefficient component by the sum of the energies of all wavelet coefficients in the k-th order decomposition coefficient vector to obtain the energy proportion of the corresponding wavelet coefficient component; The flag bit of each wavelet coefficient component is determined according to the energy proportion of each wavelet coefficient component in the k-th order decomposition coefficient vector.
4. The method according to claim 3, characterized in that Determining the energy of each wavelet coefficient component in the k-th order decomposition coefficient vector includes: For each wavelet coefficient component in the k-th order decomposition coefficient vector, the sum of the squares of the moduli of the values of the wavelet coefficients in the wavelet coefficient component is determined, and the sum is used as the energy of the wavelet coefficient component.
5. The method according to claim 3, characterized in that Determining the flag of each wavelet coefficient component according to the energy proportion of each wavelet coefficient component in the k-th order decomposition coefficient vector includes: Sorting the energy proportions of the plurality of wavelet coefficient components in the k-order decomposition coefficient vector in ascending order, and selecting first m wavelet coefficient components whose total energy proportions are less than a preset threshold value from the sorting results, where m is less than the total number of wavelet coefficient components in the k-order decomposition coefficient vector; The flag positions of the first m wavelet coefficient components are set to invalid values, and the flag positions of the remaining wavelet coefficient components are set to valid values.
6. The method according to claim 1, characterized in that The time series data sample is enhanced according to the k-order decomposition coefficient vector of the time series data sample, each wavelet coefficient component in the k-order decomposition coefficient vector of other time series data samples in the training sample data set and the corresponding flag bits, including: Randomly sampling another time series data sample from the training sample data set, and determining each wavelet coefficient component and corresponding flag bit in the k-order decomposition coefficient vector of the other time series data sample; For the nth wavelet coefficient component in the k-order decomposition coefficient vector of the time series data sample, calculate the product of a preset random number, the nth wavelet coefficient component in the k-order decomposition coefficient vector of the other time series data sample, and a flag bit corresponding to the nth wavelet coefficient component, and use the sum of the product and the nth wavelet coefficient component in the k-order decomposition coefficient vector of the time series data sample as the nth enhanced wavelet coefficient component in the k-order decomposition coefficient vector of the time series data sample; The enhanced k-order decomposition coefficient vector corresponding to the time series data sample is formed by n enhanced wavelet coefficient components in the k-order decomposition coefficient vector of the time series data sample; Performing an inverse discrete wavelet transform on the enhanced k-th order decomposition coefficient vector corresponding to the time series data sample to obtain an enhanced time series data sample.
7. The method according to claim 6, characterized in that Performing an inverse discrete wavelet transform on the enhanced k-th order decomposition coefficient vector corresponding to the time series data sample to obtain an enhanced time series data sample, including: In the k-th level inverse transform process, upsampling the k-th level approximation coefficient component and the k-th level wavelet coefficient component in the enhanced k-th order decomposition coefficient vector corresponding to the time series data sample, alternately merging the upsampled k-th level approximation coefficient component and the upsampled k-th level wavelet coefficient component, filtering the merged vector, and obtaining a new approximation coefficient component corresponding to the first level; In the inverse transform process from the k-1th level to the second level, upsampling the new approximation coefficient components generated by the previous level inverse transform and the wavelet coefficient components of the current level respectively, alternately merging the upsampled new approximation coefficient components generated by the previous level inverse transform and the upsampled wavelet coefficient components of the current level, and filtering the merged vector to obtain the new approximation coefficient components of the current level; During the first-level inverse transformation process, the new approximation coefficient components of the second level and the wavelet coefficient components of the first level are upsampled respectively, and the upsampled new approximation coefficient components of the second level and the upsampled wavelet coefficient components of the first level are alternately merged, and the merged vector is filtered to obtain the enhanced time series data sample.
8. A training sample data processing device for a time series model, characterized in that: include: An acquisition module is used to acquire a training sample data set for training a time series model, wherein the training sample data set includes multiple groups of training sample data, and each group of training sample data includes: a time series data sample and a corresponding sample label; a determination module, configured to perform a discrete wavelet transform on each of the time series data samples to obtain a corresponding k-order decomposition coefficient vector, and determine a flag bit of each wavelet coefficient component in the k-order decomposition coefficient vector, wherein the k-order decomposition coefficient vector includes at least: wavelet coefficient components obtained by each k-level decomposition, and the flag bit is used to identify whether the data component corresponding to the wavelet coefficient component is disturbed during the enhancement process; an enhancement module, configured to enhance the time series data sample based on the k-order decomposition coefficient vector of the time series data sample, each wavelet coefficient component in the k-order decomposition coefficient vector of other time series data samples in the training sample data set, and the corresponding flag bits, and use the sample label of the time series data sample as the sample label of the enhanced time series data sample; An adding module is used to add a plurality of enhanced time series data samples and corresponding sample labels to the training sample data set.
9. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, it implements the training sample data processing method of the time series model described in any one of claims 1 to 7.
10. An electronic device, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the training sample data processing method of the time series model according to any one of claims 1 to 7 through the computer program.