Revenue estimation method, system and equipment based on double-time-sequence collaboration and medium

By using a dual-time-series collaborative approach, historical proportion series and current month's income series are constructed using recent income data and dynamic time warping algorithms. Combined with a real-time correction mechanism, this approach solves the problems of poor timeliness and prediction lag caused by long-cycle dependence in existing technologies, and achieves fast and accurate income forecasting.

CN120851277APending Publication Date: 2025-10-28CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing time series forecasting methods rely on long-term historical data, making it difficult to respond quickly to short-term fluctuations. They lack real-time correction capabilities, have low trend matching accuracy, cannot effectively capture nonlinear trend differences, and lack dynamic adjustment capabilities, resulting in delayed forecasts and high sensitivity to fluctuations.

Method used

Using real daily revenue data from recent months, the trend similarity is verified through the DTW algorithm. Historical proportion series and current monthly revenue series are constructed. Combined with a dual time series model, the prediction results are corrected in real time. Holidays and similarity adjustment items are introduced to optimize the model accuracy.

Benefits of technology

It significantly improves the responsiveness and environmental adaptability of revenue forecasts, reduces data storage and processing costs, enhances the accuracy and stability of forecast results, and enables rapid response to market changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120851277A_ABST
    Figure CN120851277A_ABST
Patent Text Reader

Abstract

The invention provides an income estimation method and system based on double-time-sequence collaboration, electronic equipment and a storage medium, and aims to solve the problems that income estimation depends on long-period data, the model training period is long and the adaptability is poor, the method comprises the steps that real sunward expenditure income of recent multiple months and current t months 1-d is adopted as a training basis, and d is larger than or equal to 5; verifying the trend similarity between the data of the recent months and the data of the t month to the d month; on the basis of the verification result, calculating and normalizing the average value of the daily income proportions of the recent months, constructing a historical proportion sequence, and constructing a daily estimated income sequence of the t month on the basis of the historical proportion sequence and the existing income data of the current month to generate a dual-time sequence; and on the basis of the double time sequences and continuously included true values, constructing an estimation model, and estimating the accumulated income at the end of the current month. According to the invention, the data preparation period can be shortened, and the response speed and environmental adaptability of income estimation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, specifically to a revenue forecasting method based on dual time series collaboration, a revenue forecasting system based on dual time series collaboration, an electronic device, and a computer-readable storage medium. Background Technology

[0002] Time series forecasting has wide applications in finance, supply chain, energy and other fields. In particular, in revenue forecasting scenarios, it is necessary to take into account both historical patterns and real-time dynamic changes in data.

[0003] Traditional methods face the following challenges:

[0004] Data timeliness: Modeling relies on long-term historical data (e.g., over 1 year), making it difficult to quickly respond to short-term fluctuations (e.g., seasonal activities, sudden events). Insufficient real-time correction capability: Most models are trained offline, unable to dynamically integrate the latest data, leading to prediction lag. Low trend matching accuracy: Simple moving averages or regression methods struggle to capture non-linear trend differences, affecting the effectiveness of similar cycle selection. Specifically, ARIMA / Prophet models rely on fixed statistical assumptions (e.g., stationarity), have poor adaptability to abrupt trends, and lack real-time data fusion interfaces. LSTM neural networks require large amounts of data for training, struggle to converge in small sample scenarios (e.g., the past 3 months), and have weak interpretability. Online learning algorithms, while supporting data stream updates, are not integrated with trend similarity verification, making them susceptible to short-term noise.

[0005] It is evident that existing methods have significant bottlenecks in three dimensions: data efficiency, real-time feedback, and multi-sequence collaboration, resulting in delayed prediction results and high sensitivity to fluctuations. Summary of the Invention

[0006] To address the problems of existing technologies that rely excessively on long-term historical data accumulation, leading to long model training cycles, poor timeliness, and poor adaptability, this disclosure provides a dual-time-series collaborative revenue prediction method, a dual-time-series collaborative revenue prediction system, an electronic device, and a computer-readable storage medium. These methods effectively shorten the data preparation cycle and significantly improve the response speed and environmental adaptability of revenue prediction.

[0007] In a first aspect, this disclosure provides a revenue forecasting method based on dual time series collaboration, the method comprising:

[0008] The training data is based on the actual daily revenue recorded in the most recent months and from the 1st to the dth of the current month t, where d ≥ 5.

[0009] Verify the trend similarity between historical revenue data from recent months and monthly revenue data from the 1st to the dth of month t;

[0010] Based on the trend similarity verification results, the average daily revenue share of the most recent months is calculated and normalized to construct a historical proportion series. Based on the historical proportion series and the existing monthly revenue data, the estimated daily revenue series for month t is constructed to generate a dual time series.

[0011] Based on dual time series data and continuously incorporated real values, a forecasting model is constructed to predict the cumulative revenue up to the end of the month.

[0012] Furthermore, the verification of the trend similarity between the historical income data of recent months and the monthly income data from the 1st to the dth of month t includes:

[0013] Standardize the historical revenue data from the most recent months and the monthly revenue data from the 1st to the dth of month t.

[0014] The DTW algorithm is used to calculate the optimal matching path between historical revenue data and current monthly revenue data on the time axis.

[0015] Based on the optimal matching path, calculate the DTW distance between historical income data and current monthly income data. The smaller the DTW distance, the higher the similarity between the two sequences; conversely, the larger the DTW distance, the lower the similarity.

[0016] The DTW algorithm calculation formula is as follows:

[0017] D(i,j)=d(A) i B j )+min(D(i-1,j),D(i,j-1),D(i-1,j-1))

[0018] Where D(i,j) is the cumulative distance between the first j elements of sequence A and the first j elements of sequence B;

[0019] d(A i B j Let be the local distance between the i-th element of sequence A and the j-th element of sequence B.

[0020] Furthermore, the most recent months are t-3, t-2, and t-1 months;

[0021] Based on the trend similarity verification results, the average daily revenue share for the most recent months is calculated and normalized to construct a historical proportion sequence, including:

[0022] After the similarity verification is passed, the availability of historical data is determined, and the data from months t-3, t-2, and t-1 are used as the training set for prediction.

[0023] Calculate the average proportion of data in months t-3, t-2, and t-1, and generate a historical proportion sequence y. i :

[0024]

[0025] Where, x i t-1 x i t-2 x i t-3 These represent the revenue data for day i in months t-1, t-2, and t-3, respectively, where n represents the maximum number of days in each month's calendar.

[0026] For the historical proportion sequence y i Normalization is performed:

[0027]

[0028] Among them, sy i For the i-th element in the normalized historical proportion sequence, min(y) i ) represents the minimum value in the historical proportion sequence, and max(y) represents the minimum value. i ) represents the maximum value in the historical proportion sequence.

[0029] Furthermore, the construction of the daily estimated income series for month t based on historical proportion sequences and existing monthly income data includes:

[0030] Obtain the existing real daily revenue data and normalized historical proportion series for month t;

[0031] Calculate the total estimated monthly revenue S up to the current date. i :

[0032]

[0033] in, This refers to the revenue data for day i in month t.

[0034] Based on the historical proportional series calculated from day d, the estimated composite average T up to the end of the month is:

[0035]

[0036] Generate daily estimated revenue series sy i income :

[0037] sy i income =T*sy i

[0038] Where k is the maximum number of days for which data is available in the current month.

[0039] Furthermore, the mathematical expression of the prediction model is:

[0040]

[0041] Among them, sy k acc-income This indicates the estimated cumulative revenue up to the end of the month.

[0042] Furthermore, the method also includes real-time correction of the prediction results, including:

[0043] After constructing the forecast model, adjustment items are calculated and merged. These adjustment items include holiday adjustment items and similarity adjustment items. The cumulative revenue forecast up to the end of the month after merging the adjustment items satisfies the formula:

[0044]

[0045] Among them, sy k final The adjusted cumulative revenue is the estimated total revenue up to the end of the month. Adjustments are made for holidays during the current month. This is a similar adjustment item for the current month.

[0046] Furthermore, the calculation method for the holiday adjustment items includes:

[0047] Calculate the average income H over the past three months during holidays income :

[0048]

[0049] Among them, D a This represents the set of holiday dates in month a. This represents the revenue generated on the day corresponding to the holiday date r in month a, and hd represents the total number of holiday days in the three months t-1, t-2, and t-3, where a is taken as t-1, t-2, and t-3.

[0050] Calculate the average income D for the three months prior to non-holidays. income :

[0051]

[0052] Among them, H a This represents the set of non-holiday dates in month a. This represents the revenue generated on a single day corresponding to a non-holiday date p in month a, and dd represents the total number of non-holiday days in the three months t-1, t-2, and t-3, where a is the month t-1, t-2, and t-3.

[0053] Calculate the holiday adjustment items for the current month

[0054]

[0055] Where ht represents the total number of holidays in the current month.

[0056] Furthermore, the calculation method for the similarity adjustment term includes:

[0057] Calculate the average similarity difference between items 1 to k in months t-1, t-2, and t-3.

[0058]

[0059] Among them, DTW t-1 DTW represents the similarity between dates 1 to k in month t-1 and the current month. t-2 DTW represents the similarity between dates 1 to k in month t-2 and the current month. t-3 The similarity between dates 1 to k in month t-3 and the current month;

[0060] Calculate the average daily account discrepancies for dates 1 through k in months t-1, t-2, and t-3.

[0061]

[0062] Calculate similar adjustment items for the current month

[0063]

[0064] Among them, DTW t This represents the similarity between the average daily data from days 1 to k of the previous three months and the data from days 1 to k of the current month.

[0065] Furthermore, the method also includes:

[0066] The model is validated using real data to assess its accuracy, and continuously optimized based on new data, including:

[0067] Compile the daily revenue forecasts made by the model to the end of the month, and denot the model's predicted cumulative revenue at the end of the month as P. n ;

[0068] Calculate the actual cumulative outgoing revenue S for the month. r :

[0069]

[0070] Assess the accuracy of the prediction model (Acc):

[0071]

[0072] Secondly, this disclosure provides a revenue forecasting system based on dual time series collaboration, the system comprising:

[0073] The data collection module is configured to use real daily revenue from the most recent months and the current month t from day 1 to day d as the training basis, where d ≥ 5;

[0074] The verification module is configured to verify the trend similarity between historical revenue data from recent months and the monthly revenue data from the 1st to the dth of month t.

[0075] The generation module is configured to calculate and normalize the average daily revenue share of the most recent months based on the trend similarity verification results, construct a historical proportion sequence, and construct the estimated daily revenue sequence for month t based on the historical proportion sequence and the existing monthly revenue data to generate a dual time series.

[0076] The forecasting module is configured to build a forecasting model based on dual time series data and continuously incorporated real values ​​to forecast cumulative revenue up to the end of the month.

[0077] Thirdly, this disclosure provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the revenue forecasting method based on dual time series collaboration as described in any of the first aspects.

[0078] Fourthly, this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the revenue forecasting method based on dual time series collaboration as described in any of the first aspects above.

[0079] Beneficial effects:

[0080] This disclosure provides a revenue forecasting method, system, electronic device, and storage medium based on dual time series collaboration. It allows for monthly revenue forecasting using only data from the most recent few months, significantly reducing data storage and processing costs, improving data processing efficiency and timeliness, and enabling rapid response to market changes. Secondly, by incorporating real-time data for the current month and continuously self-correcting and optimizing, the forecast results more accurately reflect reality, effectively improving the model's reliability in short-term predictions. Furthermore, the introduction of the dual-series concept allows for precise identification and adjustment of fluctuations in revenue data, enhancing the model's adaptability to complex data fluctuations and significantly improving the accuracy and stability of revenue forecasting. Attached Figure Description

[0081] Figure 1 A flowchart illustrating a revenue prediction method based on dual time series collaboration provided in Embodiment 1 of this disclosure;

[0082] Figure 2 A schematic diagram of a generated historical proportion sequence provided in an embodiment of this disclosure;

[0083] Figure 3 A schematic diagram illustrating a daily estimated revenue sequence provided for an embodiment of this disclosure;

[0084] Figure 4 A schematic diagram illustrating the comparison between actual and estimated revenue in March, provided as an embodiment of this disclosure;

[0085] Figure 5 A schematic diagram illustrating a comparison of the accuracy of model predictions in March, provided as an embodiment of this disclosure;

[0086] Figure 6 This is a flowchart illustrating a revenue prediction method based on dual time series collaboration provided in Embodiment 2 of this disclosure;

[0087] Figure 7 This is an architecture diagram of a revenue prediction system based on dual time series collaboration provided in Embodiment 3 of this disclosure;

[0088] Figure 8 This is an architectural diagram of an electronic device provided in Embodiment 4 of this disclosure. Detailed Implementation

[0089] To enable those skilled in the art to better understand the technical solutions of this disclosure, the disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments and drawings described herein are merely for explaining the invention and are not intended to limit the invention.

[0090] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence; furthermore, in the absence of conflict, the embodiments and features in the embodiments of this disclosure can be arbitrarily combined with each other.

[0091] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure. The singular forms “a,” “the,” and “the” as used in the embodiments of this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0092] In the following description, the use of suffixes such as “module,” “part,” or “unit” to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, “module,” “part,” or “unit” may be used interchangeably.

[0093] Existing time-series revenue forecasting technologies suffer from the following drawbacks: They rely excessively on long-term historical data accumulation, leading to lengthy model training cycles, poor timeliness, and an inability to quickly adapt to dynamic changes in the market environment and business models. Furthermore, traditional methods lack real-time data fusion mechanisms, failing to dynamically incorporate real-time data for self-correction during the forecasting process, resulting in cumulative biases in forecast results over time. Existing trend verification methods lack sensitivity to changes in the form of time-series data, making it difficult to accurately capture business fluctuations and leading to biases in trend similarity judgments. Conventional forecasting models lack dynamic adjustment items, failing to effectively integrate historical patterns with real-time changing factors, resulting in insufficient adaptability to sudden business scenarios. Moreover, existing technology verification systems are lagging, hindering continuous model self-optimization.

[0094] The following detailed embodiments illustrate the technical solutions of this disclosure and how they solve the technical problems existing in the prior art. It is understood that in the embodiments of this disclosure, the executing entity may perform some or all of the steps in the embodiments of this disclosure. These steps or operations are merely examples, and the embodiments of this disclosure may also perform other operations or variations thereof. Furthermore, the steps may be performed in different orders as presented in the embodiments of this disclosure, and it is not necessary to perform all the operations in the embodiments of this disclosure. Moreover, the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0095] Figure 1 This is a flowchart illustrating a revenue prediction method based on dual time series collaboration provided in Embodiment 1 of this disclosure, as shown below. Figure 1 As shown, the method includes:

[0096] Step S101: Use the real daily revenue from the most recent months and the current month t from day 1 to day d as the training basis, where d≥5;

[0097] Step S102: Verify the trend similarity between the historical income data of the most recent months and the monthly income data from the 1st to the dth of month t;

[0098] Step S103: Based on the trend similarity verification results, calculate and normalize the average daily income ratio of the most recent months, construct a historical ratio sequence, and construct the estimated daily income sequence for month t based on the historical ratio sequence and the existing monthly income data to generate a dual time series.

[0099] Step S104: Based on the dual time series and continuously incorporated real values, construct a forecasting model to forecast the cumulative revenue up to the end of the month.

[0100] The purpose of this disclosure is to provide a revenue forecasting method based on dual time series collaboration, aiming to solve three key problems existing in the prior art: 1) the time lag caused by the insufficient sensitivity of traditional models to short-term data trends; 2) the lack of a collaborative analysis mechanism for historical and real-time data; and 3) the problem of accumulated prediction bias caused by the lack of dynamic adjustment capabilities. By constructing a dual-dimensional time series framework including historical proportional series and real-time corrected series, and combining a trend matching verification mechanism of dynamic time warping algorithm, the self-optimization of the data-driven prediction model is achieved, effectively improving the real-time response capability to business fluctuations and the continuous accuracy of prediction results.

[0101] By using real daily revenue data from multiple recent months, which can be the most recent 2-6 months, preferably the most recent 3 months, as the training basis; in a specific implementation, for example, real daily revenue data from the three months of 202312, 202401, and 202402, as well as from the 1st to the 7th of the current month (202403). Let x i 202312 、x i 202401 、x i 202402 Let x represent the revenue received on day i of the corresponding month. i t Let represent the revenue generated on day i of month t (i = 1, ..., 7), and n represent the maximum number of days in a month's calendar. Revenue forecasts are generated daily using real daily revenue from the past three months and from the 1st to the 7th of the current month. This method abandons the traditional reliance on large amounts of historical data, focusing instead on recent revenue. It can more sensitively respond to short-term fluctuations and business changes, quickly extracting valuable information patterns for end-of-month revenue forecasting, and efficiently building the accurate foundational data pool needed for subsequent forecasts.

[0102] For historical income data from recent months, its usability needs to be verified. This is done by comparing the trend similarity between the historical income data and the income data from the 1st to the dth of the current month, to determine if the income trends of the past few months and the current month are the same, and whether it can be used as a basis for the current month's income forecast. Methods used include Pearson correlation coefficient, Dynamic Time Warping (DTW) algorithm, and trend direction consistency test; the DTW algorithm is preferred.

[0103] Once the data verification is successful, the average daily revenue percentage for the most recent months can be calculated (i.e., the average percentage of the same day in different recent months within a given month) and normalized to construct a historical percentage series. Based on the historical percentage series and the existing monthly revenue data, the estimated daily revenue series for month t can be constructed to generate a dual time series. The estimated daily revenue series is obtained by bridging historical patterns with current data by comparing the actual values ​​of existing data with the corresponding historical percentage series. Based on the verified dates, the average monthly percentage benchmark is calculated, combining historical patterns with real-time calibration percentages to achieve a dual-driven forecast of "historical trend + real-time correction".

[0104] Based on the dual time series and continuously incorporated real values, a forecasting model is constructed. The model consists of realized revenue for the current month, estimated revenue for the remaining days, and an error adjustment term, to obtain the estimated cumulative revenue up to the end of the current month.

[0105] This disclosed embodiment requires only data from the most recent few months to estimate monthly revenue, significantly reducing data storage and processing costs, improving data processing efficiency and timeliness, and enabling rapid response to market changes. Secondly, by incorporating real-time monthly data and continuously self-correcting and optimizing, the estimated results more accurately reflect reality, effectively improving the model's reliability in short-term forecasts. Furthermore, the introduction of a dual-series concept allows for precise identification and adjustment of fluctuations in revenue data, enhancing the model's adaptability to complex data fluctuations and significantly improving the accuracy and stability of revenue forecasting.

[0106] Furthermore, the verification of the trend similarity between the historical income data of recent months and the monthly income data from the 1st to the dth of month t includes:

[0107] Standardize the historical revenue data from the most recent months and the monthly revenue data from the 1st to the dth of month t.

[0108] The DTW algorithm is used to calculate the optimal matching path between historical revenue data and current monthly revenue data on the time axis.

[0109] Based on the optimal matching path, calculate the DTW distance between historical income data and current monthly income data. The smaller the DTW distance, the higher the similarity between the two sequences; conversely, the larger the DTW distance, the lower the similarity.

[0110] The DTW algorithm calculation formula is as follows:

[0111] D(i,j)=d(A) i B j )+min(D(i-1,j),D(i,j-1),D(i-1,j-1))

[0112] Where D(i,j) is the cumulative distance between the first j elements of sequence A and the first j elements of sequence B;

[0113] d(A i B j Let be the local distance between the i-th element of sequence A (such as historical monthly income data) and the j-th element of sequence B (such as current monthly income data).

[0114] The income data is standardized using the following formula:

[0115]

[0116] Where x is the original data point, μ is the mean of the sequence, and σ is the standard deviation of the sequence.

[0117] After standardization, the DTW (Dynamic Time Warping) algorithm is used to verify the trend similarity between historical and current data. The optimal matching path between historical and current monthly income data on the time axis is calculated. The DTW algorithm is a method for measuring the similarity between two time series. It finds the optimal matching path between the two series by non-linearly scaling them on the time axis, thereby calculating the similarity between the two series. The DTW algorithm can effectively handle the problem of time axis inconsistency in time series data, i.e., the scaling and distortion of the two series over time.

[0118] The algorithm matches the historical proportion sequence H (length n) for the entire month with the proportion sequence P (length m) of the current elapsed days. The calculation method is the same as the existing DTW algorithm, including data preparation, constructing a distance matrix, dynamic programming to calculate the cumulative distance matrix, and backtracking to the optimal path. D(i, j) is calculated, where the local distance can be Euclidean distance, Manhattan distance, etc. By continuously accumulating local distances and taking the minimum value among three possible paths (i.e., the distance to the previous point, the distance to the point above, and the distance to the point to the upper left), the DTW algorithm can gradually construct the optimal matching path, thus accurately reflecting the similarity between the two time series.

[0119] Determine if the conditions are met. If the conditions are met, historical data is available, such as a trend direction matching degree of ≥80% for three months and a normalized average DTW distance of ≤0.15, etc., which can be set independently.

[0120] With the above x i 202312 、x i 202401 、x i 202402 The actual daily revenue data from the 1st to the 7th of the month was used as historical data, and the similarity calculation results are shown in Table 1 below:

[0121] Table 1: Similarity Calculation Results

[0122]

[0123]

[0124] The calculation results above show that the similarity of a single month is less than the similarity of the average value Avg, and the overall average similarity with the current month is greater than 95%, which can be used as a basis for predicting the data of the current month using data from the past three months.

[0125] Furthermore, the most recent months are t-3, t-2, and t-1 months;

[0126] Based on the trend similarity verification results, the average daily revenue share for the most recent months is calculated and normalized to construct a historical proportion sequence, including:

[0127] After the similarity verification is passed, the availability of historical data is determined, and the data from months t-3, t-2, and t-1 are used as the training set for prediction.

[0128] Calculate the average proportion of data in months t-3, t-2, and t-1, and generate a historical proportion sequence y. i :

[0129]

[0130] Where, x i t-1 x i t-2 x i t-3 These represent the revenue data for day i in months t-1, t-2, and t-3, respectively, where n represents the maximum number of days in each month's calendar.

[0131] For the historical proportion sequence y i Normalization is performed:

[0132]

[0133] Among them, sy i For the i-th element in the normalized historical proportion sequence, min(y) i ) represents the minimum value in the historical proportion sequence, and max(y) represents the minimum value. i ) represents the maximum value in the historical proportion sequence.

[0134] The historical proportion series aims to reflect the revenue distribution pattern of the business at different points in time within a month by calculating the average daily revenue proportion over the past three months (t-3, t-2, and t-1) and normalizing it.

[0135] Calculate the average daily income percentage Rt i Ct represents the percentage of daily income to total monthly income. i This indicates the valid data count (used to resolve missing values). It calculates the average daily revenue percentage for each month. The calculated average daily revenue percentage is then normalized to ensure its value falls within the range of [0, 1], facilitating subsequent calculations and analysis. This eliminates differences in absolute magnitude and highlights the relative fluctuations between dates.

[0136] By calculating the average percentage of data from the past three months, the historical percentage series can comprehensively reflect the revenue distribution pattern of the business at different points in time within a month. Even though the total revenue each month may fluctuate, the relative percentage of revenue on each day often has a certain stability, and this pattern can provide an important reference for estimating the revenue for the current month.

[0137] Because it uses recent historical data, historical proportion series better reflects the current business situation and development trends. When forecasting monthly revenue, combining the existing actual revenue data for the current month with historical proportion series allows for a more accurate prediction of revenue for the remainder of the month, improving the timeliness and accuracy of the forecast.

[0138] Compared to traditional methods that require at least six months of data, this method constructs a historical proportional series using only the last three months of data, significantly reducing reliance on historical data volume. This not only lowers data storage and processing costs but also enables faster response to short-term business changes.

[0139] Referring to a specific embodiment of this disclosure, the historical proportion sequence generated from the dates 20240306 to 20240331 using the above steps is as follows: Figure 2 As shown.

[0140] Furthermore, the construction of the daily estimated income series for month t based on historical proportion sequences and existing monthly income data includes:

[0141] Obtain the existing real daily revenue data and normalized historical proportion series for month t;

[0142] Calculate the total estimated monthly revenue S up to the current date. i :

[0143]

[0144] in, This refers to the revenue data for day i in month t.

[0145] Based on the historical proportional series calculated from day d, the estimated composite average T up to the end of the month is:

[0146]

[0147] Generate daily estimated revenue series sy i income :

[0148] sy i income =T*sy i

[0149] Where k is the maximum number of days for which data is available in the current month.

[0150] For each existing data point, calculate the ratio Si of actual income to the historical normalized proportion based on the actual income data. Estimate the comprehensive average T at the end of the month based on the historical proportion sequence calculated from day d. Estimate the average of the cumulative value at the end of the month using the actual income of each day from day d to day k (inclusive). This algorithm can be used even with a small number of data points, and its accuracy increases with the amount of actual income included. i income The calculation formula is used to calculate the estimated income from the current date k to the end of the month, and to back-calculate the current ratio benchmark by the actual value to verify the applicability of historical patterns.

[0151] Taking the 7th of the month as an example, where k=7, we can generate the estimated daily revenue values ​​from the 7th to the 31st, forming the estimated revenue sequence for that day, such as... Figure 3 As shown.

[0152] In the revenue forecasting scenario, this model uses previous actual values ​​to improve the accuracy and timeliness of the monthly revenue forecast, as detailed below:

[0153] Starting from the 7th of the previous month, the actual values ​​from the 1st to the 7th of the current month contain the most relevant information to the prediction starting point, accurately reflecting the immediate characteristics and trend of the business. Using this data as the initial basis for the model ensures that the prediction is built on a reliable and realistic foundation from the 7th of each month. Furthermore, throughout the prediction process, the gradually accumulated real data of the month is integrated into the model system in real time, allowing the model to continuously adapt to the latest developments in the business. The model incorporates the daily estimated revenue sequence to predict revenue up to the end of the month. The generation of each day's sequence is closely based on the actual situation of that day, fully considering the dynamic changes in the business at different points in time. In this way, it ensures that the estimated revenue covers the full revenue of the official days of the month, providing a comprehensive and accurate reference for revenue prediction.

[0154] As time progresses, new actual values ​​are continuously generated for each date. The model meticulously compares these actual values ​​with their corresponding predicted values, calculating the differences between them. This difference is then fed back to the model, which adjusts its subsequent predictions accordingly. Through this real-time comparison and correction mechanism, the model dynamically adjusts its predictions based on historical data and the latest actual values.

[0155] Furthermore, the mathematical expression of the prediction model is:

[0156]

[0157] Among them, sy k acc-incom This indicates the estimated cumulative revenue up to the end of the month.

[0158] The total actual income of the first k days of the current month (known data) is combined with the estimated total income of the remaining nk days based on the historical proportion sequence (historical pattern). The deviation between the actual value of the first k days and the historical estimate is dynamically corrected according to the proportion of the remaining days to obtain the estimated cumulative income up to the end of the current month. Through the dynamic correction mechanism, the deviation is recalculated after the addition of actual data every day, which significantly improves the accuracy of long-term income forecasting.

[0159] With the actual data volume of the month The continuous increase and (x) i t -sy i income By incorporating the discrepancy between the actual and the predicted values, the model can more sensitively and dynamically capture new information and continuously adjust the prediction direction, thereby significantly improving the accuracy and timeliness of the prediction in the context of the current month.

[0160] In this embodiment, the estimated data for 7-10 are shown in Table 2 below.

[0161] Table 2: Unrevised Revenue Data for the Current Month (July-10)

[0162] Estimated date Estimated revenue at the end of the month (in RMB 100 million) 20240307 15.921005 20240308 16.429988 20240309 16.584550 20240310 16.508977

[0163] Furthermore, the method also includes real-time correction of the prediction results, including:

[0164] After constructing the forecast model, adjustment items are calculated and merged. These adjustment items include holiday adjustment items and similarity adjustment items. The cumulative revenue forecast up to the end of the month after merging the adjustment items satisfies the formula:

[0165]

[0166] Among them, sy k finalThe adjusted cumulative revenue is the estimated total revenue up to the end of the month. Adjustments are made for holidays during the current month. This is a similar adjustment item for the current month.

[0167] By correcting the abnormal impact of holidays on revenue distribution in historical data through holiday adjustment items and addressing cyclical differences between different months (such as seasonal industry fluctuations) through monthly similarity adjustment items, the impact of abnormal factors on revenue forecasts can be reduced, making revenue forecasts more accurate and improving the real-time response capability to business fluctuations and the continuous accuracy of forecast results.

[0168] Furthermore, the calculation method for the holiday adjustment items includes:

[0169] Calculate the average income H over the past three months during holidays income :

[0170]

[0171] Among them, D a This represents the set of holiday dates in month a. This represents the revenue generated on the day corresponding to the holiday date r in month a, and hd represents the total number of holiday days in the three months t-1, t-2, and t-3, where a is taken as t-1, t-2, and t-3.

[0172] Calculate the average income D for the three months prior to non-holidays. income :

[0173]

[0174] Among them, H a This represents the set of non-holiday dates in month a. This represents the revenue generated on a single day corresponding to a non-holiday date p in month a, and dd represents the total number of non-holiday days in the three months t-1, t-2, and t-3, where a is the month t-1, t-2, and t-3.

[0175] Calculate the holiday adjustment items for the current month

[0176]

[0177] Where ht represents the total number of holidays in the current month.

[0178] H income By employing a three-month moving window to calculate the mean, a balance is struck between data timeliness and volatility; through D... income Establish a baseline for weekdays and compare it with holiday data; use a difference amplification factor. The impact intensity is dynamically adjusted; statutory holidays and work-rest arrangements are accurately identified using the official chinese_calendar library; and interpretable data support for holiday adjustment items is provided by quantifying the holiday-specific effects. This eliminates revenue forecasting errors caused by differences in holiday data between the current month and previous months.

[0179] Furthermore, the calculation method for the similarity adjustment term includes:

[0180] Calculate the average similarity difference between items 1 to k in months t-1, t-2, and t-3.

[0181]

[0182] Among them, DTW t-1 DTW represents the similarity between dates 1 to k in month t-1 and the current month. t-2 DTW represents the similarity between dates 1 to k in month t-2 and the current month. t-3 The similarity between dates 1 to k in month t-3 and the current month;

[0183] Calculate the average daily account discrepancies for dates 1 through k in months t-1, t-2, and t-3.

[0184]

[0185] Calculate similar adjustment items for the current month

[0186]

[0187] Among them, DTW t This represents the similarity between the average daily data from days 1 to k of the previous three months and the data from days 1 to k of the current month.

[0188] The similarity adjustment term is calculated using a Dynamic Time Warping (DTW) algorithm to quantify the morphological differences between historical months and the current month. It can handle identical patterns recorded at different speeds through flexible time alignment, making it particularly suitable for processing holiday offsets and promotional activity effects in revenue data; average daily account discrepancies. Capturing absolute numerical differences in historical data reflects the overall trend of income level shifts; positive values ​​indicate that the current month's income is higher than the historical average for the same period. The final adjustment term integrates both morphological and numerical differences; 1-DTW t The term indicates that the higher the similarity between the current sequence and the historical benchmark, the greater the adjustment weight; the subsequent ratio amplifies numerical differences with a consistent trend, realizing a dual verification mechanism of morphology and numerical value.

[0189] In this embodiment, the prediction results are corrected by taking into account both holiday adjustment items and similarity adjustment items, and the final prediction data of 7-10 is shown in Table 3 below.

[0190] Table 3: Revised Final Forecast Data for 7-10

[0191]

[0192] By introducing and integrating holiday and similarity adjustment items, the impact of actual conditions on projected revenue can be more accurately reflected. Holidays are often accompanied by significant changes in consumption patterns, while the similarity adjustment item can capture similarities in time-series data. Both work together to improve the projection results, making them closer to reality. In this embodiment, by comprehensively considering both holiday and similarity adjustment items, the projection results are corrected, resulting in a final projection of 7-10. These figures are closer to reality and have higher reference value.

[0193] Furthermore, the method also includes:

[0194] The model is validated using real data to assess its accuracy, and continuously optimized based on new data, including:

[0195] Compile the daily revenue forecasts made by the model to the end of the month, and denot the model's predicted cumulative revenue at the end of the month as P. n ;

[0196] Calculate the actual cumulative outgoing revenue S for the month. r :

[0197]

[0198] Assess the accuracy of the prediction model (Acc):

[0199]

[0200] Compile the daily generated end-of-month cumulative revenue forecast value P n This forms a time-series dataset; it summarizes the actual revenue generated in the current month to ensure data integrity and timeliness; and it sets P... n and S r Align the models along the same time dimension and handle missing and outlier values. Calculate the daily prediction accuracy using the Accuracy rating, and determine whether the model can be applied directly or requires adjustment based on the accuracy level.

[0201] In practical verification, using data from March 2024 as an example, this model demonstrates significant advantages over the original conventional time series model. The accuracy of the conventional time series model is 93.1%, while the average precision of this model reaches 99.7%, an improvement of approximately 7 percentage points. Especially in the last week of the month, the precision can reach approximately 99.9%. Figure 4 and 5 As shown, compared with previous forecasting methods based on simple historical averages, the accuracy of this model has been significantly improved.

[0202] Currently, this model has been successfully applied to two key aspects of actual production: revenue forecasting and development forecasting, with significant results in both. Comparing the model's forecasts with actual monthly values ​​across different industry scenarios clearly demonstrates its excellent predictive performance. This fully proves the model's high application value and its ability to provide enterprises with more accurate forecasting information.

[0203] This disclosed embodiment achieves a technological breakthrough of "lightweight input, real-time output, and enhanced robustness" through three major measures: data condensation over the past three months, DTW trend verification + dual-sequence coupling, and online adjustment terms. It is particularly suitable for short-cycle income forecasting scenarios with high-frequency changes. The DTW algorithm quantitatively analyzes the local trend similarity between historical data from month t-3 to month t-1 and the current data in month t, overcoming the limitations of traditional fixed-window alignment methods and achieving dynamic matching of non-equal-length time series, providing differentiated weighting criteria for constructing the proportional series. The unsupervised dual-time-series collaborative modeling framework innovatively integrates the "historical proportional series" and the "daily estimated income series." The historical proportional series is dynamically weighted based on similarity verification results, while the daily series is updated rollingly based on real-time values. The two series complement each other through fusion adjustment terms (such as similarity adjustment or holiday fluctuations), enhancing the model's adaptability to sudden fluctuations. Lightweight data dependency and daily self-correction system: Model training can be completed using only the last three months of data. By incorporating real revenue data from the 1st to the kth of month t daily, an online learning mechanism is designed to dynamically adjust the prediction parameters, reducing the overhead of long-term historical data storage and computation. This also solves the problem of accumulated prediction bias caused by data lag in traditional models. Incremental optimization and closed-loop verification process: During the model deployment phase, error backpropagation and sequence fine-tuning are performed on the prediction results based on real-time revenue values. A sliding window evaluation metric (such as the difference between the actual value and the predicted value) is introduced to achieve continuous iterative optimization of model accuracy, forming a "prediction-verification-correction" closed loop, significantly improving the responsiveness to changes in business scenarios.

[0204] Embodiment 2 of this disclosure also provides a revenue prediction method based on dual time series collaboration, such as... Figure 6 As shown, the method includes:

[0205] S1. The actual daily revenue recorded in months t-3, t-2, t-1 and the current month t from day 1 to day d is used as the training basis, where d≥5;

[0206] S2. The DTW algorithm is used to verify the trend similarity between the historical data of months t-3, t-2, and t-1 and the current data from the 1st to the dth of month t.

[0207] S3. Based on the trend similarity verification results, construct the historical proportion series and the estimated daily income series to generate a dual time series;

[0208] S4. Based on dual time series and continuously incorporated real values, construct a prediction model to correct the prediction results in real time;

[0209] S5. Use real data to verify and evaluate the accuracy of the prediction model, and continuously optimize the model based on new data.

[0210] It is understood that the executing entity of this disclosure can be a revenue prediction system based on dual time series collaboration, or it can be a terminal or a server; the specific implementation is not limited here. This disclosure uses a server as an example for illustration.

[0211] In one specific implementation, for example, real daily revenue data is collected for the three months of 202312, 202401, and 202402, as well as from the 1st to the 7th of the current month. Let x... i 202312 x i 202401 x i 202402 Let x represent the revenue received on day i of the corresponding month. i t Let represent the revenue generated on day i of the current month (i = 1, ..., 7), and n represent the maximum number of days in a month's calendar. Revenue forecasts are generated daily using real daily revenue from the past three months and from the 1st to the 7th of the current month. This method abandons the traditional reliance on large amounts of historical data, focusing instead on recent revenue. It can more sensitively respond to short-term fluctuations and business changes, quickly extracting valuable information patterns for end-of-month revenue forecasting, and efficiently building the accurate foundational data pool needed for subsequent forecasts.

[0212] The Dynamic Time Warping (DTW) algorithm was used to verify the trend similarity between historical and current data. DTW is a method for measuring the similarity between two time series. It calculates the similarity by non-linearly scaling the two series along the time axis to find the optimal matching path between them. The DTW algorithm effectively handles the problem of time axis inconsistency in time series data, i.e., the scaling and distortion of the two series over time.

[0213] In this invention, the DTW algorithm is used for the trend similarity verification step. Specifically, the specific steps for trend similarity verification are as follows:

[0214] S2.1 Standardize the historical data for months t-3, t-2, and t-1, and the current data from the 1st to the 7th of month t.

[0215] The standardized formula is:

[0216]

[0217] Where x is the original data point, μ is the mean of the sequence, and σ is the standard deviation of the sequence.

[0218] S2.2 Calculate the optimal matching path between historical data and current data on the time axis using the DTW algorithm;

[0219] Specifically, in this embodiment, the DTW algorithm formula is:

[0220] D(i,j)=d(A) i B j )+min(D(i-1,j),D(i,j-1),D(i-1,j-1))

[0221] Where D(i,j) is the cumulative distance between the first j elements of sequence A and the first j elements of sequence B;

[0222] d(A i B j Let be the local distance between the i-th element of sequence A and the j-th element of sequence B. The local distance can be Euclidean distance, Manhattan distance, etc. By continuously accumulating the local distances and taking the minimum value among the three possible paths (i.e., the distance to the previous point, the distance to the point above, and the distance to the point to the upper left), the DTW algorithm can gradually construct the optimal matching path, thus accurately reflecting the similarity between the two time series.

[0223] S2.3. Based on the optimal matching path, calculate the DTW distance between historical data and current data. The smaller the DTW distance, the higher the similarity between the two sequences; conversely, the larger the DTW distance, the lower the similarity.

[0224] With the above x i 202312 x i 202401 x i 202402 The actual daily revenue data from the 1st to the 7th of the month was used as historical data, and the similarity calculation results are shown in Table 1 below:

[0225] Table 1: Similarity Calculation Results

[0226] Historical payment period Current month Similarity after data standardization 202312 202403 0.82830817 202401 202403 0.946793586 202402 202403 0.896638467 Avg (Average) 202403 0.952009762

[0227] The calculation results above show that the similarity of a single month is less than the similarity of the average value Avg, and the overall average similarity with the current month is greater than 95%, which can be used as a basis for predicting the data of the current month using data from the past three months.

[0228] In step S3, constructing the historical proportion sequence includes the following steps:

[0229] After the similarity verification is passed, the availability of historical data is determined, and the data from months t-3, t-2, and t-1 are used as the training set for prediction.

[0230] Calculate the average proportion of data from months t-3, t-2, and t-1, and generate a historical proportion sequence y. i :

[0231]

[0232] Where, x i t-1 、x i t-2 、x i t-3 These represent the revenue data for day i in months t-1, t-2, and t-3, respectively, where n represents the maximum number of days in each month.

[0233] Next, the historical proportion sequence y i Normalization is performed to ensure its applicability and accuracy in subsequent calculations:

[0234]

[0235] Among them, sy i It is the i-th element in the normalized historical proportion sequence, min(y i ) is the minimum value in the historical proportion sequence, max(y) i ) is the maximum value in the historical proportion sequence.

[0236] By calculating the average percentage of data from the past three months, the historical percentage series can comprehensively reflect the revenue distribution pattern of the business at different points in time within a month. Even though the total revenue each month may fluctuate, the relative percentage of revenue on each day often has a certain stability, and this pattern can provide an important reference for estimating the revenue for the current month.

[0237] Because it uses recent historical data, historical proportion series better reflects the current business situation and development trends. When forecasting monthly revenue, combining the existing actual revenue data for the current month with historical proportion series allows for a more accurate prediction of revenue for the remainder of the month, improving the timeliness and accuracy of the forecast.

[0238] Compared to traditional methods that require at least six months of data, this method constructs a historical proportional series using only the last three months of data, significantly reducing reliance on historical data volume. This not only lowers data storage and processing costs but also enables faster response to short-term business changes.

[0239] Referring to a specific embodiment of this disclosure, the historical proportion sequence generated from the dates 20240306 to 20240331 using the above steps is as follows: Figure 2 As shown.

[0240] Furthermore, step S3, constructing the estimated daily revenue sequence, includes the following steps:

[0241] Obtain the existing real daily revenue data and historical percentage series for the current month;

[0242] Calculate the total estimated monthly revenue S up to the current date. i :

[0243]

[0244] Based on calculations starting from day d, the historical proportional series is projected to reach a combined average T by the end of the month:

[0245]

[0246] Generate the estimated daily revenue sequence sy i income :

[0247] sy i income =T*sy i

[0248] Where k is the maximum number of days for which data is available in the current month.

[0249] Taking the 7th of the month as an example, where k=7, we can generate the estimated daily revenue values ​​from the 7th to the 31st, forming the estimated revenue sequence for that day, such as... Figure 3 As shown.

[0250] In the revenue forecasting scenario, this model uses previous actual values ​​to improve the accuracy and timeliness of the monthly revenue forecast, as detailed below:

[0251] Starting from the 7th of the previous month, the actual values ​​from the 1st to the 7th of the current month contain the most relevant information to the prediction starting point, accurately reflecting the immediate characteristics and trend of the business. Using this data as the initial basis for the model ensures that the prediction is built on a reliable and realistic foundation from the 7th of each month. Furthermore, throughout the prediction process, the gradually accumulated real data of the month is integrated into the model system in real time, allowing the model to continuously adapt to the latest developments in the business. The model incorporates the daily estimated revenue sequence to predict revenue up to the end of the month. The generation of each day's sequence is closely based on the actual situation of that day, fully considering the dynamic changes in the business at different points in time. In this way, it ensures that the estimated revenue covers the full revenue of the official days of the month, providing a comprehensive and accurate reference for revenue prediction.

[0252] As time progresses, new actual values ​​will continuously emerge. The model meticulously compares these actual values ​​with their corresponding predicted values, calculating the differences between them. This difference is then fed back to the model, which adjusts its subsequent predictions accordingly. Through this real-time comparison and correction mechanism, the model dynamically adjusts its predictions based on historical data and the latest actual values. Specifically, the mathematical expression for the prediction model in step S4 is:

[0253]

[0254] Among them, sy k acc-incom This indicates the estimated cumulative revenue up to the end of the month.

[0255] With the actual data volume of the month The continuous increase and (x) i t -sy i income By incorporating the discrepancy between the actual and the predicted values, the model can more sensitively and dynamically capture new information and continuously adjust the prediction direction, thereby significantly improving the accuracy and timeliness of the prediction in the context of the current month.

[0256] The estimated data for 7-10 are shown in Table 2 below.

[0257] Table 2: Unrevised Revenue Data for the Current Month (July-10)

[0258] Estimated date Estimated revenue at the end of the month (in RMB 100 million) 20240307 15.921005 20240308 16.429988 20240309 16.584550 20240310 16.508977

[0259] After constructing the forecast model, the process also includes calculating and integrating adjustment items, which include holiday adjustments and similarity adjustments. The adjusted cumulative revenue forecast up to the end of the month satisfies the following formula:

[0260]

[0261] Among them, sy k final This is the estimated cumulative revenue up to the end of the month after adjusting for the combined items.

[0262] Adjustments are made for holidays during the current month;

[0263] This is a similar adjustment item for the current month.

[0264] In one specific implementation, the calculation method for holiday adjustment items includes the following steps:

[0265] First, calculate the average income H over the past three months during holidays. income :

[0266]

[0267] Among them, D a This represents the set of holiday dates in month a. This represents the revenue generated on the day corresponding to the holiday date r in month a, and hd represents the total number of holiday days in the three months t-1, t-2, and t-3, where a is taken as t-1, t-2, and t-3.

[0268] Secondly, calculate the average income D for the three months prior to non-holidays. income :

[0269]

[0270] Among them, H a This represents the set of non-holiday dates in month a. This represents the revenue generated on a single day corresponding to a non-holiday date p in month a, and dd represents the total number of non-holiday days in the three months t-1, t-2, and t-3, where a is the month t-1, t-2, and t-3.

[0271] Finally, calculate the holiday adjustment items for the current month.

[0272]

[0273] Where ht represents the total number of holidays in the current month.

[0274] In one specific embodiment, the method for calculating the similarity adjustment term includes the following steps:

[0275] Calculate the average similarity difference between items 1 to k in months t-1, t-2, and t-3.

[0276]

[0277] Among them, DTW t-1 The similarity between dates 1 to k in month t-1 and the current month;

[0278] DTW t-2 The similarity between dates 1 to k in month t-2 and the current month;

[0279] DTW t-3 The similarity between dates 1 to k in month t-3 and the current month;

[0280] Calculate the average daily account discrepancies for dates 1 through k in months t-1, t-2, and t-3.

[0281]

[0282] Calculate similar adjustment items for the current month

[0283]

[0284] Among them, DTW t This represents the similarity between the average daily data from days 1 to k of the previous three months and the data from days 1 to k of the current month.

[0285] In this embodiment, the prediction results are corrected by taking into account both holiday adjustment items and similarity adjustment items, and the final prediction data of 7-10 is shown in Table 3 below.

[0286] Table 3: Revised Final Forecast Data for 7-10

[0287]

[0288] By introducing and integrating holiday and similarity adjustment items, the impact of actual conditions on projected revenue can be more accurately reflected. Holidays are often accompanied by significant changes in consumption patterns, while the similarity adjustment item can capture similarities in time-series data. Both work together to improve the projection results, making them closer to reality. In this embodiment, by comprehensively considering both holiday and similarity adjustment items, the projection results are corrected, resulting in a final projection of 7-10. These figures are closer to reality and have higher reference value.

[0289] Since this model uses an unsupervised algorithm for income prediction, step S7 uses real data for validation to evaluate the accuracy of the prediction model and continuously optimizes the model based on new data. The specific steps are as follows:

[0290] The model compiles daily revenue forecasts up to the end of the month, and the model's predicted cumulative revenue at the end of the month is denoted as P. n ;

[0291] Calculate the actual cumulative outgoing revenue S for the month. r :

[0292]

[0293] Assess the accuracy of the prediction model (Acc):

[0294]

[0295] In practical verification, using data from March 2024 as an example, this model demonstrates significant advantages over the original conventional time series model. The accuracy of the conventional time series model is 93.1%, while the average precision of this model reaches 99.7%, an improvement of approximately 7 percentage points. Especially in the last week of the month, the precision can reach approximately 99.9%. Figure 4 and 5 As shown, compared with previous forecasting methods based on simple historical averages, the accuracy of this model has been significantly improved.

[0296] Currently, this model has been successfully applied to two key aspects of actual production: revenue forecasting and development forecasting, with significant results in both. Comparing the model's forecasts with actual monthly values ​​across different industry scenarios clearly demonstrates its excellent predictive performance. This fully proves the model's high application value and its ability to provide enterprises with more accurate forecasting information.

[0297] Compared to existing time series analysis methods that rely on large amounts of historical data, the embodiments disclosed herein offer significant advantages. First, this disclosure requires only the most recent three months of data for forecasting, greatly reducing data storage and processing costs, improving data processing efficiency and timeliness, and enabling rapid response to market changes. Second, by incorporating real-time data for the current month and continuously self-correcting and optimizing, the forecast results more accurately reflect the actual situation, effectively improving the model's reliability in short-term predictions. Furthermore, by introducing the concept of dual-series data, the impact of fluctuations in income data can be accurately identified and adjusted, enhancing the model's adaptability to complex data fluctuations. Simultaneously, an adjustment term for the difference between the actual and forecast values ​​is designed, comprehensively considering various factors such as holidays and policy impacts, further refining the correction mechanism of the forecasting model. This allows the model to comprehensively consider various potential factors affecting income, thereby significantly improving the accuracy and stability of income forecasting.

[0298] Embodiment 3 of this disclosure also provides a revenue prediction system based on dual time series collaboration, such as Figure 7 As shown, the system includes:

[0299] The data collection module 11 is configured to use the real daily revenue from the most recent months and the current month t from day 1 to day d as the training basis, where d ≥ 5;

[0300] Verification module 12 is configured to verify the trend similarity between historical revenue data from recent months and the monthly revenue data from the 1st to the dth of month t.

[0301] The generation module 13 is set to calculate and normalize the average daily income ratio of the most recent months based on the trend similarity verification results, construct a historical ratio sequence, and construct the estimated daily income sequence for month t based on the historical ratio sequence and the existing monthly income data to generate a dual time series.

[0302] The forecasting module 14 is configured to build a forecasting model based on dual time series and continuously incorporated real values ​​to forecast the cumulative revenue up to the end of the month.

[0303] Furthermore, the verification module 12 is specifically configured as follows:

[0304] Standardize the historical revenue data from the most recent months and the monthly revenue data from the 1st to the dth of month t.

[0305] The DTW algorithm is used to calculate the optimal matching path between historical revenue data and current monthly revenue data on the time axis.

[0306] Based on the optimal matching path, calculate the DTW distance between historical income data and current monthly income data. The smaller the DTW distance, the higher the similarity between the two sequences; conversely, the larger the DTW distance, the lower the similarity.

[0307] The DTW algorithm calculation formula is as follows:

[0308] D(i,j)=d(A) i B j )+min(D(i-1,j),D(i,j-1),D(i-1,j-1))

[0309] Where D(i,j) is the cumulative distance between the first j elements of sequence A and the first j elements of sequence B;

[0310] d(A i B j Let be the local distance between the i-th element of sequence A and the j-th element of sequence B.

[0311] Furthermore, the most recent months are t-3, t-2, and t-1 months;

[0312] The generation module 13 is specifically configured as follows:

[0313] After the similarity verification is passed, the availability of historical data is determined, and the data from months t-3, t-2, and t-1 are used as the training set for prediction.

[0314] Calculate the average proportion of data in months t-3, t-2, and t-1, and generate a historical proportion sequence y. i :

[0315]

[0316] Where, x i t-1 、x i t-2 、x i t-3 These represent the revenue data for day i in months t-1, t-2, and t-3, respectively, where n represents the maximum number of days in each month's calendar.

[0317] For the historical proportion sequence y i Normalization is performed:

[0318]

[0319] Among them, sy i For the i-th element in the normalized historical proportion sequence, min(y) i ) represents the minimum value in the historical proportion sequence, and max(y) represents the minimum value. i ) represents the maximum value in the historical proportion sequence.

[0320] Furthermore, the generation module 13 is specifically configured as follows:

[0321] Obtain the existing real daily revenue data and normalized historical proportion series for month t;

[0322] Calculate the total estimated monthly revenue S up to the current date. i :

[0323]

[0324] in, This refers to the revenue data for day i in month t.

[0325] Based on the historical proportional series calculated from day d, the estimated composite average T up to the end of the month is:

[0326]

[0327] Generate daily estimated revenue series sy i income :

[0328] sy i income=T*sy i

[0329] Where k is the maximum number of days for which data is available in the current month.

[0330] Furthermore, the mathematical expression of the prediction model is:

[0331]

[0332] Among them, sy k acc-income This indicates the estimated cumulative revenue up to the end of the month.

[0333] Furthermore, the system also includes a correction module 15, which is configured as follows:

[0334] After constructing the forecast model, adjustment items are calculated and merged. These adjustment items include holiday adjustment items and similarity adjustment items. The cumulative revenue forecast up to the end of the month after merging the adjustment items satisfies the formula:

[0335]

[0336] Among them, sy k final The adjusted cumulative revenue is the estimated total revenue up to the end of the month. This is an adjustment item for the monthly holidays. This is a similar adjustment item for the current month.

[0337] Furthermore, the calculation method for the holiday adjustment items includes:

[0338] Calculate the average income H over the past three months during holidays income :

[0339]

[0340] Among them, D a This represents the set of holiday dates in month a. This represents the revenue generated on the day corresponding to the holiday date r in month a, and hd represents the total number of holiday days in the three months t-1, t-2, and t-3, where a is taken as t-1, t-2, and t-3.

[0341] Calculate the average income D for the three months prior to non-holidays. income :

[0342]

[0343] Among them, H a This represents the set of non-holiday dates in month a. This represents the revenue generated on a single day corresponding to a non-holiday date p in month a, and dd represents the total number of non-holiday days in the three months t-1, t-2, and t-3, where a is the month t-1, t-2, and t-3.

[0344] Calculate the holiday adjustment items for the current month

[0345]

[0346] Where ht represents the total number of holidays in the current month.

[0347] Furthermore, the calculation method for the similarity adjustment term includes:

[0348] Calculate the average similarity difference between items 1 to k in months t-1, t-2, and t-3.

[0349]

[0350] Among them, DTW t-1 DTW represents the similarity between dates 1 to k in month t-1 and the current month. t-2 DTW represents the similarity between dates 1 to k in month t-2 and the current month. t-3 The similarity between dates 1 to k in month t-3 and the current month;

[0351] Calculate the average daily account discrepancies for dates 1 through k in months t-1, t-2, and t-3.

[0352]

[0353] Calculate similar adjustment items for the current month

[0354]

[0355] Among them, DTW t This represents the similarity between the average daily data from days 1 to k of the previous three months and the data from days 1 to k of the current month.

[0356] Furthermore, the system also includes an evaluation module 16:

[0357] The evaluation module 16 is configured to use real data for verification, evaluate the accuracy of the prediction model, and continuously optimize the model based on new data, including:

[0358] Compile the daily revenue forecasts made by the model to the end of the month, and denot the model's predicted cumulative revenue at the end of the month as P. n ;

[0359] Calculate the actual cumulative outgoing revenue S for the month. r :

[0360]

[0361] Assess the accuracy of the prediction model (Acc):

[0362]

[0363] The revenue forecasting system based on dual time series collaboration in this disclosure is used to implement the revenue forecasting method based on dual time series collaboration in Embodiment 1 and Embodiment 2. Therefore, the description is relatively simple. For details, please refer to the relevant descriptions in the previous method embodiments. It will not be repeated here.

[0364] In addition, such as Figure 8 As shown, Embodiment 4 of this disclosure also provides an electronic device, including a memory 100 and a processor 200. The memory 100 stores a computer program. When the processor 200 runs the computer program stored in the memory 100, the processor 200 executes the various possible methods described above.

[0365] The memory 100 is connected to the processor 200. The memory 100 can be a flash memory, a read-only memory, or another type of memory. The processor 200 can be a central processing unit or a microcontroller.

[0366] Furthermore, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program, which is executed by a processor using the various possible methods described above.

[0367] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media includes, but is not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other memory technologies, CD-ROM (Compact Disc Read-Only Memory), Digital Video Disc (DVD) or other optical disc storage, cartridges, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer.

[0368] It is understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of this disclosure, and this disclosure is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of this disclosure, and these modifications and improvements are also considered to be within the scope of protection of this disclosure.

Claims

1. A revenue forecasting method based on dual time series collaboration, characterized in that, The method includes: The training data is based on the actual daily revenue recorded in the most recent months and from the 1st to the dth of the current month t, where d ≥ 5. Verify the trend similarity between historical revenue data from recent months and monthly revenue data from the 1st to the dth of month t; Based on the trend similarity verification results, the average daily revenue share of the most recent months is calculated and normalized to construct a historical proportion series. Based on the historical proportion series and the existing monthly revenue data, the estimated daily revenue series for month t is constructed to generate a dual time series. Based on dual time series data and continuously incorporated real values, a forecasting model is constructed to predict the cumulative revenue up to the end of the month.

2. The method according to claim 1, characterized in that, The verification of the trend similarity between historical income data from recent months and the monthly income data from the 1st to the dth of month t includes: Standardize the historical revenue data from the most recent months and the monthly revenue data from the 1st to the dth of month t. The DTW algorithm is used to calculate the optimal matching path between historical revenue data and current monthly revenue data on the time axis. Based on the optimal matching path, calculate the DTW distance between historical income data and current monthly income data. The smaller the DTW distance, the higher the similarity between the two sequences; conversely, the larger the DTW distance, the lower the similarity. The DTW algorithm calculation formula is as follows: D(i,j)=d(A i ,B j )+min(D(i-1,j),D(i,j-1),D(i-1,j-1)) Where D(i,j) is the cumulative distance between the first j elements of sequence A and the first j elements of sequence B; d(A i B j Let be the local distance between the i-th element of sequence A and the j-th element of sequence B.

3. The method according to claim 1 or 2, characterized in that, The most recent months are t-3, t-2, and t-1. Based on the trend similarity verification results, the average daily revenue share for the most recent months is calculated and normalized to construct a historical proportion sequence, including: After the similarity verification is passed, the availability of historical data is determined, and the data from months t-3, t-2, and t-1 are used as the training set for prediction. Calculate the average proportion of data in months t-3, t-2, and t-1, and generate a historical proportion sequence y. i : Where, x i t-1 x i t-2 x i t-3 These represent the revenue data for day i in months t-1, t-2, and t-3, respectively, where n represents the maximum number of days in each month's calendar. For the historical proportion sequence y i Normalization is performed: Among them, sy i For the i-th element in the normalized historical proportion sequence, min(y) i ) represents the minimum value in the historical proportion sequence, and max(y) represents the minimum value. i ) represents the maximum value in the historical proportion sequence.

4. The method according to claim 3, characterized in that, The method for constructing the daily estimated income sequence for month t based on historical proportion sequences and existing monthly income data includes: Obtain the existing real daily revenue data and normalized historical proportion series for month t; Calculate the total estimated monthly revenue S up to the current date. i : in, This refers to the revenue data for day i in month t. Based on the historical proportional series calculated from day d, the estimated composite average T up to the end of the month is: Generate daily estimated revenue series sy i income : and i income =T*sy i Where k is the maximum number of days for which data is available in the current month.

5. The method according to claim 4, characterized in that, The mathematical expression for the prediction model is: Among them, sy k acc-income This indicates the estimated cumulative revenue up to the end of the month.

6. The method according to claim 5, characterized in that, The method also includes real-time correction of the prediction results, including: After constructing the forecast model, adjustment items are calculated and merged. These adjustment items include holiday adjustment items and similarity adjustment items. The cumulative revenue forecast up to the end of the month after merging the adjustment items satisfies the formula: Among them, sy n final The adjusted cumulative revenue is the estimated total revenue up to the end of the month. Adjustments are made for holidays during the current month. This is a similar adjustment item for the current month.

7. The method according to claim 6, characterized in that, The calculation method for the holiday adjustment items includes: Calculate the average income H over the past three months during holidays ibcome : Among them, D a This represents the set of holiday dates in month a. This represents the revenue generated on the day corresponding to the holiday date r in month a, and hd represents the total number of holiday days in the three months t-1, t-2, and t-3, where a is taken as t-1, t-2, and t-3. Calculate the average income D for the three months prior to non-holidays. income : Among them, H a This represents the set of non-holiday dates in month a. This represents the revenue generated on a single day corresponding to a non-holiday date p in month a, and dd represents the total number of non-holiday days in the three months t-1, t-2, and t-3, where a is the month t-1, t-2, and t-3. Calculate the holiday adjustment items for the current month Where ht represents the total number of holidays in the current month.

8. The method according to claim 6, characterized in that, The calculation method for the similarity adjustment item includes: Calculate the average similarity difference between items 1 to k in months t-1, t-2, and t-3. Among them, DTW t-1 DTW represents the similarity between dates 1 to k in month t-1 and the current month. t-2 DTW represents the similarity between dates 1 to k in month t-2 and the current month. t-3 The similarity between dates 1 to k in month t-3 and the current month; Calculate the average daily account discrepancies for dates 1 through k in months t-1, t-2, and t-3. Calculate similar adjustment items for the current month Among them, DTW t This represents the similarity between the average daily data from days 1 to k of the previous three months and the data from days 1 to k of the current month.

9. The method according to claim 1, characterized in that, The method further includes: The model is validated using real data to assess its accuracy, and continuously optimized based on new data, including: Compile the daily revenue forecasts made by the model to the end of the month, and denot the model's predicted cumulative revenue at the end of the month as P. n ; Calculate the actual cumulative outgoing revenue S for the month. r : Assess the accuracy of the prediction model (Acc):

10. A revenue forecasting system based on dual time series collaboration, characterized in that, The system includes: The data collection module is configured to use real daily revenue from the most recent months and the current month t from day 1 to day d as the training basis, where d ≥ 5; The verification module is configured to verify the trend similarity between historical revenue data from recent months and the monthly revenue data from the 1st to the dth of month t. The generation module is configured to calculate and normalize the average daily revenue share of the most recent months based on the trend similarity verification results, construct a historical proportion sequence, and construct the estimated daily revenue sequence for month t based on the historical proportion sequence and the existing monthly revenue data to generate a dual time series. The forecasting module is configured to build a forecasting model based on dual time series data and continuously incorporated real values ​​to forecast cumulative revenue up to the end of the month.

11. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the revenue forecasting method based on dual time series collaboration as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the revenue forecasting method based on dual time series collaboration as described in any one of claims 1-9.