Event impact influence quantitative evaluation method, device, equipment and medium
By obtaining and fitting the timing data of regional research indicators, residual prediction and counterfactual situation construction are carried out, the problem of low accuracy of event impact assessment in the prior art is solved, and accurate quantitative evaluation of the impact of specific events is achieved.
Patent Information
- Application Number
- CN202411652584.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The accuracy of event impact assessment in the prior art is low, and it is impossible to fully and quantitatively analyze the impact of specific events on economic and social variables.
By obtaining the first and second time series data of regional research indicators, fitting and residual prediction are performed, counterfactual situations under the influence of event shocks are constructed, and the actual impact of event shocks is quantified. The specific steps include fitting the first time-series data, obtaining the fitted data and residual data, performing time-series prediction based on the residual data, synthesizing counterfactual prediction data, and finally comparing the counterfactual prediction data with the actual data, and quantitatively evaluating the impact of event impact.
It improves the accuracy of quantitative assessment of event shock effects, enables the construction of counterfactual situations, quantifies the actual impact of specific events on economic and social variables, and overcomes the limitations of traditional month-on-month and year-on-year analysis.
Smart Images

Figure CN119558715A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis technology, and in particular to a method, device, equipment and medium for quantitatively evaluating the impact of an event. Background Art
[0002] With the development of science and technology, data analysis technology continues to improve.
[0003] At present, quantitative assessment of the impact of a specific event on economic and social variables generally relies on simple comparative analysis of the month-on-month or year-on-year data, which is to compare the data after the impact with the data before the impact. For example, when studying the impact of Japan's nuclear wastewater discharge on Japan's foreign trade exports, relevant technologies generally use the year-on-year value of Japan's foreign trade exports before and after the discharge of nuclear wastewater to assess the impact of nuclear wastewater discharge on Japan's foreign trade exports.
[0004] However, the accuracy of event shock impact assessment of related technologies is low. Summary of the invention
[0005] The present invention provides a method, device, equipment and medium for quantitatively evaluating the impact of an event, so as to solve the defect of low accuracy in the evaluation of the impact of an event in the related art and improve the accuracy of the evaluation of the impact of an event.
[0006] In a first aspect, the present invention provides a method for quantitatively evaluating the impact of an event, comprising:
[0007] Acquire first time series data and second time series data corresponding to the regional research indicator, wherein the first time series data is the time series data before the regional research indicator is affected by the event impact, and the second time series data is the time series data after the regional research indicator is affected by the event impact;
[0008] Fitting the first time series data to obtain first fitting time series data corresponding to the first time series data and second fitting time series data corresponding to the second time series data;
[0009] Subtract the first fitting time series data from the first time series data to obtain first residual time series data;
[0010] Performing time series prediction based on the first residual time series data to obtain second residual time series data corresponding to the second fitting time series data;
[0011] Adding the second residual time series data to the second fitting time series data to obtain counterfactual prediction time series data;
[0012] The impact of the event shock is quantitatively evaluated based on the counterfactual prediction time series data and the second time series data.
[0013] Optionally, the first time series data includes the real index value of the regional research index at each time point in the period from the first time point to the time point when the event occurs, and the second time series data includes the real index value of the regional research index at each time point in the period from the second time point to the third time point;
[0014] The first time point is before the event occurrence time point, the second time point is adjacent to the event occurrence time point and after the event occurrence time point, and the third time point is after the second time point.
[0015] Optionally, fitting the first time series data to obtain first fitting time series data corresponding to the first time series data and second fitting time series data corresponding to the second time series data includes:
[0016] Input the first time series data into a trained seasonal linear regression model for fitting, so as to obtain the first fitting time series data and the second fitting time series data; wherein the linear regression model is obtained by training the linear regression model to be trained based on the sample time series data corresponding to the regional research indicator;
[0017] The performing time series prediction based on the first residual time series data to obtain second residual time series data corresponding to the second fitting time series data includes:
[0018] The first residual time series data is input into a trained time series prediction model for time series prediction to obtain second residual time series data corresponding to the second fitting time series data; wherein the time series prediction model is obtained by training a time series prediction model to be trained based on sample residual time series data.
[0019] Optionally, the seasonal linear regression model is a seasonal autoregressive integrated moving average model SARIMA, and the time series prediction model is a bidirectional long short-term memory network BiLSTM.
[0020] Optionally, the second time series data includes the real index value of the regional research index at N time points, and the counterfactual prediction time series data includes the predicted index value of the regional research index at the N time points;
[0021] The quantitatively evaluating the impact of the event according to the counterfactual prediction time series data and the second time series data includes:
[0022] For any of the time points, subtract the predicted index value at the time point from the real index value at the time point to obtain the residual value at the time point;
[0023] According to the residual value at each of the time points, an indicator loss value for evaluating the impact of the event shock is determined; wherein the indicator loss value is positively correlated with the intensity of the impact of the event shock.
[0024] Optionally, the indicator loss value is an absolute indicator loss value;
[0025] Determining the indicator loss value for evaluating the impact of the event according to the residual value at each time point includes:
[0026] The sum of the residual values at all the time points is calculated, and the sum is determined as the absolute indicator loss value for evaluating the impact of the event shock.
[0027] Optionally, the indicator loss value is a relative indicator loss value;
[0028] Determining the indicator loss value for evaluating the impact of the event according to the residual value at each time point includes:
[0029] Calculating a first sum of the residual values at all the time points, and calculating a second sum of the true indicator values at all the time points;
[0030] The first sum is divided by the second sum to obtain a corresponding quotient value as the relative indicator loss value.
[0031] In a second aspect, the present invention provides a device for quantitatively evaluating the impact of an event, comprising:
[0032] An acquisition unit, used to acquire first time series data and second time series data corresponding to the regional research indicator, wherein the first time series data is the time series data before the regional research indicator is affected by the event impact, and the second time series data is the time series data after the regional research indicator is affected by the event impact;
[0033] a fitting unit, configured to fit the first time series data to obtain first fitting time series data corresponding to the first time series data and second fitting time series data corresponding to the second time series data;
[0034] a subtraction unit, configured to subtract the first fitting time series data from the first time series data to obtain first residual time series data;
[0035] A prediction unit, configured to perform time series prediction based on the first residual time series data to obtain second residual time series data corresponding to the second fitting time series data;
[0036] an adding unit, configured to add the second residual time series data to the second fitting time series data to obtain counterfactual prediction time series data;
[0037] An evaluation unit is used to quantitatively evaluate the impact of an event according to the counterfactual prediction time series data and the second time series data.
[0038] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for quantitatively assessing the impact of an event according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0039] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for quantitatively assessing the impact of an event according to the first aspect or any corresponding embodiment thereof.
[0040] The quantitative assessment method, device, equipment and medium for the impact of event shocks provided by the present invention can obtain the first time series data and the second time series data corresponding to the regional research index, the first time series data is the time series data before the regional research index is affected by the event shock, and the second time series data is the time series data after the regional research index is affected by the event shock. Fit the first time series data to obtain the first fitting time series data corresponding to the first time series data and the second fitting time series data corresponding to the second time series data. Subtract the first fitting time series data from the first time series data to obtain the first residual time series data. Time series prediction is performed based on the first residual time series data to obtain the second residual time series data corresponding to the second fitting time series data. Add the second residual time series data to the second fitting time series data to obtain the counterfactual prediction time series data. According to the counterfactual prediction time series data and the second time series data, quantitatively assess the impact of the event shock. The present invention can construct a counterfactual scenario without the impact of the event shock, quantify the actual impact of a specific event on economic and social variables, and improve the accuracy of the quantitative assessment of the impact of the event shock. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 A flowchart of a method for quantitatively evaluating the impact of an event provided by an embodiment of the present invention;
[0043] Figure 2 A sample data partitioning schematic table provided in an embodiment of the present invention;
[0044] Figure 3A flowchart of another method for quantitatively evaluating the impact of an event provided by an embodiment of the present invention;
[0045] Figure 4 A comparison table of prediction performance of different models provided in an embodiment of the present invention;
[0046] Figure 5 A schematic diagram of the structure of a device for quantitatively evaluating the impact of an event provided by an embodiment of the present invention;
[0047] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] Combine the following Figure 1-Figure 4 The present invention describes the method for quantitatively evaluating the impact of an event.
[0050] like Figure 1 As shown, this embodiment proposes a first method for quantitatively evaluating the impact of an event, which may include the following steps:
[0051] S101. Obtain first time series data and second time series data corresponding to the regional research indicator, where the first time series data is the time series data before the regional research indicator is affected by the event shock, and the second time series data is the time series data after the regional research indicator is affected by the event shock.
[0052] Among them, the regional research indicator can be a research indicator in a certain research area. The research area can be a country, region, province, city or county, etc. The research indicator can be a parameter indicator in the research field. Specifically, the research indicator can be an economic indicator, such as regional gross domestic product, foreign trade export volume, total retail sales of social consumer goods, or total customs imports and exports. The research indicator can also be a parameter indicator in the fields of environmental change and policy evaluation. It should be noted that the regional research indicator can be specified by the technician according to actual needs, and this embodiment does not limit it.
[0053] It can be understood that both the first time series data and the second time series data may include the real indicator values of the regional research indicators at multiple consecutive time points.
[0054] Specifically, the event may be an event that will affect or even significantly change the indicator value of the regional research indicator. For example, when the regional research indicator is Japan's foreign trade export volume, the event may be Japan's discharge of nuclear wastewater.
[0055] Optionally, the first time series data includes the real index value of the regional research index at each time point in the period from the first time point to the time point when the event occurs, and the second time series data includes the real index value of the regional research index at each time point in the period from the second time point to the third time point.
[0056] Among them, the first time point is before the time point when the event occurs, the second time point is adjacent to the time point when the event occurs and after the time point when the event occurs, and the third time point is after the second time point.
[0057] Optionally, the first time series data may not include the real index value of the regional research index at the time point when the event occurs. Specifically, the first time series data may include the real index value of the regional research index at each time point in the period from the first time point to the target time point, and the target time point may be the Pth time point before the time point when the event occurs, and P may be 1 or greater than 1.
[0058] Optionally, the second time point may be non-adjacent to the time point at which the event occurs and may be after the time point at which the event occurs.
[0059] Optionally, the elements in the first time series data and the second time series data can also be obtained by preprocessing after obtaining the real indicator values at the corresponding time points in this embodiment. The preprocessing can specifically include processing methods such as cleaning abnormal values and normalization.
[0060] S102: Fit the first time series data to obtain first fitting time series data corresponding to the first time series data and second fitting time series data corresponding to the second time series data.
[0061] It should be noted that, in this embodiment, fitting the first time series data can obtain fitting index values at multiple consecutive time points. The fitting index value is the index value of the fitted regional research index.
[0062] Specifically, this embodiment may perform data fitting based on the first time series data to obtain first fitting time series data corresponding to the first time series data and second fitting time series data corresponding to the second time series data.
[0063] The first fitting time series data includes the fitting index value corresponding to the time point of the first time series data obtained after data fitting is performed based on the first time series data in this embodiment. The second fitting time series data includes the fitting index value corresponding to the time point of the second time series data obtained after data fitting is performed based on the first time series data in this embodiment.
[0064] For example, when the first time series data includes the real index value of the regional research index at each time point in the period from the above-mentioned first time point to the time point when the above-mentioned event occurs, and the second time series data includes the real index value of the regional research index at each time point in the period from the above-mentioned second time point to the above-mentioned third time point, at this time, the first fitting time series data includes the fitting index value of each time point in the period from the first time point to the time point when the event occurs after data fitting based on the first time series data is performed in this embodiment, and the second fitting time series data includes the fitting index value of each time point in the period from the second time point to the third time point after data fitting based on the first time series data is performed in this embodiment.
[0065] S103. Subtract the first fitting time series data from the first time series data to obtain first residual time series data.
[0066] It can be understood that the time point corresponding to the first time series data and the first fitting time series data is the same.
[0067] Specifically, in this embodiment, each element in the first time series data can be subtracted from the element at the corresponding time point in the first fitting time series data to obtain the element difference corresponding to different time points, and the element difference corresponding to different time points can be arranged to obtain the first residual time series data. For example, the first time series data is {A1, A2, A3}, the first fitting time series data is {B1, B2, B3}, A1 and B1 correspond to the same time point, A2 and B2 correspond to the same time point, and A3 and B3 correspond to the same time point. In this embodiment, A1 can be subtracted from B1 to obtain C1, A2 can be subtracted from B2 to obtain C2, and A3 can be subtracted from B3 to obtain C3. At this time, the first residual time series data is {C1, C2, C3}.
[0068] S104. Perform time series prediction based on the first residual time series data to obtain second residual time series data corresponding to the second fitting time series data.
[0069] Specifically, this embodiment can perform time series prediction based on the first residual time series data to obtain second residual time series data corresponding to the second fitting time series data.
[0070] It should be noted that the second residual time series data includes residual data corresponding to the time point of the second fitting time series data. The time point of the second residual time series data is the same as the time point of the second fitting time series data. The correspondence between the second residual time series data and the second fitting time series data can refer to the correspondence between the first residual time series data and the first fitting time series data, and will not be repeated here.
[0071] S105. Add the second residual time series data to the second fitting time series data to obtain counterfactual prediction time series data.
[0072] Specifically, this embodiment can add the elements at the same time point in the second residual time series data and the second fitting time series data to obtain the elements and values corresponding to different time points, and the elements and values corresponding to different time points can be arranged to obtain the counterfactual prediction time series data. For example, the second residual time series data is {D1, D2, D3}, and the second fitting time series data is {E1, E2, E3}. In this embodiment, D1 and E1 can be added to obtain F1, D2 and E2 can be added to obtain F2, and D3 and E3 can be added to obtain F3. The counterfactual prediction time series data is {F1, F2, F3}.
[0073] S106. Quantitatively evaluate the impact of the event shock based on the counterfactual prediction time series data and the second time series data.
[0074] Specifically, this embodiment can calculate a data value for evaluating the impact of an event shock based on the counterfactual prediction time series data and the second time series data.
[0075] Optionally, the second time series data includes the real index values of the regional research index at N time points, and the counterfactual prediction time series data includes the predicted index values of the regional research index at N time points. In this case, step S106 may include:
[0076] For any time point, the actual index value at that time point is subtracted from the predicted index value at that time point to obtain the residual value at that time point;
[0077] According to the residual value at each time point, the indicator loss value used to evaluate the impact of the event shock is determined; among them, the indicator loss value is positively correlated with the intensity of the event shock impact.
[0078] Specifically, in this embodiment, the residual value at a certain time point can be calculated according to the following formula.
[0079]
[0080] Among them, Impact t represents the residual value at time point t, represents the predicted index value at time point t, x t Represents the true indicator value at time point t.
[0081] Optionally, the indicator loss value is an absolute indicator loss value. In this case, the indicator loss value used to evaluate the impact of the event according to the residual value at each time point may include:
[0082] The sum of the residual values at all time points is calculated and determined as the absolute indicator loss value used to assess the impact of the event shock.
[0083] Specifically, in this embodiment, the absolute index loss value can be calculated by the following formula.
[0084]
[0085] Among them, Absolute Impact represents the absolute indicator loss value.
[0086] Optionally, the indicator loss value is a relative indicator loss value. In this case, the indicator loss value used to evaluate the impact of the event shock is determined based on the residual value at each time point, including:
[0087] Calculate a first sum of the residual values at all time points, and calculate a second sum of the true indicator values at all time points;
[0088] The first sum is divided by the second sum to obtain the corresponding quotient value and used as the relative indicator loss value.
[0089] Specifically, in this embodiment, the relative index loss value can be calculated by the following formula.
[0090]
[0091] Among them, Relative Impact represents the relative indicator loss value.
[0092] It should be noted that the absolute indicator loss value represents the absolute value of the indicator loss (increase) caused by the event impact over a period of time, while the relative indicator loss value represents the relative percentage of the indicator loss (increase) caused by the event impact over a period of time. This is a more accurate measurement than "year-on-year" or "month-on-month", because "year-on-year" or "month-on-month" directly uses the data of the previous year (month) to represent the situation at this point in time, while the indicator loss value is a counterfactual inference based on historical data. For example, when studying the impact of Japan's discharge of nuclear waste water on Japan's foreign trade exports, the relevant technology can only use the year-on-year (for example, the first half of 2024 compared with the first half of 2023) or month-on-month (for example, August 2023 compared with July 2024) decline in Japan's foreign trade exports after the discharge of nuclear waste water to estimate the impact of the shock. However, the export data may have an upward trend. Directly using the data of the previous year (month) to represent the situation at this point in time actually underestimates the export volume that should have been there at this point in time if there had been no shock, thereby further underestimating the impact of the discharge of nuclear waste water on exports, resulting in low accuracy. This embodiment can use historical export data to accurately predict the export volume that should have been there at this point in time, thereby obtaining an accurate estimate of the impact by comparing it with the actual export volume that was shocked.
[0093] It should also be noted that this embodiment can construct counterfactual scenarios without the impact of event shocks, quantify the actual impact of specific events on economic and social variables, overcome the defects of month-on-month and year-on-year analysis in related technologies, use historical data at a single time point to represent the limitations of future data, and improve the accuracy of quantitative assessment of event shock impacts. This embodiment can handle the complex dynamic characteristics caused by emergencies, especially in the face of nonlinear shocks and uncertain environments. It shows strong adaptability. This embodiment can not only be applied to event shock assessments of economic and social variables, but can also be widely used in multiple fields such as environmental changes and policy evaluation. Its flexibility and accuracy make it suitable for a variety of complex real-world scenarios, and can provide a more reliable quantitative basis for decision-making.
[0094] The quantitative assessment method of the impact of event shocks proposed in this embodiment can obtain the first time series data and the second time series data corresponding to the regional research indicator, the first time series data is the time series data before the regional research indicator is affected by the event shock, and the second time series data is the time series data after the regional research indicator is affected by the event shock. Fit the first time series data to obtain the first fitting time series data corresponding to the first time series data and the second fitting time series data corresponding to the second time series data. Subtract the first fitting time series data from the first time series data to obtain the first residual time series data. Time series prediction is performed based on the first residual time series data to obtain the second residual time series data corresponding to the second fitting time series data. Add the second residual time series data to the second fitting time series data to obtain the counterfactual prediction time series data. According to the counterfactual prediction time series data and the second time series data, quantitatively assess the impact of the event shock. This embodiment can construct a counterfactual scenario without the impact of the event shock, quantify the actual impact of a specific event on economic and social variables, and improve the accuracy of the quantitative assessment of the impact of the event shock.
[0095] In related technologies, quantitative assessment of the impact of specific events on economic and social variables mainly relies on simple comparative analysis of month-on-month or year-on-year data. Although related technologies can reflect certain trends and changes, they lack sufficient predictive capabilities, especially in complex environments, and cannot accurately quantify the differences before and after the event impact, because they rely too much on historical data and fail to take into account the suddenness of events and their nonlinear impact on variables.
[0096] Time series forecasting models in related technologies, such as the autoregressive moving average model and the seasonal autoregressive integrated moving average model, have certain advantages in processing time series data, but they still have limitations when dealing with complex event shocks. These models usually assume that the data is stationary and have difficulty handling highly complex nonlinear relationships. In addition, traditional models cannot fully utilize multidimensional data or dynamic characteristics, so their prediction accuracy is limited when facing complex economic and social systems.
[0097] In recent years, machine learning technology, especially deep learning models (such as long short-term memory artificial neural networks and bidirectional long short-term memory networks) have gradually been introduced into the field of time series analysis, solving the limitations of traditional statistical models in processing nonlinear and complex data. However, a single machine learning model often fails to achieve optimal results when processing time series containing trend and periodic characteristics.
[0098] The combination of machine learning and statistical models in related technologies can improve the prediction effect of time series, but the research mainly focuses on the prediction accuracy and lacks counterfactual analysis and quantitative evaluation of event impacts. This limitation makes it impossible for existing technologies to comprehensively and quantitatively analyze the impact of specific events on economic and social variables.
[0099] Therefore, how to construct a hybrid model that combines the linear advantages of statistical models and the nonlinear processing capabilities of machine learning to establish a model that can perform counterfactual inferences and quantitatively analyze event shocks, so as to improve the accuracy of quantitative assessment of the impact of event shocks, is an urgent problem that needs to be solved.
[0100] based on Figure 1 This embodiment proposes a second method for quantitatively evaluating the impact of an event. In this method, step S102 may include:
[0101] The first time series data is input into the trained seasonal linear regression model for fitting to obtain first fitting time series data and second fitting time series data; wherein the linear regression model is obtained by training the linear regression model to be trained based on the sample time series data corresponding to the regional research indicators.
[0102] The first time series data is input into the trained seasonal linear regression model for fitting to obtain first fitting time series data and second fitting time series data; wherein the linear regression model is obtained by training the linear regression model to be trained based on the sample time series data corresponding to the regional research indicators.
[0103] Step S104 may include:
[0104] The first residual time series data is input into the trained time series prediction model for time series prediction to obtain second residual time series data corresponding to the second fitting time series data; wherein the time series prediction model is obtained by training the time series prediction model to be trained based on the sample residual time series data.
[0105] Optionally, the seasonal linear regression model is a seasonal autoregressive integrated moving average model (SARIMA), and the time series forecasting model is a bidirectional long short-term memory network (BiLSTM).
[0106] The inventors of the present invention have found that economic and social factors in reality usually show the characteristics of seasonal time series due to various natural or social factors, including linear and nonlinear elements, which makes conventional predictions challenging. In order to solve this problem, the seasonal autoregressive integrated moving average model (SARIMA) can be used to extract linear features first, and then the bidirectional long short-term memory network (Bidirectional Long Short-Term Memory, BiLSTM) model can be used to capture nonlinear features. Based on this hybrid model, the impact of specific event shocks on economic and social indicators is calculated.
[0107] The quantitative assessment method for the impact of other event shocks proposed in this embodiment may include steps such as data preprocessing, model selection and construction, hybrid model construction, counterfactual inference, evaluation and output.
[0108] Specifically, in the data preprocessing of this embodiment, first, the original time series data is read and cleaned to remove outliers and missing values. The time point p when the event impact occurs is determined, and the data is divided into two parts before and after the event. For the data before the event, it is divided into a training set and a test set in a ratio of 4:1. The normalization method is used to standardize the data in order to improve the convergence speed and stability of the model.
[0109] Specifically, in the model selection and construction of this embodiment, regarding the linear part, the seasonal autoregressive integrated moving average (SARIMA) model can be used to extract linear features in time series data. First, determine whether the time series is stationary. If it does not meet the requirements, perform differential processing on it. Use the autocorrelation function and partial autocorrelation function graph to identify the model type. Use the Akaike information criterion to select appropriate parameters to minimize the model fitting error. Draw a time series decomposition diagram and perform residual analysis on the data to verify the applicability of the SARIMA model. Specifically, in the nonlinear part of this embodiment, the residuals generated by the SARIMA model can be input into the BiLSTM model to capture the nonlinear features in the time series.
[0110] Specifically, in the hybrid model construction of this embodiment, the linear part results generated by the SARIMA model can be combined with the nonlinear output of the BiLSTM model to form a SARIMA-BiLSTM hybrid model. The hybrid model can handle complex nonlinear and trend changes, thereby effectively capturing the global and local characteristics of event impacts.
[0111] Specifically, in the counterfactual inference of this embodiment, a counterfactual simulation in the absence of event shocks can be constructed, that is, assuming the changing trend of key variables in the absence of event impacts. By comparing the actual observed values and the counterfactual predicted values, the true impact effect of the event can be quantitatively analyzed.
[0112] Specifically, in the evaluation and output of this embodiment, the output of the model can be compared with the actual observed values, the absolute and relative errors can be calculated, and the accuracy of the model can be evaluated. The total impact of the event shock can be calculated, including the absolute impact and the relative impact, providing a basis for decision-making.
[0113] This embodiment proposes a hybrid model SARIMA-BiLSTM, which can not only consider linear and non-linear trends, but also incorporate the seasonal characteristics of the data, and maximize the use of available data through a bidirectional structure, having a wider applicability. The input of the model can be the economic and social time series data including the main research (such as the monthly data of Japan's foreign export trade) x t and one or more other covariate data (here considering the data that is likely to affect x t in a realistic sense. For example, the exchange rate is likely to affect trade, so when studying Japan's foreign export trade, the yen exchange rate data is used as a covariate). Before the data is input into the model, preprocessing is required, including removing outliers, filling in missing values using linear interpolation, and performing normalization processing to improve the stability and speed of training. Assuming that the event causes a shock at t = p (such as the impact of Japan's discharge of nuclear wastewater in August 2023 on Japan's foreign trade), the starting point of the historical data is t0 (for example, having monthly data of Japan's foreign trade exports since 2010, then t0 is January 2010), and the data set within the time range t0 ≤ t < p is divided into a training set and a test set according to 4:1, and the starting point of the test set is denoted as t1. Therefore, all data can be divided into three parts, as Figure 2 shown.
[0114] The linear and non-linear parts of the variables of main concern can be expressed as:
[0115] x t = L t + N t + ε t , t ≥ t0.
[0116] Among them, L t represents the linear trend of the data at time t, N t represents the non-linear trend of the data at time t, and ε t is the error term. This embodiment can be divided into two steps. The first step is to use historical data for prediction, and the second step is to calculate the difference between the counterfactual predicted value obtained in the first step and the true value to calculate the impact of the event shock.
[0117] Specifically, this embodiment can use historical data for prediction. The input for this part is the original values of economic and social and covariate data where t0 ≤ t < p. To cover linear and non - linear trends, SARIMA and BiLSTM are combined into a SARIMA - BiLSTM hybrid model to achieve better prediction results. The SARIMA method takes the original value x t of an economic and social indicator (such as the value of foreign trade exports) as input and outputs an estimate of the linear trend and the residual u t , to capture the linear pattern in the time series.
[0118]
[0119] BiLSTM is then used to capture the non - linear trend. The calculation of the estimate of the non - linear trend at time t2 is as follows:
[0120]
[0121] Here, t is a certain moment after the test set, X T represents the S×(t1 - t0) - dimensional input matrix of BiLSTM, which contains the residual u t and the data of S - 1 covariates within the time range t0 ≤ t < t1.
[0122] During the training process of the BiLSTM model, the mean squared error MSE is used as the loss function. K - fold cross - validation is used to enhance the reliability of the estimate and improve the generalization ability, and K = 10 is set according to empirical values. In addition, the early stopping method is adopted to prevent overfitting. The number of iterations is initially set to 500 and can be adjusted according to the specific data situation. The optimization objective can be described as:
[0123]
[0124] where, N k is the number of samples in the training set, and represent the true value and the estimated value of the l - th sample point in the k - th fold validation process respectively. Through the iterative calculation of the model and the evaluation of the model's performance in the test set, the optimal parameters are obtained, and then the counterfactual prediction of the economic and social variables after the event shock is given
[0125]
[0126] Here t represents a certain moment after the event shock, and the counterfactual prediction value of the economic and social variables at time t is the estimate of the linear trend at this time and nonlinear trends A linear combination of .
[0127] Specifically, this embodiment can calculate the impact based on the difference between the actual data and the counterfactual prediction. Based on the counterfactual prediction obtained in the previous step, the impact of the event impact can be output based on the original value of the input and the difference therewith:
[0128]
[0129] Among them, x t represents the true value at time t, Represents the predicted value at time t, Impact t That is, the impact estimated at time t, and then the total absolute indicator loss value and relative indicator loss value caused by the event impact on economic and social variables over a period of time can be output.
[0130] like Figure 3 As shown, this embodiment can quantitatively evaluate the impact of an event on regional economic indicators, such as the impact of Japan's nuclear wastewater discharge on its foreign trade exports. Specifically, this embodiment can obtain the original value x of economic and social data within the target research period t , such as the real indicator value of Japan's foreign trade export volume at each time point in the target research period. Afterwards, this embodiment can perform data preprocessing, including outlier cleaning and normalization processing, to obtain preprocessed data values, that is, the first time series data and the second time series data corresponding to the regional research indicators can be obtained, such as the first time series data and the second time series data corresponding to Japan's foreign trade export volume. The preprocessed data values are input into the trained SARIMA for fitting to obtain the first fitting time series data corresponding to the first time series data and the second fitting time series data corresponding to the second time series data. Subtract the first fitting time series data from the first time series data to obtain the first residual time series data u t , perform data preprocessing on the index values of covariates such as the Japanese yen exchange rate data in the target research period, obtain the preprocessed covariate time series data, and combine the covariate time series data and the first residual time series data u t Input into the trained BiLSTM model for time series prediction to obtain the second residual time series data corresponding to the second fitting time series data Afterwards, this embodiment can convert the second residual time series data into Fitting the time series data with the second Add together to get the counterfactual prediction time series data, that is, the predicted value of economic and social data Construct counterfactual inferences to evaluate the real impact of event shocks (such as the impact of Japan's nuclear wastewater discharge on its foreign trade exports). Among them, this embodiment can quantitatively calculate the absolute impact (i.e., the absolute indicator loss value) and the relative impact (i.e., the relative indicator loss value) to quantitatively evaluate the impact of event shocks.
[0131] Compared with related technologies, this embodiment can realize counterfactual speculation and quantitative evaluation. By combining machine learning and statistical models, this embodiment can construct counterfactual scenarios without event shocks and quantify the actual impact of specific events on economic and social variables. This feature overcomes the limitations of traditional month-on-month and year-on-year analysis, which uses historical data at a single time point to represent future data, and provides a more scientific method for quantitative evaluation of event shocks.
[0132] This embodiment can improve the prediction accuracy. Specifically, this embodiment can significantly improve the accuracy of time series prediction by combining the trend and periodicity analysis advantages of statistical models such as SARIMA with the nonlinear processing capabilities of deep learning models such as BiLSTM. The statistical model is responsible for capturing the linear characteristics of the time series, while the machine learning model effectively handles the complex nonlinear dynamics therein. This hybrid model greatly reduces the error in predicting economic and social variables and improves the ability to predict changes before and after the impact of sudden events. Compared with a single model, the SARIMA-BiLSTM model used in this embodiment combines the advantages of statistical models and deep learning models in related technologies, and further improves the processing capabilities of seasonal characteristics of data compared to the original ARIMA-BiLSTM hybrid model, and maximizes the use of the time series information of the data through a bidirectional structure. This enables the present invention to maintain a high prediction accuracy when processing long-term data or limited data points, further reducing errors.
[0133] This embodiment can handle complex dynamic features. Specifically, this embodiment can handle complex dynamic features caused by sudden events, especially showing strong adaptability in the face of nonlinear shocks and uncertain environments. Compared with a single model, the hybrid model of this embodiment can more comprehensively capture the multi-dimensional impacts brought about by event shocks.
[0134] This embodiment has wide applicability. This embodiment is not only applicable to event impact assessment of economic and social variables, but can also be widely used in multiple fields such as environmental change and policy evaluation. Its flexibility and accuracy make it applicable to a variety of complex real-world scenarios and can provide a more reliable quantitative basis for decision-making.
[0135] The data utilization efficiency of this embodiment is high. This embodiment can efficiently process multi-dimensional data through machine learning algorithms, use large-scale data sets for training, and enhance the ability to predict and respond to unknown events. Compared with related technologies, the hybrid model of this embodiment can make full use of hidden information in historical data, thereby improving the reliability of analysis results.
[0136] Compared with related technologies, the quantitative assessment of event impacts in this embodiment is more accurate and adaptable, and can provide more efficient solutions for areas such as policy making and economic forecasting.
[0137] In practical applications, the inventors of the present invention predicted and evaluated 184 independent time series in a study on evaluating the impact of Japan's nuclear wastewater discharge on Japan's foreign trade. In order to demonstrate the comprehensive prediction performance of the hybrid model of this embodiment, the relative error, the median Med of the root mean square error coefficient of variation CVRMSE, and the median Med of the mean absolute percentage error MAPE were selected for evaluation. The most commonly used autoregressive moving average model in time series is used as the benchmark model, and the relative error is defined as:
[0138]
[0139] like Figure 4 As shown, the evaluation results of several single models and the hybrid model of this embodiment are shown. The SARIMA-BiLSTM model of this embodiment shows the best performance in all three evaluation criteria. Its lowest relative error indicates that the overall trade forecast error of the model is the smallest, while the lowest root mean square error coefficient of variation CVRMSE and mean absolute percentage error MAPE indicate that its relative error is also the smallest. Taken together, these results show that the SARIMA-BiLSTM model has good prediction performance and is the best choice for studying the impact of event shocks. Among them, SVR is the support vector machine regression model, ES is the exponential smoothing method, RelativeError is the relative error, and Med represents the median.
[0140] like Figure 5 As shown, this embodiment provides a device for quantitatively evaluating the impact of an event, including:
[0141] An acquisition unit 501 is used to acquire first time series data and second time series data corresponding to the regional research indicator, wherein the first time series data is the time series data before the regional research indicator is affected by the event impact, and the second time series data is the time series data after the regional research indicator is affected by the event impact;
[0142] A fitting unit 502, configured to fit the first time series data to obtain first fitting time series data corresponding to the first time series data and second fitting time series data corresponding to the second time series data;
[0143] A subtraction unit 503 is used to subtract the first fitting time series data from the first time series data to obtain first residual time series data;
[0144] A prediction unit 504, configured to perform time series prediction based on the first residual time series data to obtain second residual time series data corresponding to the second fitting time series data;
[0145] An adding unit 505, configured to add the second residual time series data to the second fitting time series data to obtain counterfactual prediction time series data;
[0146] The evaluation unit 506 is used to quantitatively evaluate the impact of the event according to the counterfactual prediction time series data and the second time series data.
[0147] It should be noted that the processing of the acquisition unit 501, the fitting unit 502, the subtraction unit 503, the prediction unit 504, the addition unit 505 and the evaluation unit 506 and the beneficial effects thereof can be respectively referred to in Figure 1 Steps S101 to S106 in the above are not described in detail.
[0148] Optionally, the first time series data includes the real index value of the regional research index at each time point in the period from the first time point to the time point when the event occurs, and the second time series data includes the real index value of the regional research index at each time point in the period from the second time point to the third time point;
[0149] Among them, the first time point is before the time point when the event occurs, the second time point is adjacent to the time point when the event occurs and after the time point when the event occurs, and the third time point is after the second time point.
[0150] Optionally, the fitting unit 502 is further configured to:
[0151] Input the first time series data into the trained seasonal linear regression model for fitting, so as to obtain the first fitting time series data and the second fitting time series data; wherein the linear regression model is obtained by training the linear regression model to be trained based on the sample time series data corresponding to the regional research indicator;
[0152] The prediction unit 504 is further configured to:
[0153] The first residual time series data is input into the trained time series prediction model for time series prediction to obtain second residual time series data corresponding to the second fitting time series data; wherein the time series prediction model is obtained by training the time series prediction model to be trained based on the sample residual time series data.
[0154] Optionally, the seasonal linear regression model is a seasonal autoregressive integrated moving average model (SARIMA), and the time series forecasting model is a bidirectional long short-term memory network (BiLSTM).
[0155] Optionally, the second time series data includes real index values of the regional research index at N time points, and the counterfactual prediction time series data includes predicted index values of the regional research index at N time points; the evaluation unit 506 is further used to:
[0156] For any time point, the actual index value at that time point is subtracted from the predicted index value at that time point to obtain the residual value at that time point;
[0157] According to the residual value at each time point, the indicator loss value used to evaluate the impact of the event shock is determined; among them, the indicator loss value is positively correlated with the intensity of the event shock impact.
[0158] Optionally, the index loss value is an absolute index loss value; the evaluation unit 506 is further used for:
[0159] The sum of the residual values at all time points is calculated and determined as the absolute indicator loss value used to assess the impact of the event shock.
[0160] Optionally, the index loss value is a relative index loss value; the evaluation unit 506 is further used to:
[0161] Calculate a first sum of the residual values at all time points, and calculate a second sum of the true indicator values at all time points;
[0162] The first sum is divided by the second sum to obtain the corresponding quotient value and used as the relative indicator loss value.
[0163] The quantitative assessment device for the impact of event shocks proposed in this embodiment can obtain the first time series data and the second time series data corresponding to the regional research index, the first time series data is the time series data before the regional research index is affected by the event shock, and the second time series data is the time series data after the regional research index is affected by the event shock. Fit the first time series data to obtain the first fitting time series data corresponding to the first time series data and the second fitting time series data corresponding to the second time series data. Subtract the first fitting time series data from the first time series data to obtain the first residual time series data. Time series prediction is performed based on the first residual time series data to obtain the second residual time series data corresponding to the second fitting time series data. Add the second residual time series data to the second fitting time series data to obtain the counterfactual prediction time series data. According to the counterfactual prediction time series data and the second time series data, quantitatively assess the impact of the event shock. This embodiment can construct a counterfactual scenario without the impact of the event shock, quantify the actual impact of a specific event on economic and social variables, and improve the accuracy of the quantitative assessment of the impact of the event shock.
[0164] The event impact quantitative assessment device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0165] The embodiment of the present invention also provides a computer device having the above Figure 5 The device shown is a quantitative assessment device for the impact of the event shock.
[0166] See also Figure 6 , a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0167] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0168] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0169] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0170] The memory 20 may include a volatile memory, such as a random access memory. The memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive. The memory 20 may also include a combination of the above-mentioned types of memory.
[0171] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0172] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A quantitative assessment method for the impact of an event, characterized in that: include: Acquire first time series data and second time series data corresponding to the regional research indicator, wherein the first time series data is the time series data before the regional research indicator is affected by the event impact, and the second time series data is the time series data after the regional research indicator is affected by the event impact; Fitting the first time series data to obtain first fitting time series data corresponding to the first time series data and second fitting time series data corresponding to the second time series data; Subtract the first fitting time series data from the first time series data to obtain first residual time series data; Performing time series prediction based on the first residual time series data to obtain second residual time series data corresponding to the second fitting time series data; Adding the second residual time series data to the second fitting time series data to obtain counterfactual prediction time series data; The impact of the event shock is quantitatively evaluated based on the counterfactual prediction time series data and the second time series data.
2. The method according to claim 1, characterized in that The first time series data includes the real index value of the regional research index at each time point in the period from the first time point to the time point when the event occurs, and the second time series data includes the real index value of the regional research index at each time point in the period from the second time point to the third time point; The first time point is before the event occurrence time point, the second time point is adjacent to the event occurrence time point and after the event occurrence time point, and the third time point is after the second time point.
3. The method according to claim 1, characterized in that The fitting of the first time series data to obtain first fitting time series data corresponding to the first time series data and second fitting time series data corresponding to the second time series data includes: Input the first time series data into a trained seasonal linear regression model for fitting, so as to obtain the first fitting time series data and the second fitting time series data; wherein the linear regression model is obtained by training the linear regression model to be trained based on the sample time series data corresponding to the regional research indicator; The performing time series prediction based on the first residual time series data to obtain second residual time series data corresponding to the second fitting time series data includes: The first residual time series data is input into a trained time series prediction model for time series prediction to obtain second residual time series data corresponding to the second fitting time series data; wherein the time series prediction model is obtained by training a time series prediction model to be trained based on sample residual time series data.
4. The method according to claim 3, characterized in that The seasonal linear regression model is the seasonal autoregressive integrated moving average model SARIMA, and the time series prediction model is the bidirectional long short-term memory network BiLSTM.
5. The method according to claim 1, characterized in that The second time series data includes the real index value of the regional research index at N time points, and the counterfactual prediction time series data includes the predicted index value of the regional research index at the N time points; The quantitatively evaluating the impact of the event according to the counterfactual prediction time series data and the second time series data includes: For any of the time points, subtract the predicted index value at the time point from the real index value at the time point to obtain the residual value at the time point; According to the residual value at each of the time points, an indicator loss value for evaluating the impact of the event shock is determined; wherein the indicator loss value is positively correlated with the intensity of the impact of the event shock.
6. The method according to claim 5, characterized in that The index loss value is an absolute index loss value; Determining the indicator loss value for evaluating the impact of the event according to the residual value at each time point includes: The sum of the residual values at all the time points is calculated, and the sum is determined as the absolute indicator loss value for evaluating the impact of the event shock.
7. The method according to claim 5, characterized in that The index loss value is a relative index loss value; Determining the indicator loss value for evaluating the impact of the event according to the residual value at each time point includes: Calculating a first sum of the residual values at all the time points, and calculating a second sum of the true indicator values at all the time points; The first sum is divided by the second sum to obtain a corresponding quotient value as the relative indicator loss value.
8. A device for quantitatively evaluating the impact of an event, characterized in that: include: An acquisition unit, used to acquire first time series data and second time series data corresponding to the regional research indicator, wherein the first time series data is the time series data before the regional research indicator is affected by the event impact, and the second time series data is the time series data after the regional research indicator is affected by the event impact; a fitting unit, configured to fit the first time series data to obtain first fitting time series data corresponding to the first time series data and second fitting time series data corresponding to the second time series data; a subtraction unit, configured to subtract the first fitting time series data from the first time series data to obtain first residual time series data; A prediction unit, configured to perform time series prediction based on the first residual time series data to obtain second residual time series data corresponding to the second fitting time series data; an adding unit, configured to add the second residual time series data to the second fitting time series data to obtain counterfactual prediction time series data; An evaluation unit is used to quantitatively evaluate the impact of an event according to the counterfactual prediction time series data and the second time series data.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the event impact quantitative assessment method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the event impact quantitative assessment method according to any one of claims 1 to 7.