Data prediction method

CN122887577APending Publication Date: 2026-10-09WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610963056.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-30
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0005]本申请实施例提供一种数据预测方法、装置、计算机设备、计算机可读存储介质、计算机程序产品,以解决或缓解上面提出的一项或更多项技术问题

Benefits of technology

[0021]本申请中的一些实施例所提供的技术方案中,获取基线模型输出的目标业务在目标清算场次内各个时间点的预测值(预测时序数据),获取目标清算场次内各个已发生时间点的观测值(观测时序数据)。在最新的已发生时间点的观测值与预测值之间的差异大于第一误差阈值的情况下,召回与观测时序数据相似度最高的一组历史时序数据作为目标历史时序数据,基于目标历史时序数据对目标清算场次内未发生时间点的预测值进行校准,以提升预测值的准确度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122887577A_ABST
    Figure CN122887577A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computers and provides a data prediction method, which comprises the following steps: acquiring prediction time series data output by a baseline model for a target business, wherein the prediction time series data comprises predicted values of the target business at each time point within a target clearing session; acquiring observation time series data, wherein the observation time series data comprises observation values of time points that have occurred within the target clearing session; in the case where the difference between the observation value and the predicted value at a target time point is greater than a first error threshold, acquiring target historical time series data from a plurality of sets of historical time series data, wherein the target historical time series data is a set of historical time series data with the highest similarity to the observation time series data, and the target time point is the latest time point that has occurred; and calibrating the predicted values of time points that have not occurred within the target clearing session based on the target historical time series data. The technical scheme of the embodiment of the application can correct the predicted values in a timely manner and improve the accuracy of liquidity prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data prediction method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] A bank's cash management system needs to continuously predict the liquidity of each business channel in each clearing session. Accurate liquidity prediction can help banks make reasonable arrangements for the use of funds, which is of great significance for ensuring the safety of funds and improving the efficiency of fund use.

[0003] However, current liquidity forecasting methods mainly adopt an offline training and online forecasting model, which has a long model parameter update cycle and lacks online learning and adaptive correction capabilities, resulting in predicted values ​​deviating significantly from actual values.

[0004] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application. Summary of the Invention

[0005] This application provides a data prediction method, apparatus, computer device, computer-readable storage medium, and computer program product to solve or alleviate one or more of the technical problems mentioned above.

[0006] One aspect of this application provides a data prediction method, the method comprising:

[0007] Obtain the predicted time series data output by the baseline model for the target business, wherein the predicted time series data includes the predicted values ​​of the target business at each time point within the target clearing session; Acquire observation time-series data, which includes observation values ​​at time points that have occurred within the target liquidation session; If the difference between the observed value and the predicted value at the target time point is greater than the first error threshold, target historical time series data is obtained from multiple sets of historical time series data. The target historical time series data is the set of historical time series data with the highest similarity to the observed time series data. The target time point is the latest time point that has occurred. Based on the target's historical time series data, the predicted values ​​for time points that did not occur within the target liquidation session are calibrated.

[0008] In some embodiments, based on the target historical time-series data, the predicted values ​​for time points that did not occur within the target liquidation session are calibrated, including: Based on the target historical time series data, update the predicted values ​​of time points that did not occur within the target liquidation session; Obtain the observed values ​​and updated predicted values ​​at each time point within a preset time window after the target time point; Based on the difference between the observed values ​​and the updated predicted values ​​at each time point within the preset time window, the predicted values ​​after the preset time window when no updates have occurred are calibrated.

[0009] In some embodiments, updating the predicted values ​​of time points that did not occur within the target liquidation session based on the target historical time-series data includes: Based on the number of time points that have occurred, the target historical time series data is divided into first time series data and second time series data. The minimum time point in the second time series data is greater than the maximum time point in the first time series data, and the number of time points in the first time series data is the same as the number of time points that have occurred. Based on the values ​​of each time point in the second time series data, the predicted values ​​of each of the non-occurring time points within the target liquidation session are updated sequentially.

[0010] In some embodiments, based on the difference between the observed values ​​and the updated predicted values ​​at each time point within the preset time window, the predicted values ​​after which no updates have occurred at time points following the preset time window are calibrated, including: Based on the preset decay factor, the exponential decay weight corresponding to each time point within the preset time window is determined, wherein the exponential decay weight corresponding to the earlier time point within the preset time window is less than the exponential decay weight corresponding to the later time point. The weighted average error is calculated based on the difference between the observed values ​​and the updated predicted values ​​at each time point within the preset time window and the corresponding exponential decay weights. Based on the weighted average error, the predicted value after the preset time window when no time point update occurs is calibrated.

[0011] In some embodiments, obtaining target historical time series data from multiple sets of historical time series data includes: Obtain the dynamic time warping distance between each set of historical time series data and the observed time series data, and obtain candidate historical time series data from the multiple sets of historical time series data based on the dynamic time warping distance; Obtain the time features corresponding to each group of candidate historical time series data and the time features corresponding to the observed time series data, and determine the time feature similarity between each group of candidate historical time series data and the observed time series data; Obtain the liquidation session corresponding to each group of candidate historical time series data, and determine the liquidation session similarity between each group of candidate historical time series data and the observed time series data based on the target liquidation session; Based on the dynamic time warping distance, the time feature similarity, and the liquidation session similarity, the similarity between each group of candidate historical time series data and the observed time series data is determined; The candidate historical time series data with the highest similarity to the observed time series data among the multiple candidate historical time series data is determined as the target historical time series data.

[0012] In some embodiments, obtaining the time features corresponding to each group of candidate historical time series data and the time features corresponding to the observed time series data, and determining the time feature similarity between each group of candidate historical time series data and the observed time series data, includes: For each group of candidate historical time series data, determine the historical holiday identifier, historical weekday day sequence, historical monthday day sequence, and historical yearday day sequence; Based on the observed time series data, determine the current holiday identifier, the current week's day sequence, the current month's day sequence, and the current year's day sequence; Based on the differences between the historical holiday identifiers and the current holiday identifiers, the differences between the historical weekday sequence and the current weekday sequence, the differences between the historical monthday sequence and the current monthday sequence, and the differences between the historical yearday sequence and the current yearday sequence, the temporal feature similarity between each group of candidate historical time series data and the observed time series data is determined.

[0013] In some embodiments, the data prediction method further includes: Receive event description text for the abnormal event of the target service and determine the abnormal time point, wherein the abnormal time point is the time point that occurred closest to the time of the abnormal event; The event description text is input into a pre-trained large language model to determine the target time decay model from multiple time decay models. If the predicted value at the abnormal time point is the predicted value output by the baseline model, the predicted values ​​at time points that do not occur after the abnormal time point are calibrated based on the target time decay model. If the predicted value at the abnormal time point is the predicted value obtained by calibrating the predicted value output by the baseline model based on the target historical time series data, then the predicted value at the time point that did not occur after the abnormal time point is calibrated a second time based on the target time decay model and the abnormal time point.

[0014] In some embodiments, based on the target time decay model and the anomalous time point, a secondary calibration is performed on the predicted values ​​of time points that did not occur after the anomalous time point, including: Using the abnormal time point as the first reference time point, obtain each time point backward as a reference time point until a preset number of reference time points are obtained; Obtain the observed and predicted values ​​at the preset number of reference time points; The mean absolute error is calculated based on the difference between the observed and predicted values ​​at each of the aforementioned reference time points; If the mean absolute error exceeds the second error threshold, the calibration factor for each non-occurring time point after the abnormal time point is calculated based on the target time decay model; and the predicted value for each non-occurring time point after the abnormal time point is calibrated based on the observed value of the abnormal time point and the calibration factor for each non-occurring time point after the abnormal time point. If the mean absolute error does not exceed the second error threshold, the predicted values ​​of time points that do not occur after the abnormal time point are calibrated based on the target time decay model.

[0015] In some embodiments, based on the target time decay model, the predicted values ​​of time points that did not occur after the anomalous time point are calibrated, including: Based on the target time decay model, the calibration factor for each time point after the abnormal time point that did not occur is calculated; Based on the predicted values ​​of each time point after the abnormal time point and the corresponding calibration factor, the predicted values ​​of each time point after the abnormal time point are calibrated.

[0016] In some embodiments, determining a target time decay model from the plurality of time decay models includes: Based on the event description text, determine the event type and confidence level; If the confidence level exceeds a preset confidence threshold, a target historical event set is obtained from the historical event dataset based on the event type. The target historical event set includes multiple target historical events, and each target historical event is associated with historical impact intensity and historical duration. The target time decay model is determined from the plurality of time decay models based on the event type, the intensity of the historical impact, and the duration of the historical impact.

[0017] Another aspect of this application provides a data prediction apparatus, the apparatus comprising: The first acquisition module is used to acquire the predicted time series data output by the baseline model for the target business, wherein the predicted time series data includes the predicted values ​​of the target business at each time point within the target clearing session; The second acquisition module is used to acquire observation time series data, which includes the observation values ​​of the time points that have occurred within the target liquidation session. The third acquisition module is used to acquire target historical time series data from multiple sets of historical time series data when the difference between the observed value and the predicted value at the target time point is greater than the first error threshold. The target historical time series data is the set of historical time series data with the highest similarity to the observed time series data, and the target time point is the latest time point that has occurred. The calibration module is used to calibrate the predicted values ​​of time points that did not occur within the target liquidation session based on the target's historical time series data.

[0018] Another aspect of this application provides a computer device, including: At least one processor; and A memory that is communicatively connected to the at least one processor; Wherein: the memory stores instructions that can be executed by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described above.

[0019] Another aspect of this application provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the method described above.

[0020] Another aspect of this application provides a computer program product including a computer program that, when executed by a processor, implements the method described above.

[0021] In some embodiments of this application, the technical solutions involve obtaining the predicted values ​​(predicted time-series data) of the target service at each time point within the target liquidation session, output by the baseline model, and obtaining the observed values ​​(observed time-series data) at each time point that has occurred within the target liquidation session. If the difference between the observed value and the predicted value at the latest time point exceeds a first error threshold, a set of historical time-series data with the highest similarity to the observed time-series data is recalled as the target historical time-series data. Based on the target historical time-series data, the predicted values ​​at time points that have not yet occurred within the target liquidation session are calibrated to improve the accuracy of the predicted values.

[0022] The embodiments of this application employing the above technical solution may include the following advantages: by real-time monitoring of the error between the predicted value and the observed value output by the baseline model at each time point, once the error exceeds the threshold, the calibration process is automatically initiated, that is, recalling the historical time series data most similar to the observed time series data to calibrate the predicted value of the future time point output by the baseline model, thereby correcting the predicted value in a timely manner and improving the accuracy of liquidity prediction. Attached Figure Description

[0023] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0024] Figure 1 A flowchart of a data prediction method according to an embodiment of this application is shown.

[0025] Figure 2 A flowchart illustrating a large-model-assisted liquidity prediction method according to an embodiment of this application is shown.

[0026] Figure 3 A flowchart of a data prediction method according to an embodiment of this application is shown.

[0027] Figure 4 A block diagram of a data prediction system according to an embodiment of this application is shown.

[0028] Figure 5 A block diagram of a computer device according to an embodiment of this application is shown.

[0029] Figure 6 A computer system architecture block diagram is shown for implementing some embodiments of this application. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0031] It should be noted that the descriptions involving "first," "second," etc., in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0032] It should be noted that, in any stage of this application involving the collection, storage, use, transmission, and processing of data, each stage strictly adheres to the laws, regulations, industry standards, and regulatory requirements of the data source, usage location, and relevant countries and regions to ensure the legality and compliance of data activities. In the collection stage, the purpose, method, and scope of collection are clearly communicated to the data subject in a prominent manner. Collection is conducted only after obtaining the data subject's legal authorization, ensuring that the collection process follows the "minimum necessary" principle and does not exceed the scope of data collection. In the storage stage, storage periods are limited, and data is promptly deleted or anonymized / encrypted after the storage purpose is achieved. In the usage stage, a strict data security protection mechanism is implemented, using field-level desensitization technology and processing the original data according to preset desensitization rules. For different types of data, multiple desensitization strategies, such as data generalization, data anonymization, and data encryption, are employed to effectively mitigate the risk of sensitive information leakage and ensure that all data used is securely processed and desensitized, comprehensively protecting the rights and interests of data subjects and data security. In the transmission and processing stages, the confidentiality and security of data are ensured during transmission and processing.

[0033] In the description of this application, it should be understood that the numerical labels before the steps do not indicate the order of the steps, but are only used to facilitate the description of this application and to distinguish each step, and therefore should not be construed as a limitation of this application.

[0034] To facilitate understanding of the technical solutions provided in the embodiments of this application by those skilled in the art, the relevant technologies are described below: Banks need to ensure they have sufficient liquidity reserves at all times. To this end, their cash management systems require continuous forecasting of liquidity across various business channels and clearing sessions. Inaccurate forecasting can lead to insufficient cash reserves (liquidity risk) or idle funds (loss of efficiency). Therefore, liquidity forecasting is a core basis for banks' cash allocation. Accurate liquidity forecasting helps banks rationally plan the use of funds, which is crucial for ensuring fund security and improving fund utilization efficiency.

[0035] However, the relevant liquidity forecasting schemes mainly rely on machine learning models, which still have the following drawbacks: (1) When the error between the predicted value and the actual value (observed value) exceeds the threshold, the model lacks an effective correction mechanism, which leads to the continuous accumulation of error and a rapid decline in prediction accuracy. For example, if an abnormal transaction occurs in a certain clearing session, the model cannot identify and adjust the prediction in time, resulting in all predicted values ​​in subsequent periods deviating significantly from the actual values.

[0036] (2) The model mainly relies on historical time series data for prediction. The feature dimension is single and it is difficult to comprehensively consider multiple influencing factors. For example, it fails to combine the impact of special dates (holidays, days of the week, end of the month, end of the quarter, end of the year) and clearing sessions (9:00-11:00, 14:00-16:00, 16:00-17:30) on liquidity for prediction, resulting in low prediction accuracy.

[0037] (3) When encountering unconventional events (such as system failures, major transactions, policy adjustments), the model lacks a response mechanism. These abnormal events often do not follow historical patterns, and the model cannot make effective predictions by learning historical patterns, resulting in the complete failure of the prediction results.

[0038] (4) The model adopts an offline training and online prediction mode, and the model parameter update cycle is long (such as daily or weekly). During the prediction process, even if a large prediction deviation is found, the prediction results cannot be adjusted in real time, and the model lacks online learning and adaptive correction capabilities.

[0039] Therefore, this application provides a technical solution for data prediction. In this technical solution: (1) A dual calibration mechanism is designed. Under normal operating conditions, the recalled historical time series data is used for calibration, and under extreme operating conditions, a large language model is used for calibration, which can effectively reduce prediction errors. (2) The error between the predicted value and the actual value is monitored in real time. When the error exceeds the threshold, the calibration process is automatically started. This dynamic adjustment mechanism can quickly adapt to changes in the business environment, especially in case of emergencies, the prediction results can be adjusted in time. (3) The most similar historical time series data is recalled by comprehensively considering multiple dimensions such as dynamic time warping distance (morphology), time characteristics, and liquidation sessions, so as to achieve accurate matching of observed time series data. Compared with the solution that only relies on morphological similarity, the recall accuracy of this solution is greatly improved. (4) A response strategy is designed specifically for unconventional events. The event type is identified and the event impact is quantified by natural language analysis of the large language model, so that the prediction performance can still be maintained under extreme operating conditions such as system failure, major transactions, and normal adjustments. (5) The scheme for calibrating predicted values ​​based on sliding windows incorporates a liquidation session isolation mechanism. When switching liquidation sessions, the historical window is automatically cleared to prevent the propagation of errors across sessions. Different liquidation sessions do not interfere with each other, ensuring the accuracy and rationality of the prediction results. See below for details.

[0040] The technical solutions of this application are described below through several embodiments. It should be understood that these embodiments can be implemented in many different forms and should not be construed as being limited to the embodiments set forth herein.

[0041] Figure 1 A flowchart illustrating a data prediction method according to an embodiment of this application is shown.

[0042] like Figure 1 As shown, the data prediction method may include steps S100 to S106, wherein: Step S100: Obtain the predicted time series data output by the baseline model for the target business. The predicted time series data includes the predicted values ​​of the target business at each time point within the target clearing session.

[0043] Step S102: Obtain observation time series data, which includes observation values ​​at time points that have occurred within the target liquidation phase.

[0044] Step S104: If the difference between the observed value and the predicted value at the target time point is greater than the first error threshold, target historical time series data is obtained from multiple sets of historical time series data. The target historical time series data is the set of historical time series data with the highest similarity to the observed time series data, and the target time point is the latest time point that has occurred.

[0045] Step S106: Based on the target historical time series data, calibrate the predicted values ​​of time points that did not occur within the target liquidation session.

[0046] The data prediction method provided in this embodiment obtains the predicted values ​​of the target business at each time point within the target clearing session, output by the baseline model, and obtains the observed values ​​at each time point that has occurred within the target clearing session. If the difference between the observed value and the predicted value at the latest time point exceeds a first error threshold, the method recalls the set of historical time-series data with the highest similarity to the observed time-series data as the target historical time-series data. Based on the target historical time-series data, the predicted values ​​at time points that have not yet occurred within the target clearing session are calibrated. By monitoring the error between the predicted value and the observed value output by the baseline model at each time point in real time, once the error exceeds the threshold, the method automatically enters the calibration process. That is, it recalls the historical time-series data most similar to the observed time-series data to calibrate the predicted values ​​at future time points output by the baseline model, thereby timely correcting the predicted values ​​and improving the accuracy of liquidity prediction.

[0047] The following combination Figure 1 The steps in steps S100 to S106 and other optional steps are described in detail.

[0048] Step S100 Obtain the predicted time series data output by the baseline model for the target business. The predicted time series data includes the predicted values ​​of the target business at each time point within the target clearing session.

[0049] The target business can be a designated business channel that requires liquidity forecasting. The business channel can include over-the-counter business, non-over-the-counter business, etc. The target clearing session can be a designated time period that requires liquidity forecasting, such as: 9:00-11:00, 14:00-16:00, 16:00-17:30, etc.

[0050] The baseline model can be a pre-trained time-series forecasting model based on historical time-series data, such as the Auto-regressive Integrated Moving Average (ARIMA), Long Short-Term Memory (LSTM), and Prophet models. For example, taking over-the-counter business as an example, the fund changes over a certain period (such as a day or a week) can be continuously collected and recorded to form time-series data, which serves as a historical dataset. The time-series forecasting model is trained using this historical dataset, allowing the model to learn the patterns and rules of fund changes based on historical data, resulting in a baseline model that can predict future fund trends. An exemplary training process is provided below. First, fund inflow and outflow data from various business channels are continuously collected. The data undergoes a series of preprocessing steps, including cleaning, filling in missing values, and correcting outliers. Time features and business features are extracted from the preprocessed data to train the time-series forecasting model. The trained time-series forecasting model can output predicted fund liquidity values ​​for future periods.

[0051] The following section uses the example of liquidity forecasting for bank counter services to provide a detailed description of the data forecasting method provided in this application.

[0052] The bank's funds management system needs to predict liquidity for counter services between 9:00 and 11:00. The prediction time granularity can be 5 minutes, with a total of 24 time points. A baseline model (such as LSTM) has been deployed. When switching to the clearing session (9:00), the baseline model can make predictions based on historical time-series data (up to 8:55) to obtain the predicted time-series data. ,in, This represents the predicted value at the first time point, 9:00. This represents the predicted value at the second time point, 9:05, and so on. For example: Unit: million yuan.

[0053] Step S102 Acquire observation time series data, which includes observation values ​​at time points that have occurred within the target liquidation phase.

[0054] Starting at 9:00, actual flow data (i.e., observations) at each point in time are continuously collected to form observational time-series data, which can be represented as follows: For example, if we have reached the third time point, 9:10, then the observed time series data can be represented as: .

[0055] Step S104If the difference between the observed value and the predicted value at the target time point is greater than the first error threshold, target historical time series data is obtained from multiple sets of historical time series data. The target historical time series data is the set of historical time series data with the highest similarity to the observed time series data, and the target time point is the latest time point that has occurred.

[0056] At each time point, the difference between the observed value and the predicted value at that time point is calculated, forming an error sequence. For example, if we have now reached the third time point, 9:10, the error sequence can be represented as follows: The error continues to increase, exceeding a pre-set first error threshold. When this happens, a calibration process for the predicted value can be triggered.

[0057] Historical time-series data can be observational time-series data of counter services at past times. For example, observational time-series data from 9:00-11:00 on a certain month of a certain year, observational time-series data from 16:00-17:30 on another day, and observational time-series data from 14:00-16:00 on a third day. The historical time-series data set with the highest similarity to the observed time-series data is retrieved from multiple sets, thereby calibrating the predicted values ​​output by the baseline model. An exemplary retrieval scheme will be provided below.

[0058] In one possible implementation, the steps for obtaining the target historical time series data from multiple sets of historical time series data may include: Step S200: Obtain the dynamic time warping distance between each set of historical time series data and the observed time series data, and obtain candidate historical time series data from multiple sets of historical time series data based on the dynamic time warping distance.

[0059] Dynamic Time Warping (DTW) can be used to measure the similarity between any two sets of time series data, supporting non-linear alignment of sequences along the time axis. Given two sets of time series data, such as and The DTW distance can be calculated as follows: ,in, It is a distance matrix. Represents a sequence The first i elements and the sequence The optimal normalized path distance for the first j elements. It is the distance between two elements, usually referring to Euclidean distance. .sequence and sequence The dynamic time-warped distance between them is .

[0060] Multiple sets of historical time-series data are acquired, with the historical time-series data being longer than the observed time-series data. In practical applications, time-series data segments of equal length can be extracted from the historical time-series data based on the length t of the observed time-series data (e.g., t=3, 3 time points) to calculate the DTW distance. Since the actual historical time-series data used in the calculation has the same length as the observed time-series data, the accuracy of the DTW distance calculation can be improved.

[0061] For example, multiple sets of historical time-series data can form a set, represented as The i-th set of historical time-series data can be represented as: , length is , Greater than or equal to t. Based on the length t of the observed time series data, segments of equal length are truncated from each group of historical time series data in the historical time series dataset to be used for calculating the DTW distance. For example, for historical time series data... The values ​​(elements) of the first t time points are extracted as segments to participate in the DTW distance calculation, represented as follows: ,in, The data is a segment of historical time series data, with a length of t. The DTW distance between the observed time series data and the segment of historical time series data can be expressed as: ,in, Represents observed time series data, Historical time series data The extracted segment is then used. In this case, the length of the observed time-series data is t, and the length of the extracted segment of the historical time-series data used in the calculation is also t; their lengths are identical. This method of truncation calculation can reduce DTW distance errors caused by length differences and effectively reduce computational complexity.

[0062] The time complexity of DTW distance calculation is Performing recall calculations on large-scale historical time-series datasets requires significant computational resources and time, potentially impacting real-time performance. To mitigate this issue, some embodiments can construct a time-dimensional index to quickly exclude obviously irrelevant historical time-series data, such as quickly excluding historical time-series data with significantly different liquidation sessions. Alternatively, a categorization index can be established for historical time-series data, for example, classifying the data according to business channels, product types, etc., and only retrieving multiple sets of historical time-series data belonging to the same category as the observed time-series data for DTW distance calculation. Furthermore, multi-core CPUs can be used to accelerate the parallel calculation of DTW distances between multiple sets of historical time-series data and the observed time-series data.

[0063] For example, when the observed time series data is In this case, one can iterate through the historical time series dataset, calculate the DTW distance between each set of historical time series data and the observed time series data, and then obtain candidate historical time series data from multiple sets of historical time series data based on the DTW distance. For example, find the top 3 most similar historical time series data. Historical time series data from 9:00 to 11:00 in a certain month of a certain year, DTW distance = 5.2. Historical time series data for another day, with a DTW distance of 6.8. This is the historical time series data for the third day, with a DTW distance of 7.5.

[0064] Step S202: Obtain the time features corresponding to each group of candidate historical time series data and the time features corresponding to the observed time series data, and determine the time feature similarity between each group of candidate historical time series data and the observed time series data.

[0065] Dynamic time warping relies solely on the morphological similarity of two sets of time series data for matching. To improve matching accuracy, various factors such as time characteristics and business characteristics can be comprehensively considered to accurately determine the target historical time series data with the highest similarity to the observed time series data from multiple sets of time series data. An exemplary solution is provided below.

[0066] Temporal features can include holiday identifiers (whether it is a holiday), day sequence within a week (day of the week), day sequence within a month (day of the month), day sequence within a quarter (day of the quarter), and day sequence within a year (day of the year), etc. Based on the temporal features of each set of candidate historical time series data and the corresponding temporal features of the observed time series data, the temporal feature similarity can be determined.

[0067] In one possible implementation, step S202 may include: for each set of candidate historical time series data, determining historical holiday identifiers, historical weekday dates, historical monthday dates, and historical yearday dates; for observed time series data, determining current holiday identifiers, current weekday dates, current monthday dates, and current yearday dates. Based on the differences between historical holiday identifiers and current holiday identifiers, the differences between historical weekday dates and current weekday dates, the differences between historical monthday dates and current monthday dates, and the differences between historical yearday dates and current yearday dates, the temporal feature similarity between each set of candidate historical time series data and observed time series data is determined.

[0068] For example, the time characteristics corresponding to historical time series data can be represented as:

[0069] in, This is a holiday indicator (1 indicates a holiday, 0 indicates a non-holiday). Indicates the day sequence within the week (1-7). Represents the day sequence within the month (1-31), Indicates the date sequence within the year (1-366).

[0070] The temporal characteristics corresponding to the observed time series data can be represented as:

[0071] Based on the differences between historical and current holiday identifiers, the differences between historical and current weekday dates, the differences between historical and current monthday dates, and the differences between historical and current yearday dates, time feature similarity can be calculated. The calculation formula can be expressed as follows:

[0072]

[0073]

[0074] in, To determine the similarity of holiday identifiers, For the similarity of day order within the week, The similarity of day order within the month, Similarity of day order within the year, For time feature similarity, where, , , , As weight, and It should be noted that the specific values ​​of each weight can be dynamically set according to the actual situation.

[0075] For example, the time characteristics corresponding to the observed time series data can be: =0 (non-holidays) =3 (Wednesday) =15, =105. Candidate historical time series data The corresponding time features can be: =0, =3, =14, =104, and the above calculation formula can be used to determine the observed time series data and candidate historical time series data. The temporal feature similarity between them. Similarly, candidate historical time series data can be calculated. Temporal feature similarity between candidate historical time series data and observed time series data Temporal feature similarity between the observed time series data and the time series data.

[0076] Step S204: Obtain the liquidation session corresponding to each group of candidate historical time series data, and determine the similarity of liquidation sessions between each group of candidate historical time series data and observed time series data based on the target liquidation session.

[0077] For example, for each set of candidate historical time-series data, if the corresponding liquidation session is the same as the target liquidation session, the similarity of the liquidation sessions can be determined as the first similarity; if the corresponding liquidation session is adjacent to the target liquidation session, the similarity of the liquidation sessions can be determined as the second similarity; if the corresponding liquidation session is different from the target liquidation session and is not adjacent, the similarity of the liquidation sessions can be determined as the third similarity. The first similarity is greater than the second similarity, and the second similarity is greater than the third similarity. The calculation formula can be expressed as:

[0078] in, For the target number of sessions, The liquidation sessions corresponding to the candidate historical time series data.

[0079] Step S206: Based on the dynamic time warping distance, time feature similarity, and liquidation session similarity, determine the similarity between each group of candidate historical time series data and the observed time series data.

[0080] For each group of candidate historical time series data, the weighted sum of the corresponding dynamic time normalization distance, time feature similarity, and liquidation session similarity can be used to determine its comprehensive similarity with the observed time series data. The calculation process can be expressed as follows:

[0081] in, The weights for the normalized DTW distance are... The weights for temporal feature similarity. As the weight for the similarity of the liquidation sessions, It should be noted that the weights for each item can be dynamically set according to actual business needs. By normalizing the DTW distance, consistency of all dimensions can be ensured.

[0082] Step S208: The candidate historical time series data with the highest similarity to the observed time series data among multiple candidate historical time series data is determined as the target historical time series data.

[0083] After determining the comprehensive similarity between each set of candidate historical time series data and the observed time series data, the set of candidate historical time series data with the highest comprehensive similarity can be identified as the target historical time series data.

[0084] Step S106Based on the target's historical time series data, the predicted values ​​for time points that did not occur within the target liquidation session are calibrated.

[0085] For example, calibrating the predicted values ​​for time points that did not occur within the target liquidation period based on the target historical time series data can be achieved by directly overwriting (replacing) the predicted values ​​for the time points that did not occur with the target historical time series data. Furthermore, residual value correction can be performed using a sliding time window to further improve the calibration effect and reduce prediction errors. Several embodiments will be used to illustrate the calibration scheme below.

[0086] In one possible implementation, step S106 may include: Step S300: Based on the target historical time series data, update the predicted values ​​of time points that have not occurred within the target liquidation session.

[0087] For example, the predicted values ​​of time points that have not occurred within the target liquidation session can be directly overwritten using target historical time-series data. In an optional embodiment, step S300 may include: dividing the target historical time-series data into first time-series data and second time-series data based on the number of time points that have occurred, wherein the minimum time point in the second time-series data is greater than the maximum time point in the first time-series data, and the number of time points in the first time-series data is the same as the number of time points that have occurred. Based on the values ​​of each time point in the second time-series data, the predicted values ​​of each time point that has not occurred within the target liquidation session are updated accordingly.

[0088] Assuming the target liquidation session is from 9:00 to 11:00, the already occurred times are 9:00, 9:05, and 9:10, while the non-occurring times are 9:15 and subsequent times. The target historical time series data is the data from the previous day from 9:00 to 11:00. Based on the number of already occurred times, the target historical time series data can be divided into the first time series data (9:00-9:10) and the second time series data (9:15-11:00). The values ​​of each time point in the second time series data are used to update the predicted values ​​of each non-occurring time point within the target liquidation session. That is, the predicted value for 9:15 from the baseline model is replaced with the value for 9:15 from the previous day, the predicted value for 9:20 from the previous day is replaced with the value for 9:20 from the previous day, and so on. Assuming the target historical time series data is data from 14:00 to 16:00 on another day, based on the number of time points that have occurred, the target historical time series data can be divided into the first time series data from 14:00 to 14:10 and the second time series data from 14:15 to 16:00. The values ​​of each time point in the second time series data are used to update the predicted values ​​of each time point that has not occurred within the target liquidation session. That is, the predicted value of 14:15 output by the baseline model is replaced with the value of 14:15 of the previous day, the predicted value of 14:20 output by the baseline model is replaced with the value of 14:20 of the previous day, and so on.

[0089] This embodiment updates the predicted values ​​by directly overwriting historical data. This allows for timely correction of the prediction results and improves prediction accuracy when there is a significant difference between the model's predicted values ​​and the actual values.

[0090] When updating the predicted values ​​for time points that have not occurred within the target liquidation period based on the target's historical time series data, we can also calculate the weighted average error by statistically analyzing the error between the updated predicted values ​​and the actual observed values ​​over a recent period, and then use a sliding time window to make a more accurate calibration of the predicted values ​​updated at future time points.

[0091] Step S302: Obtain the observed values ​​and updated predicted values ​​for each time point within the preset time window after the target time point.

[0092] Suppose there are n observations at time points within a time window before time t. and recall value (That is, the updated predicted value), can be expressed as:

[0093] For example, if the difference between the predicted value and the observed value at the target time point 9:10 exceeds a first error threshold, historical time-series data is recalled to update the predicted value from 9:15 to 11:00. A pre-set time window size is used, such as windowSize=6, representing 6 time points. After the target time point, the data passes through the pre-set time window, specifically 9:15, 9:20, 9:25, 9:30, 9:35, and 9:40 (a total of 6 time points), with a corresponding time t of 9:40. This allows the acquisition of the observed values ​​and updated predicted values ​​at each time point within the pre-set time window between the target time point and time t.

[0094] Step S304: Based on the difference between the observed values ​​and the updated predicted values ​​at each time point within the preset time window, the predicted values ​​after the preset time window when no time point update occurs are calibrated.

[0095] For example, an error sequence can be determined based on the observed values ​​at each time point within a preset time window and the updated observed values. Then, a weighted average error is calculated to calibrate the updated predicted values ​​at future time points after the preset time window (i.e., 9:45 and subsequent time points). The error sequence can be represented as follows: , .

[0096] In one possible implementation, step S304 may include: determining the exponential decay weight corresponding to each time point within a preset time window based on a preset decay factor, wherein the exponential decay weight corresponding to an earlier time point within the preset time window is less than the exponential decay weight corresponding to a later time point. Calculating a weighted average error based on the difference between the observed value and the updated observed value at each time point within the preset time window and the corresponding exponential decay weight. Calibrating the predicted values ​​after the preset time window when no updates have occurred based on the weighted average error.

[0097] For example, exponentially decaying weights can be used to give greater weight to time points closer to time t, meaning that within a preset time window, later time points have greater weight than earlier time points. The exponentially decaying weights can be represented as follows:

[0098] in, The attenuation factor has a value of (0, 1]. This represents the most recent point in time (i.e., time t), with the weights decreasing backward from time t according to the decay factor. The exponential decay.

[0099] The weight calculation can be simplified as follows:

[0100] After determining the exponential decay weights for each time point, the weighted average error can be calculated by combining the updated predicted and observed values ​​for each time point. The calculation method can be expressed as follows:

[0101] After determining the weighted average error, the updated predicted values ​​(recall values) at future times t+1, t+2, ..., t+L can be calibrated. The calibration process can be represented as follows:

[0102] It should be noted that the attenuation factor The value range can be 0.7-1.0. With a value close to 1, the weights of all time points are similar, and more attention is paid to the overall error performance of the time window. The smaller the window size, the higher the weight of recent time points, focusing primarily on the most recent error trend. The time window size is `windowSize=n`, where `n` is the number of time points considered when calculating the error sequence, ranging from 6 to 24. The specific size can be determined based on the stability of the business data; a larger value can be used when the business is stable. The sliding time window calibration scheme only applies to the data of the current clearing session (target clearing session). At the end of a clearing session, the error sequence is cleared, and a new statistical window is started, without carrying over the residual characteristics of the previous clearing session to the next, ensuring that the residual characteristics of different clearing sessions do not interfere with each other.

[0103] The above embodiments exemplify how, when the predicted values ​​output by the baseline model differ significantly from the actual observed values, the predicted values ​​output by the baseline model are calibrated by recalling the historical time-series data with the highest similarity to improve prediction accuracy. The following will exemplarily describe a prediction calibration scheme that can handle extreme operating conditions.

[0104] In one possible implementation, the data prediction method may also include: Step S400: Receive the event description text for the abnormal event of the target service and determine the abnormal time point, which is the time point that occurred closest to the time when the abnormal event occurred.

[0105] When encountering unconventional events (such as system failures, major transactions, or policy adjustments), the predicted values ​​output by the model, or the predicted values ​​calibrated based on the target's historical time-series data, often do not follow historical patterns, resulting in significant discrepancies between the actual values ​​and the historical data. In other words, both historical data and model predictions become invalid. To mitigate these issues, this application's embodiments eliminate the approach of using large models to analyze unconventional events to assist in liquidity prediction.

[0106] like Figure 2 As shown, users can describe abnormal events occurring in the target business using natural language, such as "Our bank's core transaction system experienced a failure at 10:30 AM, causing a surge of offline transactions to occur at the counter. The failure is expected to be resolved by 11:15 AM." The system receives event description text provided by the user. And identify the abnormal time point. In the preceding text, the abnormal time point can be 10:25.

[0107] Step S402: Input the event description text into a pre-trained large language model to determine the target time decay model from multiple time decay models through the large language model.

[0108] like Figure 2 As shown, the event description text The input is fed into a pre-trained large language model, which can then use an event monitoring engine, an impact quantification module, and a model evaluation module to determine the target time decay model from multiple time decay models. An exemplary scheme is provided below.

[0109] In one possible implementation, the large language model can determine the target time decay model from multiple time decay models through the following steps: determining the event type and confidence level based on the event description text; if the confidence level exceeds a preset confidence threshold, obtaining a target historical event set from the historical event dataset based on the event type, the target historical event set including multiple target historical events, each of which is associated with historical impact intensity and historical duration; and determining the target time decay model from multiple time decay models based on the event type, historical impact intensity, and historical duration.

[0110] For example, a large language model (Agent) can assess the event type by performing semantic analysis on the event description text. and confidence level Common event types include: normal business fluctuations, promotional activities, system failures, external policy adjustments, malicious attacks, and other abnormal events. Event types can be represented by sets, such as... The event type evaluation function can then be expressed as:

[0111] in, , The most likely event type identified by the large language model. If the confidence level is lower than the preset confidence threshold (e.g., 0.7), it indicates that the credibility of the anomalous event is not high enough, and there is no need to use a large language model to assist in liquidity prediction. If the confidence level is higher than the preset confidence threshold, a large language model can be used to assist in liquidity prediction.

[0112] For example, the large language model calls the historical event retrieval function based on the identified event type. Retrieve similar historical events from the historical event dataset, i.e., target historical events, to form a target historical event set. Each target historical event includes an event description text, historical impact intensity, and historical duration. Based on the event type, event description text, and target historical event set, the impact intensity and duration of this anomalous event can be quantified.

[0113] The formula for quantifying the intensity of influence can be expressed as:

[0114] The duration quantification formula can be expressed as:

[0115] The value range of the influence intensity is [-1, 1], and the unit of duration can be minutes.

[0116] Based on the event type, impact intensity, and duration of this abnormal event, the most suitable time decay model can be selected from multiple time decay models as the target time decay model for prediction calibration.

[0117] The model selection function can be expressed as: .

[0118] The available time decay models and their adaptation conditions are as follows: 1. Exponential decay model Applicable scenarios: Rapid decay after sudden events, such as system failures or promotional activities.

[0119] The decay function can be expressed as: .

[0120] Where t is the time elapsed since the occurrence of the abnormal event. For decay rate parameters, , Half-life. Half-life Duration "Confirmed" can be expressed as:

[0121] This setting causes the influence intensity to decay to 5% of its initial value after a certain duration.

[0122] 2. SIGMOID model Applicable scenarios: Slow start followed by rapid changes, such as policy impacts or market reactions.

[0123] The decay function can be expressed as: .

[0124] in, For the growth rate parameter, This refers to the midpoint position parameter.

[0125] The parameters can be determined in the following way:

[0126] Set the midpoint at 30% of the duration.

[0127]

[0128] This setting ensures that at t=0.2 The change begins to become more pronounced at t=0.8 The situation tends to stabilize.

[0129] 3. Power-law decay model Applicable scenarios: Long-term, continuous but slowly diminishing effects, such as brand effect and reputation impact.

[0130] The decay function can be expressed as: .

[0131] in, As a characteristic time scale, The decay exponent, >0.

[0132] The parameters can be determined in the following way:

[0133] 4. Cyclic Model Applicable scenarios: Regular fluctuations, such as seasonality and holiday effects.

[0134] The decay function can be expressed as: .

[0135] in, Angular frequency, This is the initial phase. The decay rate can be set to 0 to indicate continuous fluctuation. , The period length, Assuming a daily cycle in minutes, and setting the initial time as the peak value, the parameters can be determined as follows:

[0136]

[0137]

[0138] This setting causes the decay to drop to 5% after 2 cycles.

[0139] like Figure 2 As shown, after determining the target time decay model, prediction calibration can be performed by calibrating the actuator. Specifically, there are two execution strategies, which are described below as examples.

[0140] Step S404: If the predicted value at the abnormal time point is the predicted value output by the baseline model, the predicted value at the time point that did not occur after the abnormal time point is calibrated based on the target time decay model.

[0141] If the predicted value at the abnormal time point is the same as the predicted value output by the baseline model, it means that the error between the predicted value output by the model and the actual observed value does not exceed the first error threshold, that is, the error is within a controllable range, and the predicted value output by the model still has reference value. Therefore, incremental correction can be made on the basis of the existing predicted value, retaining the regular patterns captured by the original baseline model, and superimposing the event influence factor to achieve accurate local calibration.

[0142] For example, calibrating the predicted values ​​for time points that did not occur after the anomalous time point based on the target time decay model may include: calculating a calibration factor for each time point that did not occur after the anomalous time point based on the target time decay model; and calibrating the predicted values ​​for each time point that did not occur after the anomalous time point based on the predicted values ​​for each time point that did not occur after the anomalous time point and the corresponding calibration factor.

[0143] The calibration factor for each time point where the event did not occur can be expressed as:

[0144] Applying a calibration factor to the predicted values ​​at each time point where the event did not occur can be expressed as:

[0145] Step S406: If the predicted value at the abnormal time point is the predicted value obtained by calibrating the predicted value output by the baseline model based on the target historical time series data, then the predicted value at the time point that did not occur after the abnormal time point is calibrated a second time based on the target time decay model and the abnormal time point.

[0146] If the predicted value for the anomalous time point has already been calibrated based on the predicted value output by the baseline model using the recalled target historical time series data, then the predicted values ​​for time points that have not occurred after the anomalous time point can be calibrated a second time based on the anomalous time point and the target time decay model. An exemplary solution is provided below.

[0147] In one possible implementation, step S406 may include: taking the abnormal time point as the first reference time point, and successively acquiring time points as reference time points backward until a preset number of reference time points are obtained; acquiring the observed values ​​and predicted values ​​of the preset number of reference time points; calculating the mean absolute error based on the difference between the observed values ​​and predicted values ​​of each reference time point; if the mean absolute error exceeds a second error threshold, calculating the calibration factor for each time point that did not occur after the abnormal time point based on the target time decay model; calibrating the predicted values ​​of each time point that did not occur after the abnormal time point based on the observed values ​​of the abnormal time point and the calibration factors of each time point that did not occur after the abnormal time point; and calibrating the predicted values ​​of each time point that did not occur after the abnormal time point based on the target time decay model if the mean absolute error does not exceed the second error threshold.

[0148] For example, an abnormal time point can be used as the first reference time point, and time points are successively obtained backwards as reference time points until n reference time points are obtained. The mean absolute error is calculated based on the observed values ​​and predicted values ​​of the n reference time points. If the mean absolute error exceeds a preset second error threshold, it indicates that the historical time series data is invalid. Since the historical time series data has been retrieved, the predicted values ​​output by the baseline model are also invalid; therefore, calibration based on both is ineffective. This embodiment of the application will use the observed values ​​of the abnormal time point... As a benchmark, calibration factors are calculated for each time point after the anomalous time point based on the target time decay model. Based on the observed values ​​at the anomalous time point and the calibration factors for each time point after the anomalous time point, the predicted values ​​for each future time point are directly calculated. The predicted sequence for future time points can be represented as follows:

[0149] This calibration strategy can bypass outdated historical time-series data and baseline models, using actual observations as reliable anchors and combining them with the target time decay model to directly extrapolate future trends, thus avoiding secondary bias caused by calibration on an incorrect benchmark.

[0150] To make this application easier to understand, the following is combined with... Figure 3 Several exemplary applications are provided, which are mainly embodied in the following ways: Figure 3 Steps ⑧ and ⑨ in the process.

[0151] Example Application 1: Liquidity forecasting for bank counter products.

[0152] The current time is 9:00. A bank's funds management system needs to predict changes in product liquidity over the next 2 hours. The prediction time granularity is 5 minutes, with a total of 24 prediction points. A machine learning model (such as LSTM) has been deployed and is online.

[0153] S1: Model Prediction: At the current time t=9:00, basic predictions are made based on historical data (up to 8:55) to obtain the predicted time series data.

[0154] S2: Real-time error detection: Starting at 9:00 AM, actual mobility data is continuously collected to obtain observation time-series data, and the error between the observed and predicted values ​​at each time point is calculated. If, at the third time point (9:10 AM), the calculated error exceeds a first error threshold, a process is triggered to recall the historical time-series data with the highest similarity for prediction calibration.

[0155] S3: Traverse the historical time-series data set, calculate the DTW distance between each set of historical time-series data and the observed time-series data, and find the top 3 most similar historical time-series data sets (candidate historical time-series data sets). Calculate the temporal feature similarity and liquidation session similarity between each set of candidate historical time-series data sets and the observed time-series data sets. Determine the comprehensive similarity by weighted summation. Select the candidate historical time-series data set with the highest comprehensive similarity as the target historical time-series data set. Based on the target historical time-series data set, directly overwrite the predicted values ​​for each time point within the target liquidation session that has not yet occurred.

[0156] S4: Sliding window residual correction When the time reaches 9:15, there is only one time point within the time window, which does not meet the preset time window size of windowSize=6. When the time reaches 9:40, there are now six time points within the time window, meeting the preset time window size. The errors from the past six time points are collected, and the exponential decay weight corresponding to each time point is calculated based on a preset decay factor. A weighted summation error is then calculated. This weighted summation error is used to calibrate the predicted values ​​for each time point from 9:45 onwards.

[0157] Example Application 2: Suppose one morning, the administrator reports: "Our bank's core transaction system malfunctioned at 10:30 a.m., causing a large number of offline transactions to flood the counter. The malfunction is expected to be fixed at 11:15 a.m."

[0158] S1: After calling the large model to perform semantic analysis on the event description text, the event type "system failure" is output. With a confidence level of 0.92, which is greater than the preset confidence threshold of 0.7, the large model-assisted liquidity prediction is triggered.

[0159] S2: Large-scale model evaluation based on historical similar event analysis: Impact magnitude = 0.35 (positive impact, significant increase in trading volume); Duration = 45 minutes (10:30-11:15).

[0160] S3: Time decay model selection: Based on the "system failure" type and the "rapid recovery" characteristic, the exponential decay model is selected.

[0161] S4: Based on the intensity and duration of the impact obtained from the assessment, calculate the parameters of the exponential decay model, including the half-life and decay rate, to construct the decay function.

[0162] S5: The predicted value for the anomalous time point is a calibrated value (i.e., recall value) based on the target's historical time series data. Using the anomalous time point 10:25 as a reference time point, reference time points are obtained sequentially backwards until a preset number (e.g., 6) of reference time points (10:00-10:25) are obtained. The mean absolute error (MAE) is calculated based on the predicted and observed values ​​at each reference time point. If the MAE exceeds a preset second error threshold, the calibration factor for each future time point (e.g., 10:30, 10:35, etc.) is calculated using an exponential decay model, with the observed value at the anomalous time point as the baseline. Based on the observed value at the anomalous time point and the calibration factors for each future time point, the predicted value for each future time point is directly calculated.

[0163] In this exemplary application, due to a system failure, the transaction volume at the counter surged, and both the recall value and the predicted value deviated significantly from the actual value. At this time, the actual observed value at the abnormal time point was used as the anchor point, and the prediction was directly derived by combining the target time decay model. The predicted value first rose and then gradually returned to normal, which is more in line with the actual business trend.

[0164] Example Application 3: Suppose another scenario: At 9:00 on a certain workday, the administrator reports: "Today is the end of the quarter, and the counter service volume is expected to increase slightly."

[0165] S1: After calling the large model to perform semantic analysis on the event description text, the output event type is "normal business fluctuation (quarter-end effect)" with a confidence level of 0.85. Since the confidence level of 0.85 is greater than the preset confidence threshold of 0.7, the large model is triggered to assist in liquidity prediction.

[0166] S2: Large-scale model evaluation based on historical similar event analysis: Impact magnitude = 0.08 (small positive impact); Duration = 120 minutes.

[0167] S3: Time decay model selection: Based on the "normal business fluctuations (quarter-end effect)" type and the "slow start followed by rapid change" characteristic, the SIGMOID model was selected.

[0168] S4: Calculate the parameters of the SIGMOID model based on the intensity and duration of the impact obtained from the assessment.

[0169] S5: The predicted values ​​at abnormal time points are the same as those of the baseline model, indicating that the error is controllable and the baseline model prediction has not failed. Therefore, calibration factors can be calculated for each future time point (9:05, 9:10, etc.) based on the SIGMOID model, and these calibration factors can be applied to the original predicted values ​​at each future time point.

[0170] In this exemplary application, the prediction error is small, and the quarter-end calibration factor can be directly superimposed on the prediction value. This can preserve the original prediction model's ability to capture regular patterns while accurately reflecting the gradual enhancement process of the quarter-end effect.

[0171] The data prediction method provided in this application has the following beneficial effects: (1) Significantly improved prediction accuracy: Through a dual calibration mechanism, historical data is used for calibration under normal circumstances, and large model semantic analysis is used for calibration under extreme circumstances, which effectively reduces prediction error. Compared with a single machine learning model, the mean absolute percentage error of prediction can be reduced by 30-50%.

[0172] (2) Strong real-time adaptive capability: It monitors the error between prediction and reality in real time, and automatically starts the calibration process when the error exceeds the threshold. This dynamic adjustment mechanism can quickly adapt to changes in the business environment, especially in case of emergencies, it can adjust the prediction strategy in a timely manner.

[0173] (3) Multi-dimensional feature fusion: By comprehensively considering multiple dimensions such as DTW morphological similarity, time features, and liquidation sessions, accurate matching of historical data is achieved. Compared with traditional algorithms that rely solely on morphological similarity, the recall accuracy is significantly improved.

[0174] (4) Good robustness under extreme conditions: The large model is specially designed to assist liquidity forecasting for unconventional events and can identify event types and quantify their impact through natural language analysis. It can still maintain good forecasting performance under extreme conditions such as system failures, major promotions, and policy adjustments.

[0175] (5) Session isolation and status management: A session isolation mechanism was designed to prevent the residual value characteristics of different liquidation sessions from interfering with each other, thus ensuring the accuracy and rationality of the prediction. The historical window is automatically cleared when switching sessions to avoid the propagation of errors across sessions.

[0176] In some embodiments, when the business scenario does not require handling extreme events, or when large model resources are limited, prediction calibration can be performed simply by recalling historical time-series data. This solution can already provide good calibration results for routine business fluctuation scenarios and is suitable for application scenarios where prediction accuracy requirements are not high or resources are limited.

[0177] In some embodiments, for scenarios with limited computing resources, a simplified DTW calculation scheme can be adopted, such as using the FastDTW algorithm to replace the standard DTW to reduce time complexity, or selecting only a time window of a specific length for DTW calculation, or performing DTW matching on a coarse-grained time scale.

[0178] In some embodiments, a rule engine can be used for event type identification. For example, based on keyword matching (such as "fault", "promotion", etc.), a mapping table between predefined event types and processing strategies can be provided, and configurable event triggering conditions and processing rules can be set. Although this approach has lower flexibility, it does not require calling external large model interfaces and has higher operating efficiency.

[0179] In some embodiments, for scenarios where real-time requirements are not high, a batch correction approach can be adopted. Instead of performing error detection and correction at every time point, errors from multiple time points are accumulated and then corrected uniformly, with a set correction trigger interval (e.g., every 10 minutes). This approach reduces the system load caused by frequent calculations and is suitable for offline analysis scenarios where real-time requirements are not high.

[0180] In some embodiments, a degradation strategy can be provided when the external large language model service interface is unavailable or times out. For example, when the large model is unavailable, predefined rules can be used to determine the event type. Retry mechanisms and timeout policies can be set up to ensure stability, or the impact assessment results of common exception events can be cached locally to reduce reliance on the real-time interface.

[0181] Figure 4 This diagram schematically illustrates the composition of a data prediction system according to an embodiment of this application. The system can be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiments of this application. The program module referred to in the embodiments of this application refers to a series of computer program instruction segments capable of performing a specific function. The following description will specifically introduce the function of each program module in this embodiment. For example... Figure 4 As shown, the system 400 may include: a first acquisition module 410, a second acquisition module 420, a third acquisition module 430, and a calibration module 440, wherein: The first acquisition module 410 is used to acquire the predicted time series data output by the baseline model for the target business, wherein the predicted time series data includes the predicted values ​​of the target business at each time point within the target clearing session. The second acquisition module 420 is used to acquire observation time series data, which includes the observation values ​​of the time points that have occurred within the target liquidation session. The third acquisition module 430 is used to acquire target historical time series data from multiple sets of historical time series data when the difference between the observed value and the predicted value at the target time point is greater than a first error threshold. The target historical time series data is the set of historical time series data with the highest similarity to the observed time series data, and the target time point is the latest time point that has occurred. The calibration module 440 is used to calibrate the predicted values ​​of time points that have not occurred within the target liquidation session based on the target historical time series data.

[0182] See next. Figure 5 This embodiment provides a computer device 500, which includes one or more processors 501 and a memory 502. The memory 502 is used to store one or more programs. When one or more programs are executed by one or more processors 501, the computer device 500 implements the data prediction method of this application.

[0183] Figure 6 The diagram shows a computer system architecture block diagram for implementing some embodiments of this application. It should be noted that... Figure 6 The computer system shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0184] like Figure 6 As shown, the computer system 600 includes a CPU (Central Processing Unit) 601, which can perform various appropriate actions and processes based on programs stored in ROM (Read-Only Memory) 602 or programs loaded from storage portion 608 into RAM (Random Access Memory) 603, such as executing the data prediction method in the above embodiments. The RAM 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An I / O (Input / Output) interface 605 is also connected to the bus 604.

[0185] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including CRT (Cathode Ray Tube), LCD (Liquid Crystal Display), and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card and a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.

[0186] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing all or some of the steps shown in the flowcharts of the data prediction method. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs various functions defined in the system of this application.

[0187] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0188] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0189] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0190] In another aspect, this application also provides a computer-readable medium, which may be included in the computer device described in the above embodiments; or it may exist independently and not assembled into the computer device. The computer-readable medium carries one or more programs that, when executed by the computer device, cause the computer device to implement the methods described in the above embodiments.

[0191] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0192] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored on a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application. Other embodiments of this application will readily conceive of by those skilled in the art upon considering the specification and practicing the invention disclosed herein.

[0193] This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed in this application. The description and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the appended claims.

Claims

1. A data prediction method, characterized in that, The method includes: Obtain the predicted time series data output by the baseline model for the target business, wherein the predicted time series data includes the predicted values ​​of the target business at each time point within the target clearing session; Acquire observation time-series data, which includes observation values ​​at time points that have occurred within the target liquidation session; If the difference between the observed value and the predicted value at the target time point is greater than the first error threshold, target historical time series data is obtained from multiple sets of historical time series data. The target historical time series data is the set of historical time series data with the highest similarity to the observed time series data. The target time point is the latest time point that has occurred. Based on the target's historical time series data, the predicted values ​​for time points that did not occur within the target liquidation session are calibrated.

2. The data prediction method according to claim 1, characterized in that, Based on the target historical time-series data, the predicted values ​​for time points that did not occur within the target liquidation period are calibrated, including: Based on the target historical time series data, update the predicted values ​​of time points that did not occur within the target liquidation session; Obtain the observed values ​​and updated predicted values ​​at each time point within a preset time window after the target time point; Based on the difference between the observed values ​​and the updated predicted values ​​at each time point within the preset time window, the predicted values ​​after the preset time window when no updates have occurred are calibrated.

3. The data prediction method according to claim 2, characterized in that, Based on the target historical time series data, update the predicted values ​​of time points that did not occur within the target liquidation session, including: Based on the number of time points that have occurred, the target historical time series data is divided into first time series data and second time series data. The minimum time point in the second time series data is greater than the maximum time point in the first time series data, and the number of time points in the first time series data is the same as the number of time points that have occurred. Based on the values ​​of each time point in the second time series data, the predicted values ​​of each of the non-occurring time points within the target liquidation session are updated sequentially.

4. The data prediction method according to claim 2, characterized in that, Based on the differences between the observed values ​​and the updated predicted values ​​at each time point within the preset time window, the predicted values ​​after which no updates have occurred at time points following the preset time window are calibrated, including: Based on the preset decay factor, the exponential decay weight corresponding to each time point within the preset time window is determined, wherein the exponential decay weight corresponding to the earlier time point within the preset time window is less than the exponential decay weight corresponding to the later time point. The weighted average error is calculated based on the difference between the observed values ​​and the updated predicted values ​​at each time point within the preset time window and the corresponding exponential decay weights. Based on the weighted average error, the predicted value after the preset time window when no time point update occurs is calibrated.

5. The data prediction method according to claim 1, characterized in that, Obtain the target historical time series data from multiple sets of historical time series data, including: Obtain the dynamic time warping distance between each set of historical time series data and the observed time series data, and obtain candidate historical time series data from the multiple sets of historical time series data based on the dynamic time warping distance; Obtain the time features corresponding to each group of candidate historical time series data and the time features corresponding to the observed time series data, and determine the time feature similarity between each group of candidate historical time series data and the observed time series data; Obtain the liquidation session corresponding to each group of candidate historical time series data, and determine the liquidation session similarity between each group of candidate historical time series data and the observed time series data based on the target liquidation session; Based on the dynamic time warping distance, the time feature similarity, and the liquidation session similarity, the similarity between each group of candidate historical time series data and the observed time series data is determined; The candidate historical time series data with the highest similarity to the observed time series data among the multiple sets of candidate historical time series data is determined as the target historical time series data.

6. The data prediction method according to claim 5, characterized in that, Obtain the time features corresponding to each group of candidate historical time series data and the time features corresponding to the observed time series data, and determine the time feature similarity between each group of candidate historical time series data and the observed time series data, including: For each group of candidate historical time series data, determine the historical holiday identifier, historical weekday day sequence, historical monthday day sequence, and historical yearday day sequence; Based on the observed time series data, determine the current holiday identifier, the current week's day sequence, the current month's day sequence, and the current year's day sequence; Based on the differences between the historical holiday identifiers and the current holiday identifiers, the differences between the historical weekday sequence and the current weekday sequence, the differences between the historical monthday sequence and the current monthday sequence, and the differences between the historical yearday sequence and the current yearday sequence, the temporal feature similarity between each group of candidate historical time series data and the observed time series data is determined.

7. The data prediction method according to claim 1, characterized in that, The method further includes: Receive event description text for the abnormal event of the target service and determine the abnormal time point, wherein the abnormal time point is the time point that occurred closest to the time of the abnormal event; The event description text is input into a pre-trained large language model to determine the target time decay model from multiple time decay models. If the predicted value at the abnormal time point is the predicted value output by the baseline model, the predicted values ​​at time points that do not occur after the abnormal time point are calibrated based on the target time decay model. If the predicted value at the abnormal time point is the predicted value obtained by calibrating the predicted value output by the baseline model based on the target historical time series data, then the predicted value at the time point that did not occur after the abnormal time point is calibrated a second time based on the target time decay model and the abnormal time point.

8. The data prediction method according to claim 7, characterized in that, Based on the target time decay model and the anomalous time point, a secondary calibration is performed on the predicted values ​​of time points that did not occur after the anomalous time point, including: Using the abnormal time point as the first reference time point, obtain each time point backward as a reference time point until a preset number of reference time points are obtained; Obtain the observed and predicted values ​​at the preset number of reference time points; The mean absolute error is calculated based on the difference between the observed and predicted values ​​at each of the aforementioned reference time points; If the mean absolute error exceeds the second error threshold, the calibration factor for each non-occurring time point after the abnormal time point is calculated based on the target time decay model; and the predicted value for each non-occurring time point after the abnormal time point is calibrated based on the observed value of the abnormal time point and the calibration factor for each non-occurring time point after the abnormal time point. If the mean absolute error does not exceed the second error threshold, the predicted values ​​of time points that do not occur after the abnormal time point are calibrated based on the target time decay model.

9. The data prediction method according to claim 7 or 8, characterized in that, Based on the target time decay model, the predicted values ​​for time points that did not occur after the anomalous time point are calibrated, including: Based on the target time decay model, the calibration factor for each time point after the abnormal time point that did not occur is calculated; Based on the predicted values ​​of each time point after the abnormal time point and the corresponding calibration factor, the predicted values ​​of each time point after the abnormal time point are calibrated.

10. The data prediction method according to claim 7, characterized in that, Determining the target time decay model from the plurality of time decay models includes: Based on the event description text, determine the event type and confidence level; If the confidence level exceeds a preset confidence threshold, a target historical event set is obtained from the historical event dataset based on the event type. The target historical event set includes multiple target historical events, and each target historical event is associated with historical impact intensity and historical duration. The target time decay model is determined from the plurality of time decay models based on the event type, the intensity of the historical impact, and the duration of the historical impact.