A time series data processing method, device and medium for machine learning modeling

By preprocessing time series data and extracting noise characteristics, a target data list is generated, which solves the problem of failure to utilize noise characteristics in the existing technology and improves the accuracy and applicability of the machine learning model.

CN114118445BActive Publication Date: 2024-09-20SHENZHEN AUDAQUE DATA TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111463279.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-02
Publication Date
2024-09-20
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

The existing technology fails to effectively utilize the noise characteristics in time series data in machine learning modeling, resulting in poor model training results and failure to fully utilize the useful information in the noisy data.

Method used

By obtaining a sample data set for preprocessing, a noise data set is constructed and noise-related values ​​are extracted, a target data list is generated, and the data dimension is expanded to reflect the noise characteristics, which is used to improve the training accuracy of the machine learning model.

Benefits of technology

It improves the training accuracy and application scope of the machine learning model, can more effectively utilize the information in the noisy data, and enhance the model's understanding and prediction ability of time series data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114118445B
    Figure CN114118445B
Patent Text Reader

Abstract

The present application provides a time series data processing method, device and medium for machine learning modeling, the method comprising: obtaining a sample data set with time series within a preset time period; preprocessing any sample data list in the sample data set to obtain an intermediate data set; determining a noise data list based on intermediate data and noise-related values ​​in the intermediate data set; finally, determining other data lists required for machine learning model training based on the noise data list, so that the original one dimension corresponding to one data list is expanded to one dimension corresponding to multiple data lists, which is conducive to improving the accuracy of machine learning model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and specifically to a time series data processing method, device and medium for machine learning modeling. Background Art

[0002] There is inevitably a lot of noise data in time series data. For example, when detecting current and voltage values ​​in the industrial field, the accuracy of the sensor and external environmental interference will cause random fluctuations in the detection values. For example, in bad weather, the detection value of the road load sensor will change due to environmental factors such as humidity and temperature. When performing machine learning modeling on such data, existing technologies usually do not process such data and directly use noisy data for training, or completely eliminate it as contaminated data.

[0003] In fact, noise data contains a variety of useful information. For example, the true value of the data can be restored after the noise is accurately identified. At the same time, the variance value and the mean value of the noise also reflect the intensity of the influence of the external environment on the time series data, which can improve the training effect of the machine learning model. However, the existing technology rarely takes the above information in the noise data into consideration. Therefore, it is necessary to provide a time series data processing method for machine learning modeling that takes into account the characteristics of noise, make full use of the valuable information in the noise, and improve the scope of application and accuracy of the machine learning model. Summary of the invention

[0004] In view of the above technical problems, the technical solution adopted by this application is as follows:

[0005] S100, within a preset time period, obtain a sample data set A=(A1, A2, ..., A n ), A i Refers to the sample data list corresponding to the i-th feature dimension, i = 1...n, n is the number of feature dimensions, and obtains any sample data list from the sample data set A Ai j It refers to the data corresponding to the jth time node of the i-th feature dimension, j = 1...m, m is the number of time nodes;

[0006] S200, for A i Perform preprocessing to obtain the intermediate data set B = (B1, B2, ..., B k ), B r Refers to the intermediate data list corresponding to the rth priority, r = 1...k, k is the number of priorities, where B r The corresponding priority is greater than B r+1 The corresponding priority;

[0007] S300, traverse B and construct a noise data set S = (S1, S2, ..., S k ), where S r refers to the rth noise data list, S r =B1+B2+…B r , r = 1...k;

[0008] S400, traverse S, obtain each noise data list S r The corresponding noise correlation value F r And according to F r Construct a list of related values ​​F = (F1, F2, ..., F k ), obtain the minimum noise correlation value from F, and convert the S corresponding to the minimum noise correlation value r As the target noise data list T i ;

[0009] S500, according to the target noise data list T i , generating T i The corresponding first data list, T i The corresponding second data list and T i The corresponding third data list, and according to T i 、T i The corresponding first data list, T i The corresponding second data list and T i The corresponding third data list is constructed into A i The corresponding target data list;

[0010] S600, repeat steps S100-S500 to obtain A except A i Target data lists corresponding to other sample data lists except ;

[0011] S700, merging n target data lists in the order of feature dimensions of A to construct a final data set.

[0012] The present application has at least the following technical effects: within a preset time period, a sample data set with time series is obtained, any sample data list in the sample data set is preprocessed to obtain an intermediate data set, and then a noise data list is determined based on the intermediate data and noise-related values ​​in the intermediate data set, and the noise data list can truly reflect the noise characteristics carried in the time series data, and then other data lists required for machine learning model training are determined based on the noise data list, so that the original one dimension corresponding to one data list is expanded to one dimension corresponding to multiple data lists, which is conducive to improving the accuracy of machine learning model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1A flowchart of a time series data processing method for machine learning modeling provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0014] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0015] like Figure 1 As shown, the embodiment of the present application provides a time series data processing method for machine learning modeling, comprising the following steps:

[0016] S100: within a preset time period, obtain a sample data set A=(A1, A2, ..., A n ), where A i Refers to the sample data list corresponding to the i-th feature dimension, i = 1...n, n is the number of feature dimensions, and obtains any sample data list from the sample data set A It refers to the data corresponding to the jth time node of the i-th feature dimension, j=1…m, m is the number of time nodes.

[0017] Specifically, the m time nodes can be divided according to the specific duration of the preset time period, wherein each sample data list A i middle The corresponding time node is greater than The corresponding time nodes and the consistent time intervals between adjacent time nodes can ensure that all sample data in the sample data list under any feature dimension in the sample data set are time series data, which can be helpful in obtaining noise data and its corresponding related data and improving the accuracy of machine learning.

[0018] Preferably, the sample data set has an m*n matrix structure.

[0019] Specifically, for any application scenario, the sample data can determine several characteristic dimensions according to different application scenarios. For example, when n kinds of materials are required to prepare a certain product, any one material can be understood as a characteristic dimension.

[0020] S200, against A i Perform preprocessing to obtain the intermediate data set B = (B1, B2, ..., B k ), B r It refers to the intermediate data list corresponding to the rth priority, r = 1...k, k is the number of priorities, preferably, Br The corresponding priority is greater than B r+1 The corresponding priority.

[0021] Specifically, in step S200, B r The corresponding priorities can be set according to the attributes of the sample data itself. For example, when the sample data is a signal, the priority corresponding to the high frequency of the signal is greater than the priority corresponding to the medium frequency of the signal.

[0022] Preferably, the preprocessing is an empirical mode decomposition process. Those skilled in the art will know that data after the empirical mode decomposition process will generate a number of intrinsic mode function sequences and use the intrinsic mode function sequences as intermediate data lists.

[0023] S300, traverse B and construct a noise data set S = (S1, S2, ..., S k ), where S r refers to the rth noise data list, S r =B1+B2+…B r , r = 1...k, which can be understood as S r It is formed by merging the first r intermediate data lists in B to avoid data discretization and improve the accuracy of machine learning model training.

[0024] S400, traverse S, obtain each noise data list S r The corresponding noise correlation value F r And according to F r Construct a list of related values ​​F = (F1, F2, ..., F k ), obtain the minimum noise correlation value from F, and convert the S corresponding to the minimum noise correlation value r As the target noise data list T i , it can be understood that the noise correlation value is a numerical value used to reflect the accuracy of the noise.

[0025] Specifically, the method further includes obtaining F r Steps:

[0026] Get the target weight list Y = (Y1, Y2, ..., Y m ), where Y j refers to the label value corresponding to the jth time node and is based on each noise data list S in Y and S r , get S r The corresponding noise correlation value F r , F r Meet the following conditions:

[0027]

[0028] in, Meet the following conditions:

[0029] in, Meet the following conditions:

[0030] In the above steps It can be understood as S r The mean of It can be understood as the mean value of Y, the noise correlation value F r It reflects the correlation between the noise and the target weight list. The lower the correlation, the stronger the independence of the noise, and the greater the supplementary value to model training, which is conducive to improving the accuracy of machine learning model training.

[0031] S500, according to the target noise data list T i , generate the target noise data list T i The corresponding first data list, the second data list and the third data list, and according to the target noise data list T i , Target noise data list T i The corresponding first data list, second data list and third data list are constructed into A i The corresponding target data list can be understood as: construct A i The corresponding target data list is as follows: i 、T i The corresponding first data list, T i The corresponding second data list and T i The corresponding third data list and other four lists of m rows and 1 column are horizontally combined to form a data list of m rows and 4 columns, which is the target data list.

[0032] Specifically, the first data list is a sample data list A i The corresponding target noise data list T i The data list constructed by the phase difference data can be understood as the real data obtained after the noise is removed from the original noisy sample data. The real data is stable because the noise influence is eliminated, so that the data in machine learning will not affect the accuracy of machine learning training due to stability problems.

[0033] Specifically, the target noise data list T i Input into the preset noise model for fitting, and obtain the target noise data list T i The noise mean is taken as the second data list, and a data list constructed according to the noise mean is used as the second data list. Those skilled in the art may know how to calculate the noise mean, which will not be described in detail here.

[0034] Specifically, the target noise data list is input into a preset noise model for fitting, and the target noise data list T is obtained. i The noise variance value is obtained, and a data list constructed according to the noise variance value is used as the third data list. Those skilled in the art may know how to calculate the noise variance value, which will not be described in detail herein.

[0035] Preferably, those skilled in the art may select any existing noise model, which will not be described in detail here.

[0036] S600, repeat steps S100-S500 to obtain A except A i The target data list corresponding to other sample data lists except .

[0037] S700, merging n target data lists according to the order of feature dimensions of A to construct a final data set, which can be understood as: according to the order of the original feature dimensions of A, for each A i The corresponding target data lists are sorted and merged to construct the final data set, which can convert the m*n matrix structure of the sample data set into the m*4n matrix structure of the final data set, avoid missing important data related to noise data, and improve the accuracy of machine learning model training.

[0038] In a specific embodiment, considering that the preset time period is too long, so that the sample data list corresponds to a large amount of data, the method further includes the following steps before step S100:

[0039] When m>preset time threshold m0, i Divide and generate A i Corresponding multiple sub-sample data lists, and the sample data in each sub-sample data list are time series data;

[0040] List each sub-sample data, execute steps S100-S700, and generate a final data set; this can reduce the amount of data processing and improve data calculation efficiency.

[0041] The present embodiment provides a time series data processing method for machine learning modeling, which can obtain a sample data set with time series within a preset time period, preprocess any sample data list in the sample data set to obtain an intermediate data set, and then determine a noise data list based on the intermediate data and noise-related values ​​in the intermediate data set. The noise data list can truly reflect the noise characteristics carried in the time series data, and then determine other data lists required for machine learning model training based on the noise data list, so that the original one dimension corresponding to one data list is expanded to one dimension corresponding to multiple data lists, which is beneficial to improving the accuracy of machine learning model training.

[0042] In a specific practical application, when predicting and estimating the energy state of the battery in an electric vehicle, due to the accuracy of the sensor and external interference, there is a lot of noise in the original data. Directly inputting the original data for modeling will lead to serious estimation errors. For example, the actual voltage of the single cell is 3.52V, and the measured voltage is 3.55V, then there is an error of 30mV. For the above application scenario, the above steps S100-S600 can be taken, which can be understood as: obtaining 10,000 records, each record including single cell voltage, single cell current, single cell temperature, battery pack total voltage, battery pack total current and battery pack temperature difference, a total of 6 features, that is, the feature dimension is 6; when predicting the current energy state of the single cell, the original feature data is obtained as a 10,000*6 matrix, that is, a sample data set; the label data is obtained as a 10,000*1 matrix set, that is, a target weight list; technicians in this field know that the specific values ​​of the original feature data and label data can be determined according to the actual application scenario, which will not be listed here.

[0043] The original data of each feature is separated, that is, steps S200-S600 are executed, and the above 6 features are decomposed into 4 components, which can achieve the separation of stable data and noise data, and extract the mean and variance of the noise as features and integrate them into the data set, so that the data can be reconstructed and the target data set is a 10000*24 matrix. The newly reconstructed matrix can be used for modeling, and its prediction effect will be better than the original data.

[0044] In a specific practical application, for the application scenario of time slicing, taking steps S100-S600 can reconstruct every 1000 rows of the slice, so that the 10000*6 matrix is ​​divided into 10 1000*24 matrices, which will further improve the accuracy of model prediction.

[0045] An embodiment of the present application also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiment.

[0046] An embodiment of the present application also provides an electronic device, comprising a processor and the aforementioned non-transitory computer-readable storage medium.

[0047] Although some specific embodiments of the present application have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are only for illustration and not for limiting the scope of the present application. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present application. The scope of the present application is defined by the appended claims.

Claims

1. A time series data processing method for machine learning modeling, characterized in that: The method comprises the following steps: S100, within a preset time period, obtaining a sample data set A=(A1, A2, ..., An), Ai refers to a sample data list corresponding to the i-th feature dimension, i=1...n, n is the number of feature dimensions, and obtaining any sample data list Ai=(Ai1, Ai2, ..., Aim) from the sample data set A, Aij refers to data corresponding to the j-th time node of the i-th feature dimension, j=1...m, m is the number of time nodes; S200, preprocess Ai to obtain an intermediate data set B = (B1, B2, ..., Bk), where Br refers to an intermediate data list corresponding to the rth priority, r = 1 ... k, k is the number of priorities, wherein the priority corresponding to Br is greater than the priority corresponding to Br + 1; S300, traverse B and construct a noise data set S = (S1, S2, ..., Sk), where Sr refers to the rth noise data list, Sr = B1 + B2 + ... Br, r = 1 ... k; S400, traverse S, obtain the noise correlation value Fr corresponding to each noise data list Sr and construct a correlation value list F=(F1, F2, ..., Fk) according to Fr, obtain the minimum noise correlation value from F, and use Sr corresponding to the minimum noise correlation value as the target noise data list Ti; S500, generating a first data list corresponding to Ti, a second data list corresponding to Ti, and a third data list corresponding to Ti according to the target noise data list Ti, and constructing a target data list corresponding to Ai according to Ti, the first data list corresponding to Ti, the second data list corresponding to Ti, and the third data list corresponding to Ti; S600, repeating steps S100-S500 to obtain target data lists corresponding to other sample data lists in A except Ai; wherein, in steps S100-S600, 10,000 records are obtained, each record includes 6 features, namely, single cell voltage, single cell current, single cell temperature, battery pack total voltage, battery pack total current and battery pack temperature difference, i.e., the feature dimension is 6; when predicting the current energy state of the single cell, the original feature data is obtained as a 10,000×6 matrix, i.e., the sample data set; the label data is obtained as a 10,000×1 matrix set, i.e., the target weight list; S700, merging n target data lists in the order of feature dimensions of A to construct a final data set.

2. The method according to claim 1, characterized in that: In step S100, the time node corresponding to Aij+1 in each Ai is greater than the time node corresponding to Aij, and the time intervals between adjacent time nodes are consistent.

3. The method according to claim 1, characterized in that In step S200, the preprocessing is an empirical mode decomposition process.

4. The method according to claim 1, characterized in that In step S400, the following steps are also included: obtaining a target weight list Y=(Y1, Y2, ..., Ym), where Yj refers to the label value corresponding to the j-th time node and based on each noise data list Sr in Y and S, obtaining a noise correlation value Fr corresponding to Sr, where Fr meets the following conditions: Among them, Sr meets the following conditions: Among them, Y meets the following conditions: .

5. The method according to claim 1, characterized in that In step S500 , the first data list is a data list constructed from the phase difference data between Ai and Ti.

6. The method according to claim 1, characterized in that In step S500, the following steps are also included to determine the second data list: Ti is input into a preset noise model for fitting, the noise mean of Ti is obtained, and a data list constructed according to the noise mean is used as the second data list.

7. The method according to claim 1, characterized in that In step S500, the following steps are also included to determine the third data list: Ti is input into a preset noise model for fitting, the noise variance value of Ti is obtained, and a data list constructed by the noise variance value is used as the third data list.

8. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the method as claimed in any one of claims 1 to 7.

9. An electronic device, characterized in that: Comprising a processor and the non-transitory computer-readable storage medium of claim 8.