Atmospheric carbon concentration prediction method and system based on multivariable data hysteresis detection and alignment method
Through the multivariate data hysteresis detection and alignment method, the hysteresis problem in the atmospheric carbon concentration prediction model is solved, significantly improving the prediction accuracy and model robustness.
Patent Information
- Application Number
- CN202411480436.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2024-12-31
AI Technical Summary
Existing atmospheric carbon concentration prediction models ignore the lag problems present in multivariable time series, especially when dealing with complex channel dependencies, resulting in low prediction accuracy.
The multivariate data hysteresis detection and alignment method is used to calculate the correlation coefficient through the rolling window, build a hysteresis relationship matrix, and align the multivariate time series data. The aligned data is obtained for training the atmospheric carbon concentration prediction model.
The accuracy of the atmospheric carbon concentration prediction model is significantly improved, the impact of hysteresis relationship on prediction is reduced, and the robustness and robustness of the model are improved.
Smart Images

Figure CN119227903A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of machine learning, deep learning and time series prediction, and in particular to a method and system for predicting atmospheric carbon concentration based on a multivariate data hysteresis detection and alignment method. Background Art
[0002] As the global carbon emission problem intensifies, the study of changes in the concentration of carbon products in the atmosphere has become increasingly important. Carbon dioxide (CO2) and methane (CH4), as the main greenhouse gases, have a profound impact on global climate change. XCO2 and XCH4 represent the concentrations of carbon dioxide and methane in the atmosphere, respectively, usually characterized by volume fractions. These parameters are crucial for monitoring and evaluating the global carbon cycle, climate change, and the impact of greenhouse gas emissions.
[0003] TCCON (Total Carbon Column Observing Network), as the most widely used and recognized monitoring network in the world, provides important data support. TCCON uses high-resolution infrared spectrometers to measure the total carbon column (XCO2 and XCH4) in the atmosphere through ground observation stations around the world. These measurement data provide researchers with an important reference for understanding the spatiotemporal changes of carbon gases in the atmosphere, helping to monitor greenhouse gas emissions and assess the global carbon cycle. Existing prediction models often ignore the hysteresis problem in multivariate time series, especially when dealing with complex channel dependencies. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides an atmospheric carbon concentration prediction method and system based on a multivariate data hysteresis detection and alignment method, the method comprising:
[0005] Step S1, using a rolling window method to calculate the changing trend of the correlation coefficient between the atmospheric carbon data variables over time using the multivariate time series data obtained by monitoring, and constructing a lag relationship matrix based on the changing trend;
[0006] Step S2, adjusting and aligning the multivariate time series data based on the lag relationship matrix to obtain aligned multivariate time series data;
[0007] Step S3, constructing and training an atmospheric carbon concentration prediction model based on the aligned multivariate time series data;
[0008] Step S4: Use the trained atmospheric carbon concentration prediction model to process the atmospheric carbon concentration data to be predicted that is acquired in real time to obtain a prediction result of the atmospheric carbon concentration.
[0009] Optionally, in step S1, the multivariate time series data obtained by monitoring is used in a rolling window manner to calculate the change trend of the correlation coefficient between the atmospheric carbon data variables over time, and the process of constructing a lag relationship matrix based on the change trend specifically includes:
[0010] Step S11: Set the main variable j window X of the multivariate time series data (j) t-L+1:t ={X (j) t-L+1 , ..., X (j) t}, covariate i window X (i) t-L+1:t ={X (i) t-L+1 , ..., X (i) t}, calculate the lagged rolling correlation score between the main variable j window and the covariate i window;
[0011] Step S12: Move the covariate window backward by one step and move the multivariate time series data rightward by one point, and construct a filling sequence x based on the moved covariate window and the moved multivariate time series data. (i)* ={x (i*) t-2L+1 , ..., x (i*) t-L};
[0012] Step S13, repeating steps S11 and S12 until the covariate window is completely moved out, and recording each lag rolling correlation score and the lag distance corresponding to the lag rolling correlation score;
[0013] Step S14, finding the maximum value from the hysteresis scrolling correlation score, and finding the alignment hysteresis distance corresponding to the hysteresis scrolling correlation score of the peak value;
[0014] Step S15: constructing a hysteresis relationship matrix based on the alignment hysteresis distance.
[0015] Optionally, in step S2, the process of adjusting and aligning the multivariate time series data based on the lag relationship matrix to obtain the aligned multivariate time series data specifically includes:
[0016] Based on the lagged relationship matrix, calculating the aligned lagged distance of each covariate relative to the main variable;
[0017] The covariate is adjusted based on the alignment lag distance until it is aligned with the main variable to obtain aligned multivariate time series data.
[0018] Optionally, the process of adjusting the covariate based on the alignment lag distance until the covariate is aligned with the main variable to obtain the aligned multivariate time series data specifically includes:
[0019] In the process of adjusting the covariates, the overflowed data on the right side are discarded, and the missing data on the left side are supplemented using the filling sequence;
[0020] An alignment lag distance for the covariate is determined to align the covariate with the primary variable.
[0021] The present invention discloses an atmospheric carbon concentration prediction system based on a multivariate data hysteresis detection and alignment method, the system comprising: a matrix construction module, a data alignment module, a model optimization module, and a carbon data prediction module;
[0022] The matrix construction module is used to use a rolling window method to calculate the changing trend of the correlation coefficient between the atmospheric carbon data variables over time using the multivariate time series data obtained by monitoring, and to construct a lag relationship matrix based on the changing trend;
[0023] The data alignment module is used to adjust and align the multivariate time series data based on the lag relationship matrix to obtain aligned multivariate time series data;
[0024] The model optimization module is used to construct and train an atmospheric carbon concentration prediction model based on the aligned multivariate time series data;
[0025] The carbon data prediction module is used to use the trained atmospheric carbon concentration prediction model to perform data processing on the atmospheric carbon concentration data to be predicted that is acquired in real time to obtain the prediction result of the atmospheric carbon data.
[0026] Optionally, the matrix construction module further includes: a rolling score calculation submodule, a filling sequence construction submodule, a lagged rolling record submodule, a lagged distance matching submodule and a relationship matrix construction submodule;
[0027] The rolling score calculation submodule is used to set the main variable j window X of the multivariate time series data (j) t-L+1:t ={X (j) t-L+1 , ..., X (j) t}, covariate i window X (i) t-L+1:t ={X (i) t-L+1 , ..., X (i) t}, calculate the lagged rolling correlation score between the main variable j window and the covariate i window;
[0028] The filling sequence construction submodule is used to move the covariate window backward by one step, move the multivariate time series data to the right by one point, and construct a filling sequence x based on the moved covariate window and the moved multivariate time series data. (i)* ={x (i*) t-2L+1 , ..., x (i*) t-L};
[0029] The hysteresis rolling recording submodule is used to repeat step S11-step S12 until the covariate window is completely moved out, and record each hysteresis rolling correlation score and the corresponding hysteresis value;
[0030] The hysteresis distance matching submodule is used to find the maximum value from the hysteresis rolling correlation score and find the alignment hysteresis distance corresponding to the hysteresis rolling correlation score of the front value;
[0031] The relationship matrix construction submodule is used to construct a lag relationship matrix based on the alignment lag distance.
[0032] Optionally, the data alignment module further includes: a compensation distance calculation submodule and a sequence data alignment submodule;
[0033] The compensation distance calculation submodule is used to calculate the alignment lag distance of each covariate relative to the main variable based on the lag relationship matrix;
[0034] The sequence data alignment submodule is used to adjust the covariate based on the alignment lag distance until it is aligned with the main variable to obtain aligned multivariate time series data.
[0035] Optionally, the workflow of the sequence data alignment submodule specifically includes:
[0036] In the process of adjusting the covariates, the overflowed data on the right side are discarded, and the missing data on the left side are supplemented using the filling sequence;
[0037] An alignment lag distance for the covariate is determined to align the covariate with the primary variable.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] Multivariate Rolling Lagged Correlation Detection-Alignment (MRLCD-A) Method: A novel Multivariate Rolling Lagged Correlation Detection-Alignment (MRLCD-A) method is proposed to mitigate the lagged relationships between variables in multivariate time series forecasting. The method first uses a multivariate cross-correlation algorithm to quantify the relationship between variables and determine the lag steps to detect rolling lagged correlations. Subsequently, a sliding window alignment technique is used to align the lagged variables. Three independent real-world carbon concentration datasets and publicly available time series forecast datasets are used to evaluate the atmospheric carbon concentration prediction model and system based on the multivariate rolling hysteresis detection and alignment method. The results show that the model using the MRLCD-A method significantly improves the state-of-the-art baseline. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0041] Figure 1 A method step diagram of the atmospheric carbon data prediction method according to an embodiment of the present invention;
[0042] Figure 2 This is a flowchart of the steps of the method for detecting rolling hysteresis of multivariate time series data according to an embodiment of the present invention;
[0043] Figure 3 A schematic diagram of a method for aligning lagged data of multivariate time series according to an embodiment of the present invention;
[0044] Figure 4 The present invention compares the atmospheric carbon concentration prediction results and ablation experiment results based on the multivariate data hysteresis detection and alignment method. Specific implementation methods
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0047] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0048] Embodiment 1
[0049] Atmospheric carbon data prediction method based on multivariate rolling hysteresis detection and alignment, such as Figure 1 As shown, specifically including:
[0050] Step S1: Using a rolling window method to monitor the multivariate time series data, calculate the time trend of the correlation coefficient between the atmospheric carbon data variables, and construct a lag relationship matrix based on the change trend.
[0051] Input multiple related time series data, such as environmental factors such as atmospheric temperature, humidity, wind speed, solar radiation, and atmospheric carbon data variables such as carbon dioxide and methane. Use a rolling window method to calculate the correlation between each variable and other variables, and obtain the trend of the correlation coefficient between each variable over time. According to the change of the correlation coefficient over time, determine the lag relationship between each variable and calculate their lag distance. Construct these lag distances into a lag relationship matrix to describe the lag between each variable, such as Figure 2 shown.
[0052] Step 1: Variable matching: Set the main variable j window X (j) t-L+1:t ={X (j) t-L+1 , ..., X (j) t}, covariate i window X (i) t-L+1:t ={X (i) t-L+1 , ..., X (i) t}, calculate correlation scores to identify potential lags. By calculating the correlation scores for each time point, potential lagged relationships are identified and corrected.
[0053] Step 2: Shift the covariate window backward and fill the sequence to construct x (i)* : Use the covariate window to construct the filling sequence inversely. Specifically, construct the filling sequence x (i)* ={x (i*) t-2L+1 , ..., x (i*) t-L}. These filling data maintain the consistency of the data and ensure the integrity and reliability of the model.
[0054] Step 3: Calculate the lagged rolling correlation score R i,t (j) (δ): In this step, the covariate sequence window is rolled back. At each step of the movement, based on the main variable window X (j) t-L+1:t ={X (j) t-L+1, ..., X (j) t} and covariate window X (i) t-L+1:t ={X (i) t-L+1 , ..., X (i) t} Calculate the lagged rolling correlation score R i,t (j) (δ). The specific process is as follows:
[0055] Step 1-1: Calculate the correlation score: For each step, calculate the main variable window X (j) t-L+1:t ={X (j) t-L+1 , ..., X (j) t} and covariate window X (i) t-L+1:t ={X (i) t-L+1 , ..., X (i) t}The hysteresis rolling correlation score R i,t (j) (δ). Calculate the correlation for all time points within the window and use the average as the score. Step 1-2: Window shift and fill: Shift the covariate window one step back, shift the data one point to the right, and fill in the sequence x(i) = x (i) t-2L+1 , ..., x (i*) t-L Add a point to maintain the sequence integrity. Step 1-3: Repeat the calculation: Repeat steps (S1-3-1) and (S1-3-2) until the covariate window is completely removed, such as Figure 4 As shown in N. Record the relevant score R i,t (j) (δ) and its corresponding lag value δ. Step 4: Match the lag distance with the maximum rolling correlation score: Determine the peak correlation score R i,t (j) (δ), t(δ) and the corresponding aligned lag distances.
[0056] Step S2: adjusting and aligning the multivariate time series data based on the lag relationship matrix to obtain aligned multivariate time series data.
[0057] According to the lag relationship matrix, the original multivariate time series data is adjusted and aligned to eliminate the time differences between variables. Fix the main variable sequence and adjust each covariate sequence to align with the main variable. During the adjustment process, discard the overflow data on the right side, and use the pre-built filling sequence to supplement the missing data on the left side. Determine the optimal alignment lag distance for each covariate, align all covariates to the main variable, ensure the time consistency between variables, and reduce the impact of lag on prediction accuracy. According to the correlation or other feature importance indicators, select the top K variables with the most significant leading and lagging relationship with the main variable as indicator variables. In multivariate time series forecasting, it is crucial to align the time series of different variables to eliminate the time differences between them. The following are the detailed steps for multivariate lag alignment, such as Figure 3 As shown:
[0058] Step 1: Determine the lag relationship matrix: First, by analyzing the lag relationship between the variables, a lag relationship matrix is constructed. This matrix reflects the time difference between the variables, that is, the optimal time lag of each covariate relative to the main variable. This matrix is usually obtained by calculating the lag correlation coefficient or cross-correlation method to quantify the time delay relationship between variables.
[0059] Step 2: Fix the main variable sequence: Select a main variable as the benchmark sequence, and the time points of this sequence will be used as the standard for alignment. The main variable sequence is usually the target variable for prediction or the variable that is most representative of other variables. Fixing the main variable sequence helps ensure consistency and accuracy during the alignment process.
[0060] Step 3: Adjust each covariate sequence: adjust each covariate sequence according to the lag relationship matrix. The specific steps include: Time alignment: adjust each covariate sequence to align with the time point of the main variable sequence. This means that if the optimal lag time of the covariate is t, the covariate sequence is moved to the right by t time points. Data processing: discard overflow data: discard covariates that exceed the range of the main variable sequence after adjustment. Fill missing data: use pre-built filling sequences to supplement the missing covariates caused by adjustment at the beginning of the main variable sequence. These filling sequences can be constructed based on the mean, median or other filling strategies of historical data.
[0061] Step 4: Determine the optimal alignment lag distance: Determine the optimal rolling distance for each covariate by evaluating the prediction accuracy of each covariate. This refers to the optimal lag amount for each covariate when it is aligned with the main variable. Cross-validation or other model evaluation methods are usually used to select the lag amount that best improves prediction accuracy.
[0062] Step 5: Align all covariates: Align all covariates to the main variable sequence according to their respective best alignment lag distances. This step ensures the temporal consistency between all variables in the multivariate prediction model, thereby reducing the impact of lag on prediction accuracy. The aligned dataset can be used as the input of the prediction model, reducing data noise caused by time differences.
[0063] Step 6: Select indicator variables: Based on correlation or other feature importance indicators, select the top K variables with the most significant leading and lagging relationship with the main variable as indicator variables. These indicator variables are the covariates that are most helpful in predicting the main variable, and their selection can be based on: Correlation analysis: Calculate the lagged correlation between each covariate and the main variable, and select the top K covariates with the highest correlation. Feature importance scoring: Use feature selection methods (such as feature importance scoring, mutual information metrics, etc.) to evaluate the contribution of each covariate and select the top K variables with the highest importance.
[0064] Step 7: Integrate the aligned data: Integrate the aligned covariates with the main variables to form a complete multivariate time series dataset. This dataset can be used for subsequent model training and prediction.
[0065] Step S3, construct and train an atmospheric carbon concentration prediction model based on the aligned multivariate time series data. The present invention is a plug-and-play plug-in that can be used in combination with an existing atmospheric carbon concentration prediction model, that is, the aligned multivariate time series data obtained in this embodiment is input into other atmospheric carbon concentration prediction models for use.
[0066] In view of the poor performance of common multivariate time series based channel-dependent methods, the present invention pays attention to the inherent hysteresis characteristics of multivariate carbon data, detects the degree of hysteresis and aligns accordingly. The aligned multivariate time series data is input into the model to allow the model to learn the dynamic relationship and long-term dependency between variables. Channel-based methods need to overcome the noise transmission problem of multiple channels, which makes the method more challenging in modeling and prediction than single-channel prediction, which is one of the possible reasons for the poor performance of channel-dependent methods. This problem is alleviated by hysteresis detection and alignment of multivariate data, thereby improving the robustness of channel-dependent prediction methods. In the experiment, the model parameters are optimized through training, so that the model can effectively capture the complex patterns between multivariate data and improve the prediction accuracy. The present invention proposes a novel method to solve the hysteresis problem by aligning variables before the prediction process. By alleviating the negative impact of hysteresis in advance, the embodiment of the present invention aims to improve the accuracy and robustness of predictions. Its main steps include:
[0067] Step 1: Rolling lag detection of multivariate time series data: In this step, rolling lag detection is first performed on the multivariate time series data. This process aims to identify and quantify the lag relationship between the target variable and other covariates. Specific methods include: Determine the lag step size: Determine the optimal lag step size by calculating the lag correlation between the target variable and each covariate. This step uses a rolling window technique to evaluate the correlation under different lag step sizes to find the step size that best reflects the lag effect. Lag relationship matrix: Construct a lag relationship matrix to represent the time delay between different variables. This matrix provides a basis for subsequent data alignment and helps identify the most important lag variables.
[0068] Step 2: Multivariate lag alignment: After completing the lag detection, align the multivariate data to eliminate the time differences between different variables. Specifically include: Determine the lag compensation distance: According to the lag relationship matrix obtained in Step 1, calculate the optimal lag compensation distance of each covariate relative to the main variable. Data alignment: Adjust the data of each covariate to align with the main variable. This includes: Time alignment: According to the lag compensation distance, move the covariate to align it with the time point of the main variable. Data processing: Discard the data that exceeds the time range of the main variable, and fill in the missing data caused by alignment to ensure data integrity.
[0069] Step 3: Align variables and feed them into the prediction model for training: After completing data alignment, feed the aligned variable data into the prediction model for training. The specific steps include: Step 3-1: Model training: Use the aligned multivariate data to train the prediction model. Parameter optimization is performed during the training process to improve the prediction performance of the model. Step 3-2: Performance evaluation: Test the prediction accuracy of the model through cross-validation or other evaluation methods, and adjust the model parameters to achieve the best performance.
[0070] Step S4, using the trained atmospheric carbon concentration prediction model to process the atmospheric carbon concentration data to be predicted in real time, and obtain the prediction results of atmospheric carbon data. Input the atmospheric carbon concentration data to be predicted into the trained prediction model. Use the relationship between multiple variables learned by the model to predict the future trend of atmospheric carbon concentration. Output the prediction results of atmospheric carbon concentration, including the trend of carbon concentration change within a certain period of time in the future. On the basis of considering multiple meteorological variables such as XCO2 and XCH4, channel-dependent model training is used to predict multiple variables such as XCO2 and XCH4 in the future. Multivariate prediction of multiple variables, the prediction model can use multiple input variables to predict multiple output variables. In the present invention, the input prediction window is set to 96 steps. After modeling multiple variables such as XCO2 and XCH4, the output prediction window is 96, 192, 336, 720, and there are 4 prediction scales of step length. The experiment selected MSE and MAE as the evaluation indicators of the model, and the experimental performance of the model was quantitatively analyzed and evaluated. Mean square error (MSE) and mean absolute error (MAE) are two commonly used prediction error evaluation indicators. They respectively calculate the difference between the predicted value and the true value, and use it as the final prediction evaluation index of the model of the present invention.
[0071] Its main steps include: Step 1: Data alignment and model input: Step 1-1: Data alignment: First, the multivariate data of atmospheric carbon concentration to be predicted is processed by the aforementioned multivariate hysteresis detection and alignment steps, and then input into the trained prediction model. This step ensures that the data is aligned in time and eliminates the error caused by the hysteresis effect. Step 1-2: Model input: The aligned data includes multiple variables (such as XCO2 and XCH4), which are sent to the trained prediction model as input data after alignment. Step 2: Predicting future carbon concentration trends: Step 2-1: Model learning: The prediction model uses the relationship between multiple variables learned during the training process to predict the future trend of atmospheric carbon concentration. The model predicts the future trend of carbon concentration by analyzing the time dependence and the relationship between multiple variables in historical data. Step 2-2: Output prediction results: The model outputs the prediction results of carbon concentration in the future, including the prediction of the concentration trend of variables such as XCO2 and XCH4 in the future. These prediction results can be used to assess future environmental changes and formulate corresponding policy measures. Step 3: Multi-scale prediction settings: Step 3-1: Prediction window settings: In order to achieve predictions at different time scales, multiple prediction window lengths are selected to train and evaluate the model. The input prediction window is set to 96 steps, and the output prediction window includes four steps of 96, 192, 336, and 720. These steps represent different prediction time ranges, covering short-term to long-term prediction needs. Step 3-2: Prediction scale: By modeling variables such as XCO2 and XCH4, the model is able to make predictions at different time scales. These scales provide a multi-angle understanding of carbon concentration changes and help to more comprehensively evaluate the future trend of carbon concentration. Step 4: Model performance evaluation: Step 4-1: Evaluation indicators: Mean square error (MSE) and mean absolute error (MAE) are selected as evaluation indicators of model performance. These two indicators are used to quantify the accuracy of the prediction results: Step 4-2: Mean square error (MSE): Calculate the average of the squared difference between the predicted value and the true value, which is used to measure the overall prediction error of the model. Step 4-3: Quantitative analysis and evaluation: Quantitatively analyze and evaluate the experimental performance of the model through MSE and MAE. These indicators help determine the performance of the model under different prediction windows and guide further model optimization and adjustment.
[0072] Tables 1 and 2 are experimental results of the atmospheric carbon concentration prediction model based on the multivariate data hysteresis detection and alignment method in the embodiments of the present invention on the Edwards, Parkfalls, and Lamont data sets in PatchTS, DLinear, Crossformer, and MTGNN:
[0073] Table 1
[0074]
[0075] Table 2
[0076]
[0077] Tables 3 and 4 are experimental results of the atmospheric carbon concentration prediction model based on the multivariate data hysteresis detection and alignment method in the embodiments of the present invention on the ETTh1, ETTh2, ETTm1, ETTm2, Exchange, and Weather data sets in PatchTS, DLinear, Crossformer, and MTGNN:
[0078] Table 3
[0079]
[0080] Table 4
[0081]
[0082] Embodiment 2
[0083] An atmospheric carbon data prediction system based on multivariate rolling hysteresis detection and alignment, the system includes: a matrix construction module, a data alignment module, a model optimization module, and a carbon data prediction module;
[0084] The matrix construction module is used to use a rolling window method to calculate the changing trend of the correlation coefficient between the atmospheric carbon data variables over time for the multivariate time series data obtained by monitoring, and to construct a lag relationship matrix based on the changing trend. Input multiple relevant time series data, such as environmental factors such as atmospheric temperature, humidity, wind speed, solar radiation, and greenhouse gas concentration data such as carbon dioxide and methane. Using a rolling window method, calculate the correlation between each variable and other variables to obtain the changing trend of the correlation coefficient between the variables over time. According to the change of the correlation coefficient over time, determine the lag relationship between the variables and calculate their lag distances. Construct these lag distances into a lag relationship matrix to describe the lag between the variables.
[0085] The matrix construction module also includes: a rolling score calculation submodule, a filling sequence construction submodule, a lagged rolling record submodule, a lagged distance matching submodule and a relationship matrix construction submodule:
[0086] The rolling score calculation submodule is used to set the main variable j window X (j) t-L+1:t ={X (j) t-L+1 , ..., X (j) t}, covariate i window X (i) t-L+1:t ={X (i) t-L+1 , ..., X (i) t}, calculate correlation scores to identify potential lags. By calculating the correlation scores for each time point, potential lagged relationships are identified and corrected.
[0087] The fill sequence construction submodule is used for covariate window backward movement and fill sequence construction x (i)* : Design a covariate window reversal to construct a filling sequence. Specifically, construct a filling sequence x (i)* ={x (i*) t-2L+1 , ..., x (i*) t-L}. These filling data maintain the consistency of the data and ensure the integrity and reliability of the model.
[0088] The lagged rolling record submodule is used for lagged rolling correlation score calculation R i,t (j) (δ): In this step, the covariate sequence window is rolled back. At each step of the movement, based on the main variable window X (j) t-L+1:t ={X (j) t-L+1 , ..., X (j) t} and covariate window X (i) t-L+1:t ={X (i) t-L+1 , ..., X (i) t} Calculate the lagged rolling correlation score R i,t (j) (δ). The specific process is as follows:
[0089] Calculate the correlation score: For each step, calculate the main variable window X (j) t-L+1:t ={X (j) t-L+1 , ..., X (j) t} and covariate window X (i) t-L+1:t ={X (i) t-L+1 , ..., X (i) t}The hysteresis rolling correlation score R i,t (j) (δ). Calculate the correlation for all time points within the window and use the average as the score.
[0090] Window shift and padding: Shift the covariate window one step back, shift the data one point to the right, and start from the padding sequence x(i)=x (i) t-2L+1 , ..., x (i* )t-L Add a point to maintain the sequence integrity. Repeat the calculation: Repeat the above steps until the covariate window is completely moved out, such as Figure 4 As shown in N. Record the relevant score R i,t (j) (δ) and its corresponding hysteresis value δ.
[0091] The lagged distance matching submodule and the relationship matrix construction submodule match the lagged distances with the maximum rolling correlation score: determine the peak correlation score R i,t (j) (δ), t(δ) and the corresponding aligned lag distances.
[0092] The data alignment module is used to adjust and align the multivariate time series data based on the lag relationship matrix to obtain aligned multivariate time series data.
[0093] The data alignment module also includes: a compensation distance calculation submodule and a sequence data alignment submodule; the compensation distance calculation submodule is used to calculate the optimal alignment lag distance of each covariate relative to the main variable based on the lag relationship matrix; first, by analyzing the lag relationship between the variables, a lag relationship matrix is constructed. This matrix reflects the time difference between the variables, that is, the optimal time lag of each covariate relative to the main variable. This matrix is usually obtained by calculating the lag correlation coefficient or cross-correlation method to quantify the time delay relationship between variables.
[0094] The sequence data alignment submodule is used to adjust the covariate based on the lag compensation distance until it is aligned with the main variable to obtain the aligned multivariate time series data. A main variable is selected as the benchmark sequence, and the time point of the sequence will be used as the alignment standard. The main variable sequence is usually the target variable for prediction or the variable that is most representative of other variables. Fixed main variable sequence helps to ensure consistency and accuracy during the alignment process. According to the lag relationship matrix, each covariate sequence is adjusted. The specific steps include: Time alignment: adjust each covariate sequence to align with the time point of the main variable sequence. This means that if the optimal lag time of the covariate is t, the covariate sequence is moved to the right by t time points. Data processing: discard overflow data: For covariates that exceed the range of the main variable sequence after adjustment, they are discarded. Fill missing data: For the missing covariates caused by adjustment at the beginning of the main variable sequence, use the pre-built filling sequence to supplement. These filling sequences can be constructed based on the mean, median or other filling strategies of historical data. The optimal rolling distance for each covariate is determined by evaluating the prediction accuracy of each covariate. This refers to the optimal lag amount of each covariate when it is aligned with the main variable. Cross-validation or other model evaluation methods are often used to select the lag that will most improve forecast accuracy. Align all covariates to the main variable series based on their respective optimal rolling distances. This step ensures temporal consistency between all variables in the multivariate forecasting model, thereby reducing the impact of lags on forecast accuracy. The aligned dataset can be used as the input to the forecasting model, reducing data noise caused by time differences. Based on correlation or other feature importance metrics, select the top K variables with the most significant lead-lag relationship with the main variable as indicator variables. These indicator variables are the covariates that are most helpful in predicting the main variable, and their selection can be based on: Correlation analysis: Calculate the lagged correlation between each covariate and the main variable, and select the top K covariates with the highest correlation. Feature importance scoring: Use feature selection methods (such as feature importance scoring, mutual information metrics, etc.) to evaluate the contribution of each covariate and select the top K variables with the highest importance. Integrate the aligned covariates with the main variable to form a complete multivariate time series dataset. This dataset can be used for subsequent model training and forecasting.
[0095] The model optimization module is used to construct and train an atmospheric carbon concentration prediction model based on the aligned multivariate time series data.
[0096] In view of the poor performance of common multivariate time series based channel-dependent methods, the present invention pays attention to the inherent hysteresis characteristics of multivariate carbon data, and detects and aligns the degree of hysteresis accordingly. The aligned multivariate time series data is input into the model to allow the model to learn the dynamic relationship and long-term dependency between variables. Channel-based methods need to overcome the problem of noise transmission in multiple channels, which makes the method more challenging in modeling and prediction than single-channel prediction, which is one of the possible reasons for the poor performance of channel-dependent methods. This problem is alleviated by hysteresis detection and alignment of multivariate data, thereby improving the robustness of channel-dependent prediction methods. In the experiment, the model parameters are optimized through training, so that the model can effectively capture the complex patterns between multivariate data and improve the prediction accuracy.
[0097] This paper proposes a novel method to solve the lag problem by aligning variables before the forecasting process. By mitigating the negative impact of lag in advance, the method aims to improve the accuracy and robustness of forecasts. Its main steps include:
[0098] Step 1: Rolling hysteresis detection of multivariate time series data: In this step, rolling hysteresis detection is first performed on the multivariate time series data. This process aims to identify and quantify the hysteresis relationship between the target variable and other covariates. The specific methods include:
[0099] Determine the lag step size: Determine the optimal lag step size by calculating the lagged correlation between the target variable and each covariate. This step uses a rolling window technique to evaluate the correlation at different lag steps to find the step size that best reflects the lag effect. Lagged relationship matrix: Construct a lagged relationship matrix to represent the time delay between different variables. This matrix provides a basis for subsequent data alignment and helps identify the most important lagged variables.
[0100] Step 2: Multivariate lag alignment: After completing the lag detection, align the multivariate data to eliminate the time differences between different variables. Specifically include: Determine the lag compensation distance: According to the lag relationship matrix obtained in Step 1, calculate the optimal lag compensation distance of each covariate relative to the main variable. Data alignment: Adjust the data of each covariate to align with the main variable. This includes: Time alignment: According to the lag compensation distance, move the covariate to align it with the time point of the main variable. Data processing: Discard the data that exceeds the time range of the main variable, and fill in the missing data caused by alignment to ensure data integrity.
[0101] Step 3: Align variables and feed them into the prediction model for training: After completing data alignment, feed the aligned variable data into the prediction model for training. The specific steps include: Step 3-1: Model training: Use the aligned multivariate data to train the prediction model. Parameter optimization is performed during the training process to improve the prediction performance of the model. Step 3-2: Performance evaluation: Test the prediction accuracy of the model through cross-validation or other evaluation methods, and adjust the model parameters to achieve the best performance.
[0102] The carbon data prediction module is used to use the trained atmospheric carbon concentration prediction model to process the atmospheric carbon concentration data to be predicted obtained in real time to obtain the prediction results of the atmospheric carbon data.
[0103] The atmospheric carbon concentration data to be predicted is input into the trained prediction model. The relationship between multiple variables learned by the model is used to predict the future trend of atmospheric carbon concentration. The prediction results of atmospheric carbon concentration are output, including the trend of carbon concentration changes within a certain period of time in the future. On the basis of considering multiple meteorological variables such as XCO2 and XCH4, channel-dependent model training is used to predict multiple variables such as XCO2 and XCH4 in the future. Multivariables predict multiple variables, and the prediction model can use multiple input variables to predict multiple output variables. In the present invention, the input prediction window is set to 96 steps. After modeling multiple variables such as XCO2 and XCH4, the output prediction window is 96, 192, 336, 720, and there are 4 prediction scales of step length. The experiment selected MSE and MAE as the evaluation indicators of the model, and the experimental performance of the model was quantitatively analyzed and evaluated. Mean square error (MSE) and mean absolute error (MAE) are two commonly used prediction error evaluation indicators. They calculate the difference between the predicted value and the true value respectively. It is used as the final prediction evaluation indicator of the model of the present invention.
[0104] Its main steps include: Step 1: Data alignment and model input: Step 1-1: Data alignment: First, the multivariate data of atmospheric carbon concentration to be predicted is processed by the aforementioned multivariate hysteresis detection and alignment steps, and then input into the trained prediction model. This step ensures that the data is aligned in time and eliminates the error caused by the hysteresis effect. Step 1-2: Model input: The aligned data includes multiple variables (such as XCO2 and XCH4), which are sent to the trained prediction model as input data after alignment. Step 2: Predicting future carbon concentration trends: Step 2-1: Model learning: The prediction model uses the relationship between multiple variables learned during the training process to predict the future trend of atmospheric carbon concentration. The model predicts the future trend of carbon concentration by analyzing the time dependence and the relationship between multiple variables in historical data. Step 2-2: Output prediction results: The model outputs the prediction results of carbon concentration in the future, including the prediction of the concentration trend of variables such as XCO2 and XCH4 in the future. These prediction results can be used to assess future environmental changes and formulate corresponding policy measures. Step 3: Multi-scale prediction settings: Step 3-1: Prediction window settings: In order to achieve predictions at different time scales, multiple prediction window lengths are selected to train and evaluate the model. The input prediction window is set to 96 steps, and the output prediction window includes four steps of 96, 192, 336, and 720. These steps represent different prediction time ranges, covering short-term to long-term prediction needs. Step 3-2: Prediction scale: By modeling variables such as XCO2 and XCH4, the model is able to make predictions at different time scales. These scales provide a multi-angle understanding of carbon concentration changes and help to more comprehensively evaluate the future trend of carbon concentration. Step 4: Model performance evaluation: Step 4-1: Evaluation indicators: Mean square error (MSE) and mean absolute error (MAE) are selected as evaluation indicators of model performance. These two indicators are used to quantify the accuracy of the prediction results: Step 4-2: Mean square error (MSE): Calculate the average of the squared difference between the predicted value and the true value, which is used to measure the overall prediction error of the model. Step 4-3: Quantitative analysis and evaluation: Quantitatively analyze and evaluate the experimental performance of the model through MSE and MAE. These indicators help determine the performance of the model under different prediction windows and guide further model optimization and adjustment.
[0105] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for predicting atmospheric carbon concentration based on multivariate data hysteresis detection and alignment method, characterized in that: The method comprises: Step S1, using a rolling window method to calculate the changing trend of the correlation coefficient between the atmospheric carbon data variables over time using the multivariate time series data obtained by monitoring, and constructing a lag relationship matrix based on the changing trend; Step S2, adjusting and aligning the multivariate time series data based on the lag relationship matrix to obtain aligned multivariate time series data; Step S3, constructing and training an atmospheric carbon concentration prediction model based on the aligned multivariate time series data; Step S4: Use the trained atmospheric carbon concentration prediction model to process the atmospheric carbon concentration data to be predicted that is acquired in real time to obtain a prediction result of the atmospheric carbon data.
2. The atmospheric carbon concentration prediction method based on multivariate data hysteresis detection and alignment method according to claim 1 is characterized in that: In step S1, the multivariate time series data obtained by monitoring is used in a rolling window manner to calculate the change trend of the correlation coefficient between the atmospheric carbon data variables over time, and the process of constructing a lag relationship matrix based on the change trend specifically includes: Step S11: Set the main variable j window X of the multivariate time series data (j) t-L+1:t ={X (j) t -L+1,...,X (j) t }, covariate i window X (i) t-L+1:t ={X (i) t-L+1 , ..., X (i) t }, calculate the lagged rolling correlation score between the main variable j window and the covariate i window; Step S12: Move the covariate window backward by one step and move the multivariate time series data to the right by one point, and construct a filling sequence based on the moved covariate window and the moved multivariate time series data. Step S13, repeating steps S11 and S12 until the covariate window is completely moved out, and recording each lag rolling correlation score and the lag distance corresponding to the lag rolling correlation score; Step S14, finding the maximum value from the hysteresis scrolling correlation score, and finding the alignment hysteresis distance corresponding to the hysteresis scrolling correlation score of the peak value; Step S15: constructing a hysteresis relationship matrix based on the alignment hysteresis distance.
3. The atmospheric carbon concentration prediction method based on multivariate data hysteresis detection and alignment method according to claim 2 is characterized in that: In step S2, the process of adjusting and aligning the multivariate time series data based on the lag relationship matrix to obtain the aligned multivariate time series data specifically includes: Based on the lagged relationship matrix, calculating the aligned lagged distance of each covariate relative to the main variable; The covariate is adjusted based on the alignment lag distance until it is aligned with the main variable to obtain aligned multivariate time series data.
4. The atmospheric carbon concentration prediction method based on multivariate data hysteresis detection and alignment method according to claim 3 is characterized in that: The process of adjusting the covariate based on the alignment lag distance until it is aligned with the main variable to obtain the aligned multivariate time series data specifically includes: In the process of adjusting the covariates, the overflowed data on the right side are discarded, and the missing data on the left side are supplemented using the filling sequence; An alignment lag distance for the covariate is determined to align the covariate with the primary variable.
5. An atmospheric carbon concentration prediction system based on a multivariate data hysteresis detection and alignment method, the system being used to implement the atmospheric carbon concentration prediction method according to any one of claims 1 to 4, characterized in that: The system includes: matrix construction module, data alignment module, model optimization module, and carbon data prediction module; The matrix construction module is used to use a rolling window method to calculate the changing trend of the correlation coefficient between the atmospheric carbon data variables over time using the multivariate time series data obtained by monitoring, and to construct a lag relationship matrix based on the changing trend; The data alignment module is used to adjust and align the multivariate time series data based on the lag relationship matrix to obtain aligned multivariate time series data; The model optimization module is used to construct and train an atmospheric carbon concentration prediction model based on the aligned multivariate time series data; The carbon data prediction module is used to use the trained atmospheric carbon concentration prediction model to perform data processing on the atmospheric carbon concentration data to be predicted that is acquired in real time to obtain the prediction result of the atmospheric carbon data.
6. The atmospheric carbon concentration prediction system based on multivariate data hysteresis detection and alignment method according to claim 5, characterized in that: The matrix construction module also includes: a rolling score calculation submodule, a filling sequence construction submodule, a lag rolling record submodule, a lag distance matching submodule and a relationship matrix construction submodule; The rolling score calculation submodule is used to set the main variable j window X of the multivariate time series data (j) t-L+1:t ={X (j) t-L+1 , ..., X (j) t }, covariate i window X (i) t-L+1:t ={X (i) t-L+1 , ..., X (i) t }, calculate the lagged rolling correlation score between the main variable j window and the covariate i window; The filling sequence construction submodule is used to move the covariate window backward by one step, move the multivariate time series data to the right by one point, and construct a filling sequence based on the moved covariate window and the moved multivariate time series data. The hysteresis rolling recording submodule is used to repeat step S11-step S12 until the covariate window is completely moved out, and record each hysteresis rolling correlation score and the corresponding hysteresis value; The hysteresis distance matching submodule is used to find the maximum value from the hysteresis rolling correlation score and find the alignment hysteresis distance corresponding to the hysteresis rolling correlation score of the front value; The relationship matrix construction submodule is used to construct a lag relationship matrix based on the alignment lag distance.
7. The atmospheric carbon concentration prediction system based on multivariate data hysteresis detection and alignment method according to claim 6, characterized in that: The data alignment module also includes: a compensation distance calculation submodule and a sequence data alignment submodule; The compensation distance calculation submodule is used to calculate the alignment lag distance of each covariate relative to the main variable based on the lag relationship matrix; The sequence data alignment submodule is used to adjust the covariate based on the alignment lag distance until it is aligned with the main variable to obtain aligned multivariate time series data.
8. The atmospheric carbon concentration prediction system based on multivariate data hysteresis detection and alignment method according to claim 7, characterized in that: The workflow of the sequence data alignment submodule specifically includes: In the process of adjusting the covariates, the overflowed data on the right side are discarded, and the missing data on the left side are supplemented using the filling sequence; An alignment lag distance for the covariate is determined to align the covariate with the primary variable.
Citation Information
Cited By
Cattle breeding environment monitoring method, system and equipment based on data analysis
CN119475193A
Gas concentration rapid detection method based on time sliding window alignment lag difference
CN122545610A
