Scene generation method and device, equipment, medium and product

By performing time series decomposition and simulation of business weekly data and combining with the parameter calibration of investors' expectations, the problem of inaccurate business data prediction under the influence of periodicity is solved, and accurate capture and accurate prediction of business data is achieved.

CN120296356APending Publication Date: 2025-07-11XIAN JIAOTONG LIVERPOOL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510417422.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

When the prior art predictive analysis of business data affected by periodicity, it is impossible to accurately capture complex features, resulting in inaccurate predictions.

Method used

The business weekly data is decomposed into periodic weekly data and non-periodic weekly data by using the time series decomposition method, and the target simulation scenario is generated by a random model and a time series model, combined with the parameter calibration mechanism expected by investors.

Benefits of technology

Accurate decomposition of business data is achieved, the impact of seasonal factor fluctuations on prediction analysis is avoided, and the accuracy of the prediction scenario is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120296356A_ABST
    Figure CN120296356A_ABST
Patent Text Reader

Abstract

The invention discloses a scene generation method and device, equipment and a medium, and relates to the technical field of data processing. Obtaining service weekness data; performing time sequence decomposition on the service weekness data to obtain periodic weekness data and non-periodic weekness data; simulating the non-periodic weekness data through a first model to obtain a first simulation scene; simulating the periodic weekness data through a second model to obtain a second simulation scene; and determining a target simulation scene based on the first simulation scene and the second simulation scene. By adopting the technical scheme, the business data is periodically decomposed, and the periodic data and the non-periodic data are predicted, so that the accurate decomposition of the business data is realized, and the problem of inaccurate prediction analysis caused by fluctuation of seasonal factors is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and particularly to a scenario generation method, device, equipment, medium and product. Background Art

[0002] With the development of Internet technology, the existing prediction of business data often only predicts based on historical data and time series models. However, business data is extremely vulnerable to the influence of periodic data, and the complex characteristics of business data cannot be accurately captured in the prediction and analysis of business data, resulting in inaccurate prediction and analysis of business data.

[0003] For example: in the energy field, the electricity demand is affected by daily peak-valley fluctuations or seasonal fluctuations, etc., and it is necessary to allocate power generation resources based on temperature changes and seasonal factors; the stock dividend income in the financial field is easily affected by the holiday effect, and it is necessary to analyze seasonal fluctuations for income prediction, etc.

[0004] Based on this, how to accurately predict and analyze business data affected by periodicity is an urgent problem to be solved. Summary of the Invention

[0005] The present invention provides a scenario generation method, device, equipment, medium and product to solve the problem of how to predict and analyze business data affected by periodicity, realize the accurate decomposition of business data, and avoid the problem of inaccurate prediction and analysis caused by seasonal factor fluctuations.

[0006] According to one aspect of the present invention, a scenario generation method is provided, including:

[0007] Obtain business weekly data;

[0008] Perform time series decomposition on the business weekly data to obtain periodic weekly data and non-periodic weekly data;

[0009] Simulate the non-periodic weekly data through a first model to obtain a first simulation scenario; wherein, the first model is a stochastic model;

[0010] Simulate the periodic weekly data through a second model to obtain a second simulation scenario; wherein, the second model is a time series model;

[0011] Determine a target simulation scenario based on the first simulation scenario and the second simulation scenario.

[0012] According to another aspect of the present invention, a scenario generation device is provided, including:

[0013] A data acquisition module for obtaining business weekly data;

[0014] A data decomposition module, configured to perform time series decomposition on the business weekly data to obtain periodic weekly data and aperiodic weekly data;

[0015] A first simulation module, configured to simulate the aperiodic weekly data through a first model to obtain a first simulation scenario; wherein, the first model is a stochastic model;

[0016] A second simulation module, configured to simulate the periodic weekly data through a second model to obtain a second simulation scenario; wherein, the second model is a time series model;

[0017] A target simulation scenario determination module, configured to determine a target simulation scenario based on the first simulation scenario and the second simulation scenario.

[0018] According to another aspect of the present invention, there is provided an electronic device, including:

[0019] At least one processor; and

[0020] A memory communicatively connected to the at least one processor; wherein,

[0021] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the scenario generation method according to any embodiment of the present invention.

[0022] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the scenario generation method according to any embodiment of the present invention when executed.

[0023] According to another aspect of the present invention, there is provided a computer program product including a computer program, and when the computer program is executed by a processor, it implements the scenario generation method according to any embodiment of the present invention.

[0024] The technical solution of the embodiment of the present invention is to obtain business weekly data; perform time series decomposition on the business weekly data to obtain periodic weekly data and aperiodic weekly data; simulate the aperiodic weekly data through a first model to obtain a first simulation scenario; simulate the periodic weekly data through a second model to obtain a second simulation scenario; determine a target simulation scenario based on the first simulation scenario and the second simulation scenario. The above technical solution solves the problem of how to perform predictive analysis on business data affected by periodicity, realizes precise decomposition of business data, and avoids inaccurate predictive analysis caused by fluctuations in seasonal factors.

[0025] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0027] Figure 1 is a flowchart of a scenario generation method provided according to an embodiment of the present invention;

[0028] Figure 2 is a flowchart of decomposing business weekly data adopted according to an embodiment of the present invention;

[0029] Figure 3 is a flowchart of a scenario generation method provided according to an embodiment of the present invention;

[0030] Figure 4 is a flowchart of a target model processing method adopted according to an embodiment of the present invention;

[0031] Figure 5 is a schematic structural diagram of a scenario generation device provided according to an embodiment of the present invention;

[0032] Figure 6 is a schematic structural diagram of an electronic device for implementing the scenario generation method of the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0033] In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, rather than all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0034] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein.

[0035] In addition, it should be noted that in the technical solution of the present invention, the collection, storage, use, processing, transmission, provision, and disclosure of business weekly data and the like comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0036] Figure 1 The flowchart of a scenario generation method is provided for an embodiment of the present invention. The embodiment of the present invention is applicable to the situation of trend prediction of business data, especially applicable to the situation of stock return prediction in the financial field; this method can be executed by the scenario generation device provided by the embodiment of the present invention, and the scenario generation device can be implemented in the form of hardware and / or software, and the scenario generation device can be configured in a server. As Figure 1 shown, the method includes:

[0037] S110. Obtain business weekly data.

[0038] Among them, the business weekly data is the business data points of the target business in each week, which is to summarize or statistically process the original business data on a weekly basis to form the business data points of each week; the target business can be a business that is easily affected by seasonal cycles, such as electricity data, stock dividend income in the financial field, advertising placement and other businesses.

[0039] Specifically, obtain the business data value of the target business within a preset period and the corresponding period of this data value as the business weekly data.

[0040] In a preferred embodiment of the present invention, the target business is preferably dividend income; then its business data is the stock return rate, and the business weekly data is the weekly data corresponding to the dividend return rate; then the weekly data of the CSI 300 total return index and the CSI 300 index can be obtained from the wind database, and the difference between their weekly data is calculated as the business weekly data.

[0041] S120. Perform time series decomposition on the business weekly data to obtain periodic weekly data and non-periodic weekly data.

[0042] Among them, the periodic weekly data is the periodic data in the business data affected by seasonality; the non-periodic weekly data is the non-periodic data in the business data; since the target business may be affected by seasonal factors, each business weekly data thereof can be divided into periodic weekly data and non-periodic weekly data.

[0043] Specifically, perform time series decomposition on the business weekly data, and then it can be decomposed according to seasonality to obtain the corresponding periodic weekly data and non-periodic weekly data.

[0044] Preferably, in the embodiments of the present invention, STL (Seasonal and Trend decomposition using Loess), a time series decomposition method using local weighted regression as a smoothing method, is adopted. The corresponding weekly business data is a set of the following three data components:

[0045] Y(t) = T(t) + S(t) + R(t)

[0046] Among them, Y(t) is the weekly business data, T(t) is the trend component data, S(t) is the periodic weekly data, and R(t) is the residual term.

[0047] It can be understood that by adopting the STL time series decomposition method, the time series data can be effectively decomposed into three parts: trend, seasonality, and residuals, which can more accurately capture the periodic characteristics of the weekly business data, adapt to different lengths of seasonal cycles, and provide a more reliable basis for subsequent analysis and prediction of the weekly business data.

[0048] Optionally, as Figure 2 shown, a method for decomposing weekly business data using STL includes:

[0049] S121. Perform a moving average process on the weekly business data to obtain trend component data and non-trend component data.

[0050] Among them, the trend component data is the trend or direction linearly represented in the weekly business data; the non-trend component data is the component data in the weekly business data excluding the trend component data.

[0051] Specifically, by calculating the average value of the corresponding data values in the weekly business data within a preset period, the corresponding trend component data and non-trend component data are obtained. The calculation formula is as follows:

[0052]

[0053] Among them, T(t) is the trend component data, Y(t) is the weekly business data, q is the half-width of the window during moving average, and j is the window variable.

[0054] According to the difference between the trend component data and the weekly business data, the non-trend component data is determined. The calculation formula is as follows:

[0055] D(t) = Y(t) - T(t)

[0056] Among them, D(t) is the non-trend component data.

[0057] In an alternative embodiment of the present invention, the half-width of the window during moving average processing can be set according to a preset period; for example, the half-width of the window can be defined according to the period expected by the user. If the expected period is 52, which is the number of periods in a year, the corresponding half-width of the window is 26. It should be noted that the setting of the half-width of the window in the embodiments of the present invention can be artificially preset according to actual needs, and the embodiments of the present invention do not specifically limit this.

[0058] S122. Smooth the non-trend component data to obtain the initial periodic weekly data.

[0059] Among them, the initial periodic weekly data is the prototype of the periodic weekly data, that is, the data result with periodicity preliminarily removed.

[0060] Specifically, the non-trend component data can be locally weighted regressed by using the cyclic subsequence smoothing method to obtain the initial periodic weekly data, and its calculation formula is as follows:

[0061]

[0062] Among them, C p (t) is the initial periodic weekly data, and ω i (t) is the weight parameter.

[0063] In an alternative embodiment of the present invention, the period can be a default value of 52, and the weight parameters are all determined according to the ratio of the current weekly data in the whole period. Its calculation formula is as follows:

[0064]

[0065] Among them, h is the default value of 52.

[0066] To keep the formula tidy, let

[0067]

[0068] S123. Perform low-pass filtering on the initial periodic weekly data to obtain the residual data.

[0069] Among them, the residual data is the trend residual data generated in each period.

[0070] Specifically, by performing low-pass filtering on the initial periodic weekly data, the corresponding residual data is obtained, and its calculation formula is as follows:

[0071]

[0072] Among them, L(t) is the residual data, and v i (t) is the weight parameter.

[0073] In an alternative embodiment of the present invention, the weight parameter is determined based on the ratio of the current weekly data to the entire cycle, and its calculation formula is as follows:

[0074]

[0075] where h is the default value of 54.

[0076] We let

[0077]

[0078] S124. Determine the cycle weekly data based on the difference between the initial cycle weekly data and the residual data.

[0079] Among them, the cycle weekly data is the data with periodic fluctuations in the business weekly data and repeats within a fixed cycle.

[0080] Specifically, determine the cycle weekly data according to the difference between the initial cycle weekly data and the residual data at the current weekly position, and its calculation formula is as follows:

[0081] S(t) = C p (t) - L(t)

[0082] where S(t) is the cycle weekly data.

[0083] S125. Determine the non-cycle weekly data based on the difference between the business weekly data and the cycle weekly data.

[0084] Specifically, determine the non-cycle weekly data according to the difference between the business weekly data and the cycle weekly data at the current weekly position, and its calculation formula is as follows:

[0085] Y′(t) = Y(t) - S(t)

[0086] where Y′(t) is the non-cycle weekly data.

[0087] It can be understood that by decomposing the business weekly data using STL, the cycle weekly data is removed, avoiding the influence of periodicity on business data during subsequent scenario prediction.

[0088] In an alternative embodiment of the present invention, the above decomposition operation of the business weekly data can be iteratively processed multiple times. After each iteration, new weights will be assigned to each business data value according to the size of the residual data, gradually reducing the influence of outliers on the decomposition result. For example, when it is detected that the residual of a certain business data point is extremely large, then this weekly data point will be given a smaller weight in the next iteration.

[0089] It is understandable that by iteratively optimizing and decomposing the weekly business data, the robustness to outliers is enhanced, and the interference of outliers on the periodicity of business data is further reduced.

[0090] S130. Simulate the aperiodic weekly data through a first model to obtain a first simulation scenario; wherein, the first model is a random model.

[0091] Wherein, the first simulation scenario is a trend chart of the target business in the future period.

[0092] Specifically, simulate the aperiodic weekly data through a random model to obtain a predicted trend chart corresponding to the target business.

[0093] In a preferred embodiment of the present invention, when the target business is stock dividend, the random model is preferably the Vasicek model, and the Vasicek model is used to describe the dynamic change of interest rate to realize the scenario simulation of the weekly data of dividend income.

[0094] S140. Simulate the periodic weekly data through a second model to obtain a second simulation scenario; wherein, the second model is a time series model.

[0095] Wherein, the second simulation scenario is a prediction chart of the target business in the future period.

[0096] Specifically, simulate the periodic weekly data through a time series model to obtain the predicted value of the target business in the future period.

[0097] S150. Determine the target simulation scenario based on the first simulation scenario and the second simulation scenario.

[0098] Wherein, the target simulation scenario is a trend chart of the business data value corresponding to the target business in the future period.

[0099] Specifically, combine the two parts of results to obtain the final stock dividend scenario:

[0100] Y simulation = y t + δ t

[0101] Wherein, Y simulation is the target simulation scenario, δ t is the first simulation scenario, y t is the second simulation scenario.

[0102] In a preferred embodiment of the present invention, when the target business is stock dividend, the corresponding business data is the stock dividend yield rate, and the target simulation scenario is the economic scenario of stock dividend.

[0103] It is understandable that by decomposing the weekly business data and introducing the prediction of the periodic weekly data, the periodic changes in the data can be effectively captured, ensuring the accuracy of the generation of the target simulation scenario.

[0104] In the technical solution of the embodiment of the present invention, weekly business data is obtained; the time series decomposition is performed on the weekly business data to obtain periodic weekly data and aperiodic weekly data; the aperiodic weekly data is simulated through a first model to obtain a first simulation scenario; the periodic weekly data is simulated through a second model to obtain a second simulation scenario; and the target simulation scenario is determined based on the first simulation scenario and the second simulation scenario. The above technical solution solves the problem of the impact of periodic data on the business, realizes the accurate capture of the periodic changes in the business data, ensures the accuracy of the generation of the prediction scenario, and avoids inaccurate judgment of the prediction scenario corresponding to the business data due to the failure to consider the impact of periodicity on the scenario prediction.

[0105] Figure 3 It is a flowchart of a scenario generation method provided by an embodiment of the present invention. Based on the above embodiment, the present invention embodiment supplements the specific simulation methods for the periodic weekly data and the aperiodic weekly data. It should be noted that for the parts not detailed in the embodiment of the present invention, reference can be made to the relevant descriptions of other embodiments. As Figure 3 shown, the method includes:

[0106] S210. Obtain weekly business data.

[0107] S220. Perform time series decomposition on the weekly business data to obtain periodic weekly data and aperiodic weekly data.

[0108] S230. Perform time series discretization processing on the first model based on a preset time step to obtain a time series discrete model.

[0109] Among them, the time series discrete model is the first model after time series discretization processing.

[0110] Specifically, the first model can be the Vasicek model, and the continuous form expression of this model is:

[0111] dδ t = k(θ - δ t )dt + σdW t

[0112] Among them, δ t is the business data value at time t, k is the mean reversion speed, θ is the long-term mean, σ is the volatility, and dW t is a standard Brownian motion.

[0113] The aperiodic weekly data is discrete time series data, and the first model needs to be discretized in time series. According to the preset time step, the discretization processing expression of the business data value within the preset time step interval is as follows:

[0114]

[0115] where Δt is the preset time step.

[0116] It can be understood that by discretizing the first model in time series, the first model can be converted from a continuous time model to a discrete time model, enabling it to be applicable to actual discrete time data, thereby better matching and analyzing real data and improving the simulation efficiency of subsequent models.

[0117] S240. Process the initial model parameters of the time series discrete model based on historical aperiodic weekly data to obtain the target model.

[0118] Among them, the historical aperiodic weekly data is the historical aperiodic weekly data of the target business, and the initial model parameters are the mean reversion speed, long-term mean, and volatility of the first model.

[0119] Specifically, re-estimate and calibrate the initial model parameters of the time series discrete model based on historical aperiodic weekly data to obtain the target model.

[0120] Optionally, as Figure 4 shown in a target model processing method, including:

[0121] S241. Construct a log-likelihood function using maximum likelihood estimation.

[0122] Among them, maximum likelihood estimation is used for probability model parameter estimation, and the log-likelihood function is the natural logarithm of the likelihood function, which is used to simplify calculations.

[0123] Specifically, according to the maximum likelihood estimation function, take the natural logarithm to construct the corresponding log-likelihood function, and the specific expression is as follows:

[0124]

[0125] It can be understood that by constructing the log-likelihood function, it can have good statistical properties in large samples and improve the efficiency of data processing.

[0126] S242. Estimate the initial model parameters of the time series discrete model by maximizing the log-likelihood function to obtain the estimated model.

[0127] Among them, the estimated model is a stochastic model after re-estimating the model parameters in the time series discrete model.

[0128] Specifically, the L-BFGS-B optimization algorithm can be used to optimize the log-likelihood function, ensuring that on the premise that all initial model parameters are greater than 0, the parameter values that maximize the log-likelihood function are efficiently found as parameter estimates, and the initial model parameters of the time series discrete model are replaced with the estimates to obtain an estimated model.

[0129] In a preferred embodiment of the present invention, the optimize.minimize function in the Scipy library in Python can be used to maximize the log-likelihood function, realizing the rapid processing of optimization problems with constraints.

[0130] It can be understood that by maximizing the log-likelihood function to obtain the estimated values of the model parameters, the accuracy of accurately extracting the model parameters from the business data is achieved, and for large sample data, the statistical properties of the data are improved.

[0131] S243. Calibrate the parameters of the estimated model through a preset parameter calibration mechanism and historical non-periodic weekly data to obtain a target model.

[0132] Among them, the preset parameter calibration mechanism is a parameter calibration mechanism based on investors' expectations, and the target model is the first model after re-estimating and calibrating the model parameters in the first model.

[0133] Specifically, calibrate the parameters of the estimated model through a parameter calibration mechanism based on investors' expectations and historical non-periodic weekly data to obtain a target model.

[0134] It can be understood that since maximizing the log-likelihood function value is calibrated for historical prediction data, which is not accurate for the prediction scenario, a parameter calibration mechanism based on investors' expectations is introduced to adjust the long-term mean parameters, making the subsequent scenario simulation meet investors' expectations.

[0135] Optionally, calibrating the parameters of the estimated model through a preset parameter calibration mechanism and historical non-periodic weekly data to obtain a target model includes:

[0136] Convert the historical non-periodic weekly data into historical non-periodic annual data to obtain the predicted expected value and the predicted variance value;

[0137] Through the preset parameter calibration mechanism, minimize the log-likelihood function based on the predicted expected value and the predicted variance value to obtain the target model.

[0138] Among them, the historical non-periodic annual data is the business data value summarized in years, the predicted expected value is the expected value corresponding to the historical non-periodic data, and the predicted variance value is the variance value corresponding to the historical non-periodic data.

[0139] Convert historical non-periodic weekly data into historical non-periodic annual data, and calculate the predicted expected value and predicted variance value. The specific calculation method is as follows:

[0140]

[0141] Among them, is the predicted expected value, is the predicted variance value.

[0142] It should be noted that to convert weekly data into annual data, it can be done by addition or taking the average. Relevant technical personnel can choose according to their own needs, and this embodiment of the present invention does not specifically limit it.

[0143] If the preset parameter calibration mechanism is a parameter calibration mechanism based on investors' expectations, then set the target expected value and target variance value according to the actual needs of relevant technical personnel. Minimize the log-likelihood function according to the target expected value, target variance value, predicted expected value, and predicted variance value. The corresponding calculation method is as follows:

[0144]

[0145] Among them, G1 is the target expected value, G2 is the target variance value, and ω1, ω2 are input parameters.

[0146] By setting the target expected value and target variance value actually expected by technical personnel, and using the L-BFGS-B optimization algorithm to minimize and optimize the log-likelihood function, the calibrated model parameters are obtained.

[0147] It can be understood that for the parameter calibration of a stochastic model, historical data is often only used, resulting in the scenarios simulated by the model being easily affected by historical data. By introducing a preset parameter calibration mechanism and setting the target expected value and target variance value expected by investors, the calibrated model parameters obtained by minimizing the objective function are more in line with the actual data, narrowing the gap between the output of the target model and the actual market value, and improving the prediction reliability.

[0148] In an alternative embodiment of the present invention, before obtaining the predicted expected value and predicted variance value, it also includes obtaining the historical expected value and historical variance value corresponding to the historical non-periodic weekly data. The specific calculation method is as follows:

[0149] E[δ t |δ t-1 =δ t-1 e -kΔt +θ(1 - e -kΔt )

[0150]

[0151] Among them, E[δ t |δ t-1 is the historical expected value, and V[δ t |δ t-1 is the historical variance value.

[0152] S250. Simulate the aperiodic weekly data based on the target model, the first simulation scenario.

[0153] Specifically, input the aperiodic weekly data into the target model to obtain the first simulation scenario, that is, the trend chart of the aperiodic weekly data under the target business.

[0154] S260. Simulate the periodic weekly data through the second model to obtain the second simulation scenario; among them, the second model is a time series model.

[0155] Among them, the second model is a time series model, preferably the SARIMA model. The second simulation scenario is the periodic prediction service data chart corresponding to the target business.

[0156] Specifically, the SARIMA(1,1,1)(1,1,1,52) model can be used to simulate the periodic weekly data, and its expression is as follows:

[0157] (1 - φB)(1 - ΦB 52 )×(1 - B)(1 - B 52 )yt = (1 + θB)(1 + ΘB 52 )×∈ t

[0158] Among them, φ is the autoregressive term coefficient, θ is the moving average coefficient, Φ is the first-order difference, B is the backshift operator, Φ is the seasonal autoregressive term coefficient, Θ is the seasonal moving average coefficient (SMA), and ∈ t is the white noise error term.

[0159] In an alternative embodiment of the present invention, the fitting of the SARIMA model can be implemented through the statsmodels library in Python, and finally the expression of the periodic weekly data with respect to time t is obtained, thereby completing the simulation of the second simulation scenario.

[0160] Optionally, simulating the periodic weekly data through the second model to obtain the second simulation scenario includes:

[0161] Judging whether the periodic weekly data triggers the noise enhancement mechanism based on a preset threshold;

[0162] If the periodic weekly data triggers the noise enhancement mechanism, then add noise to the periodic weekly data to obtain the noise-added periodic weekly data;

[0163] Simulate the noisy periodic weekly data through the second model to obtain a second simulated scenario.

[0164] Among them, the noise enhancement mechanism is to add noise to the periodic weekly data, and a preset threshold is set to determine whether to trigger the noise enhancement mechanism.

[0165] Specifically, if the periodic weekly data is compared with the preset target prediction threshold and is greater than the target prediction threshold, the noise enhancement mechanism is triggered; if it is less than the target prediction threshold, the noise enhancement mechanism is not triggered; if the noise enhancement mechanism is triggered, noise is added to the periodic weekly data to obtain the noisy periodic weekly data, and the noisy periodic weekly data is simulated through the second model to obtain a second simulated scenario.

[0166] S270. Determine the target simulated scenario based on the first simulated scenario and the second simulated scenario.

[0167] In the embodiment of the present invention, the model parameters of the first model are re-estimated and calibrated based on a preset parameter calibration mechanism. Compared with calibrating only according to the historical data of derivatives in the past, it can better meet the actual business needs and avoid the problem of inaccurate generation of simulated scenarios caused by calibrating model parameters only according to historical data.

[0168] Figure 5 FIG. is a schematic structural diagram of a scenario generation device provided by an embodiment of the present invention. The embodiment of the present invention is applicable to the situation of trend prediction of business data, especially applicable to the situation of revenue prediction in the economic field; the scenario generation device can be implemented in the form of hardware and / or software, and the scenario generation device can be configured in a server. The scenario generation device 300 includes a data acquisition module 310, a data decomposition module 320, a first simulation module 330, a second simulation module 340, and a target simulation scenario determination module 350.

[0169] The data acquisition module 310 is used to acquire business weekly data;

[0170] The data decomposition module 320 is used to perform time series decomposition on the business weekly data to obtain periodic weekly data and non-periodic weekly data;

[0171] The first simulation module 330 is used to simulate the non-periodic weekly data through the first model to obtain a first simulated scenario; among them, the first model is a stochastic model;

[0172] The second simulation module 340 is used to simulate the periodic weekly data through the second model to obtain a second simulated scenario; among them, the second model is a time series model;

[0173] The target simulation scenario determination module 350 is used to determine the target simulation scenario based on the first simulated scenario and the second simulated scenario.

[0174] In the technical solution of the embodiment of the present invention, weekly business data is obtained; the weekly business data is decomposed by time series to obtain periodic weekly data and aperiodic weekly data; the aperiodic weekly data is simulated by a first model to obtain a first simulation scenario; the periodic weekly data is simulated by a second model to obtain a second simulation scenario; and a target simulation scenario is determined based on the first simulation scenario and the second simulation scenario. The above technical solution solves the problem of the influence of periodic data on business data, realizes accurate capture of the periodic changes of business data, ensures the accuracy of the generated prediction scenario, and avoids inaccurate judgment of the corresponding prediction scenario of business data caused by not considering the influence of periodicity on scenario prediction.

[0175] Optionally, the data decomposition module 320 is specifically configured to perform a moving average process on the weekly business data to obtain trend component data and non-trend component data; perform a smoothing process on the non-trend component data to obtain initial periodic weekly data; perform a low-pass filter on the initial periodic weekly data to obtain residual data; determine the periodic weekly data according to the difference between the initial periodic weekly data and the residual data; and determine the aperiodic weekly data according to the difference between the weekly business data and the periodic weekly data.

[0176] Optionally, the first simulation module 330 includes:

[0177] A time series discrete model acquisition unit, configured to perform time series discretization processing on the first model based on a preset time step to obtain a time series discrete model;

[0178] A target model acquisition unit, configured to process the initial model parameters of the time series discrete model based on historical aperiodic weekly data to obtain a target model;

[0179] A simulation unit, configured to simulate the aperiodic weekly data based on the target model, the first simulation scenario.

[0180] Optionally, the target model acquisition unit includes:

[0181] A function construction subunit, configured to construct a log-likelihood function by using maximum likelihood estimation;

[0182] An estimated model acquisition subunit, configured to estimate the initial model parameters of the time series discrete model by maximizing the log-likelihood function to obtain an estimated model;

[0183] A target model acquisition subunit, configured to calibrate the parameters of the estimated model by using a preset parameter calibration mechanism and historical aperiodic weekly data to obtain a target model.

[0184] Optionally, the target model acquisition subunit is specifically configured to convert historical non-periodic weekly data into historical non-periodic annual data to obtain a predicted expected value and a predicted variance value; and perform a minimization process on the log-likelihood function based on the predicted expected value and the predicted variance value through a preset parameter calibration mechanism to obtain the target model.

[0185] Optionally, the second simulation module 340 is specifically configured to determine whether the periodic weekly data triggers a noise enhancement mechanism based on a preset threshold; if the periodic weekly data triggers the noise enhancement mechanism, add noise to the periodic weekly data to obtain the noise-added periodic weekly data; and simulate the noise-added periodic weekly data through a second model to obtain a second simulation scenario.

[0186] The scenario generation device provided by the embodiments of the present invention can execute the scenario generation method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

[0187] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium, and a computer program product.

[0188] Figure 6 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0189] As Figure 6 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0190] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0191] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the scenario generation method.

[0192] In some embodiments, the scenario generation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the scenario generation method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the scenario generation method by any other suitable means (e.g., by means of firmware).

[0193] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, the programmable processor can be a special or general-purpose programmable processor, can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0194] A computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0195] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0196] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0197] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend, middleware, or frontend components. The components of the system can be interconnected with each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0198] A computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs that run on respective computers and have a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0199] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and this is not limited herein.

[0200] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A scenario generation method, characterized in that, Including: Obtain weekly business data; Perform time series decomposition on the weekly business data to obtain periodic weekly data and aperiodic weekly data; Simulate the aperiodic weekly data through a first model to obtain a first simulation scenario; wherein, the first model is a stochastic model; Simulate the periodic weekly data through a second model to obtain a second simulation scenario; wherein, the second model is a time series model; Determine a target simulation scenario based on the first simulation scenario and the second simulation scenario.

2. The method according to claim 1, characterized in that, Performing time series decomposition on the weekly business data to obtain periodic weekly data and aperiodic weekly data includes: Perform moving average processing on the weekly business data to obtain trend component data and non-trend component data; Perform smoothing processing on the non-trend component data to obtain initial periodic weekly data; Perform low-pass filtering on the initial periodic weekly data to obtain residual data; Determine the periodic weekly data according to the difference between the initial periodic weekly data and the residual data; Determine the aperiodic weekly data according to the difference between the weekly business data and the periodic weekly data.

3. The method according to claim 1, characterized in that, Simulating the aperiodic weekly data through a first model to obtain a first simulation scenario includes: Perform time series discretization processing on the first model based on a preset time step to obtain a time series discrete model; Process the initial model parameters of the time series discrete model based on historical aperiodic weekly data to obtain a target model; Simulate the aperiodic weekly data based on the target model, and obtain a first simulation scenario.

4. The method according to claim 3, wherein processing the initial model parameters of the time series discrete model based on historical aperiodic weekly data to obtain a target model includes: Construct a log-likelihood function using maximum likelihood estimation; Estimate the initial model parameters of the time series discrete model by maximizing the log-likelihood function to obtain an estimated model; Calibrate the parameters of the estimated model through a preset parameter calibration mechanism and historical aperiodic weekly data to obtain a target model.

5. The method according to claim 4, wherein calibrating the parameters of the estimated model through a preset parameter calibration mechanism and the historical aperiodic weekly data to obtain a target model includes: Convert historical aperiodic weekly data into historical aperiodic annual data to obtain a predicted expected value and a predicted variance value; Minimize the log-likelihood function based on the predicted expected value and the predicted variance value through a preset parameter calibration mechanism to obtain a target model.

6. The method according to claim 1, wherein simulating the periodic weekly data through a second model to obtain a second simulation scenario includes: Judge whether the periodic weekly data triggers a noise enhancement mechanism based on a preset threshold; If the periodic weekly data triggers a noise enhancement mechanism, add noise to the periodic weekly data to obtain noise-added periodic weekly data; Simulate the noise-added periodic weekly data through the second model to obtain a second simulation scenario.

7. A scenario generation device, characterized in that Including: A data acquisition module for acquiring weekly business data; A data decomposition module for performing time series decomposition on the weekly business data to obtain periodic weekly data and aperiodic weekly data; A first simulation module for simulating the aperiodic weekly data through a first model to obtain a first simulation scenario; wherein, the first model is a stochastic model; A second simulation module for simulating the periodic weekly data through a second model to obtain a second simulation scenario; wherein, the second model is a time series model; A target simulation scenario determination module for determining a target simulation scenario based on the first simulation scenario and the second simulation scenario.

8. An electronic device, characterized in that, Comprising: One or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the scenario generation method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the scenario generation method as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program which, when executed by a processor, implements the scenario generation method according to any one of claims 1-6.