Data prediction methods, systems, devices and storage media
By analyzing the time series data of cloud resource scheduling scenarios, using prediction algorithms to predict or using knowledge bases to mine abnormal events, the problem of difficult prediction of poor regularity in the existing technology is solved, and cloud resource scheduling event prediction for multiple scenarios is achieved, which is better versatile.
Patent Information
- Application Number
- CN202210482072.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-05-05
AI Technical Summary
The existing cloud resource scheduling prediction scheme is difficult to accurately predict data with poor regularity, and the prediction model has great restrictions on scenario types and cannot meet the prediction needs of multiple scheduling events.
By obtaining time series data related to cloud resource scheduling, analyzing the data to determine whether event prediction can be performed. If it is predictable, an appropriate prediction algorithm will be used for processing. If it is unpredictable, an abnormal event will be mined using the knowledge base.
It realizes the prediction of cloud resource scheduling events in various scenarios, avoids the limitation of prediction universality caused by different scenario parameters and characteristics, and has a wider application applicability.
Smart Images

Figure CN115018124B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data prediction method, system, device and storage medium. Background Art
[0002] With the development of cloud computing technology, there are more and more cloud computing application scenarios, and the scheduling of cloud resources has become more and more complicated.
[0003] In order to meet the various task requirements of different users in the market, a variety of cloud resources will be provided accordingly. Although it can provide users with diversified cloud resource solutions, it will also make cloud resource scheduling complicated. In the prior art, although cloud service providers have certain prediction capabilities for cloud resource scheduling, various prediction algorithms or prediction models have high requirements on the data types used to participate in the calculation, or have certain restrictions on task scenarios. For example, it is difficult to achieve accurate predictions related to cloud resource scheduling for cloud resource scheduling related data that is not very regular. Therefore, the cloud resource scheduling prediction solutions proposed by these cloud service providers have certain limitations and cannot meet the prediction needs in cloud resource scheduling for a variety of scheduling events. Summary of the invention
[0004] In order to solve or improve the problems existing in the prior art, the embodiments of the present application provide a data prediction method, system, device and storage medium.
[0005] In a first aspect, in one embodiment of the present application, a data prediction method is provided. The method comprises:
[0006] Get the time series data of the target event;
[0007] Analyzing the time series data to determine whether event prediction can be performed based on the time series data;
[0008] If event prediction is possible, the time series data is processed using a prediction algorithm to obtain a predicted event.
[0009] In a second aspect, in one embodiment of the present application, a data prediction method is provided. The method comprises:
[0010] Get the time series data of the target event;
[0011] Analyzing the time series data to determine whether event prediction can be performed based on the time series data;
[0012] If event prediction can be performed, the time series data is processed using a prediction algorithm to obtain a predicted event;
[0013] In response to a hierarchical prediction request from a user, determining whether the time series data contains time series hierarchical information;
[0014] If the temporal level information is included, the level prediction correction is performed on the predicted event.
[0015] In a third aspect, in one embodiment of the present application, a data prediction method is provided. The method comprises:
[0016] Get the time series data of the target event;
[0017] In response to a hierarchical prediction request from a user, determining whether the time series data contains time series hierarchical information;
[0018] If the temporal hierarchical information is included, a hierarchical prediction is performed on the target event.
[0019] In a fourth aspect, in one embodiment of the present application, a data prediction system is provided, the system comprising:
[0020] An algorithm selector, used to obtain time series data of a target event; analyze the time series data to determine whether an event prediction can be performed based on the time series data; if an event prediction can be performed, use a prediction algorithm to process the time series data to obtain a predicted event;
[0021] The knowledge base module is used to mine abnormal events from time series data using the knowledge base if event prediction is not possible.
[0022] In a fifth aspect, in one embodiment of the present application, an electronic device is provided, including a memory and a processor; wherein:
[0023] The memory is used to store programs;
[0024] The processor is coupled to the memory and is used to execute the program stored in the memory to implement the data prediction method described in the first aspect, the data prediction method described in the second aspect, or the data prediction method described in the third aspect.
[0025] In the sixth aspect, in one embodiment of the present application, a non-temporary machine-readable storage medium is provided, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor executes a data prediction method as described in the first aspect, a data prediction method as described in the second aspect, or a data prediction method as described in the third aspect.
[0026] In the technical solution provided by the embodiment of the present application, in the cloud resource scheduling scenario, cloud resources are dynamically changing, and events related to the cloud resource scheduling scenario can be obtained. These events have obvious dynamic timing characteristics. Therefore, in order to facilitate the prediction of related events, the time series data of the related events can be obtained. By analyzing the time series data, it is determined whether the time series data is a predictable event. If it is predictable, it is necessary to determine a suitable prediction algorithm for it, and use the prediction algorithm to predict the time series data to obtain the predicted event, so as to better guide the subsequent work. This solution predicts and processes events based on time series data, and is not restricted by event type factors, scenario types, etc., so that this solution can be more widely used.
[0027] In addition, if the time series data is determined to be unpredictable after analysis, the pre-established knowledge base can be used to mine abnormal events in the time series data. Based on the above scheme, the time series data presented by various predictable and unpredictable events can be analyzed and processed, and the corresponding event patterns can be determined or mined, which has a better general effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0029] Figure 1 A schematic diagram of a flow chart of a data prediction method provided in an embodiment of the present application;
[0030] Figure 2 A schematic diagram of a flow chart of a prediction algorithm for determining an embodiment of the present application;
[0031] Figure 3 A flowchart of a method for mining abnormal events provided in an embodiment of the present application;
[0032] Figure 4 A schematic diagram of the timing anomaly types illustrated by examples in the embodiments of the present application;
[0033] Figure 5 A flowchart of an abnormal event mining method provided in an embodiment of the present application;
[0034] Figure 6 A schematic diagram of a process flow of a hierarchical prediction method provided in an embodiment of the present application;
[0035] Figure 7A schematic diagram of a process for performing hierarchical prediction based on a parent-child hierarchical relationship provided in an embodiment of the present application;
[0036] Figure 8 A schematic diagram of a process for performing hierarchical prediction on a sub-hierarchical relationship provided in an embodiment of the present application;
[0037] Fig. 9 A three-layer hierarchical relationship diagram provided for an embodiment of the present application;
[0038] Fig.10 A schematic diagram of a flow chart of another data prediction method provided in an embodiment of the present application;
[0039] Fig.11 A flowchart of another data prediction method provided in an embodiment of the present application;
[0040] Fig.12 A schematic diagram of the structure of a data prediction system provided in an embodiment of the present application;
[0041] Fig.13 A schematic diagram of the structure of the algorithm selector provided in the embodiment of the present application;
[0042] Fig.14 A schematic diagram of the structure of the knowledge base module provided in the embodiment of the present application;
[0043] Fig.15 A schematic diagram of a hierarchical prediction structure provided in an embodiment of the present application;
[0044] Fig.16 A schematic diagram of the structure of a data prediction device provided in an embodiment of the present application;
[0045] Fig.17 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0046] Fig.18 A schematic diagram of the structure of another data prediction device provided in an embodiment of the present application;
[0047] Fig.19 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
[0048] Fig. 20 A schematic diagram of the structure of another data prediction device provided in an embodiment of the present application;
[0049] Fig.21 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0051] In some processes described in the specification, claims and the above-mentioned figures of the present application, multiple operations appearing in a specific order are included, and these operations may not be executed or executed in parallel in the order in which they appear in this article. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit "first" and "second" to different types. In addition, the embodiments described below are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0052] With the development of cloud computing technology, more and more scenarios. Large-scale cloud computing services require the reasonable and timely supply, allocation, planning, operation and management of cloud resources. Only in this way can high-quality and efficient services be provided to cloud users. The scenarios in which cloud resources are applied are different, and the scenario characteristics presented to the outside world are also different. For example, in the e-commerce application scenario, the scheduling of cloud resources has a more obvious holiday surge characteristic; in the streaming media application scenario, the scheduling of cloud resources has a more obvious time period increase and decrease characteristic. Therefore, some prediction models are trained using certain scenario parameters with obvious scenario characteristics, which are difficult to apply to other scenarios and do not have good versatility. However, in actual applications, cloud resources will be called into various scenarios according to actual needs. If only cloud resource scheduling-related events of a single scenario are predicted, the demand for overall resource coordination and scheduling management cannot be met. Cloud resource scheduling-related events of various scenario types have time series data. Therefore, the present application scheme proposes to use time series data to realize the prediction of related events in various scenarios.
[0053] In the technical solution of the present application, the specific working process will be described in the following embodiments.
[0054] like Figure 1 The data prediction method provided in the embodiment of the present application is a flow chart. The execution subject of the data prediction method can be a server device such as Figure 1 As shown, the data prediction method includes the following steps:
[0055] 101: Obtain time series data of the target event.
[0056] 102: Analyze the time series data to determine whether event prediction can be performed based on the time series data.
[0057] 103: If event prediction can be performed, the time series data is processed using a prediction algorithm to obtain a predicted event.
[0058] The target event mentioned here can be, for example, a storage resource event, a network traffic event, and so on. In the cloud resource scheduling scenario, the cloud resource attribute values change dynamically over time, so the cloud resource attribute values with dynamic time series characteristics are a kind of time series data. The time series data mentioned here can be various types of related data collected in chronological order during the occurrence or execution of these events, or time series data obtained based on log data. In other words, time series data represents the related data obtained by the dynamic change of the attribute value of the target event over time. Each time series data has its unique corresponding identity (ID). Cloud resource scheduling in various types of scenarios will generate corresponding time series data. Therefore, the prediction of event patterns based on time series data has better versatility.
[0059] After obtaining the time series data, the time series data will be preprocessed to eliminate the interference of uncontrollable factors on the subsequent prediction of the time series data. During the preprocessing, the preprocessing can be carried out for obvious large burr detection, missing value detection, periodicity detection and other issues.
[0060] For example, the detection and smoothing of large burrs are as follows:
[0061] First, we perform large burr anomaly detection. To improve timeliness, we first use the “upper and lower quantiles” to preliminarily filter suspected anomalies, and then use the Select Search (SS) algorithm to detect large burr anomalies. The principle of the SS algorithm is as follows: i , through the sliding window, the current window is
[0062] Statistics i for:
[0063] For the "sudden increase" statistics:
[0064] ss i = count((x i -x i-j )>threshold spike ), j = 1, ..., t
[0065] For the "sudden drop anomaly" statistics:
[0066] ss i = count((x i-j -x i )>threshold dip ), j = 1, ..., t
[0067] in:
[0068]
[0069] count(f(.)) counts the number of times all f(.) are true.
[0070] The large glitches found by the anomaly detection are removed, and then the "linear interpolation algorithm" is used for smoothing. In addition to linear interpolation, an interpolation algorithm based on time series distribution can be used.
[0071] The missing value detection and smoothing methods are as follows:
[0072] Missing value detection and smoothing algorithm: After the missing values are detected, the "linear interpolation algorithm" is also used for smoothing. In addition to linear interpolation, an interpolation algorithm based on time series distribution can be used.
[0073] The periodicity detection and period calculation algorithm are as follows:
[0074] Considering the data size and timeliness, the fast Fourier transform (FFT) algorithm can be used to convert the time series data from the time domain to the frequency domain, and then determine whether the maximum amplitude exceeds a certain threshold in the frequency domain. If the maximum amplitude is less than a certain threshold, there is no period. If the maximum amplitude is greater than a certain threshold, the calculated period value is: int(T / f), where T is the time series length and f is the frequency corresponding to the maximum amplitude. In addition to using the FFT algorithm, the autocorrelation algorithm can also be used for period detection.
[0075] The above three preprocessing methods also perform preprocessing operations on time series data in a certain order.
[0076] After completing the preprocessing of time series data using the above method, the time series data can be further analyzed and processed. Specifically:
[0077] Perform feature extraction on the time series data, and determine the feature type and time series type corresponding to the time series data based on the extracted feature content. Feature types can be divided into: single time series features, joint variable features, and scene experience features. Among them, single time series features and joint variable features can be intelligently extracted using feature extraction algorithms, and experience features are features provided based on a priori. The specific feature content and extraction method will be specifically illustrated in the following embodiments, so they will not be repeated here. Furthermore, based on the feature extraction results, it is further determined whether the time series data can be used for event prediction.
[0078] In practical applications, not all time series data are valuable and regular data. Therefore, according to the specific analysis results, for events that can be predicted, an adaptive prediction algorithm is used to predict based on the time series data. The selection of the specific prediction algorithm and the prediction process will be described in the following embodiments.
[0079] If the result of analysis and judgment is that event prediction cannot be performed based on time series data, the pre-established knowledge base can be used to mine abnormal events from the time series data. The knowledge base mentioned here can be understood as: storing various event patterns and related time series data, which can be used to give a white-box analysis explanation that can be understood by the demand side for the unpredictability of each time series data, and can also make post-corrections to the prediction results of the algorithm; at the same time, the accumulated knowledge base can also be fed back to the demand side to help the demand side better complete the scheduling and coordination tasks of cloud resources. Specific solutions related to mining abnormal events will be illustrated in the following embodiments, and will not be repeated here. Through the above scheme, the prediction of events is realized using time series data, which can effectively avoid the limitations on the universality of prediction due to different scene parameters and scene characteristics. It is suitable for event prediction needs in various scenarios and has better universality.
[0080] In one or more embodiments of the present application, it also includes: using the knowledge base to analyze the event pattern to which the time series data belongs; and correcting the predicted event or abnormal event based on the time series data corresponding to the event pattern.
[0081] As mentioned above, various event patterns and related time series data are pre-stored in the knowledge base. The time series data is analyzed in the manner described above and the target event is determined to be an event that can be predicted. Then, an adapted prediction algorithm is selected to perform the prediction work and predict a certain event pattern. Since in practical applications, some event patterns may be relatively similar, in order to avoid prediction errors or improve prediction accuracy, the prediction results can be further corrected. The knowledge base can be used here for further correction. Specifically, the time series data to be predicted previously obtained can be calculated for similarity with the time series data corresponding to each event pattern in the knowledge base, and then the event pattern with the highest similarity can be used to correct the previously predicted event pattern.
[0082] For ease of understanding, the following is a specific example. For example, suppose the predicted result obtains an event pattern: network resources and storage resources have a significant increase every weekend, while they will drop significantly on Monday. After matching with the time series data of the knowledge base, the most similar event pattern found also has a surge in network resources and storage resources on holidays. Based on this, the predicted event pattern is corrected, and the corrected event pattern is: network resources and storage resources have a significant increase every weekend and holiday, and they will drop significantly on weekdays.
[0083] like Figure 2 A flow chart of a prediction algorithm for determining a prediction algorithm according to an embodiment of the present application is provided. Figure 2 As can be seen in FIG, based on the time series data, determining an adapted prediction algorithm specifically includes the following steps:
[0084] 201: Obtain data features contained in the time series data.
[0085] 202: Determine the feature type of the data feature.
[0086] 203: Determine the time series type of the time series data according to the feature type.
[0087] 204: If the time series type is a single time series type, determine a target single time series prediction algorithm from a candidate algorithm library based on a first data feature included in the single time series type.
[0088] 205: If the time series type is a multi-joint variable type, determine a target multi-joint variable prediction algorithm from the candidate algorithm library based on a second data feature included in the multi-joint variable type.
[0089] It should be noted that the candidate algorithm library stores a variety of prediction algorithms, including statistical prediction algorithms, machine learning prediction algorithms, and deep learning prediction algorithms. The target prediction algorithm can be selected based on the data volume, data relationship, data type, and scenario type of the time series data.
[0090] As mentioned above, the feature types of data features extracted based on time series data can be divided into: single time series features, joint variable features and empirical features. The time series type corresponding to the single time series feature is the single time series type, and the time series type corresponding to the joint variable feature is the multi-joint variable type.
[0091] Among them, single time series features include: statistical features: mean, median, quantile, variance, etc. of time series; distribution features: kurtosis, skewness, etc.; time series features: stationarity, periodicity, etc. of time series; entropy features: first-order sample entropy, box entropy, etc.; other features: zero proportion, missing proportion, etc.
[0092] Multivariate joint features include: spatial correlation features: Pearson correlation, Spearman correlation, etc.; temporal correlation features: Dynamic Time Warping (DTW) correlation, Shaped Based Distance (SBD) correlation, etc.
[0093] Empirical features include: Dynamic features: Features provided a priori based on actual experience change over time. For example, network traffic prediction can include resource usage features (such as the number of CPU cores, etc.) that consume network traffic, and resource usage features are data features. Static features: Features provided a priori based on actual experience do not change over time in the long term. They are generally attribute features, such as the region to which the time series ID is predicted, product attributes, etc.
[0094] If the feature type is determined to be a single time series feature based on the data features, the target prediction algorithm suitable for the single time series type prediction requirement is further compared and selected from the candidate algorithm library. If the feature type is determined to be a joint variable feature based on the data features, the target prediction algorithm suitable for the multi-joint variable type prediction requirement is further compared and selected from the candidate algorithm library. The target prediction algorithm mentioned here can be understood as a matching prediction algorithm determined for the single time series type and the multi-joint variable type, which can obtain the expected prediction results.
[0095] After making a decision, the decision maker generates a target prediction algorithm, and then uses the prediction algorithm to predict the data. If the algorithm is a single time series prediction algorithm, the preprocessed time series is directly input for prediction; if the single time series prediction algorithm is a periodic algorithm, the periodic features can be obtained from the previously extracted data features for auxiliary prediction. If the single time series prediction algorithm is a multi-variable joint prediction, the algorithm will take various features generated by the previous data features for joint prediction.
[0096] The above embodiment illustrates the event prediction process under predictable circumstances. The following will illustrate the prediction, mining and other related technical solutions under the situation that the event is determined to be an unpredictable event through analysis.
[0097] like Figure 3 A flowchart of a method for mining abnormal events provided by an embodiment of the present application. Figure 3 As can be seen in the figure, using the knowledge base to mine abnormal events from time series data includes the following steps:
[0098] 301: Determine the time series anomaly type of the time series data.
[0099] 302: Process the time series data according to the time series anomaly type.
[0100] 303: Using the knowledge base, mining abnormal events from the processed time series data.
[0101] The event patterns stored in the knowledge base can be obtained based on prior experience or algorithm mining. The prior experience here can be the experience obtained through user reports, special scene mode experience during holidays, etc.
[0102] In practical applications, time series data is generally unpredictable because it has no obvious period and is not stable. The lack of period and instability of time series is often caused by sudden time series anomalies. These time series anomaly types can be divided into "fault anomalies", "frequency fluctuation anomalies" and "large burr anomalies", and the corresponding events can be called abnormal events. After determining the type of time series anomaly through mining the above-mentioned anomalies, a white-box explanation for the time series data can be further generated and provided to the demander so that the demander can understand the unpredictability and the reasons for the anomaly. So that the demander can further analyze whether the occurrence of the anomaly is a normal phenomenon in a certain scenario based on the white-box explanation, or whether it needs to be further investigated and resolved.
[0103] like Figure 4This is a schematic diagram of the types of timing anomalies used to illustrate an embodiment of the present application. From left to right, the anomalies are a "fault anomaly" schematic diagram, a "frequency fluctuation anomaly" schematic diagram, and a "large burr anomaly" schematic diagram.
[0104] The mining algorithms used for various types of time series anomalies are as follows:
[0105] Fault anomaly detection algorithm T-test: By sliding the window, the window is divided into two windows {x pre} and {x post}, the statistics of the rising fault anomaly and the falling fault anomaly t are:
[0106]
[0107]
[0108] Where SP is calculated as follows and var is the sample variance:
[0109]
[0110] Frequency fluctuation anomaly algorithm F-test:
[0111] For the statistics of "low-frequency to high-frequency anomaly":
[0112]
[0113] For the statistics of "high frequency to low frequency anomaly":
[0114]
[0115] The large glitch anomaly detection algorithm uses the SS algorithm.
[0116] It should be noted that although there is a preprocessing operation on time series data in the previous description, the preprocessing operation only simply processes the more obvious glitches and missing values, so that it can be clearly distinguished which are predictable time series data and which are unpredictable time series data. The preprocessing work will not have a negative impact on the identification and mining of time series anomaly types.
[0117] like Figure 5 A flowchart of an abnormal event mining method provided in an embodiment of the present application. Figure 5 As can be seen in the figure, the use of the knowledge base to mine abnormal events from the processed time series data specifically includes the following steps:
[0118] 501: Determine the abnormal time corresponding to the processed time series data.
[0119] 502: Taking the time window before the abnormal moment as the target time period.
[0120] 503: Determine the target time series data corresponding to the target time period.
[0121] 504: Utilize the knowledge base to mine abnormal events from the target time series data.
[0122] As mentioned above, some time series data cannot be predicted because of some time series anomalies. Therefore, in order to eliminate the impact of the time series anomaly on the prediction work, a comprehensive prediction can be made by combining the time when the anomaly occurred and the previous historical time series. Specifically,
[0123] After the anomaly is found, the time when the anomaly occurred, that is, the time series data of the abnormal moment t and the previous time window T is extracted. Then the similarity analysis of the time series data is performed one by one with the event patterns stored in the knowledge base. The similarity algorithm is based on the classic time series DTW algorithm (it can also be the SBD algorithm). If an event pattern whose similarity meets the threshold is found, the event pattern is used as the prediction result obtained by mining the abnormal event. It should be noted that when mining abnormal events using the method of this embodiment, if the target time series data also has the same abnormal moment, then the similarity analysis can be performed directly without processing the time series data corresponding to the abnormal moment.
[0124] For example, suppose the time when the anomaly occurs is t, and the corresponding forward time window is T. Take time window T as the target period. The time series data corresponding to the target period is the target time series data. Then, the abnormal events are mined based on the target time series data and the knowledge base. Since there are abnormal events that affect the analysis in the time series data, the event pattern can be mined through the time series data corresponding to the time window T in the historical records. It should be noted that the time window T mentioned here can be a longer period of time, so that the rules or cycles of the time series data can be better mined.
[0125] If you want to obtain the desired mining results based on the knowledge base, you can also use other methods to mine abnormal events, as follows:
[0126] If the target time series data is used and no corresponding event pattern is adapted from the knowledge base, then the historical time series data corresponding to the abnormal moment is determined from the historical data;
[0127] Determining the similarity between the target time series data and the historical time series data;
[0128] If the similarity satisfies a similarity threshold, the event pattern corresponding to the target time series data is added to the knowledge base as a new event pattern.
[0129] In actual applications, if no similar event pattern is found in the knowledge base, the time series data of the same period and time period in history will be taken out for similarity analysis. If similar, it will be determined to be a hidden event pattern. Feedback will be given to the demander for confirmation. After confirming that it is a newly discovered hidden event pattern, the event pattern will be added to the knowledge base to correct the subsequent prediction results or provide a reference for unpredictable event mining. The details are as follows:
[0130] Since the target time series data is a randomly selected piece of data based on the time window, it may be impossible to match the appropriate event pattern from the knowledge base using the target time series data due to reasons such as too much time series data corresponding to the T time window. Therefore, the historical time series data of the corresponding moment is found from the historical data according to the abnormal moment t. Then, the similarity between the target time series data and the historical time series data is analyzed. In addition, the time series data obtained previously and the historical time series data corresponding to the abnormal moment t can also be analyzed for similarity. When the analysis result is that the similarity meets the similarity threshold, the analysis result and the target time series data are sent to the demander for confirmation. The demander determines whether the target time series data represents a new event pattern. If so, the target time series data and / or the corresponding event pattern are added to the knowledge base to enrich the content of the knowledge base so that a prediction basis can be provided when subsequent event prediction processing is performed.
[0131] like Figure 6 A schematic diagram of a hierarchical prediction method provided in an embodiment of the present application. Figure 6 As you can see, it includes the following steps:
[0132] 601: In response to a hierarchical prediction request from a user, determine whether the time series data contains time series hierarchical information.
[0133] 602: If the time series level information is included, perform level prediction correction on the predicted event and abnormal event.
[0134] It should be noted that the hierarchical relationship mentioned here can be various attribute information corresponding to cloud resources, and these attribute information have hierarchical relationships. Time series data is obtained by combining various attribute information in the time dimension. For example, the hierarchical relationship of regions corresponding to regional attributes, the hierarchical relationship of provinces, cities and counties; the hierarchical relationship of commodities corresponding to commodity attributes, and so on. As events are executed, the hierarchical relationship may change over time, and time series data composed of various attribute information in the time dimension is obtained.
[0135] In practical applications, there are two ways to make hierarchical prediction corrections: one is to make hierarchical predictions based on the parent-child hierarchical relationship, and the other is to make hierarchical predictions based on the event patterns of other sub-levels in the same level.
[0136] The following will give specific examples to illustrate this.
[0137] like Figure 7 A flowchart of a hierarchical prediction method based on a parent-child hierarchical relationship provided in an embodiment of the present application. Figure 7 It can be seen that if the time series level information is included, the level prediction is performed based on the time series data, specifically including the following steps:
[0138] 6021a: Determine the level corresponding to the time series data, and the parent-child level relationship.
[0139] 6021b: Determine the event pattern corresponding to the parent level based on the parent-child hierarchical relationship.
[0140] 6021c: Perform hierarchical prediction correction on the abnormal event according to the time series data corresponding to the event pattern.
[0141] Refer to the event patterns of other sibling levels under the same parent level: once other time series data belonging to the same parent level have the same event pattern (for example, the same or similar periodicity, etc.), the time series data also has the event pattern to a large extent.
[0142] Because low-level data features (such as periodic features) can often be more obvious at high levels. This is because events will jump between sub-levels under the same parent level. For example, in a network traffic prediction scenario, the traffic between two regions may change over time and take different paths under the two regions. In this way, the lower levels of different paths under the high-level region have the characteristics of "event pattern jumping".
[0143] like Figure 8 A schematic diagram of a process for predicting a sub-level relationship according to an embodiment of the present application. Figure 8It can be seen that if the time series level information is included, the level prediction is performed based on the time series data, including:
[0144] 6022a: Determine the level corresponding to the time series data, and the parent-child level relationship.
[0145] 6022b: Determine event patterns corresponding to other sub-levels in the same sub-level based on the parent-child hierarchy relationship.
[0146] 6022c: Perform hierarchical prediction correction on the abnormal event according to the time series data corresponding to the event pattern.
[0147] The time series patterns of each sub-level under the same parent level can also refer to each other, because each sub-level belonging to the same parent level belongs to similar time series data, so they also have similar event patterns. If there are multiple sub-levels with a period of T, then the period of this sub-level is most likely to be T. Based on this method of using horizontal reference in the same sub-level, hierarchical prediction and correction are performed.
[0148] The following is an example of a prediction algorithm for performing hierarchical prediction.
[0149] The hierarchical forecasting algorithm can be "Hierarchical Forecasting", which takes into account the relationship between each level and makes a globally optimized joint forecast. Fig. 9 A three-layer hierarchical relationship diagram provided for an embodiment of the present application.
[0150] Generally, the upper layer prediction time series is a simple sum of the lower layer time series:
[0151] y a =y aa +y ab +y aaa +y aab +y aac +y aba +y abb + yabc (1)
[0152] have:
[0153] y b ={y aaa ,y aab ,y aac ,y aba ,y abb , yabc}′
[0154] and
[0155] y={y a ,yaa ,y ab ,y aaa ,y aab ,y aac ,y aba ,y abb ,y abc}′
[0156] So equation (1) can be written as:
[0157] y=Sy b
[0158] S is:
[0159]
[0160] Assume that after level correction, we can rewrite equation (2) as:
[0161]
[0162] G is the optimized mapping linear relationship matrix of the original prediction result after correction, the target result:
[0163]
[0164] And Wh is:
[0165]
[0166] e is the prediction residual:
[0167]
[0168] In addition to the "Hierarchical Forecasting" mentioned above, the forecasting algorithms for hierarchical forecasting can also include "Top-down" (only predict the highest level, and then split it down layer by layer according to the proportion of the historical lower level in the higher level), "Bottom-up" (only predict the lower level, and then aggregate it up layer by layer according to the aggregation relationship), etc.
[0169] Based on the same idea, the present application embodiment also proposes a data prediction method. Fig.10 A flow chart of another data prediction method provided in an embodiment of the present application. Fig.10 As can be seen in , the method includes:
[0170] 1001: Get the time series data of the target event.
[0171] 1002: Analyze the time series data to determine whether event prediction can be performed based on the time series data.
[0172] 1003: If event prediction can be performed, the time series data is processed using a prediction algorithm to obtain a predicted event.
[0173] 1004: In response to a hierarchical prediction request from a user, determine whether the time series data contains time series hierarchical information.
[0174] 1005: If the time series level information is included, perform level prediction correction on the predicted event and the abnormal event.
[0175] In practical applications, after using time series data to complete the predictability judgment of an event, the event prediction results can be further corrected by hierarchical prediction. It should be noted that the premise of hierarchical prediction is that the time series data has temporal hierarchical information and the demand side (user) has put forward the demand for hierarchical prediction.
[0176] For example, the acquired time series data includes: the demand for storage resources of the North China Central Station increases significantly on weekends, and the demand for storage resources of the North China Central Substation 1 increases significantly on holidays. It can be seen that there is time series hierarchical information in the time series data. After receiving the hierarchical forecast demand of the predicted event from the demand side, the event pattern is further predicted and corrected based on the time series data. For example, the correction result of the substation is: the demand for storage resources of the North China Central Substation 1 increases significantly on weekends and holidays.
[0177] It should be noted that the prediction of events based on time series data, the selection of adaptive prediction algorithms for predictable events, the selection of hierarchical prediction algorithms, and the calculation process mentioned here can be referred to Figures 1 to 9 The corresponding embodiments will not be repeated here.
[0178] Based on the same idea, the present application embodiment also provides a data prediction method. Fig.11 A flowchart of another data prediction method provided in an embodiment of the present application is shown below. Fig.11 As can be seen in , the method specifically includes the following steps:
[0179] 1101: Obtain time series data of the target event.
[0180] 1102: In response to a hierarchical prediction request from a user, determine whether the time series data contains time series hierarchical information.
[0181] 1103: If the temporal hierarchical information is included, a hierarchical prediction is performed on the target event.
[0182] After obtaining the scene-related time series data, further event prediction can be performed based on the time series data.
[0183] In practical applications, it is inevitable that time series data is unpredictable due to certain interference factors. Therefore, before performing hierarchical forecasting, we can first analyze the time series data.
[0184] The details are as follows:
[0185] After acquiring the time series data of the target event, the method further includes: analyzing the time series data to determine whether event prediction can be performed based on the time series data. If event prediction can be performed, an adapted prediction algorithm is determined based on the time series data, so as to process the time series data using the prediction algorithm to obtain a predicted event. If event prediction cannot be performed, a knowledge base is used to mine abnormal events from the time series data.
[0186] It should be noted that the prediction of events based on time series data, the selection of adaptive prediction algorithms for predictable events, the selection of hierarchical prediction algorithms, and the calculation process mentioned here can be referred to Figures 1 to 9 The corresponding embodiments will not be repeated here.
[0187] Based on the same idea, the present application also proposes a data prediction system. Fig.12 A schematic diagram of the structure of a data prediction system provided in an embodiment of the present application. Fig.12 As can be seen in FIG. 1 , the system comprises:
[0188] The algorithm selector 121 is used to obtain time series data of the target event; analyze the time series data to determine whether event prediction can be performed based on the time series data; if event prediction can be performed, use the prediction algorithm to process the time series data to obtain a predicted event;
[0189] The knowledge base module 122 is used to mine abnormal events from time series data using the knowledge base if event prediction is not possible.
[0190] In addition, it also includes an input data format conversion module 123, a preprocessing module 124, a level prediction module 125, an output result format conversion module 126, and a configuration module 127. Each module will be described in detail below.
[0191] Since the data formats of the demanders are diverse, in order to facilitate the demanders' quick access, the staff does not need to provide the specified format data separately. Instead, as long as the user configures the corresponding data format information, the input data format conversion module 123 and the output result format conversion module 126 in this system can automatically perform the format conversion.
[0192] In order to enhance the scalability of the system, it can easily and quickly access various demand scenarios, and allow different demand scenarios to maintain personalized services. The system can use the configuration module 127 to separately configure personalized algorithm service information for each demand scenario in the form of a json configuration file.
[0193] like Fig.13 A schematic diagram of the structure of the algorithm selector provided in the embodiment of the present application. Fig.13 As can be seen in the figure, the algorithm selector includes a feature module, an algorithm decider, and a candidate algorithm library. Among them, the feature module is used to extract data features and determine the corresponding feature type and time series type. After feature extraction and analysis, it can be divided into predictable events and unpredictable events. Among them, predictable events can be divided into single time series type and multi-joint variable type according to the time series type. The algorithm decider is used to adapt the target algorithm from the candidate algorithm library according to the time series type.
[0194] like Fig.14 A schematic diagram of the structure of the knowledge base module provided in the embodiment of the present application. Fig.14 As can be seen in the figure, it includes: Bad Case Analyzer (BCA) module, identification and correction module, knowledge base, and mining module.
[0195] The identification and correction module is used to analyze the event pattern to which the time series data belongs by using the knowledge base, and to correct the predicted event or abnormal event based on the time series data corresponding to the event pattern.
[0196] The anomaly analysis module is used to determine the time series anomaly type of the time series data.
[0197] The mining module is used to process the time series data according to the time series anomaly type; and utilize the knowledge base to mine abnormal events from the processed time series data.
[0198] The specific mining method includes: determining the abnormal moment corresponding to the processed time series data; taking the time window before the abnormal moment as the target period; determining the target time series data corresponding to the target period; and mining abnormal events from the target time series data using the knowledge base. If the corresponding event pattern is not adapted from the knowledge base using the target time series data, then determining the historical time series data corresponding to the abnormal moment from the historical data; determining the similarity between the target time series data and the historical time series data; and if the similarity meets the similarity threshold, then adding the event pattern corresponding to the target time series data as a new event pattern to the knowledge base.
[0199] like Fig.15A schematic diagram of a hierarchical prediction structure provided in an embodiment of the present application. Fig.15 As can be seen in the figure, it includes: utilizing the hierarchical relationship correction module and the prediction algorithm module.
[0200] There are two ways to use hierarchical relationship correction, which are: responding to the hierarchical prediction request raised by the user, determining whether the time series data contains time series hierarchical information; if the time series hierarchical information is contained, performing hierarchical prediction correction on the predicted event and abnormal event. One hierarchical relationship correction method is: determining the hierarchy corresponding to the time series data and the parent-child hierarchy relationship; determining the event pattern corresponding to the parent hierarchy based on the parent-child hierarchy relationship; and performing hierarchical prediction correction on the abnormal event according to the time series data corresponding to the event pattern.
[0201] Another method of using hierarchical relationship correction is: determining the hierarchy corresponding to the time series data, and the parent-child hierarchy relationship; determining the event patterns corresponding to other sub-levels in the same sub-level based on the parent-child hierarchy relationship; and performing hierarchical prediction correction on the abnormal event according to the time series data corresponding to the event pattern.
[0202] Based on the same idea, the embodiment of the present application also provides a data prediction device. Fig.16 A schematic diagram of the structure of a data prediction device provided in an embodiment of the present application. The data prediction device includes:
[0203] The acquisition module 161 is used to acquire time series data of the target event.
[0204] The analysis module 162 is used to analyze the time series data to determine whether event prediction can be performed based on the time series data.
[0205] The algorithm determination module 163 is used to process the time series data using a prediction algorithm to obtain a predicted event if event prediction can be performed.
[0206] Optionally, it also includes: a mining module 164, which is used to use the knowledge base to mine abnormal events from time series data if event prediction cannot be performed.
[0207] Optionally, a correction module 165 is further included, which is used to use the knowledge base to analyze the event pattern to which the time series data belongs; and to correct the predicted event or abnormal event based on the time series data corresponding to the event pattern.
[0208] Optionally, the algorithm determination module 163 is also used to obtain data features contained in the time series data; determine the feature type of the data features; determine the time series type of the time series data based on the feature type; if the time series type is a single time series type, then based on the first data feature contained in the single time series type, determine the target single time series prediction algorithm from the candidate algorithm library; if the time series type is a multiple joint variable type, then based on the second data feature contained in the multiple joint variable type, determine the target multiple joint variable prediction algorithm from the candidate algorithm library.
[0209] Optionally, the mining module 164 is further used to determine the time series anomaly type of the time series data;
[0210] Processing the time series data according to the time series anomaly type;
[0211] The knowledge base is used to mine abnormal events from the processed time series data.
[0212] Optionally, the mining module 164 is further used to determine the abnormal moment corresponding to the processed time series data;
[0213] Taking the time window before the abnormal moment as the target period;
[0214] Determine the target time series data corresponding to the target period;
[0215] The knowledge base is used to mine abnormal events from the target time series data.
[0216] Optionally, the mining module 164 is further configured to determine the historical time series data corresponding to the abnormal moment from the historical data if no corresponding event pattern is adapted from the knowledge base using the target time series data;
[0217] Determining the similarity between the target time series data and the historical time series data;
[0218] If the similarity satisfies a similarity threshold, the event pattern corresponding to the target time series data is added to the knowledge base as a new event pattern.
[0219] Optionally, it further includes a level prediction module 166, which is used to respond to a level prediction request from a user and determine whether the time series data contains time series level information;
[0220] If the time series level information is included, the predicted events and abnormal events are corrected in level prediction.
[0221] Optionally, the hierarchical prediction module 166 is also used to determine the hierarchy corresponding to the time series data, and the parent-child hierarchy relationship; determine the event pattern corresponding to the parent hierarchy based on the parent-child hierarchy relationship; and perform hierarchical prediction correction on the abnormal event according to the time series data corresponding to the event pattern.
[0222] Optionally, the hierarchical prediction module 166 is also used to determine the hierarchy corresponding to the time series data, and the parent-child hierarchy relationship; determine the event patterns corresponding to other sub-levels in the same sub-level based on the parent-child hierarchy relationship; and perform hierarchical prediction correction on the abnormal event according to the time series data corresponding to the event pattern.
[0223] An embodiment of the present application also provides an electronic device. Fig.17 The electronic device includes a memory 1701, a processor 1702 and a communication component 1703;
[0224] The memory 1701 is used to store programs;
[0225] The processor 1702 is coupled to the memory and is configured to execute the program stored in the memory to:
[0226] Get the time series data of the target event;
[0227] Analyzing the time series data to determine whether an event prediction can be performed based on the time series data;
[0228] If event prediction is possible, the time series data is processed using a prediction algorithm to obtain a predicted event.
[0229] The memory 1701 can be configured to store various other data to support operations on the electronic device. Examples of these data include instructions for any application or method for operating on the electronic device. The memory 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 memory, flash memory, magnetic disk or optical disk.
[0230] Furthermore, the processor 1702 in this embodiment may specifically be: a programmable switching processing chip, in which a data replication engine is configured to replicate received data.
[0231] When the processor 1702 executes the program in the memory, in addition to the above functions, it can also realize other functions, which can be specifically referred to the description of the above embodiments. Fig.17 As shown, the electronic device also includes: a power supply component 1704 and other components.
[0232] The present application also provides a non-transitory machine-readable storage medium, wherein the non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor executes Figure 1 The method described in the corresponding embodiment.
[0233] The present application also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the processor is enabled to implement Figure 1 The method described in the corresponding embodiment.
[0234] Based on the same idea, the embodiment of the present application also provides another data prediction device. Fig.18 A schematic diagram of the structure of another data prediction device provided in an embodiment of the present application. The data prediction device includes:
[0235] The acquisition module 181 is used to acquire the time series data of the target event.
[0236] The analysis module 182 is used to analyze the time series data to determine whether event prediction can be performed based on the time series data.
[0237] The algorithm determination module 183 is used to process the time series data using a prediction algorithm to obtain a predicted event if event prediction can be performed.
[0238] The judgment module 184 is used to respond to the level prediction request put forward by the user and judge whether the time series data contains time series level information.
[0239] The correction module 185 is used to perform hierarchical prediction correction on the predicted event and the abnormal event if the temporal hierarchical information is included.
[0240] The present application also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the processor is enabled to implement Fig.10 The method described in the corresponding embodiment.
[0241] An embodiment of the present application also provides an electronic device. The electronic device is a standby node electronic device in a computing unit. Fig.19This is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. The electronic device includes a memory 1901, a processor 1902 and a communication component 1903; wherein:
[0242] The memory 1901 is used to store programs;
[0243] The processor 1902 is coupled to the memory and is configured to execute the program stored in the memory to:
[0244] Get the time series data of the target event;
[0245] Analyzing the time series data to determine whether event prediction can be performed based on the time series data;
[0246] If event prediction can be performed, the time series data is processed using a prediction algorithm to obtain a predicted event;
[0247] In response to a hierarchical prediction request from a user, determining whether the time series data contains time series hierarchical information;
[0248] If the temporal level information is included, the level prediction correction is performed on the predicted event.
[0249] The memory 1901 can be configured to store various other data to support operations on the electronic device. Examples of these data include instructions for any application or method for operating on the electronic device. The memory 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 memory, flash memory, magnetic disk or optical disk.
[0250] Furthermore, the processor 1902 in this embodiment may specifically be: a programmable switching processing chip, in which a data replication engine is configured to replicate received data.
[0251] When the processor 1902 executes the program in the memory, in addition to the above functions, it can also realize other functions, which can be specifically referred to the description of the above embodiments. Fig.19 As shown, the electronic device also includes: a power supply component 1904 and other components.
[0252] The present application also provides a non-transitory machine-readable storage medium, wherein the non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor executes Fig.10 The method described in the corresponding embodiment.
[0253] The present application also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the processor is enabled to implement Fig.10 The method described in the corresponding embodiment.
[0254] Based on the same idea, the present application embodiment also provides another data prediction device. Fig. 20 A schematic diagram of the structure of another data prediction device provided in an embodiment of the present application. The data prediction device includes:
[0255] The acquisition module 2001 is used to acquire the time series data of the target event.
[0256] The judgment module 2002 is used to respond to the level prediction request put forward by the user and judge whether the time series data contains time series level information.
[0257] The correction module 2003 is used to perform hierarchical prediction on the target event if the temporal hierarchical information is included.
[0258] The present application also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the processor is enabled to implement Fig.11 The method described in the corresponding embodiment.
[0259] An embodiment of the present application also provides an electronic device. The electronic device is a standby node electronic device in a computing unit. Fig.21 The structure diagram of another electronic device provided in the embodiment of the present application. The electronic device includes a memory 2101, a processor 2102 and a communication component 2103; wherein:
[0260] The memory 2101 is used to store programs;
[0261] The processor 2102 is coupled to the memory and is configured to execute the program stored in the memory to:
[0262] Get the time series data of the target event;
[0263] In response to a hierarchical prediction request from a user, determining whether the time series data contains time series hierarchical information;
[0264] If the temporal hierarchical information is included, a hierarchical prediction is performed on the target event.
[0265] The memory 2101 can be configured to store various other data to support operations on the electronic device. Examples of these data include instructions for any application or method for operating on the electronic device. The memory 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 memory, flash memory, magnetic disk or optical disk.
[0266] Furthermore, the processor 2102 in this embodiment may specifically be: a programmable switching processing chip, in which a data replication engine is configured to replicate received data.
[0267] When the processor 2102 executes the program in the memory, in addition to the above functions, it can also realize other functions, which can be specifically referred to the description of the above embodiments. Fig.21 As shown, the electronic device also includes: a power supply component 2104 and other components.
[0268] The present application also provides a non-transitory machine-readable storage medium, wherein the non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor executes Fig.11 The method described in the corresponding embodiment.
[0269] The present application also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the processor is enabled to implement Fig.11 The method described in the corresponding embodiment.
[0270] Based on the above embodiments, in the cloud resource scheduling scenario, cloud resources are dynamically changing, and events related to the cloud resource scheduling scenario can be obtained. These events have obvious dynamic timing characteristics. Therefore, in order to facilitate the prediction of related events, the time series data of the related events can be obtained. By analyzing the time series data, it is determined whether the time series data is a predictable event. If it is predictable, it is necessary to determine a suitable prediction algorithm for it, and use the prediction algorithm to predict the time series data to obtain the predicted event, so as to better guide the subsequent work. This solution predicts and processes events based on time series data, and is not restricted by event type factors, scenario types, etc., so that this solution can be more widely used.
[0271] In addition, if the time series data is determined to be unpredictable after analysis, the pre-established knowledge base can be used to mine abnormal events in the time series data. Based on the above scheme, the time series data presented by various predictable and unpredictable events can be analyzed and processed, and the corresponding event patterns can be determined or mined, which has a better general effect.
[0272] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0273] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0274] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data prediction method, characterized in that: The method comprises: Obtain time series data of target events related to cloud resource scheduling; Analyzing the time series data to determine whether event prediction can be performed based on the time series data; If event prediction can be performed, the time series data is processed using a prediction algorithm to obtain a predicted event; If event prediction is not possible, then using the knowledge base to mine abnormal events from the time series data; Among them, using the knowledge base to mine abnormal events from the time series data includes: determining the time series anomaly type of the time series data; processing the time series data according to the time series anomaly type; determining the abnormal moment corresponding to the processed time series data; taking the time window before the abnormal moment as the target time period; determining the target time series data corresponding to the target time period; if the corresponding event pattern is not adapted from the knowledge base using the target time series data, determining the historical time series data corresponding to the abnormal moment from the historical data; determining the similarity between the target time series data and the historical time series data; if the similarity meets the similarity threshold, adding the event pattern corresponding to the target time series data as a new event pattern to the knowledge base, and the knowledge base stores various event patterns and related time series data.
2. The method according to claim 1, characterized in that The method further comprises: Utilizing the knowledge base, analyzing the event pattern to which the time series data of the predicted event belongs; The similarity between the time series data corresponding to the event pattern of the predicted event and the time series data corresponding to each event pattern in the knowledge base is calculated, and the predicted event is corrected using the event pattern with the highest similarity in the knowledge base.
3. The method according to claim 1, characterized in that Before using the prediction algorithm to process the time series data to obtain the predicted event, it also includes: Obtaining data features contained in the time series data; Determining a feature type of the data feature; Determining the time series type of the time series data according to the feature type; If the time series type is a single time series type, determining a target single time series prediction algorithm from a candidate algorithm library based on a first data feature included in the single time series type; If the time series type is a multi-joint variable type, determining a target multi-joint variable prediction algorithm from the candidate algorithm library based on a second data feature included in the multi-joint variable type; Among them, the time series type corresponding to the single time series feature is the single time series type, and the time series type corresponding to the joint variable feature is the multiple joint variable type; the single time series feature includes one or more of the following: statistical features, distribution features, time series features, entropy features; the joint variable features include one or more of the following: spatial correlation features, time correlation features.
4. The method according to claim 1, characterized in that Also includes: In response to a hierarchical prediction request from a user, determining whether the time series data contains time series hierarchical information; If the time series level information is included, determine the level corresponding to the time series data, and the parent-child level relationship; Determine the event pattern corresponding to the parent level based on the parent-child hierarchical relationship; perform hierarchical prediction correction on the abnormal event according to the time series data corresponding to the event pattern; or, Determine event patterns corresponding to other sub-levels in the same sub-level based on the parent-child hierarchical relationship; The abnormal event is subjected to hierarchical prediction correction according to the time series data corresponding to the event pattern.
5. A data prediction method, characterized in that: The method comprises: Obtain time series data of target events related to cloud resource scheduling; Analyzing the time series data to determine whether event prediction can be performed based on the time series data; If the event prediction can be performed, the time series data is processed using a prediction algorithm to obtain a predicted event; if the event prediction cannot be performed, the knowledge base is used to mine abnormal events from the time series data; In response to a hierarchical prediction request from a user, determining whether the time series data contains time series hierarchical information; If the time series hierarchical information is included, the hierarchical level corresponding to the time series data and the parent-child hierarchical relationship are determined; based on the parent-child hierarchical relationship, the event pattern corresponding to the parent hierarchical level is determined; and hierarchical prediction and correction are performed on the abnormal event according to the time series data corresponding to the event pattern; or, based on the parent-child hierarchical relationship, the event patterns corresponding to other sub-levels in the same sub-level are determined; and hierarchical prediction and correction are performed on the abnormal event according to the time series data corresponding to the event pattern; Among them, using the knowledge base to mine abnormal events from the time series data includes: determining the time series anomaly type of the time series data; processing the time series data according to the time series anomaly type; determining the abnormal moment corresponding to the processed time series data; taking the time window before the abnormal moment as the target time period; determining the target time series data corresponding to the target time period; if the corresponding event pattern is not adapted from the knowledge base using the target time series data, determining the historical time series data corresponding to the abnormal moment from the historical data; determining the similarity between the target time series data and the historical time series data; if the similarity meets the similarity threshold, adding the event pattern corresponding to the target time series data as a new event pattern to the knowledge base, and the knowledge base stores various event patterns and related time series data.
6. A data prediction system, characterized in that: The system comprises: An algorithm selector, used to obtain time series data of target events related to cloud resource scheduling; analyze the time series data to determine whether event prediction can be performed based on the time series data; if event prediction can be performed, use a prediction algorithm to process the time series data to obtain a predicted event; The knowledge base module is used to mine abnormal events from time series data using the knowledge base if event prediction is not possible; Among them, using the knowledge base to mine abnormal events from the time series data includes: determining the time series anomaly type of the time series data; processing the time series data according to the time series anomaly type; determining the abnormal moment corresponding to the processed time series data; taking the time window before the abnormal moment as the target time period; determining the target time series data corresponding to the target time period; if the corresponding event pattern is not adapted from the knowledge base using the target time series data, determining the historical time series data corresponding to the abnormal moment from the historical data; determining the similarity between the target time series data and the historical time series data; if the similarity meets the similarity threshold, adding the event pattern corresponding to the target time series data as a new event pattern to the knowledge base, and the knowledge base stores various event patterns and related time series data.
7. An electronic device comprising a memory and a processor; wherein: The memory is used to store programs; The processor is coupled to the memory, and is configured to execute the program stored in the memory, so as to implement the method according to any one of claims 1 to 5.
8. A non-transitory machine-readable storage medium having executable code stored thereon, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Method for improving the robustness of sales forecasts
CN109034905A