Time series data prediction method and device, electronic equipment and storage medium

By classifying time series data and using specific prediction algorithms, the problem of low prediction accuracy of time series data is solved, and the prediction accuracy of time series data and the efficiency of operation and maintenance system are improved.

CN119311931APending Publication Date: 2025-01-14ULTRAPOWER SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310869805.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The timing data obtained in the computer room operation and maintenance system or cloud platform management system usually contains noise, resulting in a low accuracy of prediction of timing data.

Method used

By classifying the time series data, determining its categories, and using corresponding prediction algorithms to predict, including using the Auto-Arima model to correct the stationary data and moving average MA model, Fourier transform to judge periodic data, Mann-Kendall Test and determine trend-based data, and convolutional neural networks process irregular data to reduce the impact of noise and improve prediction accuracy.

Benefits of technology

It effectively reduces the probability that different categories of data act as noises, improves the accuracy of time series data prediction, and improves the response efficiency and management efficiency of the operation and maintenance system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311931A_ABST
    Figure CN119311931A_ABST
Patent Text Reader

Abstract

The invention provides a time series data prediction method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining to-be-processed time series data, classifying the time series data, and obtaining a plurality of types of time series data; for the type of each category in the plurality of categories, determining a corresponding prediction algorithm; the corresponding prediction algorithm is used for predicting the time series data of the category, a prediction result of the next period is obtained, and the prediction result is data of the time series data appearing in the next period. In the implementation process of the scheme, the time series data are classified, the time series data of the multiple classes are obtained, the time series data of each class in the multiple classes are predicted, the situation that the data of the different classes serve as noise to be processed mutually is improved, the probability that the data of the different classes serve as the noise mutually is effectively reduced, and the processing efficiency of the data of the different classes is improved. Therefore, the accuracy of predicting the time series data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of information technology operation and maintenance and telecommunication intelligent operation and maintenance, and specifically, to a time series data prediction method, device, electronic device and storage medium. Background Art

[0002] At present, the time series data obtained in business systems such as computer room operation and maintenance systems or cloud platform management systems usually include noise. During the specific implementation process, it was found that these noises will lead to low accuracy in predicting time series data. The predictions here may include: anomaly detection, state prediction, etc. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a time series data prediction method, device, electronic device and storage medium, which are used to improve the problem of low accuracy in predicting time series data.

[0004] The embodiment of the present application provides a method for predicting time series data, including: obtaining time series data to be processed, and classifying the time series data to obtain multiple categories of time series data; for the type of each category in the multiple categories, confirming the corresponding prediction algorithm; using the corresponding prediction algorithm to predict the time series data of the category, and obtaining the prediction result of the next cycle, the prediction result is the data that appears in the next cycle of the time series data. In the implementation process of the above scheme, by classifying the time series data, obtaining multiple categories of time series data, and predicting the time series data of each category in the multiple categories, the situation where data of different categories are treated as noise to each other is improved, and the probability of data of different categories being treated as noise to each other is effectively reduced, thereby improving the accuracy of predicting time series data, so that the operation and maintenance system or cloud platform management system can improve the operation and maintenance system or cloud platform management system to respond promptly according to the prediction, and improve the efficiency of operation and maintenance and management.

[0005] Optionally, in an embodiment of the present application, the multiple categories include: stationary data; classifying the time series data, including: calculating the standard deviation of the time series data; separating the frequency domain noise that is higher than a preset noise threshold parameter from the time series data, and calculating the standard deviation of the frequency domain noise; determining whether the ratio between the standard deviation of the time series data and the standard deviation of the frequency domain noise is less than a preset threshold; if so, determining the time series data as stationary data. In the implementation process of the above scheme, by determining whether the time series data is stationary data based on the ratio between the standard deviation of the time series data and the standard deviation of the frequency domain noise, the information in the frequency domain noise that is higher than the preset noise threshold parameter is effectively utilized, and the classification accuracy of the stationary data is effectively improved.

[0006] Optionally, in an embodiment of the present application, a corresponding prediction algorithm is used to predict the time series data of this category, including: using the Auto-Arima autoregressive model in the differential integrated moving average autoregressive ARIMA model to predict the time series data that will appear in the next cycle of the stationary data, and obtain the predicted time series data; using the moving average MA model in the ARIMA model to correct the predicted time series data, and obtain the corrected time series data; performing weighted averaging on the predicted time series data and the corrected time series data to obtain the prediction result. In the implementation process of the above scheme, the time series data of the stationary data category is predicted by using the Auto-Arima autoregressive model in the differential integrated moving average autoregressive ARIMA model, and the moving average MA model in the ARIMA model is used to correct it, thereby effectively improving the prediction accuracy of the stationary data.

[0007] Optionally, in an embodiment of the present application, the multiple categories include: periodic data; classifying the time series data, including: performing Fourier transform on the time series data to obtain a volume-energy periodic distribution diagram; determining whether the volume-energy distribution of the volume-energy periodic distribution diagram presents a periodic volume-energy peak-decreasing characteristic; if so, determining the time series data as periodic data. In the implementation process of the above scheme, periodic data is determined by the periodic volume-energy peak-decreasing characteristic of the volume-energy distribution, thereby effectively utilizing the information in the volume-energy periodic distribution diagram obtained by Fourier transform, and effectively improving the classification accuracy of periodic data.

[0008] Optionally, in an embodiment of the present application, a corresponding prediction algorithm is used to predict the time series data of this category, including: obtaining the data cycle length of the periodic data; predicting the periodic data according to the data cycle length to obtain a prediction result. In the implementation process of the above scheme, the periodic data is predicted according to the data cycle length, thereby improving the prediction accuracy of the periodic data.

[0009] Optionally, in an embodiment of the present application, multiple categories include: trend data; classifying time series data, including: performing a Mann-Kendall test on the time series data to obtain the confidence and statistics of the time series data, wherein the statistic represents the degree of trend of the time series data, and the confidence represents the credibility of the time series data; determining whether the absolute value of the statistic is greater than the confidence; if so, determining the time series data as trend data. In the implementation process of the above scheme, the confidence and statistics of the time series data are obtained by performing a Mann-Kendall test on the time series data, and the trend data is determined according to the absolute value and confidence of the statistic, thereby effectively improving the classification accuracy of the trend data, and using the Holt-winter algorithm to predict the trend data.

[0010] Optionally, in an embodiment of the present application, multiple categories include: irregular data; classifying time series data includes: determining whether the time series data meets preset conditions, the preset conditions include: the time series data is not stationary data, and the time series data is not periodic data, and the time series data is not trend data; if so, the time series data is determined to be irregular data. In the implementation process of the above scheme, the time series data is determined to be irregular data only when the time series data is not stationary data, not periodic data, and not trend data, so as to improve the classification accuracy of irregular data, and use the corresponding prediction algorithm to predict the time series data of this category, specifically: using convolutional neural networks and channel attention mechanisms to extract local dependency features between loads, and predicting the time series data by introducing RNN, LSTM or Bi-LSTM with attention mechanisms, so as to give different weights to time series data at different times.

[0011] An embodiment of the present application also provides a time series data prediction device, including: a time series data classification module, used to obtain the time series data to be processed, and classify the time series data to obtain multiple categories of time series data; a prediction result acquisition module, used to confirm the corresponding prediction algorithm for the type of each category in the multiple categories; use the corresponding prediction algorithm to predict the time series data of the category, and obtain the prediction result of the next period, and the prediction result is the data that appears in the next period of the time series data.

[0012] Optionally, in an embodiment of the present application, multiple categories include: stationary data; a time series data classification module, including: a time series standard deviation statistics submodule, used to count the standard deviation of the time series data; a frequency domain standard deviation statistics submodule, used to separate the frequency domain noise higher than a preset noise threshold parameter from the time series data, and count the standard deviation of the frequency domain noise; a standard deviation threshold judgment submodule, used to judge whether the ratio between the standard deviation of the time series data and the standard deviation of the frequency domain noise is less than a preset threshold; a stationary data determination submodule, used to determine the time series data as stationary data if the ratio between the standard deviation of the time series data and the standard deviation of the frequency domain noise is less than a preset threshold.

[0013] Optionally, in an embodiment of the present application, a prediction result obtaining module includes: a stationary data prediction submodule, which uses the Auto-Arima autoregressive model in the differential integrated moving average autoregressive ARIMA model to predict the time series data that will appear in the next period of the stationary data, and obtain predicted time series data; a time series data correction submodule, which uses the moving average MA model in the ARIMA model to correct the predicted time series data, and obtain corrected time series data; and a time series data weighting submodule, which performs weighted averaging on the predicted time series data and the corrected time series data to obtain a prediction result.

[0014] Optionally, in an embodiment of the present application, multiple categories include: periodic data; a time series data classification module, including: a data Fourier transform submodule, used to perform Fourier transform on the time series data to obtain a volume periodic distribution diagram; a distribution diagram volume judgment submodule, used to judge whether the volume distribution of the volume periodic distribution diagram presents a periodic volume peak decrease characteristic; a periodic data determination submodule, used to determine the time series data as periodic data if the volume distribution of the volume periodic distribution diagram presents a periodic volume peak decrease characteristic.

[0015] Optionally, in an embodiment of the present application, the prediction result acquisition module includes: a period length acquisition submodule, used to obtain the data period length of periodic data; and a period data prediction submodule, used to predict the periodic data according to the data period length to obtain a prediction result.

[0016] Optionally, in an embodiment of the present application, multiple categories include: trend data; a time series data classification module, including: a time series data verification submodule, used to perform a Mann-Kendall test on the time series data to obtain the confidence and statistics of the time series data, wherein the statistic represents the degree of trend of the time series data, and the confidence represents the credibility of the time series data; a statistic value judgment submodule, used to judge whether the absolute value of the statistic is greater than the confidence; a trend data determination submodule, used to determine the time series data as trend data if the absolute value of the statistic is greater than the confidence.

[0017] Optionally, in an embodiment of the present application, multiple categories include: irregular data; a time series data classification module, including: a time series data judgment submodule, used to judge whether the time series data meets preset conditions, the preset conditions include: the time series data is not stationary data, and the time series data is not periodic data, and the time series data is not trend data; an irregular type determination submodule, used to determine the time series data as irregular data if the time series data meets the preset conditions.

[0018] An embodiment of the present application further provides an electronic device, including: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method described above is performed.

[0019] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described above is executed.

[0020] Other features and advantages of the embodiments of the present application will be described in the subsequent description, and in part will become apparent from the description, or will be understood by implementing the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 A schematic diagram of a flow chart of a time series data prediction method provided by an embodiment of the present application is shown;

[0023] Figure 2 A schematic diagram of time series data of different frequencies provided by an embodiment of the present application is shown;

[0024] Figure 3 A schematic diagram showing the categories of time series data provided by an embodiment of the present application is shown;

[0025] Figure 4 A schematic diagram of a quantity and energy cycle distribution diagram provided by an embodiment of the present application is shown;

[0026] Figure 5 A schematic diagram of the structure of a time series data prediction device provided in an embodiment of the present application is shown;

[0027] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0028] To make the purpose, technical scheme and advantages of the embodiment of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. It should be understood that the drawings in the embodiment of the present application only serve the purpose of explanation and description, and are not used to limit the protection scope of the embodiment of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in the embodiment of the present application shows the operation implemented according to some embodiments of the embodiment of the present application. It should be understood that the operation of the flowchart can be implemented out of order, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the embodiment of the present application, or remove one or more operations from the flowchart.

[0029] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all embodiments. The components of the embodiments of the present application described and shown in the drawings generally here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the embodiments of the present application claimed, but merely represents the selected embodiments of the embodiments of the present application.

[0030] It is understandable that the "first" and "second" in the embodiments of the present application are used to distinguish similar objects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not necessarily limit the difference. In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship of associated objects, indicating that there may be three relationships, such as A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the related objects before and after are in an "or" relationship. The term "multiple" refers to more than two (including two), and similarly, "multiple groups" refers to more than two groups (including two groups).

[0031] Before introducing the time series data prediction method provided in the embodiment of the present application, some concepts involved in the embodiment of the present application are first introduced:

[0032] Data smoothing refers to replacing the specific values ​​in the original time series data with the average of the maximum and minimum values. Specifically, the moving average algorithm can be used to eliminate random fluctuations in the time series data, thereby eliminating the potential impact of noise and making the time series data smoother.

[0033] Deduplication refers to removing duplicate data records in time series data. For example, if there are time series data with the same collection time and other attributes (that is, one time point corresponds to multiple data records), the first data record can be retained and other duplicate data records can be removed.

[0034] Default completion processing means that if the specific value of a certain collection time is missing, the average value of the two collection times before and after it can be used as the default value, and the default value can be used as the specific value of the collection time.

[0035] Discrete Wavelet Transform (DWT) is very useful in numerical analysis and time-frequency analysis. As the name implies, discrete wavelet transform means discrete input and discrete output, but there is no simple and clear formula to express the relationship between input and output.

[0036] Fourier Transform (FT), Fourier Transform has multiple Chinese translations, the most common ones are "Fourier Transform", "Fourier Transform", "Fourier Transform", "Fourier Transform", etc., which means that a function that meets certain conditions can be expressed as a linear combination of trigonometric functions (sine and / or cosine functions) or their integrals.

[0037] It should be noted that the time series data prediction method provided in the embodiment of the present application can be executed by an electronic device, where the electronic device refers to a device terminal having the function of executing a computer program or the above-mentioned server, such as a smart phone, a personal computer, a tablet computer, a personal digital assistant or a mobile Internet device. A server refers to a device that provides computing services through a network, such as an x86 server and a non-x86 server, and a non-x86 server includes a mainframe, a minicomputer and a UNIX server.

[0038] The following introduces the application scenarios in which the time series data prediction method is applicable. The application scenarios here include but are not limited to: information technology (IT) intelligent operation and maintenance, telecommunications intelligent operation and maintenance, data center computer room operation and maintenance, etc. Here, telecommunications intelligent operation and maintenance is used as an example for explanation. Specifically, the time series data prediction method can be used to predict different categories of time series data, so as to predict the data that will appear in the next cycle of this category of time series data (for example: using the data of the last hour to predict the time series data of the next few minutes). Of course, the time series data can also be used to further predict the trend of the data, so as to determine whether to expand capacity or add hardware equipment.

[0039] See also Figure 1 The flowchart of the time series data prediction method provided by the embodiment of the present application is shown; the embodiment of the present application provides a time series data prediction method, including:

[0040] Step S110: Acquire the time series data to be processed, and classify the time series data to obtain multiple categories of time series data.

[0041] Time series data refers to the time series data collected by sensors in real time when the target object is in operation. There are many types of target objects here, such as hardware devices such as power motors, servers, and network devices, and virtual software such as virtual machines, cloud servers, and virtualized network devices. Taking the power motor as an example, the time series data of the power motor in operation includes but is not limited to: collection time, three-phase current, motor temperature, motor vibration amplitude, and other series data. Taking the cloud server as an example, the time series data of the cloud server in operation is performance indicator data, including but not limited to: software indicators such as memory usage, CPU usage, disk usage, and bandwidth occupancy. The accurate prediction results of time series data can improve the operation and maintenance effect, and timely warn of problems, etc., to ensure the normal operation of the system.

[0042] See also Figure 2 A schematic diagram of time series data of different frequencies provided by an embodiment of the present application is shown; the horizontal axis of the time series data in the figure may be time (e.g., 100 seconds or 200 seconds, etc.), and the vertical axis of the time series data in the figure may be amplitude or width. Optionally, before classifying the time series data, it may also be determined whether the above-mentioned time series data meets a preset condition. If the above-mentioned time series data does not meet the preset condition, the above-mentioned time series data may be preprocessed, and the preprocessing here includes but is not limited to: data smoothing, deduplication processing and / or default completion processing. The above-mentioned preset conditions are, for example: there are repeated data records in the time series data with indicators (e.g., the same collection time and other attributes are the same), the data is not smooth enough (i.e., the changes are too fast) and / or the attributes of some data records do not have specific values.

[0043] Step S120: for the type of each category in the multiple categories, confirm the corresponding prediction algorithm.

[0044] Step S130: Use the corresponding prediction algorithm to predict the time series data of this category to obtain the prediction result of the next cycle, where the prediction result is the data that appears in the time series data in the next cycle.

[0045] It is understandable that, due to the different characteristics of the categories of time series data, different prediction algorithms need to be used to predict each category of time series data. Specifically, a target prediction algorithm can be selected from the prediction algorithm library, and the target prediction algorithm can be used to predict the time series data of this category to obtain a prediction result. The algorithms in the above-mentioned prediction algorithm library include but are not limited to: ARIMA algorithm, Prophet algorithm, Holt-winter algorithm and / or LSTM algorithm, etc.

[0046] In the above implementation process, by classifying the time series data, multiple categories of time series data are obtained, and the time series data of each category in the multiple categories are predicted, the situation where data of different categories are treated as noise to each other is improved, and the probability of data of different categories being treated as noise to each other is effectively reduced, thereby improving the accuracy of predicting time series data.

[0047] After preprocessing the above-mentioned time series data, time series data that meets the preset conditions can be obtained. If the time series data itself meets the preset conditions, there is no need to preprocess the time series data, but the time series data can be directly classified. It is understandable that after obtaining the time series data that meets the preset conditions, a classifier can also be used to classify the time series data to obtain the category of the time series data. The classifier here includes but is not limited to: a classification neural network model composed of a convolutional neural network (CNN) and / or a recurrent neural network (RNN).

[0048] See also Figure 3 A schematic diagram of the categories of time series data provided by an embodiment of the present application is shown; similarly, the horizontal axis of the time series data in the figure can be time (for example, 100 seconds or 200 seconds, etc.), and the vertical axis of the time series data in the figure can be amplitude or width. Since the categories of time series data are relatively complex, the following only uses the classification into stationary data, periodic data, trend data and / or irregular data as examples for explanation, wherein trend data may include: no trend data, rising trend data and falling trend data. It can be understood that for different data types, the data processing method and prediction process used are also different. The processing process of these types of data is described in detail below.

[0049] As an optional implementation of the above step S110, the above multiple categories may include: stationary data; classifying the time series data may obtain stationary data, and the implementation may include:

[0050] Step S111: Calculate the standard deviation of the time series data, separate the frequency domain noise that is higher than a preset noise threshold parameter from the time series data, and then calculate the standard deviation of the frequency domain noise.

[0051] The implementation method of the above step S111 is, for example: the above step S111 can be completed by using an executable program compiled or interpreted by a preset programming language, and the programming languages ​​here are, for example: C, C++, Java, BASIC, JavaScript, LISP, Shell, Perl, Ruby, Python and PHP, etc. For ease of understanding and explanation, Python language is used as an example for explanation here. Specifically, the standard deviation of the time series data can be calculated using the library function in the Python language, and the frequency domain noise (also known as the high-frequency noise part) that is higher than the preset noise threshold parameter can be separated from the time series data using the dwt function (i.e., discrete wavelet transform function) in the PyWavelets library in the Python language. Then, the standard deviation of the frequency domain noise can be calculated using the executable program.

[0052] Step S112: Determine whether the ratio between the standard deviation of the time series data and the standard deviation of the frequency domain noise is less than a preset threshold. If the ratio between the standard deviation of the time series data and the standard deviation of the frequency domain noise is less than the preset threshold, the time series data is determined to be stationary data.

[0053] An implementation example of the above-mentioned step S112 is as follows: an executable program compiled or interpreted in a preset programming language can be used to determine whether the ratio between the standard deviation of the time series data and the standard deviation of the frequency domain noise is less than a preset threshold value. If the ratio between the standard deviation of the time series data and the standard deviation of the frequency domain noise is less than the preset threshold value, the executable program can be used to determine that the time series data is stationary data, for example, the time series data is marked as stationary data (i.e., labeled).

[0054] As an optional implementation of the above steps S120 to S130, it is also possible to predict time series data of the type of stationary data, and the implementation may include:

[0055] Step S121: Use the Auto-Arima autoregressive model in the differential integrated moving average autoregressive ARIMA model to predict the time series data that will appear in the next period of the stationary data to obtain the predicted time series data.

[0056] It can be understood that the differencing integrated moving average autoregressive ARIMA model in the Python language library includes: Auto-Arima autoregressive model and Moving Average (MA) model, among which the Auto-Arima autoregressive model is used to predict the time series data appearing in the next period, and the MA model is used to correct the prediction error of the Auto-Arima autoregressive model.

[0057] The implementation method of the above step S121 is, for example: using the parameter tuning tool in the Auto-Arima autoregressive model, predicting the time series data that will appear in the next period of the stationary data (i.e., time series fitting), and obtaining the predicted time series data. It is understandable that the above parameter tuning tool requires the input of three parameters: p, d, and q; wherein the above three parameters p, d, and q can be selected by the Akaike Information Criterion (AIC), p represents the number of periods of historical time series data used to predict the data of the current period, d represents the order of differencing the time series data, and q represents the accumulated value of the error term in the Auto-Arima autoregressive model.

[0058] Step S122: Use the moving average MA model in the ARIMA model to correct the predicted time series data to obtain corrected time series data.

[0059] Step S123: perform weighted averaging on the predicted time series data and the corrected time series data to obtain a prediction result.

[0060] The implementation method of the above steps S122 to S123 is, for example: obtaining an ARIMA model from a Python language library, and using the moving average MA model in the ARIMA model to correct the predicted time series data to obtain the corrected time series data. An executable program compiled or interpreted by a preset programming language can be used to perform weighted averaging on the predicted time series data and the corrected time series data to obtain a prediction result. The programming languages ​​here are, for example, C, C++, Java, BASIC, JavaScript, LISP, Shell, Perl, Ruby, Python, PHP, etc.

[0061] As an optional implementation of the above step S110, the above multiple categories may include: periodic data; the periodic data may be obtained by classifying the time series data, and the implementation may include:

[0062] Step S113: Perform Fourier transform on the time series data to obtain a quantity-energy cycle distribution diagram.

[0063] See also Figure 4A schematic diagram of a periodic distribution diagram of energy quantity provided by an embodiment of the present application is shown; the vertical axis in the figure represents the energy quantity of the time series data, and the horizontal axis in the figure represents the periodic distribution of the time series data. The implementation method of the above step S113 is, for example: an executable program compiled or interpreted in a preset programming language can be used to perform a discrete Fourier transform (DFT) or a fast Fourier transform (FFT) and the like on the time series data to obtain a periodic distribution diagram of the energy quantity of the time series data.

[0064] Step S114: Determine whether the volume distribution of the volume cycle distribution diagram presents a periodic volume peak decreasing characteristic. If the volume distribution of the volume cycle distribution diagram presents a periodic volume peak decreasing characteristic, the time series data is determined as periodic data.

[0065] The implementation method of the above step S114 is, for example, to use an executable program compiled or interpreted by a preset programming language to determine whether the volume distribution of the volume period distribution diagram presents the characteristics of periodic volume spike decrease, wherein the programming languages ​​that can be used are, for example, C, C++, Java, BASIC, JavaScript, LISP, Shell, Perl, Ruby, Python and PHP, etc. If the volume distribution of the energy period distribution diagram presents the characteristics of periodic volume spike decrease, the executable program is used to determine the time series data as periodic data, and specifically, the executable program can be used to label the time series data as periodic data.

[0066] As an optional implementation of the above steps S120 to S130, it is also possible to predict time series data such as periodic data. This implementation may include:

[0067] Step S124: Obtain the data period length of the periodic data.

[0068] Step S125: predict the periodic data according to the data period length to obtain a prediction result.

[0069] The implementation of the above steps S124 to S125 is, for example, to obtain the data cycle length of the periodic data using an executable program compiled or interpreted by a preset programming language, thereby achieving the effect of automatically identifying the data cycle length of the periodic data. After obtaining the data cycle length, the data cycle length can be used as a Prophet algorithm parameter, and the formula Predict the periodic data and obtain the prediction results. Where S(t) represents the data result, n represents the period number (i.e. the nth period), N represents the total number of periods, and a n and b nare all hyperparameters for balancing weights, and p represents the length of the cycle. For example, p=365.25 represents a yearly cycle, and p=7 represents a weekly cycle. In the implementation of the above solution, the prediction accuracy of periodic data is improved by using the data cycle length as a parameter of the Prophet algorithm and using the Prophet algorithm to predict periodic data.

[0070] As an optional implementation of the above step S110, the above multiple categories may also include: trend data; trend data may be obtained by classifying time series data, and the implementation may include:

[0071] Step S115: Perform a Mann-Kendall test on the time series data to obtain the confidence and statistics of the time series data, wherein the statistics represent the trend degree of the time series data, and the confidence represents the credibility of the time series data.

[0072] It can be understood that the role of the Mann-Kendall test is to statistically evaluate whether the variable has a monotonically increasing or decreasing trend over time. A monotonically increasing trend means that the variable increases over time, or a monotonically decreasing trend means that the variable decreases over time. Specifically, the alternative parameter linear regression analysis in the Mann-Kendall test can be used, that is, the linear regression test method is used to perform a linear fit on the time series data to determine whether the slope of the straight line corresponding to the time series data is not zero.

[0073] Step S116: Determine whether the absolute value of the statistic is greater than the confidence level. If the absolute value of the statistic is greater than the confidence level, determine the time series data as trend data.

[0074] An example of the implementation method of the above steps S115 to S116 is: assuming that the confidence level in the Mann-Kendall test is represented by α, and the statistic is represented by Z, then the Mann-Kendall test can be performed on the time series data to obtain the confidence level α and the statistic Z of the time series data, wherein the statistic represents the trend degree of the time series data, and the confidence level represents the credibility of the time series data. An executable program compiled or interpreted using a preset programming language is used to determine whether the absolute value of the statistic is greater than the confidence level. If the absolute value of the statistic is greater than the confidence level, the time series data is determined to be trend data. Among them, programming languages ​​that can be used include: C, C++, Java, BASIC, JavaScript, LISP, Shell, Perl, Ruby, Python, PHP, etc. In a specific bilateral trend test, for a given confidence level (significance level) α, if |Z|≥Z 1-α / 2, then the null hypothesis H0 is unacceptable, that is, at the confidence level α (significance test level), the time series data has an obvious upward or downward trend. A positive value of Z indicates an upward trend, a negative value indicates a downward trend, and an absolute value of Z greater than or equal to 1.645, 1.96, and 2.576 indicates that the significance test of 90%, 95%, and 99% confidence levels has been passed, respectively. The above-mentioned Mann-Kendall test is used to statistically evaluate whether the variable has a monotonically increasing or decreasing trend over time. A monotonically increasing trend means that the variable increases over time, or a monotonically decreasing trend means that the variable decreases over time.

[0075] Optionally, when traditional algorithms are usually used to predict trend data, the value solidification phenomenon will occur, that is, the model parameters tend to converge until solidification, resulting in the inability to accurately predict the subsequent data trends. Therefore, in the specific implementation process, the embodiment of the present application can use the Holt-winter algorithm to predict trend data, thereby effectively improving the prediction accuracy of trend data.

[0076] As an optional implementation of the above step S110, the above multiple categories may also include: irregular data; irregular data may be obtained by classifying the time series data, and the implementation may include:

[0077] Step S117: Determine whether the time series data meets preset conditions, the preset conditions include: the time series data is not stationary data, the time series data is not periodic data, and the time series data is not trend data.

[0078] Step S118: If the time series data does not meet the preset conditions, the time series data is determined to be irregular data.

[0079] The implementation of the above steps S117 to S118 is, for example: using an executable program compiled or interpreted by a preset programming language to determine whether the time series data meets the preset conditions, the preset conditions include: the time series data is not stationary data, the time series data is not periodic data, and the time series data is not trend data. If the time series data does not meet the preset conditions (that is, it is not the above three types of data), the time series data is determined to be irregular data.

[0080] Optionally, in the specific implementation process, a recurrent neural network (RNN), a long short-term memory (LSTM) network model or a bidirectional long short-term memory (Bi-LSTM) network model can also be used to predict irregular data and obtain prediction results. Of course, in the specific implementation process, a convolutional neural network and / or a channel attention mechanism can be superimposed behind the RNN, LSTM or Bi-LSTM to predict irregular data and obtain prediction results. That is to say, a convolutional neural network and a channel attention mechanism can be used to extract local dependency features between loads, and the time series data can be predicted by introducing the RNN, LSTM or Bi-LSTM with an attention mechanism, thereby giving different weights to the time series data at different times, making the prediction results of irregular data more accurate and improving the prediction accuracy of irregular data.

[0081] See also Figure 5 The schematic diagram of the structure of the time series data prediction device provided by the embodiment of the present application is shown; the embodiment of the present application provides a time series data prediction device 200, including:

[0082] The time series data classification module 210 is used to obtain the time series data to be processed, and classify the time series data to obtain multiple categories of time series data.

[0083] The prediction result acquisition module 220 is used to confirm the corresponding prediction algorithm for the type of each category in multiple categories; use the corresponding prediction algorithm to predict the time series data of the category to obtain the prediction result of the next period, and the prediction result is the data that appears in the time series data in the next period.

[0084] Optionally, in an embodiment of the present application, the multiple categories include: stationary data; a time series data classification module, including:

[0085] The time series standard deviation statistics submodule is used to calculate the standard deviation of time series data.

[0086] The frequency domain standard deviation statistics submodule is used to separate the frequency domain noise that is higher than the preset noise threshold parameter from the time series data and calculate the standard deviation of the frequency domain noise.

[0087] The standard deviation threshold judgment submodule is used to judge whether the ratio between the standard deviation of the time series data and the standard deviation of the frequency domain noise is less than a preset threshold.

[0088] The stationary data determination submodule is used to determine the time series data as stationary data if the ratio between the standard deviation of the time series data and the standard deviation of the frequency domain noise is less than a preset threshold.

[0089] Optionally, in the embodiment of the present application, the prediction result obtaining module includes:

[0090] The stationary data prediction submodule is used to use the Auto-Arima autoregression model in the differential integrated moving average autoregression ARIMA model to predict the time series data that will appear in the next period of the stationary data and obtain the predicted time series data.

[0091] The time series data correction submodule is used to correct the predicted time series data using the moving average MA model in the ARIMA model to obtain the corrected time series data.

[0092] The time series data weighting submodule is used to perform weighted averaging on the predicted time series data and the corrected time series data to obtain the prediction result.

[0093] Optionally, in an embodiment of the present application, the multiple categories include: periodic data; a time series data classification module, including:

[0094] The data Fourier transform submodule is used to perform Fourier transform on time series data to obtain a volume-energy cycle distribution diagram.

[0095] The distribution chart volume judgment submodule is used to judge whether the volume distribution of the volume period distribution chart shows the characteristics of periodic volume peak decrease.

[0096] The periodic data determination submodule is used to determine the time series data as periodic data if the volume distribution of the volume periodic distribution diagram shows the characteristics of periodic volume peak decrease.

[0097] Optionally, in the embodiment of the present application, the prediction result obtaining module includes:

[0098] The cycle length acquisition submodule is used to obtain the data cycle length of periodic data.

[0099] The periodic data prediction submodule is used to predict periodic data according to the length of the data period to obtain the prediction result.

[0100] Optionally, in an embodiment of the present application, the multiple categories include: trend data; a time series data classification module, including:

[0101] The time series data verification submodule is used to perform a Mann-Kendall test on the time series data to obtain the confidence and statistics of the time series data, wherein the statistics represent the trend degree of the time series data and the confidence represents the credibility of the time series data.

[0102] The statistic value judgment submodule is used to judge whether the absolute value of the statistic is greater than the confidence level.

[0103] A trend data determination submodule is used to determine the time series data as trend data if the absolute value of the statistic is greater than the confidence level;

[0104] The corresponding prediction algorithm is used to predict the time series data of this category, specifically: the Holt-winter algorithm is used to predict the trend data.

[0105] Optionally, in an embodiment of the present application, the multiple categories include: irregular data; a time series data classification module, including:

[0106] The time series data judgment submodule is used to judge whether the time series data meets the preset conditions, and the preset conditions include: the time series data is not stationary data, the time series data is not periodic data, and the time series data is not trend data.

[0107] An irregular type determination submodule, used for determining the time series data as irregular type data if the time series data meets a preset condition;

[0108] Use the corresponding prediction algorithm to predict the time series data of this category. Specifically, use convolutional neural networks and channel attention mechanisms to extract local dependency features between loads, and predict time series data by introducing RNN, LSTM, or Bi-LSTM with an attention mechanism, thereby giving different weights to time series data at different times.

[0109] It should be understood that the device corresponds to the above-mentioned time series data prediction method embodiment and can execute the various steps involved in the above-mentioned method embodiment. The specific functions of the device can be referred to in the above description, and the detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the device.

[0110] See also Figure 6 The electronic device 300 provided in the embodiment of the present application includes: a processor 310 and a memory 320, wherein the memory 320 stores machine-readable instructions executable by the processor 310, and when the machine-readable instructions are executed by the processor 310, the above method is executed.

[0111] The embodiment of the present application further provides a computer-readable storage medium 330 , on which a computer program is stored. When the computer program is executed by the processor 310 , the above method is executed.

[0112] Among them, the computer-readable storage medium 330 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

[0113] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0114] In several embodiments provided by the embodiments of the present application, it should be understood that the disclosed device and method can also be implemented in other ways. The device embodiments described above are only schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a part of a module, a program segment or a code, and a part of a module, a program segment or a code includes one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also be different from the order of occurrence marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which is mainly determined by the functions involved.

[0115] In addition, each functional module of each embodiment in the embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. In addition, in the description of this specification, the description of reference terms "one embodiment", "some embodiments", "example", "specific example", "some examples", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present application. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples without contradiction.

[0116] The above description is only an optional implementation manner of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the embodiments of the present application, which should be covered within the protection scope of the embodiments of the present application.

Claims

1. A time series data prediction method, characterized in that: include: Acquire time series data to be processed, and classify the time series data to obtain time series data of multiple categories; For each type of the plurality of categories, determining a corresponding prediction algorithm; The corresponding prediction algorithm is used to predict the time series data of this category to obtain the prediction result of the next cycle, where the prediction result is the data that appears in the next cycle of the time series data.

2. The method according to claim 1, characterized in that The multiple categories include: stationary data; the classification of the time series data includes: Calculating the standard deviation of the time series data; Separating frequency domain noise that is higher than a preset noise threshold parameter from the time series data, and calculating the standard deviation of the frequency domain noise; Determine whether the ratio between the standard deviation of the time series data and the standard deviation of the frequency domain noise is less than a preset threshold; If so, the time series data is determined to be the stationary data.

3. The method according to claim 2, characterized in that The using a corresponding prediction algorithm to predict the time series data of the category includes: Use the Auto-Arima autoregressive model in the differential integrated moving average autoregressive ARIMA model to predict the time series data that will appear in the next period of the stationary data to obtain the predicted time series data; Using the moving average MA model in the ARIMA model, the predicted time series data is corrected to obtain corrected time series data; The predicted time series data and the corrected time series data are weighted averaged to obtain the prediction result.

4. The method according to claim 1, characterized in that: The multiple categories include: periodic data; the classification of the time series data includes: Performing Fourier transformation on the time series data to obtain a quantity-energy cycle distribution diagram; Determine whether the volume distribution of the volume period distribution diagram presents a periodic volume peak decreasing characteristic; If so, the time series data is determined to be the periodic data.

5. The method according to claim 4, characterized in that The using a corresponding prediction algorithm to predict the time series data of the category includes: Obtaining a data period length of the periodic data; The periodic data is predicted according to the data period length to obtain the prediction result.

6. The method according to claim 1, characterized in that The multiple categories include: trend data; the classification of the time series data includes: Performing a Mann-Kendall test on the time series data to obtain the confidence and statistics of the time series data, wherein the statistics represent the trend degree of the time series data, and the confidence represents the credibility of the time series data; Determining whether the absolute value of the statistic is greater than the confidence level; If yes, the time series data is determined as the trend data; The corresponding prediction algorithm is used to predict the time series data of this category, specifically: the Holt-winter algorithm is used to predict the trend data.

7. The method according to any one of claims 1 to 6, characterized in that: The multiple categories include: irregular data; the classification of the time series data includes: Determine whether the time series data meets preset conditions, the preset conditions including: the time series data is not stationary data, the time series data is not periodic data, and the time series data is not trend data; If yes, the time series data is determined as the irregular data; The corresponding prediction algorithm is used to predict the time series data of this category, specifically: a convolutional neural network and a channel attention mechanism are used to extract local dependency features between loads, and the time series data is predicted by introducing an attention mechanism such as RNN, LSTM or Bi-LSTM, thereby giving different weights to the time series data at different times.

8. A time series data prediction device, characterized in that: include: A time series data classification module, used to obtain the time series data to be processed, and classify the time series data to obtain multiple categories of time series data; The prediction result acquisition module is used to confirm the corresponding prediction algorithm for the type of each category in the multiple categories; use the corresponding prediction algorithm to predict the time series data of the category to obtain the prediction result of the next period, and the prediction result is the data that appears in the next period of the time series data.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is executed.