Time series data-oriented multi-scale time entropy loss function optimization prediction method

By introducing multi-scale time entropy loss function and entropy weighting mechanism into the timing prediction model, the problem of insufficient generalization ability in traditional models when processing complex timing data is solved, and stronger adaptability and prediction performance are achieved.

CN119903303APending Publication Date: 2025-04-29TIANJIN UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510085254.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

When traditional timing prediction models deal with nonlinear, non-stationary and multi-scale timing data, they lack generalization capabilities, difficulty in capturing long-term dependencies and outliers of data, and lack flexibility and multi-angle analysis capabilities.

Method used

A multi-scale time entropy loss function optimization prediction method for time-series data is proposed. By designing an entropy-based loss function, adaptively learning the characteristics of the data on different scales, calculating the regular terms of the multi-scale time entropy loss function, and combining the mean square error loss function, it is modeled using the Transformer architecture.

Benefits of technology

This method can effectively capture multi-level characteristics in time series data, improve the limitations of traditional models in long-term dependency modeling, improve the adaptability and prediction performance of the model, and improve the robustness and generalization capabilities of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903303A_ABST
    Figure CN119903303A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence data-oriented multi-scale time entropy loss function optimization prediction method, which relates to the field of time sequence prediction, and comprises the following steps: designing an entropy-based loss function through the entropy of a predicted value and the entropy of a true value; under different scales, obtaining tendency, periodicity, information density and complexity of a time sequence of the predicted value, calculating entropies corresponding to different features, and performing normalization processing on the entropies; entropy losses corresponding to different features are calculated, weighting processing is carried out on the entropy losses, and weights are distributed based on an entropy performance evaluation method; calculating a multi-scale time entropy loss function regular term and a total loss function; modeling is carried out based on a Transform architecture, model learning is trained through an entropy-based loss function, and a learning process is guided through a total loss function; by dynamically adjusting a model training target and adaptive weight distribution, key features in time series data are effectively captured, and the adaptability and prediction performance of the model are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of time series prediction, and in particular to a multi-scale time entropy loss function optimization prediction method for time series data. Background Art

[0002] In the field of time series forecasting, traditional evaluation methods such as mean square error (MSE) often cannot fully cope with the dynamics, complexity and diversity of data, especially for nonlinear or time-varying data, the performance of traditional loss functions is unsatisfactory; time series data usually contains multiple characteristics, such as periodicity, trend and complex patterns, but existing methods find it difficult to fully capture and model these characteristics.

[0003] In addition, in traditional time series prediction models, loss functions such as mean square error cannot effectively adapt to the nonlinear, non-stationary and multi-scale characteristics of data, resulting in insufficient model generalization ability. They usually ignore long-term dependencies, are sensitive to outliers, and lack flexibility and multi-angle analysis capabilities, which limits the model's prediction performance when processing complex and changeable time series data, and makes it difficult to accurately identify potential patterns during training, thus affecting its generalization ability.

[0004] At the same time, time series data often do not conform to the independent and identically distributed assumption. When faced with long-term changes, seasonal fluctuations or emergencies, the data distribution may change significantly. This poses a challenge to traditional models based on the fixed distribution assumption and limits their adaptability and prediction accuracy under new data patterns.

[0005] Therefore, a multi-scale time entropy loss function optimization prediction method for time series data is provided to solve the above problems. Summary of the invention

[0006] The purpose of the present invention is to provide a multi-scale time entropy loss function optimization prediction method for time series data, adaptively learn the characteristics of data at different scales, thereby overcoming the non-stationarity and non-independent and identically distributed problems of data, effectively capturing the long-term dependencies in time series data, improving the limitations of traditional models in modeling long-term and short-term dependencies, and enhancing the model's adaptability and prediction performance to time series data.

[0007] To achieve the above object, the present invention provides a multi-scale time entropy loss function optimization prediction method for time series data, comprising the following steps:

[0008] S1: Design an entropy-based loss function by using the entropy of the predicted value and the entropy of the true value;

[0009] S2: Obtain the trend characteristics, periodicity characteristics, information density characteristics and complexity characteristics of the time series of the predicted value at different scales, calculate the entropy corresponding to different characteristics, and normalize the entropy;

[0010] S3: Calculate the entropy loss corresponding to different features Entropy loss Perform weighted processing and assign weights based on the entropy-based performance evaluation method;

[0011] S4: Calculate the regularization term of the multi-scale temporal entropy loss function The regularization term of the multi-scale temporal entropy loss function Combined with the mean square error loss function, calculate the total loss function L total ;

[0012] S5: Modeling based on the Transformer architecture, training the model through an entropy-based loss function, and learning through the total loss function L total Provide guidance on the learning process.

[0013] Preferably, step S1 specifically includes the following steps:

[0014] S11: According to different scale factors γ, the predicted value and the true value y t Decompose and obtain several predicted value subsequences and several real-valued subsequences Predicted value subsequence and the true value subsequence Respectively expressed as:

[0015]

[0016] S12: Calculate predicted value subsequences at different scales and the true value subsequence The probability distribution and entropy difference of

[0017] S13: The output LOSS of the multi-scale time entropy loss function is set to the mean of the entropy difference. The output LOSS of the multi-scale time entropy loss function is expressed as:

[0018]

[0019] Where N is the total number of samples, E P Represents the entropy of the predicted value, E T The entropy representing the true value;

[0020] S14: The output LOSS of the multi-scale time entropy loss function is combined with the mean square error loss function as a regular term to obtain an entropy-based loss function.

[0021] Preferably, in step S2, calculating the entropy corresponding to the trend feature specifically includes the following steps:

[0022] Step 1: Decompose the time series of the predicted value according to different scale factors γ to obtain several subsequences

[0023] Step 2: Based on each subsequence The probability distribution and embedding dimension d of k , calculate the trend entropy Trend Entropy It is expressed as:

[0024]

[0025] Among them, Q represents the number of scale factors γ used to decompose the time series, L represents the size of each window, Represented in terms of scale factor γ and embedding dimension d k The subsequence obtained below is Represents a subsequence Frequency of occurrence.

[0026] Preferably, in step S2, the entropy corresponding to the periodic feature is calculated. The specific calculation method is: decomposing the time series of the predicted value by empirical mode decomposition EMD to obtain several intrinsic mode functions IMF, and calculating the periodic entropy based on the energy ratio of each intrinsic mode function IMF Cyclic entropy It is expressed as:

[0027]

[0028] Among them, IMF j (γ, k) represents the subsequence value of the jth intrinsic mode function IMF at time k obtained by empirical mode decomposition EMD under the scale factor γ. l (γ,k) represents the subsequence value of the lth intrinsic mode function IMF at time k obtained by empirical mode decomposition (EMD) under the scale factor γ, T represents the total length of the time series, and r represents the total number of intrinsic mode functions (IMF), that is, the number of different frequency bands decomposed in the process of empirical mode decomposition (EMD).

[0029] Preferably, in step S2, calculating the entropy corresponding to the information density feature specifically includes the following steps:

[0030] Step 1: Decompose the time series of predicted values ​​into several subsequences according to different scale factors γ The multi-scale Tsallis permutation entropy is used to calculate each subsequence The entropy value of

[0031] Step 2: At different scales, adjust the feature sensitivity by adjusting the steady-state index P and calculate the information density entropy Information Density Entropy It is expressed as:

[0032]

[0033] in, Represents a subsequence The frequency of occurrence in the time series, L and K both represent the size of the window.

[0034] Preferably, in step S2, the entropy corresponding to the complexity feature is calculated. The specific calculation method is: for different scale factors γ, the time series of the predicted value is decomposed into multiple scales to obtain several subsequences Adjust the subsequence by complexity factor δ Complexity at different scales, calculating complexity entropy Complexity Entropy It is expressed as:

[0035]

[0036] in, Represents a subsequence The frequency of occurrence in the time series, W represents the window size when calculating the probability distribution, L i Represents the subsequence corresponding to the scale factor γ and complexity factor δ The total length of

[0037] Preferably, in step S3, the entropy-based performance evaluation method includes fine composite multi-scale permutation entropy, variational embedding multi-scale sample entropy, integrated empirical mode decomposition energy entropy and multi-scale Tsallis permutation entropy.

[0038] Preferably, step S3 specifically includes the following steps:

[0039] S31: Introducing normalized contribution factors Contribution Factor It is expressed as:

[0040]

[0041] Among them, E feature (t) represents the characteristic entropy at time t;

[0042] S32: According to the evaluation results of the time series of the predicted values ​​during the training process, the weights corresponding to different features are dynamically generated, and the trend weight W trend , periodic weight W season , information density weight W info and complexity weights are expressed as:

[0043] Wtrend =contrib trend (t)

[0044] W season =contrib season (t)

[0045] W info =contrib info (t)

[0046] W complex =contrib complex (t).

[0047] S33: Add constraints to the weights. The constraints are that the sum of the weights of different features is equal to the hyperparameter α, which is specifically expressed as:

[0048] W trend +W season +W info +W complex =α.

[0049] Preferably, step S4 specifically includes the following steps:

[0050] S41: Combined with the calculation method of weight distribution, calculate the regularization term of the multi-scale time entropy loss function Regularization term of multi-scale temporal entropy loss function It is expressed as:

[0051]

[0052] S42: Regularize the multi-scale time entropy loss function Combined with the mean square error loss function, calculate the total loss function L total , the total loss function L total It is expressed as:

[0053]

[0054] Therefore, the present invention adopts the above-mentioned multi-scale time entropy loss function optimization prediction method for time series data, which has the following beneficial effects:

[0055] (1) The present invention proposes a loss function based on multi-scale time entropy. By evaluating the trend, periodicity, information density and complexity of time series data, the model training target is dynamically adjusted, which can capture the multi-level characteristics of the data, overcome the problems of non-stationarity and non-independent and identically distributed, and improve the adaptability and prediction performance of the model.

[0056] (2) The present invention introduces an adaptive weight allocation mechanism, which assigns different weights according to the entropy values ​​calculated from different features, so that the model pays more attention to the features that have a greater impact on the prediction results, while reducing the impact of noise. Combined with the traditional mean square error (MSE) loss function, the model's prediction ability at different scales is optimized, thereby improving prediction accuracy and robustness.

[0057] (3) The present invention effectively captures the long-term dependencies in time series data through a multi-scale time entropy method, improving the limitations of traditional models in modeling long-term and short-term dependencies. This method can extract more useful information from complex time series data, enhance the generalization ability of the model, and enable it to exhibit stronger adaptability and stability in practical applications.

[0058] The method scheme of the present invention is further described in detail below through the drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A flowchart of a multi-scale time entropy loss function optimization prediction method for time series data according to the present invention;

[0060] Figure 2 Schematic diagram of the entropy-based loss function of the present invention. DETAILED DESCRIPTION

[0061] The method scheme of the present invention is further described below through drawings and embodiments.

[0062] Unless otherwise defined, method terms or scientific terms used in the present invention shall have the common meanings understood by one of ordinary skill in the art to which the present invention belongs.

[0063] The words "include" or "comprises" and the like used in the present invention mean that the elements before the word include the elements listed after the word, and do not exclude the possibility of also including other elements. The orientation or position relationship indicated by the terms "inside", "outside", "upper", "lower", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation of the present invention. When the absolute position of the described object changes, the relative position relationship may also change accordingly. In the present invention, unless otherwise clearly specified and limited, the terms "attachment" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral body; it can be directly connected, or indirectly connected through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0064] Example 1

[0065] like Figure 1 and Figure 2 As shown, the present invention provides a multi-scale time entropy loss function optimization prediction method for time series data, comprising the following steps:

[0066] S1: Design an entropy-based loss function by using the entropy of the predicted value and the entropy of the true value;

[0067] Step S1 specifically includes the following steps:

[0068] S11: According to different scale factors γ, the predicted value and the true value y t Decompose and obtain several predicted value subsequences and several real-valued subsequences Predicted value subsequence and the true value subsequence Respectively expressed as:

[0069]

[0070] S12: Calculate predicted value subsequences at different scales and the true value subsequence The probability distribution and entropy difference of

[0071] S13: The output LOSS of the multi-scale time entropy loss function is set to the mean of the entropy difference. The output LOSS of the multi-scale time entropy loss function is expressed as:

[0072]

[0073] Where N is the total number of samples, E P Represents the entropy of the predicted value, E T The entropy representing the true value;

[0074] S14: The output LOSS of the multi-scale time entropy loss function is combined with the mean square error loss function as a regular term to obtain an entropy-based loss function, which can capture complex patterns and changing trends in the data from a more detailed scale level. Specifically, the multi-scale entropy regular term can effectively measure the information density and uncertainty of the data at different scales, especially for non-stationary and highly complex time series data, which helps the model to better understand the intrinsic structure of the data. Compared with the traditional mean square error MSE loss function, which only focuses on the optimization of the global error, the entropy constraints imposed at different scales in this embodiment can guide the model to better balance the local and global prediction capabilities, thereby improving the prediction accuracy and robustness.

[0075] S2: In order to better capture the complexity and diversity of time series data, improve the model's ability to capture the nonlinear characteristics of data, and effectively deal with the non-independent and identically distributed and time-varying characteristics of time series data, obtain the trend characteristics, periodicity characteristics, information density characteristics, and complexity characteristics of the time series of the predicted value at different scales, calculate the entropy corresponding to different characteristics, and normalize the entropy to enhance the model's sensitivity to these characteristics;

[0076] In step S2, the entropy corresponding to the trend feature is calculated, which specifically includes the following steps:

[0077] Step 1: Decompose the time series of the predicted value according to different scale factors γ to obtain several subsequences

[0078] Step 2: Based on each subsequence The probability distribution and embedding dimension d of k , calculate the trend entropy Trend Entropy It is expressed as:

[0079]

[0080] Among them, Q represents the number of scale factors γ used to decompose the time series, and L represents the size of each window, which determines the local subsequence The scale factor γ can control the granularity of decomposition. Different values ​​of the scale factor γ help capture different seasonal and trend characteristics. The embedding dimension d k Determine each subsequence The complexity of Represented in terms of scale factor γ and embedding dimension d k The subsequence obtained below is Represents a subsequence The frequency of occurrence shows that the subsequence The probability distribution of

[0081] The long-term trend in time series is an important factor affecting future predictions. Traditional loss functions, such as the mean square error (MSE) loss function, usually focus on minimizing local errors and may ignore the global trend of the data. Trend entropy, as part of the multi-scale analysis method, can effectively capture the long-term change trend of time series and help the model focus on global features during training, thereby improving the accuracy of long-term predictions.

[0082] In step S2, the entropy corresponding to the periodic feature is calculated. The specific calculation method is as follows: the time series of the predicted value is decomposed by empirical mode decomposition (EMD) to obtain several intrinsic mode functions (IMFs). Based on the energy ratio of each intrinsic mode function (IMF), the periodic entropy is calculated. Cyclic entropy It is expressed as:

[0083]

[0084] Among them, IMF j (γ, k) represents the subsequence value of the jth intrinsic mode function IMF at time k obtained by empirical mode decomposition EMD under the scale factor γ. l (γ,k) represents the subsequence value of the lth intrinsic mode function IMF at time k obtained by empirical mode decomposition EMD under the scale factor γ, T represents the total length of the time series, and r represents the total number of intrinsic mode functions IMF, that is, the number of different frequency bands decomposed in the process of empirical mode decomposition EMD;

[0085] Periodicity describes the regularity of periodic changes in the data. The introduction of the regularization term of periodic entropy allows the loss function to pay more attention to the periodic characteristics of the data during the model training process. This process helps the model extract periodic laws in time series data at multiple scales, thereby improving the ability to recognize and predict the periodicity of time series data. Specifically, the calculation of periodic entropy introduces the energy distribution of each inherent mode, which helps to identify the performance of periodic components at different time scales and further enhance the model's adaptability to periodic changes.

[0086] In step S2, the entropy corresponding to the information density feature is calculated, which specifically includes the following steps:

[0087] Step 1: Decompose the time series of predicted values ​​into several subsequences according to different scale factors γ The multi-scale Tsallis permutation entropy is used to calculate each subsequence The entropy value of

[0088] Step 2: At different scales, adjust the feature sensitivity by adjusting the steady-state index P. The steady-state index P is used to adjust the calculation method of information entropy, affect the weight of subsequence frequency, and control the sensitivity of calculation;

[0089] Calculating Information Density Entropy Information Density Entropy It is expressed as:

[0090]

[0091] in, Represents a subsequence The frequency of occurrence in the time series, L and K both represent the size of the window, L is used to calculate each subsequence The range of determines the number of elements calculated in the local range, and K determines the local range of each subsequence calculation;

[0092] Information density describes the distribution and changes of internal information in data in time series analysis. Introducing the entropy loss term of information density in the loss function helps the model better adapt to the complexity and multi-scale characteristics of the data, enhances the model's sensitivity to changes in information density, and thus improves the predictive ability of time series data.

[0093] In step S2, the entropy corresponding to the complexity feature is calculated. The specific calculation method is: for different scale factors γ, the time series of the predicted value is decomposed into multiple scales to obtain several subsequences Adjust the subsequence by complexity factor δ Complexity at different scales, calculating complexity entropy Complexity Entropy It is expressed as:

[0094]

[0095] in, Represents a subsequence The frequency of occurrence in the time series, each subsequence Contains expressions of different granularity and complexity of the original time series. W represents the window size when calculating the probability distribution, which is used to limit the local subsequence The range of L i Represents the subsequence corresponding to the scale factor γ and complexity factor δ The total length of the subsequence is determined by the complexity factor δ. The complexity at this scale, used to adjust the subsequence Characteristics;

[0096] In the prediction of time series data, complexity reflects the chaotic, nonlinear and random characteristics in the data. Introducing the regular term of complexity can help the model better capture the laws of these nonlinear and dynamic changes, thereby improving the prediction ability of the model. Specifically, complexity evaluates the complexity of data at different time scales by calculating the permutation entropy of the data. Adding the entropy loss of complexity to the loss function can enable the model to not only focus on traditional prediction errors during training, but also enhance its adaptability to the complex and dynamic characteristics of time series data. In this way, the model can better handle complex time series data and improve its generalization ability.

[0097] S3: Calculate the entropy loss corresponding to different features In order to make the model focus more on key features, the entropy loss Perform weighted processing and assign weights based on the entropy performance evaluation method. In each round of training, dynamically adjust the weights based on the evaluation performance of each feature. Assume that the contribution of each feature is evaluated based on the entropy value of each feature, and then adjust the weights based on these contributions. The smaller the weight, the greater the contribution of the feature to the prediction result.

[0098] This weighting operation can effectively adjust the influence of each subsequence according to the complexity and importance of the data features. By assigning weights to the entropy values ​​of different features, the model can pay more attention to those features that have a greater impact on the prediction results, such as those with high periodicity or trend, while reducing the influence of noise or less relevant parts.

[0099] This mechanism can not only guide the model to learn the key patterns in time series data more accurately, but also improve the robustness of the model when facing variable and complex data. Finally, the weighted multi-scale entropy regularization term serves as an additional constraint to guide the model to balance the information extraction of different features during the optimization process, avoiding overfitting of a single feature, and enhancing the model's ability to capture the inherent laws of time series data.

[0100] Through this approach, the model can make predictions more flexibly and accurately when dealing with data with nonlinear, time-varying, and non-independent and identically distributed characteristics, and show stronger adaptability and predictive stability in practical applications.

[0101] In step S3, the entropy-based performance evaluation methods include fine composite multi-scale permutation entropy, variational embedding multi-scale sample entropy, integrated empirical mode decomposition energy entropy and multi-scale Tsallis permutation entropy.

[0102] Step S3 specifically includes the following steps:

[0103] S31: Introducing normalized contribution factors Contribution Factor It is expressed as:

[0104]

[0105] Among them, E feature (t) represents the characteristic entropy at time t;

[0106] S32: According to the evaluation results of the time series of the predicted values ​​during the training process, the weights corresponding to different features are dynamically generated, and the trend weight W trend , periodic weight W season , information density weight W info and complexity weights are expressed as:

[0107] W trend =contribtrend (t)

[0108] W season =contrib season (t)

[0109] W info =contrib info (t)

[0110] W complex =contrib complex (t).

[0111] S33: Add constraints to the weights. The constraints are that the sum of the weights of different features is equal to the hyperparameter α, which is specifically expressed as:

[0112] W trend +W season +W info +W complex =α.

[0113] By introducing the hyperparameter α, this method can balance the weight between the mean square error MSE and the multi-scale time entropy regularization term, thereby ensuring that while optimizing the prediction accuracy, full attention is paid to key features such as trend, periodicity, information density and complexity in the time series data. By weighting each feature, the model can flexibly adjust the attention paid to different features during the training process, avoid a certain feature dominating the loss function, ensure the comprehensive effect of all features, and thus improve the overall prediction performance;

[0114] In addition, the weight distribution can be adjusted according to the dynamic data evaluation results of each round of prediction values, so that the model can adaptively respond to data changes and improve the robustness and adaptability of the model.

[0115] S4: Calculate the regularization term of the multi-scale temporal entropy loss function The regularization term of the multi-scale temporal entropy loss function Combined with the mean square error loss function, calculate the total loss function L total ;

[0116] Step S4 specifically includes the following steps:

[0117] S41: Combined with the calculation method of weight distribution, calculate the regularization term of the multi-scale time entropy loss function Regularization term of multi-scale temporal entropy loss function It is expressed as:

[0118]

[0119] S42: Regularize the multi-scale time entropy loss function Combined with the mean square error loss function, calculate the total loss function L total , the total loss function L total It is expressed as:

[0120]

[0121] S5: Modeling based on the Transformer architecture, training the model through an entropy-based loss function, and learning through the total loss function L total Provide guidance on the learning process.

[0122] This embodiment selects six representative time series prediction models and performs prediction based on data sets in eight different fields. The six time series prediction models are Fedformer, Pyraformer, Informer, Autoformer, Reformer, and ETSformer.

[0123] In order to comprehensively evaluate the effectiveness of the method of this embodiment, this embodiment designed two groups of comparative experiments. The first group of experiments optimized the loss function of each model, and the second group of experiments used the unoptimized loss function for testing. Through this design, the effect of optimizing the loss function on the prediction results can be clearly compared. The experimental results are shown in Table 1:

[0124] Table 1: Experimental results

[0125]

[0126]

[0127] Experimental results show that the model using the multi-scale time entropy loss function achieves an average improvement of about 4.73% and 6.46% in MSE and MAE respectively, demonstrating the effectiveness of this method, especially on complex data sets with strong periodicity and trends, such as Traffic and ECL, where the performance of the model is particularly improved.

[0128] This result shows that by introducing the multi-scale time entropy loss function, the model can not only capture the complexity of the data more accurately, but also improve the prediction accuracy and enhance the model's adaptability to dynamic changes in time series data. Compared with the traditional single-scale loss function, the multi-scale time entropy loss function comprehensively considers the multi-level characteristics of the data and shows stronger robustness and better generalization ability when processing complex data.

[0129] The time series prediction method based on the multi-scale time entropy loss function proposed in this embodiment significantly improves the prediction performance of the model on multiple data sets.

[0130] Example 2

[0131] This embodiment provides a multi-scale time entropy loss function optimization prediction method for time series data;

[0132] Multiscale decomposition methods use wavelet transform or Fourier transform to decompose time series data and capture features at different scales;

[0133] Entropy measurement methods use Shannon entropy, Tsallis entropy, etc. to evaluate the uncertainty and complexity of time series data;

[0134] The weight adjustment algorithm uses genetic algorithms or reinforcement learning to dynamically adjust feature weights and optimize model training;

[0135] The loss function combination method uses a combination of multi-scale time entropy loss and cross entropy loss, or a combination of multi-scale time entropy loss and mean absolute error loss;

[0136] Before processing time series data, use feature selection or dimensionality reduction techniques, such as principal component analysis (PCA), to reduce the complexity of the data and highlight key features, thereby improving the prediction accuracy of the model.

[0137] The rest of the specific implementation is the same as that of Example 1.

[0138] Therefore, the present invention adopts the above-mentioned multi-scale time entropy loss function optimization prediction method for time series data. Through the evaluation mechanism of multi-scale time entropy, a loss function with adaptive weights is generated to guide the model to flexibly adjust the learning strategy according to multiple characteristics of the data during the training process. It can not only improve the model's ability to capture the diversity and nonlinear characteristics of the data, but also effectively deal with the non-independent and identically distributed and time-varying properties in the time series data, thereby improving the robustness and generalization ability of the model.

[0139] Finally, it should be noted that the above embodiments are only used to illustrate the method scheme of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, ordinary method personnel in the field should understand that they can still modify or replace the method scheme of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified method scheme to deviate from the spirit and scope of the method scheme of the present invention.

Claims

1. A multi-scale time entropy loss function optimization prediction method for time series data, characterized in that: The following steps are involved: S1: Design an entropy-based loss function by using the entropy of the predicted value and the entropy of the true value; S2: Obtain the trend characteristics, periodicity characteristics, information density characteristics and complexity characteristics of the time series of the predicted value at different scales, calculate the entropy corresponding to different characteristics, and normalize the entropy; S3: Calculate the entropy loss corresponding to different features Entropy loss Perform weighted processing and assign weights based on the entropy-based performance evaluation method; S4: Calculate the regularization term of the multi-scale temporal entropy loss function The regularization term of the multi-scale temporal entropy loss function Combined with the mean square error loss function, the total loss function L is calculated total ; S5: Modeling based on the Transformer architecture, training the model through an entropy-based loss function, and learning through the total loss function L total Provide guidance on the learning process.

2. According to claim 1, a multi-scale time entropy loss function optimization prediction method for time series data is characterized in that: Step S1 specifically includes the following steps: S11: According to different scale factors γ, the predicted value and the true value y t Decompose and obtain several predicted value subsequences and several real value subsequences Predicted value subsequence and the true value subsequence Respectively expressed as: S12: Calculate predicted value subsequences at different scales and the true value subsequence The probability distribution and entropy difference of S13: The output LOSS of the multi-scale time entropy loss function is set to the mean of the entropy difference. The output LOSS of the multi-scale time entropy loss function is expressed as: Where N is the total number of samples, E P Represents the entropy of the predicted value, E T The entropy representing the true value; S14: The output LOSS of the multi-scale time entropy loss function is combined with the mean square error loss function as a regular term to obtain an entropy-based loss function.

3. According to claim 1, a multi-scale time entropy loss function optimization prediction method for time series data is characterized in that: In step S2, the entropy corresponding to the trend feature is calculated, which specifically includes the following steps: Step 1: Decompose the time series of the predicted value according to different scale factors γ to obtain several subsequences Step 2: Based on each subsequence The probability distribution and embedding dimension d of k , calculate the trend entropy Trend Entropy It is expressed as: Among them, Q represents the number of scale factors γ used to decompose the time series, L represents the size of each window, Represented in terms of scale factor γ and embedding dimension d k The subsequence obtained below is Represents a subsequence Frequency of occurrence.

4. According to claim 1, a multi-scale time entropy loss function optimization prediction method for time series data is characterized in that: In step S2, the entropy corresponding to the periodic feature is calculated. The specific calculation method is as follows: the time series of the predicted value is decomposed by empirical mode decomposition (EMD) to obtain several intrinsic mode functions (IMFs). Based on the energy ratio of each intrinsic mode function (IMF), the periodic entropy is calculated. Cyclic Entropy It is expressed as: Among them, IMF j (γ, k) represents the subsequence value of the jth intrinsic mode function IMF at time k obtained by empirical mode decomposition EMD under the scale factor γ. l (γ,k) represents the subsequence value of the lth intrinsic mode function IMF at time k obtained by empirical mode decomposition (EMD) under the scale factor γ, T represents the total length of the time series, and r represents the total number of intrinsic mode functions (IMF), that is, the number of different frequency bands decomposed in the process of empirical mode decomposition (EMD).

5. According to claim 1, a multi-scale time entropy loss function optimization prediction method for time series data is characterized in that: In step S2, the entropy corresponding to the information density feature is calculated, which specifically includes the following steps: Step 1: Decompose the time series of predicted values ​​into several subsequences according to different scale factors γ The multi-scale Tsallis permutation entropy is calculated for each subsequence The entropy value of Step 2: At different scales, adjust the feature sensitivity by adjusting the steady-state index P and calculate the information density entropy Information Density Entropy It is expressed as: in, Represents a subsequence The frequency of occurrence in the time series, L and K both represent the size of the window.

6. The multi-scale time entropy loss function optimization prediction method for time series data according to claim 1 is characterized in that: In step S2, the entropy corresponding to the complexity feature is calculated. The specific calculation method is: for different scale factors γ, the time series of the predicted value is decomposed into multiple scales to obtain several subsequences Adjust the subsequence by complexity factor δ Complexity at different scales, calculating complexity entropy Complexity Entropy It is expressed as: in, Represents a subsequence The frequency of occurrence in the time series, W represents the window size when calculating the probability distribution, and L i Represents the subsequence corresponding to the scale factor γ and complexity factor δ The total length of 7. The multi-scale time entropy loss function optimization prediction method for time series data according to claim 1 is characterized in that: In step S3, the entropy-based performance evaluation methods include fine composite multi-scale permutation entropy, variational embedding multi-scale sample entropy, integrated empirical mode decomposition energy entropy and multi-scale Tsallis permutation entropy.

8. The multi-scale time entropy loss function optimization prediction method for time series data according to claim 1 is characterized in that: Step S3 specifically includes the following steps: S31: Introducing normalized contribution factors Contribution Factor It is expressed as: Among them, E feature (t) represents the characteristic entropy at time t; S32: According to the evaluation results of the time series of the predicted values ​​during the training process, the weights corresponding to different features are dynamically generated, and the trend weight W trend , periodic weight W sason , information density weight W info and complexity weights are expressed as: W trend =contrib trend (t) W season =contrib season (t) W info =Contrib info (t) W complex =contrib complex (t)。 S33: Add constraints to the weights. The constraints are that the sum of the weights of different features is equal to the hyperparameter α, which is specifically expressed as: W trend +W season +W info +W complex =α。 9. The multi-scale time entropy loss function optimization prediction method for time series data according to claim 1 is characterized in that: Step S4 specifically includes the following steps: S41: Combined with the calculation method of weight distribution, calculate the regularization term of the multi-scale time entropy loss function Regularization term of multi-scale temporal entropy loss function It is expressed as: S42: Regularize the multi-scale time entropy loss function Combined with the mean square error loss function, the total loss function L is calculated total , the total loss function L total It is expressed as:

Citation Information

Cited By

  • Characteristic importance evaluation method based on POGD prediction of large model

    CN121188445A