High-precision prediction method based on multi-source data fusion and adaptive residual error

Through multi-source data fusion and adaptive residual mechanism, combined with attention mechanism and residual block hybrid neural network model, the existing deep learning prediction technology is solved inefficient and overfitting problems in large-scale data processing, and high-precision and real-time prediction effects are achieved.

CN119918017AInactive Publication Date: 2025-05-02HOHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510421715.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-05-02
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing deep learning prediction technologies are inefficient when processing large-scale data, and have problems such as inconsistent data encoding formats and loss of information, especially in small sample data scenarios that are prone to overfitting.

Method used

High-precision prediction method based on multi-source data fusion and adaptive residuals is adopted, and multiple types of data are integrated through multi-source heterogeneous data fusion technology, combined with attention mechanism and residual blocks to perform data feature processing, and model parameters are optimized through adaptive multi-task learning mechanism.

Benefits of technology

It significantly improves prediction accuracy, enhances the adaptability and robustness of the model to data fluctuations, and ensures high accuracy and real-time prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918017A_ABST
    Figure CN119918017A_ABST
Patent Text Reader

Abstract

The invention discloses a high-precision prediction method based on multi-source data fusion and adaptive residual error, and relates to the technical field of deep learning, and the method comprises the following steps: collecting a large amount of data and related factor data, carrying out basic data preprocessing, carrying out Gaussian noise injection to enhance small sample data expression, and carrying out prediction; meanwhile, integrating various types of data by utilizing a multi-source heterogeneous data fusion technology; performing targeted data feature engineering processing by using a hybrid neural network model combining an attention mechanism and a residual block; multiple models are trained and coupled to construct an integrated deep learning method suitable for high-precision prediction, and parameters are finely adjusted to realize model adaptive multi-task learning optimization; testing and outputting the high-precision deep learning model, and evaluating the performance of the final model; according to the invention, a multi-source heterogeneous data fusion technology is adopted, and meanwhile, the attention-enhanced residual network architecture can dynamically adjust the model, so that high precision and self-adaptive multiple tasks of model prediction are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning technology, and in particular to a high-precision prediction method based on multi-source data fusion and adaptive residual. Background Art

[0002] With the explosive growth of data volume and the complexity of application scenarios, the importance of high-precision prediction methods in meteorology, energy, finance, medical and other fields has become increasingly prominent. Multi-source data fusion technology can fully utilize the advantages of each data source and improve prediction accuracy by integrating different types of data sources. At the same time, the development of deep learning technology, especially the combination of hybrid neural networks, attention mechanisms and residual blocks, provides a powerful tool for the extraction and modeling of complex data features.

[0003] Existing deep learning prediction technologies are less efficient when processing large-scale data. At the same time, there are problems such as inconsistent data encoding formats and information loss in the process of processing large-scale and high-precision data. In addition, the depth and complexity of the model may lead to overfitting, especially in small sample data scenarios. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a high-precision prediction method based on multi-source data fusion and adaptive residual, comprising the following steps: S1, collect data and related factor data, perform data preprocessing, and inject Gaussian noise, while using multi-source heterogeneous data fusion technology to integrate various types of data; S2, using a hybrid neural network model combining attention mechanism and residual block to process data features; S3. Train and couple the hybrid neural network model, build a deep learning model, and adjust the parameters to achieve model adaptive multi-task learning optimization; S4. Test and output the deep learning model to evaluate the performance of the final model.

[0005] The technical solution further defined in the present invention is: Furthermore, in step S1, the small sample data is screened out by searching papers to form a small sample data set small_df with a number of less than 1,000 and an accuracy of six decimal places; simulated data for target variables and related factors are obtained to form a large-scale simulated data set large_df with a data volume 10 times that of the small sample data; and the specified columns and target variables are read from the Excel files of the large-scale simulated data and the small sample data, respectively, to construct the small_df and large_df data frames; Perform data preprocessing, define and call the data cleaning function clean_data, apply the dropna function to delete missing data values; apply the clip data pruning method to remove outliers; perform data conversion operations, including standardization, expansion, and scaling features, and introduce Gaussian noise; customize the class DataProcessor, including the _init_ initialization function, the transform conversion function, and the process_data data processing function.

[0006] As mentioned above, the high-precision prediction method based on multi-source data fusion and adaptive residual, two standardized scalers scaler_large and scaler_small are defined in the _init_ initialization function, and the data frame is scaled using the RobustScaler method; at the same time, a polynomial feature processor PolynomialFeatures is also set, which only considers the interaction terms between features and the maximum is 2 times; The transform function accepts a data frame x_df as input, and ensures that it only contains the specified feature columns through input checking. If any column is missing, a ValueError is thrown to prompt the user; Generate polynomial features by applying the polynomial feature processor PolynomialFeatures, fit the scaler_large scaler using the generated polynomial features, and scale the polynomial features using the already fitted scaler_large scaler; The process_data data processing function includes the definition and call of the data cleaning function clean_data, and checks whether the number of features of small_df and large_df are consistent. If not, an error is thrown; the replication factor replication_factor is defined to increase the number of samples of the small sample data set, repeat the features of the small sample data set, and inject random Gaussian noise into each sample; two standardized scalers are fitted to fit the polynomial features of the small sample data set and the large-scale simulation data set respectively.

[0007] As described above, in the high-precision prediction method based on multi-source data fusion and adaptive residual, in step S2, the build_hybrid_model function is defined to build a hybrid neural network model that combines the attention mechanism and the residual block; the data input layer of the hybrid neural network model is created by using the Input layer of Keras; the Dense function layer is defined to generate the same attention weight as the input dimension, and the Sigmoid activation function is introduced in the attention mechanism to ensure that the weight is between 0 and 1; in addition, the input is multiplied by the attention weight to obtain the weighted output result; Define the residual_block function of the residual block, whose input shortcut is the output of the attention mechanism and specifies the number of output units of the residual block; compare the shortcut with the required number of units, if different, adjust it through the Dense layer and add an l2 regularization to achieve the residual structure; in the main path, use the relu activation function and add l2 regularization when passing through a Dense layer, and then perform batch normalization and Dropout regularization techniques; finally, pass through a linearly activated Dense layer, and use the Add layer to add the output of the main path to the input value assigned by the attention mechanism to form a residual connection; Construct a fully connected layer and apply the relu function activation in the added Dense layer; in addition, establish two residual block calls; use the softplus activation function and the softmax activation function to construct the main output layer.

[0008] As described above, in the high-precision prediction method based on multi-source data fusion and adaptive residual, in step S3, the EnsembleModel class ensemble model training method is created, and the training model calls the train_model function, so that the model finds the best loss balance in regression and classification tasks, and combines the callback mechanism to optimize the training process; the train_model function model compilation calls the AdaptiveLoss class, so as to dynamically adjust the loss calculation method according to the training situation.

[0009] As described above, in the high-precision prediction method based on multi-source data fusion and adaptive residual, in step S3, the class AdaptiveLoss is defined, including the _init_ initialization function, the _call_ calling function, the get_config configuration acquisition function and the from_config configuration function; the _init_ initialization function initializes a trainable variable dynamic attenuation coefficient alpha, which is used to adjust the weight between the main loss MSE and the auxiliary loss CE, defines the initial value and adaptively adjusts the main task loss and the auxiliary task loss during the training process; gradually reduces the value of alpha, and the weight is given by alpha and 1-alpha; the get_config configuration acquisition function and the from_config configuration function save and load the model to ensure that the state of the loss function is correctly stored and restored.

[0010] As described above, in the high-precision prediction method based on multi-source data fusion and adaptive residual, in step S3, the train_model function is defined, x is defined as the feature, y is defined as the target, and the function converts the label y into a binary auxiliary target y_aux and converts it into a categorical variable form; the model is compiled using the Adam optimizer, and the loss functions of the main task and the auxiliary task are specified as classes AdaptiveLoss and CE respectively, and the corresponding evaluation indicators are set; the data is divided into a training set and a validation set, and auxiliary targets are also created for the training set and the validation set; the random seed random_state is set; the EarlyStopping callback mechanism is set; and the ReduceLROnPlateau dynamic learning rate callback mechanism is set.

[0011] As described above, in the high-precision prediction method based on multi-source data fusion and adaptive residual, in step S3, the class EnsembleModel is defined, including the _init_ initialization function, the train_ensemble training function, the predict prediction function, the save_models saving function and the load_models loading function; in the train_ensemble function, the build_hybrid_model function is called according to the dimension of the input feature, multiple models are created using list deduction, and the train_model function is called one by one to train each model, and the model is saved to the specified path after the training is completed; in the predict function, first check whether the model has been loaded, if not, throw an exception, then use the list deduction to predict each model, and calculate the median as the final prediction result; the class also includes the save_models function for saving the trained model and the load_models function for loading the saved model from the specified path.

[0012] As described above, in the high-precision prediction method based on multi-source data fusion and adaptive residual, in step S4, a new output file is created to store the model test results. After the integrated model training is saved, samples of the small sample data set x_small of feature x and the small sample data set y_small of feature y are selected as validation sets to verify the deep learning model; different evaluation indicators are used to evaluate the model performance, the calculated evaluation indicators are written to the new output file, and a formatted string is used to ensure that the output value retains four decimal places; several other existing machine learning models are trained and compared with this deep learning model.

[0013] As mentioned above, the high-precision prediction method based on multi-source data fusion and adaptive residuals is evaluated by the following indicators: the current training round Epoch, mean absolute error MAE, mean square error MSE, root mean square error RMSE, explained variance Explained Variance, R 2 Values ​​and mean absolute percentage error MAPE values.

[0014] The beneficial effects of the present invention are: In the present invention, multi-source heterogeneous data fusion technology is adopted to effectively integrate diversified data, so as to comprehensively capture the complex characteristics of the target data in multiple dimensions and significantly improve the prediction accuracy; on this basis, an attention-enhanced residual network architecture is introduced, which can dynamically adjust the model parameters according to real-time data, accurately focus on key features, and deeply optimize the feature engineering processing of the data, further enhancing the adaptability and robustness of the model to data fluctuations; in addition, the integration of the adaptive multi-task learning mechanism enables the model to be collaboratively optimized in multiple prediction tasks, ensuring the high accuracy and real-time performance of the prediction results, and providing reliable technical support for precise monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a schematic diagram of the overall process of the present invention; Figure 2 The method of the embodiment of the present invention and other multiple models predict N 2 Statistical comparison chart of performance evaluation indicators at time O; Figure 3 A statistical comparison chart of performance evaluation indicators when predicting Yield using the method of the embodiment of the present invention and other multiple models; Figure 4 The present invention embodiment method and other multiple models predict NH 3 Statistical comparison chart of performance evaluation indicators when . DETAILED DESCRIPTION

[0016] This embodiment provides a high-precision prediction method based on multi-source data fusion and adaptive residual. Figure 1 As shown, the following steps are included: S1. Collect a large amount of data and related factor data and perform basic data preprocessing, and inject Gaussian noise to enhance the high-precision data expression of small samples. At the same time, use multi-source heterogeneous data fusion technology to integrate various types of data.

[0017] Search papers to filter out small sample high-precision data to form a small sample high-precision data set small_df; obtain large-scale simulation data for target variables and related factors, successfully construct a comprehensive data set covering multiple key data indicators, and form a large-scale simulation data set large_df; thereby innovatively realizing the effective combination of small sample high-precision data and large-scale simulation data; and read the specified columns and target variables from the Excel files of large-scale simulation data and small sample high-precision data respectively to construct small_df and large_df data frames; among them, the small sample high-precision data ranges from thousands, but its accuracy can be quantified to 6 decimal places, and the data volume does not meet the requirements of deep learning, while the data volume of large-scale simulation data is 10 times that of small sample high-precision data, which belongs to a larger range of preset parameters.

[0018] Basic data preprocessing is performed to handle missing values ​​and detect and remove outliers. Data conversion is mainly based on standardization, expansion and scaling features. Gaussian noise is innovatively introduced to enhance the expression of small sample high-precision data. A replication factor is defined to increase the number of samples of small sample high-precision data sets by 5 times to generate more samples. At the same time, random Gaussian noise is injected into each sample to enhance the expression of small sample high-precision data so as not to overfit the model. Polynomial features of small and large data sets are fitted respectively, that is, multi-source heterogeneous data fusion technology is used to integrate the characteristics and objectives of small sample high-precision data and large-scale simulation data to enhance the predictive ability of the model.

[0019] Define and call the data cleaning function clean_data, apply the dropna function to delete missing data values; apply the clip data pruning method to remove outliers; perform data conversion operations based on standardization, expansion and scaling features, and introduce Gaussian noise to enhance the high-precision data expression of small samples; customize the class DataProcessor, including the _init_ initialization function, transform conversion function and process_data data processing function.

[0020] In the _init_ initialization function, two standardized scalers, scaler_large and scaler_small, are defined, and the RobustScaler method is used to scale the data frame. At the same time, a polynomial feature processor PolynomialFeatures is also set, which only considers the interaction terms between features and the maximum is 2.

[0021] The transform function accepts a data frame x_df as input and ensures that it contains only the specified feature columns through input checking. If any columns are missing, a ValueError is thrown to prompt the user.

[0022] Generate polynomial features by applying the polynomial feature processor PolynomialFeatures to expand the original features, fit the scaler_large scaler using the generated polynomial features, and scale the polynomial features using the already fitted scaler_large scaler.

[0023] The process_data data processing function includes the definition and call of the data cleaning function clean_data, and checks whether the number of features of small_df and large_df are consistent. If not, an error is thrown; the replication factor replication_factor is defined to increase the number of samples of the small sample high-precision data set, repeat the features of the small sample high-precision data set, and inject random Gaussian noise into each sample to avoid overfitting the model; two standardized scalers are fitted to fit the polynomial features of the small sample high-precision data set and the large-scale simulation data set respectively, which is the multi-source heterogeneous data fusion technology.

[0024] S2. Use the hybrid neural network model that combines the attention mechanism and the residual block to perform targeted data feature engineering.

[0025] Construct a data input layer, define the attention weights that are the same as the input dimension, introduce the Sigmoid activation function to act as a gate, and multiply the input by the attention weight to obtain the weighted output result to ensure that the attention mechanism realizes dynamic feature weighting; construct a deep residual block, and in the main path, use the relu activation function and add l2 regularization, perform batch normalization and Dropout regularization techniques to reduce overfitting and effectively improve the generalization ability of the model; construct a fully connected layer; establish calls to two residual blocks; construct the main output layer; the dual-output architecture simultaneously predicts continuous production, innovatively uses the softplus activation function to handle regression tasks, constrains the production prediction to have positive outputs, and uses the softmax activation function to handle classification tasks.

[0026] Define the build_hybrid_model function to build a hybrid neural network model that combines the attention mechanism and the residual block. The data input layer of the hybrid neural network model is created by using the Input layer of Keras. Define the Dense function layer to generate attention weights with the same input dimension. Introduce the Sigmoid activation function in the attention mechanism to ensure that the weight is between 0 and 1, which plays a gating role. In addition, multiply the input by the attention weight to obtain the weighted output result to ensure that the attention mechanism realizes dynamic feature weighting.

[0027] Define the residual_block function of the deep residual block, whose input shortcut is the output of the attention mechanism, and specifies the number of output units of the residual block; compare the shortcut with the required number of units, if different, adjust it through the Dense layer and add an l2 regularization to achieve the residual structure; in the main path, use the relu activation function and add l2 regularization when passing through a Dense layer, and then perform batch normalization and Dropout regularization techniques to reduce overfitting and effectively improve the generalization ability of the model; finally, pass through a linearly activated Dense layer, and use the Add layer to add the output of the main path to the input value assigned by the attention mechanism to form a residual connection.

[0028] Construct a fully connected layer and apply the relu function activation in the added Dense layer; in addition, establish two residual block calls to further improve the model complexity and expression ability; construct the main output layer, and innovatively use the softplus activation function and softmax activation function to construct the main output layer.

[0029] S3. Train and couple the hybrid neural network model to build an integrated deep learning model suitable for high-precision prediction, and fine-tune the parameters to achieve model adaptive multi-task learning optimization.

[0030] Create the EnsembleModel class to integrate model training methods, which allows training, prediction, saving and loading of multiple models, training multiple models and using the median results of these models when making predictions; among them, the training model calls the train_model function, which builds, compiles and trains a hybrid model, implements multi-task learning, helps the model find the best loss balance in regression and classification tasks, enhances the feature representation learning ability, and converts the target into a binary auxiliary target and into a classification variable form.

[0031] Use the optimizer to compile the model and set the corresponding evaluation indicators. Set the EarlyStopping callback mechanism and the ReduceLROnPlateau dynamic learning rate callback mechanism to monitor the main indicators of the validation set to ensure that the model has good generalization ability. The train_model function model compilation calls the AdaptiveLoss class, which combines the mean square error and classification cross entropy loss functions, and adjusts the dynamic attenuation coefficient alpha of the trainable variable to balance the loss weight. By dynamically adjusting the loss calculation method according to the training situation, the appropriate weight balance is found to achieve model adaptive multi-task learning optimization.

[0032] Create the EnsembleModel class to integrate the model training method. The training model calls the train_model function to implement multi-task learning, help the model find the best loss balance in regression and classification tasks, and combine the callback mechanism to optimize the training process to ensure that the model has good generalization ability. The train_model function model compilation calls the AdaptiveLoss class to dynamically adjust the loss calculation method according to the training situation to achieve model adaptive multi-task learning optimization.

[0033] Define the class AdaptiveLoss, including the _init_ initialization function, the _call_ calling function, the get_config configuration function and the from_config configuration function; the _init_ initialization function initializes a trainable variable dynamic attenuation coefficient alpha, which is used to adjust the weight between the main loss mean squared error (MSE) and the auxiliary loss categorical cross entropy (CE), defines the initial value and adaptively adjusts the main task loss and auxiliary task loss during training; gradually reduces the value of alpha, and the weight is given by alpha and 1-alpha; the get_config configuration function and the from_config configuration function save and load the model to ensure that the state of the loss function is correctly stored and restored.

[0034] Define the train_model function, define x as the feature and y as the target. The function converts the label y into the auxiliary target y_aux of the binary classification and converts it into the form of a categorical variable; use the Adam optimizer to compile the model, specify the loss functions of the main task and auxiliary task as classes AdaptiveLoss and CE respectively, and set the corresponding evaluation indicators; the data is divided into training set and validation set, and auxiliary targets are also created for the training set and validation set; set the random seed random_state to ensure repeatability; set the EarlyStopping early stopping callback mechanism. If there is no improvement within a period, stop training and restore to the optimal weight to avoid overfitting; set the ReduceLROnPlateau dynamic learning rate callback mechanism. If there is no improvement within a period, the learning rate is halved so that the model can be fine-tuned at a smaller learning rate.

[0035] Define the EnsembleModel class, including the _init_ initialization function, the train_ensemble training function, the predict prediction function, the save_models saving function, and the load_models loading function; in the train_ensemble function, call the build_hybrid_model function according to the dimension of the input feature, use list derivation to create multiple models, and call the train_model function one by one to train each model, and save it to the specified path after training; in the predict function, first check whether the model has been loaded, and throw an exception if not, then use list derivation to predict each model, and calculate the median as the final prediction result to reduce the impact of individual model prediction deviation on the final result; the class also includes the save_models function for saving the trained model and the load_models function for loading the saved model from the specified path.

[0036] S4. Test and output the deep learning model to evaluate the performance of the final model.

[0037] Create a new output file to store the model test results. After the integrated model training is saved, select samples of the small sample high-precision data set x_small of feature x and the small sample high-precision data set y_small of feature y as the validation set. In this embodiment, 200 samples are selected as the validation set to verify the deep learning model and predict crop data. Use different evaluation indicators to evaluate the model performance, write the calculated evaluation indicators to the new output file, and use a formatted string to ensure that the output value retains four decimal places. In order to show the high precision of the model, more than ten machine learning models such as Gradient Boosting Regression, Light GBM, XGBoost Regression, and Decision Tree Regressor are trained and compared with this deep learning model.

[0038] In this embodiment, the target prediction value is selected as N in agriculture. 2 O, Yield and NH 3 , 180,000 large-scale simulation data based on domestic agricultural environment were collected from more than 60,000 detection points. At the same time, agricultural-related papers were searched to obtain small sample high-precision data sets, covering key data indicators such as longitude, latitude, temperature, precipitation, rate, SOC, pH value, etc.

[0039] Read data columns from the Excel file and construct small_df and large_df data frames respectively; among them, the large_df data frame randomly samples 50,000 rows; call the custom class DataProcessor for basic data preprocessing, set the values ​​below the 5% quantile to the 5% quantile value, and the values ​​above the 95% quantile to the 95% quantile value, and limit the values ​​of SOC and pH to their respective 5% and 95% quantiles; enhance the small sample high-precision dataset small_df by a replication factor of 5, inject Gaussian noise into each sample, fit two scalers, fit polynomial features, and process the two sets of data small_df and large_df into feature x and target y respectively, and obtain x_small, y_small, x_large and y_large.

[0040] Build a hybrid neural network model with the build_hybrid_model function; use Keras's Input layer to create a data input layer, define a Dense function layer to generate the same attention weights as the input dimension, introduce the Sigmoid activation function, and ensure that the weights are between 0 and 1; define and call the residual_block function of the deep residual block, use the relu activation function and add l2 regularization when passing through a Dense layer, and then perform batch normalization and Dropout regularization techniques; use the Dense layer to generate a main output node with an output dimension of 1, use the softplus activation function, and handle regression tasks; generate an auxiliary output with an output dimension of 2, use the softmax activation function, and handle classification tasks.

[0041] Train the EnsembleModel ensemble model for 500 rounds, call the build_hybrid_model function in the train_ensemble function, use list derivation to create multiple models, and call the train_model function one by one to train each model; use list derivation to predict each model and calculate the median as the final prediction result.

[0042] The train_model function called by the training model defines x as the feature, y as the target, and the number of training rounds is 300. The function converts the label y into the auxiliary target y_aux of the binary classification and converts it into a categorical variable form; the model is compiled using the Adam optimizer, and the learning rate is set to 3e -5; The data is divided into 80% training set and 20% validation set, and auxiliary targets are created for the training set and validation set; the EarlyStopping callback mechanism is set to monitor the main indicators of the validation set. If there is no improvement within 30 cycles, the training is stopped and the optimal weight is restored; the ReduceLROnPlateau dynamic learning rate callback mechanism is set. If there is no improvement within 10 cycles, the learning rate is halved. This function trains the model with the specified parameters and specifies the number of training rounds as 1024.

[0043] A dynamic attenuation coefficient alpha is initialized in the class AdaptiveLoss, which is used to adjust the weight between the main loss and the auxiliary loss. The initial value is 0.8 and is adaptively adjusted during training. Input parameters y_true and y_pred to the _call_ function. main_loss calculates the loss of the main target, and aux_loss calculates the loss of the auxiliary target. Gradually reduce the value of alpha and multiply it by 0.99 to reduce the impact, so that the auxiliary loss is increasingly used during training, while ensuring that the value of alpha is always between 0.5 and 0.9. The weighted total loss combines main_loss and aux_loss, and the weights are given by alpha and 1-alpha.

[0044] Create the file output.txt to store the model test results, select the first 200 samples of x_small and y_small as the validation set, verify the high-precision deep learning model, and predict crop data; use different indicators to evaluate the model performance, write the calculated evaluation indicators into the output.txt file and use the format string to ensure that the output value retains four decimal places. The evaluation indicators include the current training epoch, mean absolute error MAE, mean square error MSE, root mean square error RMSE, explained variance Explained Variance, R² value and mean absolute percentage error MAPE value.

[0045] like Figures 2 to 4 As shown in the figure, more than ten machine learning models such as Gradient Boosting Regression, Light GBM, XGBoostRegression, and Decision Tree Regressor were trained and compared with the high-precision deep learning model; the MAPE value of the machine learning model is generally around 0.35, and the high-precision deep learning model uses grid search to find the optimal parameters, fine-tunes the model parameters, and reduces the MAPE to around 0.25.

[0046] In summary, this embodiment adopts multi-source heterogeneous data fusion technology to effectively integrate diversified data, so as to comprehensively capture the complex characteristics of the target data in multiple dimensions to significantly improve the prediction accuracy; on this basis, an attention-enhanced residual network architecture is introduced, which can dynamically adjust the model parameters according to real-time data, accurately focus on key features, and deeply optimize the feature engineering processing of the data, further enhancing the adaptability and robustness of the model to data fluctuations; in addition, the integration of the adaptive multi-task learning mechanism enables the model to be collaboratively optimized in multiple prediction tasks, ensuring the high accuracy and real-time performance of the prediction results, and providing reliable technical support for precise monitoring.

[0047] In addition to the above embodiments, the present invention may also have other implementation modes. Any technical solution formed by equivalent replacement or equivalent transformation falls within the protection scope required by the present invention.

Claims

1. A high-precision prediction method based on multi-source data fusion and adaptive residual, characterized by: The following steps are involved: S1, collect data and related factor data, perform data preprocessing, and inject Gaussian noise, while using multi-source heterogeneous data fusion technology to integrate various types of data; S2, using a hybrid neural network model combining attention mechanism and residual block to process data features; S3. Train and couple the hybrid neural network model, build a deep learning model, and adjust the parameters to achieve model adaptive multi-task learning optimization; S4. Test and output the deep learning model to evaluate the performance of the final model.

2. The high-precision prediction method based on multi-source data fusion and adaptive residual according to claim 1, characterized in that: In the step S1, searching papers to filter out small sample data, forming a small sample data set small_df with a number of less than 1,000 and an accuracy of six decimal places; obtaining simulation data for target variables and related factors, forming a large-scale simulation data set large_df with a data volume 10 times that of the small sample data; and reading the specified columns and target variables from the Excel files of the large-scale simulation data and the small sample data, respectively, to construct the small_df and large_df data frames; Perform data preprocessing, define and call the data cleaning function clean_data, apply the dropna function to delete missing data values; apply the clip data pruning method to remove outliers; perform data conversion operations, including standardization, expansion, and scaling features, and introduce Gaussian noise; customize the class DataProcessor, including the _init_ initialization function, the transform conversion function, and the process_data data processing function.

3. The high-precision prediction method based on multi-source data fusion and adaptive residual according to claim 2 is characterized in that: In the _init_ initialization function, two standardized scalers scaler_large and scaler_small are defined, and the data frame is scaled using the RobustScaler method; at the same time, a polynomial feature processor PolynomialFeatures is also set, which only considers the interaction terms between features and the maximum is 2 times; The transform function accepts a data frame x_df as input, and ensures that it only contains the specified feature columns through input checking. If any column is missing, a ValueError is thrown to prompt the user; Generate polynomial features by applying the polynomial feature processor PolynomialFeatures, fit the scaler_large scaler using the generated polynomial features, and scale the polynomial features using the already fitted scaler_large scaler; The process_data data processing function includes the definition and call of the data cleaning function clean_data, and checks whether the number of features of small_df and large_df are consistent. If not, an error is thrown; the replication factor replication_factor is defined to increase the number of samples of the small sample data set, repeat the features of the small sample data set, and inject random Gaussian noise into each sample; two standardized scalers are fitted to fit the polynomial features of the small sample data set and the large-scale simulation data set respectively.

4. The high-precision prediction method based on multi-source data fusion and adaptive residual according to claim 1, characterized in that: In the step S2, a build_hybrid_model function is defined to construct a hybrid neural network model that combines an attention mechanism and a residual block; a data input layer of the hybrid neural network model is created by using the Input layer of Keras; Define a Dense function layer to generate attention weights with the same dimension as the input, introduce a Sigmoid activation function into the attention mechanism to ensure that the weights are between 0 and 1; in addition, multiply the input by the attention weight to obtain the weighted output result; Define the residual_block function of the residual block, whose input shortcut is the output of the attention mechanism, and specify the number of output units of the residual block; Compare the shortcut with the required number of units. If they are different, adjust them through the Dense layer and add an l2 regularization to achieve a residual structure. In the main path, use the relu activation function and add l2 regularization when passing through a Dense layer, and then perform batch normalization and Dropout regularization techniques. Finally, pass through a linearly activated Dense layer, and use the Add layer to add the output of the main path to the input value assigned by the attention mechanism to form a residual connection. Construct a fully connected layer and apply the relu function activation in the added Dense layer; in addition, establish calls to two residual blocks; The main output layer is constructed using the softplus activation function and the softmax activation function.

5. The high-precision prediction method based on multi-source data fusion and adaptive residual according to claim 1, characterized in that: In the step S3, a class EnsembleModel is created to integrate the model training method, and the training model calls the train_model function, so that the model finds the best loss balance in the regression and classification tasks, and combines the callback mechanism to optimize the training process; the train_model function model compilation calls the AdaptiveLoss class, so as to dynamically adjust the loss calculation method according to the training situation.

6. The high-precision prediction method based on multi-source data fusion and adaptive residual according to claim 5 is characterized in that: In the step S3, the class AdaptiveLoss is defined, including an _init_ initialization function, a _call_ calling function, a get_config configuration acquisition function and a from_config configuration function; the _init_ initialization function initializes a trainable variable dynamic attenuation coefficient alpha, which is used to adjust the weight between the main loss MSE and the auxiliary loss CE, defines the initial value and adaptively adjusts the main task loss and the auxiliary task loss during the training process; gradually reduces the value of alpha, and the weight is given by alpha and 1-alpha; the get_config configuration acquisition function and the from_config configuration function save and load the model to ensure that the state of the loss function is correctly stored and restored.

7. The high-precision prediction method based on multi-source data fusion and adaptive residual according to claim 6 is characterized by: In step S3, the train_model function is defined, x is defined as a feature, y is defined as a target, and the function converts the label y into a binary auxiliary target y_aux and converts it into a categorical variable form; the model is compiled using the Adam optimizer, the loss functions of the main task and the auxiliary task are specified as classes AdaptiveLoss and CE respectively, and the corresponding evaluation indicators are set; the data is divided into a training set and a validation set, and auxiliary targets are also created for the training set and the validation set; the random seed random_state is set; the EarlyStopping early stopping callback mechanism is set; and the ReduceLROnPlateau dynamic learning rate callback mechanism is set.

8. The high-precision prediction method based on multi-source data fusion and adaptive residual according to claim 7 is characterized in that: In the step S3, the class EnsembleModel is defined, including an _init_ initialization function, a train_ensemble training function, a predict prediction function, a save_models saving function, and a load_models loading function; in the train_ensemble function, the build_hybrid_model function is called according to the dimension of the input feature, a plurality of models are created using a list derivation, and the train_model function is called one by one to train each model, and the model is saved to a specified path after the training is completed; in the predict function, firstly, it is checked whether the model has been loaded, and if not, an exception is thrown, and then each model is predicted using a list derivation, and the median is calculated as the final prediction result; the class also includes a save_models function for saving the trained model and a load_models function for loading the saved model from the specified path.

9. The high-precision prediction method based on multi-source data fusion and adaptive residual according to claim 1, characterized in that: In step S4, a new output file is created for storing the model test results. After the integrated model training is saved, samples of the small sample data set x_small of feature x and the small sample data set y_small of feature y are selected as verification sets to verify the deep learning model; different evaluation indicators are used to evaluate the model performance, the calculated evaluation indicators are written to the new output file, and a formatted string is used to ensure that the output value retains four decimal places; several other existing machine learning models are trained and compared with the present deep learning model.

10. The high-precision prediction method based on multi-source data fusion and adaptive residual according to claim 9, characterized in that: The evaluation indicators include the current training round Epoch, mean absolute error MAE, mean square error MSE, root mean square error RMSE, explained variance Explained Variance, R 2 Values ​​and mean absolute percentage error MAPE values.