Equipment demand method based on XGBoost and Kalman particle filter

The equipment demand method through XGBoost model training and Kalman particle filter correction solves the problem of nonlinear and noise interference in equipment demand prediction, achieving high-precision and stable equipment consumption demand prediction, and supporting scientific and reasonable equipment provisioning.

CN120296574APending Publication Date: 2025-07-11NO 15 INST OF CHINA ELECTRONICS TECH GRP
View PDF 0 Cites 1 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing equipment demand prediction methods deal with nonlinear dynamic characteristics, multi-source noise interference and battlefield situation sudden changes, have insufficient prediction accuracy and poor stability. Traditional methods such as statistical analysis method, task quantity method and neural network method have problems such as strong data dependence and weak dynamic adaptability.

Method used

The XGBoost model is used to train and predict the device data, and the Kalman particle filter is used to correct it. Through noise cancellation, feature extraction, hyperparameter optimization and particle set weight screening, dynamic adaptive prediction of device consumption demand is achieved.

Benefits of technology

It improves the stability and reliability of equipment demand forecasting, can effectively deal with nonlinear and noise interference, provides high-precision equipment consumption demand forecasting, supports scientific and reasonable equipment allocation, and reduces resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120296574A_ABST
    Figure CN120296574A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of equipment guarantee and resource allocation. The invention discloses an equipment demand method based on XGBoost and a Kalman particle filter. The method comprises the following steps: carrying out noise elimination on original equipment data to obtain a standard data set; training an initial XGBoost model by using the standard data set, and adjusting parameters of the initial XGBoost model to obtain a target XGBoost model; using the target XGBoost model to predict the current standard data set of the equipment to obtain the consumption demand prediction of the initial output equipment; and correcting the initial output equipment consumption demand prediction by using a Kalman particle filter to obtain the target output equipment consumption demand prediction. Through the method, the stability and reliability of the model in practical application can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of equipment support and resource allocation, and particularly relates to a method for equipment requirements based on XGBoost and Kalman particle filters. Background Technique

[0002] In the field of equipment support and resource allocation, traditional prediction methods (including statistical analysis methods, task volume methods, and intelligent algorithms) face bottlenecks such as insufficient prediction accuracy and poor stability due to difficulties in dealing with non-linear dynamic characteristics, multi-source noise interference, and sudden changes in battlefield situations. Statistical analysis methods rely on the similarity of historical data, task volume methods are limited by static parameter modeling, and intelligent algorithms such as neural networks have defects such as strong data dependence and weak dynamic adaptability.

[0003] In view of this, this application provides a method for equipment requirements based on XGBoost and Kalman particle filters. Summary of the Invention

[0004] Based on this, it is necessary to provide a method for equipment requirements based on XGBoost and Kalman particle filters to solve the above technical problems.

[0005] In the first aspect, this application provides a method for equipment requirements based on XGBoost and Kalman particle filters, and the method includes:

[0006] Eliminate noise from the original equipment data to obtain a standard data set;

[0007] Use the standard data set to train the initial XGBoost model, adjust the parameters of the initial XGBoost model, and obtain a target XGBoost model;

[0008] Use the target XGBoost model to predict the current standard data set of the equipment, and obtain a predicted value of the initial output equipment consumption demand;

[0009] Use the Kalman particle filter to correct the predicted value of the initial output equipment consumption demand to obtain a predicted value of the target output equipment consumption demand.

[0010] In some implementable ways, the step of eliminating noise from the original equipment data to obtain a standard data set includes:

[0011] Perform abnormal data processing on the original equipment data to obtain the original equipment data after abnormal data processing;

[0012] Use the method of averaging the data of the sampling period to process the original equipment data after abnormal data processing, and obtain the original equipment data that is stable within a short time interval;

[0013] Based on the original device data that is stable within the short time interval, a standard data set is obtained, where the standard data set includes a training data set, a validation data set, and a test data set.

[0014] In some implementable ways, the step of training the initial XGBoost model using the standard data set and adjusting the parameters of the initial XGBoost model to obtain the target XGBoost model includes:

[0015] Feature extraction is performed on the data in the standard data set to obtain feature standard data;

[0016] The feature standard data is divided to obtain the training data set, the validation data set, and the test data set;

[0017] Using the cross-validation algorithm, taking the training data set, the validation data set, and the test data set as input data, training the initial XGBoost model, and determining the hyperparameter combination of the initial XGBoost model;

[0018] According to the hyperparameter combination, the optimal target XGBoost model is obtained.

[0019] In some implementable ways, the step of training the initial XGBoost model using the standard data set and adjusting the parameters of the initial XGBoost model to obtain the target XGBoost model further includes:

[0020] Construct the training data set, where the calculation formula for constructing the training data set D is:

[0021] D = (X z , y z ) → z = 1, 2, 3, …, N;

[0022] where X z represents the feature vector, y z represents the device consumption demand label, and z represents the feature sample set;

[0023] Initialize the initial prediction value of the initial XGBoost model, where the calculation formula for the initial prediction value is:

[0024]

[0025] where F n represents the prediction function of the nth decision tree, and τ represents the decision tree set;

[0026] Construct a set of decision trees, where the calculation formula for the decision trees in the decision tree set τ is:

[0027]

[0028] Among them, Q represents the mapping relationship between the example and its associated leaf node, representing the structure of each regression tree, W represents the leaf weight, N represents the number of leaf nodes in the tree, F(X) represents the decision tree prediction function, and W Q(X) represents the leaf node weight, R m represents the feature space, and R N represents the weight space;

[0029] According to the decision tree set, adjust the complexity of the initialized initial XGBoost model to obtain a regularization term. Among them, the calculation formula for the regularization term Ω(F) is:

[0030]

[0031] Among them, λ and ξ represent adjustment coefficients for controlling the number of leaf nodes N and the leaf node weight W;

[0032] According to the initial predicted value and the regularization term, construct an initial objective function. Among them, the calculation formula for the initial objective function is:

[0033]

[0034] Among them, μ represents a loss function for measuring the difference between the predicted value and the true value;

[0035] Perform iterative calculations on the initial objective function to update the initial predicted value to obtain a target predicted value. Among them, the calculation formula for the target predicted value is:

[0036]

[0037] Among them, t represents the number of iterations;

[0038] According to the target predicted value, update the initial objective function to obtain a final objective function. Among them, the calculation formula for the final objective function is:

[0039]

[0040] Among them, μ t represents the objective function of the t-th iteration, z represents the sample index, RUL z represents the true value, represents the predicted value of the (t - 1)-th iteration, and F z (X z ) represents the predicted value of the t-th decision tree, and Ω(Ft ) represents the regularization term;

[0041] According to the final objective function, the target XGBoost model is obtained, where the calculation formula of the target XGBoost model is:

[0042]

[0043] Among them, OBJ represents minimizing the objective function, G k represents the first derivative of the loss function, H k represents the second derivative of the loss function, δ and γ represent adjustment coefficients, and k represents the number of leaf nodes.

[0044] In some implementable ways, the step of using the target XGBoost model to predict the current standard data set of the device to obtain the predicted initial output device consumption demand includes:

[0045] Obtain the initial current standard data set of the device;

[0046] Perform noise elimination processing on the initial current standard data set to obtain the current data set;

[0047] Input the current data set into the target XGBoost model to obtain the predicted initial output device consumption demand.

[0048] In some implementable ways, the step of using the Kalman particle filter to correct the predicted initial output device consumption demand to obtain the predicted target output device consumption demand includes:

[0049] Generate an initial particle set according to the prior distribution Monte Carlo sampling, where the calculation formula for particle initialization is:

[0050]

[0051] Among them, α represents particle initialization, Φ(·) represents the conditional probability distribution function, represents the state vector, y 1:z-1 represents the measurement vector or system output;

[0052] Use the nonlinear state transition function to process the initial particle set to generate a predicted particle set;

[0053] X z = F(X z-1 , G) → z ∈ N;

[0054] Among them, X z represents the current z state vector, G represents the system noise, and F(·) represents the nonlinear state transition function;

[0055] Calculate the observed values of each predicted particle according to the predicted particle set and the measurement noise, and obtain the observed values of each predicted particle. Among them, the calculation formula for the observed values of each predicted particle in the observed value set is:

[0056] y z =H(X z ,V z )→z∈N;

[0057] Among them, y z represents the observed value of z at the current moment, H(·) represents the non-linear observation function, and V z represents the measurement noise;

[0058] Calculate the weights of each predicted particle according to the observed values of each predicted particle, and perform normalization to obtain the normalized weights of each predicted particle;

[0059] Perform high-weight particle screening on the normalized weights of each predicted particle to obtain an updated particle set. Among them, the calculation formula for the updated particle set is:

[0060]

[0061] The normalization calculation formula is:

[0062]

[0063] The calculation formula for high-weight particle screening is:

[0064]

[0065] Among them, n represents the posterior distribution, represents the weight of the particle, λ represents the Dirac function, and β is equal to Φ(y z |X z )Φ(y z |X z-1 ) / γ p (X z |X 0:z ,y 1:z ) represents the importance distribution;

[0066] According to the updated particle set and the corresponding weights, correct the prediction of the initial output device consumption demand to obtain the prediction of the target output device consumption demand.

[0067] In some implementable ways, the step of performing high-weight particle screening on the normalized weights of each predicted particle to obtain an updated particle set includes:

[0068] Based on the EKPF decision rule, high-weight particle screening is performed on the weights of the normalized predicted particles, the predicted particles with low weights are eliminated, and resampling is used to supplement them to keep the total number unchanged.

[0069] In a second aspect, a device demand system based on XGBoost and Kalman particle filter is provided, which is applied to the device demand method based on XGBoost and Kalman particle filter as described above. The system includes:

[0070] An initial unit for eliminating noise from the original device data to obtain a standard data set;

[0071] A training unit for training an initial XGBoost model using the standard data set and adjusting the parameters of the initial XGBoost model to obtain a target XGBoost model;

[0072] A processing unit for predicting the current standard data set of the device using the target XGBoost model to obtain a predicted initial output device consumption demand;

[0073] A result unit for correcting the predicted initial output device consumption demand using a Kalman particle filter to obtain a predicted target output device consumption demand.

[0074] In a third aspect, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the foregoing method are implemented.

[0075] In a fourth aspect, a computer program is provided. When the computer program is executed by a processor, the steps of the foregoing method are implemented.

[0076] Advantageous effects: The present application provides a device demand method based on XGBoost and Kalman particle filter. Noise is eliminated from the original device data to obtain a standard data set; the initial XGBoost model is trained using the standard data set, and the parameters of the initial XGBoost model are adjusted to obtain a target XGBoost model; the current standard data set of the device is predicted using the target XGBoost model to obtain a predicted initial output device consumption demand; the predicted initial output device consumption demand is corrected using a Kalman particle filter to obtain a predicted target output device consumption demand. Through the above method, the stability and reliability of the model in practical applications can be ensured. Description of the Drawings

[0077] To more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0078] Figure 1 It is a flowchart of a device requirement method based on XGBoost and Kalman particle filter in an embodiment.

[0079] Figure 2 It is a device consumption demand prediction framework of a device requirement method based on XGBoost and Kalman particle filter in an embodiment.

[0080] Figure 3 It is a flowchart of the EKPF algorithm of a device requirement method based on XGBoost and Kalman particle filter in an embodiment. Detailed implementation manners

[0081] To facilitate the understanding of the present application, the following will describe the present application more comprehensively with reference to the relevant drawings. Embodiments of the present application are shown in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0082] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs. The terms used in the description of the present application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0083] It can be understood that the terms "first", "second", etc. used in the present application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.

[0084] The following will explain some terms related to the present application to facilitate the understanding of the present application:

[0085] XGBoost: An efficient gradient boosting algorithm used for classification and regression tasks. It improves the accuracy of the model by continuously combining new decision trees to adapt to the residuals.

[0086] Particle Filter (PF): A Bayesian state estimation method based on Monte Carlo sampling technology, capable of handling non-linear and non-Gaussian problems. It estimates the system state by selecting samples (particles) from the posterior distribution and assigning weights to them.

[0087] Kalman Filter (KF): A linear filtering and prediction algorithm that solves the state estimation problem of linear dynamic systems through a recursive method. It assumes that both system noise and measurement noise are Gaussian noises.

[0088] Kalman Particle Filter (KFPF): A method that combines Kalman filter and particle filter, capable of handling both linear and non-linear problems simultaneously, improving the accuracy and stability of state estimation.

[0089] Mean Absolute Error (MAE): An index used to evaluate the performance of a prediction model, representing the average of the absolute values of the differences between predicted values and actual values.

[0090] Root Mean Square Error (RMSE): Another index used to evaluate the performance of a prediction model, representing the square root of the mean of the squares of the differences between predicted values and actual values.

[0091] Bayesian Posterior Correction is a dynamic optimization method based on Bayes' theorem in statistics and machine learning. By integrating prior knowledge and new observed data, it updates the probability distribution to correct the model prediction results. Its core lies in using the posterior probability distribution to probabilistically weight and adjust the initial prediction, thereby reducing uncertainty and enhancing the accuracy of the prediction.

[0092] Most of the research on equipment consumption demand is mainly based on specific calculation methods at the micro level, but such methods cannot reflect the actual trends and laws of equipment consumption. Therefore, on the original basis, a kinetic model can be established, taking into account actual factors such as personnel and weapons, to explore the laws of equipment consumption at different stages from a macro level. For example, it has important strategic significance for commanders to arrange plans and grasp the laws. However, excessive equipment supply and transportation will waste a lot of manpower and material resources, and even delay the opportunity until failure. Therefore, scientific and reasonable prediction methods need to be used for equipment allocation to reduce waste and ensure victory. However, due to various uncertainties and complexities, the prediction work becomes very difficult, which is of great significance for formulating plans and having an impact.

[0093] Currently, there are mainly 3 research methods for equipment demand prediction.

[0094] One is the statistical analysis method, which uses statistical methods to analyze the consumption law of equipment. This method generally synthesizes the actual equipment consumption law, can obtain the equipment consumption in general cases, has certain regularity, and the method is simple to implement. However, the premise of statistical analysis is that a large amount of reliable historical data is required as theoretical support, and it is required that the future is somewhat similar to the past. Therefore, the predicted data and equipment consumption law obtained by this method are not suitable for the future. Currently, with the wide application of high technologies, the prediction results of the statistical analysis method will not be applicable to future informatization.

[0095] The second is the task volume method. The task volume method takes the equipment quantity and technical means as the basic reference basis, and determines the quantity of equipment used according to the tasks undertaken and the expected effects. It is a prediction method based on the basic reference principle of the strike effect. This method starts from the task, begins with the strike effect on the enemy target, and calculates the usage quantity of various equipment one by one to obtain the total quantity. The predicted data obtained has the advantages of strong pertinence and simple and easy prediction process, can reflect the intention and the expected intensity, and is widely used in [a certain context], and has a certain reference role for the future equipment consumption prediction work. However, this method cannot reflect the actual consumption situation of equipment on the battlefield, and there are often large deviations between the prediction results and the actual equipment consumption, making the support work carried out passively.

[0096] The third is the neural network method. The process adopts mathematical methods such as the exponential method and the analytic hierarchy process. First, various factors affecting the equipment are quantified, and the results are input into the neural network; then, the network structure is optimized by combining fuzzy control and the neural network; then, the historical data is iteratively calculated to train the weights, and a model for predicting equipment consumption is obtained. The prediction of equipment demand itself is a relatively complex problem, and there are many influencing factors. However, this method still has problems such as difficult construction of the network structure, poor training effect of connection weights, and relatively complex implementation process. And in determining the network structure, it depends on the experience and needs of the predictor, so that some important information will be considered lost, resulting in inaccurate prediction results. Since the rise of neural network theory in the 1980s of the 20th century, it has set off a research and application boom, and has been applied to various fields and achieved excellent results. However, this method is not applicable to all demand predictions. The situation and unit goals have the characteristics of concealment and variability, the situation is ever-changing, and the consumption of materials will also increase. Due to the inability to master information such as its own demand, there are many uncertainties. In addition, there are also uncertainties in the support method and location. Considering the above various highly mutant factors and the need for historical data, this mathematical model of neural network with fixed parameters is not suitable. Even if the input data can be well fitted, it cannot accurately predict the demand for a long time. And because the usual flight training has regularity, this prediction method is not applicable to various highly mutant factors.

[0097] Foreign research on equipment consumption demand mainly focuses on the establishment and improvement of prediction models. Common methods include the Monte Carlo method, neural network method, support vector machine method, etc. Since the beginning of the 19th century, training and equipment consumption data have been measured in terms of consumption per unit time, and system analysis techniques and operations research methods have been used for prediction assistance, starting a decades-long research on equipment consumption prediction.

[0098] This application provides a device demand method based on XGBoost and Kalman particle filter, and the method includes:

[0099] S100, eliminating noise from the original equipment data to obtain a standard data set.

[0100] Specifically, obtaining the standard data set may include the following steps:

[0101] S101, performing abnormal data processing on the original equipment data to obtain the original equipment data after abnormal data processing.

[0102] S102, using the method of averaging the data of the sampling period to process the original equipment data after abnormal data processing to obtain the original equipment data stable within a short time interval.

[0103] S103, obtaining a standard data set according to the original equipment data stable within the short time interval, where the standard data set includes a training data set, a validation data set, and a test data set.

[0104] It should be noted that in the initial stage of equipment consumption demand prediction, the original equipment data needs to undergo systematic noise elimination and standardization processing. First, in step S101, for possible outliers, missing values, or sensor noise in the original equipment data, an anomaly detection algorithm (such as outlier identification based on statistical distribution or sliding window threshold method) is used for abnormal data processing. This step ensures the integrity and reliability of the data set by removing unreasonable data points or interpolating missing values, obtaining the original equipment data after preliminary cleaning.

[0105] Subsequently, in step S102, for the possible random fluctuation problem of equipment data within a short time interval, the time series averaging method is used to smooth the data after abnormal processing. Specifically, with a fixed sampling period (such as every 5 minutes) as the window, arithmetic mean or weighted mean calculation is performed on all data points within the window, so as to eliminate high-frequency noise and extract the stable equipment operation trend. For example, if the original data sampling frequency is too high, resulting in large differences in adjacent time point data, the data oscillation amplitude can be significantly reduced by calculating the mean within the window, generating a short-term stable equipment state feature sequence.

[0106] Finally, in step S103, the dataset that has undergone noise elimination and smoothing processing is further divided into a standardized training set, validation set, and test set. When dividing, the temporal characteristics and data distribution balance need to be considered: the training set is used for model parameter learning and usually contains 70%-80% of the historical data; the validation set is used for hyperparameter tuning and model selection, accounting for about 10%-15%; the test set retains 10%-15% of the data in the latest time period to evaluate the model's generalization ability. In addition, the min-max normalization method can be used to standardize the features, linearly mapping the data of each dimension to the interval [0,1] to eliminate the impact of dimensional differences on model training. The finally formed standard dataset has both data quality guarantee and structured features, providing a high signal-to-noise ratio input basis for subsequent XGBoost model training and Kalman particle filter correction.

[0107] S200, use the standard dataset to train the initial XGBoost model and adjust the parameters of the initial XGBoost model to obtain the target XGBoost model.

[0108] Specifically, obtaining the target XGBoost model may include the following steps:

[0109] S201, extract features from the data in the standard dataset to obtain feature standard data.

[0110] S202, divide the feature standard data to obtain the training dataset, the validation dataset, and the test dataset.

[0111] S203, use the cross-validation algorithm, take the training dataset, the validation dataset, and the test dataset as input data, train the initial XGBoost model, and determine the hyperparameter combination of the initial XGBoost model.

[0112] S204, obtain the optimal target XGBoost model according to the hyperparameter combination.

[0113] It should be noted that first, in step S201, based on the device operation parameters in the standard dataset (such as energy consumption, working status, environmental temperature, etc.), multi-dimensional information needs to be extracted through feature engineering (conventional feature extraction methods). For example, for time series data, lag features (such as the energy consumption value in the previous hour), sliding window statistics (such as the mean and variance within the window), and periodic encoding (such as hour, day of the week, etc.) are constructed, and at the same time, business indicators (such as energy consumption efficiency per unit time) are derived in combination with the physical characteristics of the device. In addition, high-correlation features are screened through principal component analysis (PCA) or mutual information method, redundant information is removed, and a standard dataset containing time series dynamic features and physical association features is formed to provide high-quality input for the model.

[0114] Subsequently, in step S202, to avoid the problem of model overfitting caused by time dependence in time series data, a time series stratified partitioning strategy is adopted to dynamically allocate the feature standard data. Specifically, the data is divided into a training set (the first 80% of the time period, used for the model to learn long-term trends), a validation set (the middle 10%, used for hyperparameter tuning and early stopping monitoring), and a test set (the last 10%, strictly isolated to evaluate the future performance of the model) in chronological order. When partitioning, it is necessary to ensure that each subset covers the complete equipment operation cycle (such as seasonal changes, maintenance cycles), so as to ensure the generalization ability of the model under different working conditions.

[0115] On this basis, in step S203, the hyperparameters of the XGBoost model are optimized using the cross-validation algorithm. The specific process may include:

[0116] The training set is divided into multiple time series folds, and the last fold is reserved as the validation subset in each iteration to simulate the prediction behavior of the model in progressive time periods;

[0117] Define the hyperparameter search space, including core parameters such as the learning rate (0.01 - 0.3), the maximum depth of the tree (3 - 8 layers), regularization parameters (L2 regularization term coefficient and node splitting threshold), etc.;

[0118] Using the root mean square error (RMSE) on the validation set or a custom weighted loss function as the evaluation index, traverse the parameter combinations through grid search, and screen out the configuration with the best performance on the validation set. This process can effectively balance the model complexity and prediction accuracy, and avoid underfitting or overfitting problems caused by improper parameters.

[0119] Finally, in step S204, after determining the optimal hyperparameter combination through multi-stage optimization, Bayesian optimization is used to perform a refined search in the parameter space to further improve the model performance. The confirmation of the target XGBoost model requires the following verifications:

[0120] Full-scale training: Combine the training set and the validation set, and retrain the model with the optimal parameters to fully explore the potential laws in the data;

[0121] Test set evaluation: Calculate key indicators (such as MAE ≤ 5%, R 2 ≥ 0.95) on the strictly isolated test set to verify the prediction reliability of the model for new data;

[0122] Interpretability analysis: By means of SHAP values, the feature importance is analyzed, and the core driving factors of device energy consumption are output (for example, the contribution degree of environmental temperature reaches 32%, and the contribution degree of device load rate reaches 28%), providing a quantifiable basis for operation and maintenance decisions. Through feature optimization, time-series sensitive data processing, and multi-strategy parameter tuning, this process ensures that the target XGBoost model has high accuracy and strong generalization ability, providing a reliable basis for subsequent dynamic correction integrating Kalman particle filtering.

[0123] In addition, step S200 may further include:

[0124] Construct the training data set. The calculation formula for constructing the training data set D is:

[0125] D = (X z , y z ) → z = 1, 2, 3, …, N;

[0126] where X z represents the feature vector, y z represents the device consumption demand label, z represents the feature sample set, which is the sample index, and N is the total sample size; specifically, X z is the feature vector of the z-th sample (such as m-dimensional features such as device temperature, pressure, and running duration); y z is the corresponding device consumption demand label (i.e., the true value, such as the energy consumption value or the remaining useful life RUL z ).

[0127] Initialize the initial prediction value of the initial XGBoost model. The calculation formula for the initial prediction value is:

[0128]

[0129] where F n represents the prediction function of the n-th decision tree, and τ represents the decision tree set;

[0130] The initial prediction value of the model is defined as the weighted sum of the prediction results of all decision trees. Initially, the prediction values of all trees are initialized to zero or a constant (such as the label mean).

[0131] Construct the decision tree set. The calculation formula for the decision tree in the decision tree set τ is:

[0132]

[0133] Among them, Q represents the mapping relationship between the example and its associated leaf node (the splitting rule of the tree), representing the structure of each regression tree, W represents the leaf weight, N represents the number of leaf nodes in the tree, F(X) represents the decision tree prediction function, and W Q(X) represents the leaf node weight, that is, the weight value when the sample X falls into the leaf node, and R m represents the feature space, and R N represents the weight space;

[0134] According to the set of decision trees, adjust the complexity of initializing the initial XGBoost model to obtain a regularization term. Among them, the calculation formula of the regularization term Ω(F) is:

[0135]

[0136] Among them, λ and ξ represent adjustment coefficients, used to control the number of leaf nodes N and the leaf node weight W;

[0137] To prevent overfitting, XGBoost introduces a regularization term Ω(F) to control the complexity of the tree. λ punishes the number of leaf nodes and suppresses the splitting depth of the tree; ξ constrains the amplitude of the leaf node weight W to prevent the weight from being too large;

[0138] According to the initial prediction value and the regularization term, construct an initial objective function. Among them, the calculation formula of the initial objective function is:

[0139]

[0140] Among them, μ represents the loss function, used to measure the difference between the prediction value and the true value;

[0141] The goal of model training is to minimize the loss function μ, which includes the sum of the prediction error and the regularization term, Sum the regularization terms of all trees to ensure that the overall model complexity is controllable.

[0142] Perform iterative calculations on the initial objective function to update the initial prediction value to obtain the target prediction value. Among them, the target prediction value The calculation formula of is:

[0143]

[0144] Among them, t represents the number of iterations;

[0145] By gradually adding decision trees to optimize the objective function, the prediction value of the t-th iteration is is the cumulative prediction value of the first t - 1 trees; is the prediction value of the newly added t-th tree.

[0146] Update the initial objective function according to the target predicted value to obtain a final objective function, where the calculation formula of the final objective function is:

[0147]

[0148] where μ t represents the objective function of the t-th iteration, z represents the sample index, and RUL z represents the true value, represents the predicted value of the (t - 1)-th iteration, and F z (X z ) represents the predicted value of the t-th decision tree, and Ω(D t ) represents the regularization term;

[0149] For accelerated optimization, XGBoost expands the loss function η to the second-order term at to form the first derivative and the second derivative.

[0150] Obtain the target XGBoost model according to the final objective function, where the calculation formula of the target XGBoost model is:

[0151]

[0152] where OBJ represents minimizing the objective function, G k represents the first derivative of the loss function, the sum of the first-order gradients of all samples on the leaf node, and H k represents the second derivative of the loss function, the sum of the second-order gradients of all samples on the leaf node k, δ and γ represent adjustment coefficients, and K represents the number of leaf nodes.

[0153] By combining the leaf node weights and the regularization term, δ represents the smoothing coefficient to prevent the denominator from being zero, and γ represents the penalty coefficient to further control the number of leaf nodes.

[0154] S300. Use the target XGBoost model to predict the current standard data set of the device to obtain the initial predicted value of the device consumption demand.

[0155] Specifically, obtaining the initial predicted value of the device consumption demand may include the following steps:

[0156] S301. Obtain the initial current standard data set of the device.

[0157] S302. Perform noise elimination processing on the initial current standard data set to obtain the current data set.

[0158] S303. Input the current data set into the target XGBoost model to obtain the initial predicted value of the device consumption demand.

[0159] It should be noted that the current standard data set indicates that for the data set formed for the current device lock, for the noise cancellation processing method, it can be the same as the noise cancellation processing method in the aforementioned step S100, which will not be elaborated here. Finally, the current data set is input into the trained target XGBoost model for prediction, so as to obtain the predicted initial output device consumption demand.

[0160] In addition, step S300 may further include:

[0161] Generate an initial particle set according to the prior distribution Monte Carlo sampling, where the calculation formula for particle initialization is:

[0162]

[0163] where α represents particle initialization, which here represents sampling the particle set from the prior distribution Φ. Φ(i) represents the conditional probability distribution function, represents the state vector, representing the state history of the i-th particle, y 1:z-1 represents the measurement vector or system output, representing the measurement history;

[0164] Generate an initial particle set through the Monte Carlo method based on the joint distribution of historical states and observed data. represents the state vector of the i-th particle from time step 0 to z - 1 (such as device historical energy consumption, operating mode, etc.); y 1:z-1 is the measurement vector for the corresponding time period (such as the energy consumption value actually recorded by the sensor); Φ(·) is the conditional probability distribution function, and usually the prior distribution (such as Gaussian distribution or the empirical distribution of device historical states) is selected as the importance sampling distribution.

[0165] Process the initial particle set using the non-linear state transition function to generate a predicted particle set;

[0166] X z = F(X z-1 , G) → z ∈ N;

[0167] where X z represents the current z state vector, G represents the system noise, and F(·) represents the non-linear state transition function; z ∈ N, (the set of natural numbers).

[0168] Push the particles from time z - 1 to time z through the non-linear state transition function F(·) and inject the system noise G. F(·) simulates the physical evolution law of the device state (such as the non-linear relationship between energy consumption and load); the system noise G follows a Gaussian distribution with a mean of zero and a covariance matrix, and is used to characterize the model uncertainty.

[0169] Calculate the observed values of each predicted particle according to the predicted particle set and the measurement noise, and obtain the observed values of each predicted particle. The calculation formula for the observed values of each predicted particle in the observed value set is as follows:

[0170] y z =H(X z ,V z )→z∈N;

[0171] where y z represents the observed value of z at the current moment, H(·) represents the non-linear observation function that maps the state vector to the observation space (such as predicting the sensor measurement value according to the device state), and V z represents the measurement noise, reflecting the sensor error;

[0172] Generate the virtual observed values of each particle through the non-linear observation function H(·) based on the predicted particle set, and superimpose the measurement noise V z ,

[0173] Calculate the weights of each predicted particle according to the observed values of each predicted particle, and perform normalization to obtain the normalized weights of each predicted particle; among them, the weights are updated according to the likelihood of the predicted particle observations and the actual measurement values, and then the conventional normalization process is performed. Obtain the normalized weights of each predicted particle.

[0174] Perform high-weight particle screening on the normalized weights of each predicted particle to obtain an updated particle set. The calculation formula for the updated particle set is as follows:

[0175]

[0176] The normalization calculation formula is:

[0177]

[0178] The calculation formula for high-weight particle screening is:

[0179]

[0180] where n represents the posterior distribution, λ represents the Dirac function, represents the weight of the particle, and β is equal to Φ(y z ∣X z )Φ(y z ∣X z-1 ) / γ p (X z ∣X 0:z ,y 1:z ) represents the importance distribution, which is the weight update factor;

[0181] To avoid particle degeneration (domination by a few particle weights), systematic resampling is used to screen high-weight particles. After resampling, low-weight particles are eliminated, and high-weight particles are replicated to form an updated particle set.

[0182] Based on the updated particle set and the corresponding weights, the initial prediction of the consumption demand of the output device is corrected to obtain the target prediction of the consumption demand of the output device.

[0183] Using the updated particle set and its weights, Bayesian posterior correction is performed on the initial prediction of the XGBoost model. The corrected target prediction incorporates the uncertainties of both the model prediction and real-time observations, significantly enhancing the robustness against dynamic noise and nonlinear effects.

[0184] S400, using the Kalman particle filter, corrects the initial prediction of the consumption demand of the output device to obtain the target prediction of the consumption demand of the output device.

[0185] Specifically, obtaining the initial prediction of the consumption demand of the output device may include:

[0186] Based on the EKPF decision rule, high-weight particles are screened from the weights of the normalized prediction particles, low-weight prediction particles are eliminated, and the total number is replenished through resampling.

[0187] Specifically, in the particle screening and resampling process based on the EKPF (Ensemble Kalman Particle Filter) decision rule, the problem of degeneration in traditional particle filtering is solved by dynamically adjusting the particle distribution to ensure the accuracy and computational efficiency of state estimation. Specifically, after weight normalization (i.e., the sum of all particle weights is 1), the system first screens out and eliminates low-weight particles according to a preset threshold or adaptive criterion. For example, if the total number of particles is 1000, when the weight of a certain particle < 0.0005, its contribution to the posterior distribution is considered negligible and it is directly removed from the set. Subsequently, based on the systematic resampling strategy, high-weight particles are replicated proportionally according to the cumulative distribution function (CDF) of the normalized weights: the weight interval [0, 1] is divided into N equal parts, a random starting point is generated in each sub-interval, and particles covering this point are selected for replication with a step size of 1 / N. This process ensures an increase in the particle density in the high-likelihood region while maintaining the total number constant. In the EKPF framework, the resampled particle set is further corrected in state through Kalman gain adjustment, that is, using the latest observation value y zThe linearized approximation of the observation model H(·) is used to locally optimize the particle state. Through the calculation of the integrated covariance matrix, the particles are aggregated towards the high-likelihood region. Finally, the updated particle set not only retains the information of the high-weight particles but also suppresses the sample impoverishment effect introduced by resampling through Kalman correction, thus balancing the estimation accuracy and diversity. For example, in device power consumption prediction, if the weight of a particle drops sharply due to a load mutation and it is removed, the system generates new particles that better fit the actual state by replicating adjacent high-weight particles and superimposing Kalman correction, making the posterior distribution more accurately reflect the dynamic characteristics of the device and improving the prediction robustness.

[0188] In summary, a device demand method based on XGBoost and Kalman particle filter proposed in this application has the following beneficial effects:

[0189] Nonlinear adaptation: Through the non-parametric characteristics of particle filtering, it can effectively handle the strong nonlinearity of the device state evolution and the observation relationship.

[0190] Real-time correction: Combining the latest measurement data to dynamically adjust the predicted value and suppressing the deviation caused by data drift or sudden interference in the XGBoost model.

[0191] Uncertainty quantification: The distribution of the particle set can be directly used to estimate the confidence interval of the predicted value (for example, the 90% confidence interval is the 5% and 95% quantiles of the particle values).

[0192] This process upgrades the static prediction of XGBoost to dynamic adaptive prediction through the closed-loop mechanism of Monte Carlo sampling and Bayesian update, providing high-reliability decision support for device power consumption management.

[0193] In the second aspect, a device demand system based on XGBoost and Kalman particle filter is provided, which is applied to the aforementioned device demand method based on XGBoost and Kalman particle filter. The system includes:

[0194] An initial unit for eliminating noise from the original device data to obtain a standard data set.

[0195] A training unit for training the initial XGBoost model using the standard data set and adjusting the parameters of the initial XGBoost model to obtain a target XGBoost model.

[0196] A processing unit for using the target XGBoost model to predict the current standard data set of the device to obtain an initial predicted value of the device consumption demand.

[0197] A result unit, configured to correct the prediction of the consumption demand of the initial output device by using a Kalman particle filter, so as to obtain a prediction of the consumption demand of the target output device.

[0198] In a third aspect, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the foregoing method are implemented.

[0199] In a fourth aspect, a computer program is provided. When the computer program is executed by a processor, the steps of the foregoing method are implemented.

[0200] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. The non-volatile memory can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory can include a random access memory (RAM) or an external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), direct rambus RAM (RDRAM), direct rambus dynamic RAM (DRDRAM), and rambus dynamic RAM (RDRAM), etc.

[0201] The various embodiments in the present disclosure are described in a progressive manner. The same or similar parts among the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.

[0202] The protection scope of the present disclosure is not limited to the above embodiments. Obviously, those skilled in the art can make various changes and deformations to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and deformations belong to the scope of the claims of the present disclosure and their equivalent technologies, the intention of the present disclosure also includes these changes and deformations.

Claims

1. A device requirement method based on XGBoost and Kalman particle filter, characterized in that the method Including: Performing noise elimination on the original device data to obtain a standard data set; Training an initial XGBoost model using the standard data set and adjusting the parameters of the initial XGBoost model to obtain a target XGBoost model; Using the target XGBoost model to predict the current standard data set of the device to obtain an initial predicted value of the device consumption demand; Using a Kalman particle filter to correct the initial predicted value of the device consumption demand to obtain a target predicted value of the device consumption demand.

2. The device requirement method based on XGBoost and Kalman particle filter according to claim 1, wherein The step of performing noise elimination on the original device data to obtain a standard data set includes: Performing abnormal data processing on the original device data to obtain the original device data after abnormal data processing; Processing the original device data after abnormal data processing by averaging the data within the sampling period to obtain the original device data that is stable within a short time interval; Obtaining a standard data set based on the original device data that is stable within a short time interval, where the standard data set includes a training data set, a validation data set, and a test data set.

3. The device requirement method based on XGBoost and Kalman particle filter according to claim 2, wherein The step of training an initial XGBoost model using the standard data set and adjusting the parameters of the initial XGBoost model to obtain a target XGBoost model includes: Performing feature extraction on the data in the standard data set to obtain feature standard data; Dividing the feature standard data to obtain the training data set, the validation data set, and the test data set; Using a cross-validation algorithm, taking the training data set, the validation data set, and the test data set as input data to train the initial XGBoost model and determining the hyperparameter combination of the initial XGBoost model; Obtaining an optimal target XGBoost model according to the hyperparameter combination.

4. The device requirement method based on XGBoost and Kalman particle filter according to claim 3, wherein The step of training an initial XGBoost model using the standard data set and adjusting the parameters of the initial XGBoost model to obtain a target XGBoost model further includes: Constructing the training data set, where the calculation formula for constructing the training data set D is: D = (X z , y z ) → z = 1, 2, 3, …, N; Among them, X z represents the feature vector, y z represents the label of the device consumption demand, and z represents the feature sample set; Initialize the initial prediction value of the initial XGBoost model, where the initial prediction value is calculated by the formula: Among them, F n represents the prediction function of the nth decision tree, and τ represents the set of decision trees; Constructing a decision tree ensemble, where the calculation formula for the decision tree in the decision tree ensemble τ is: Among them, Q represents the mapping relationship between the example and its associated leaf node, representing the structure of each regression tree, W represents the leaf weight, N represents the number of leaf nodes in the tree, F(X) represents the decision tree prediction function, and W Q(X) represents the leaf node weight, and R m represents the feature space, and R N represents the weight space; Adjusting the complexity of the initialized initial XGBoost model according to the decision tree ensemble to obtain a regularization term, where the calculation formula for the regularization term Ω(F) is: Where λ and ξ represent adjustment coefficients for controlling the number of leaf nodes B and the leaf node weights W; Constructing an initial objective function according to the initial predicted value and the regularization term, where the calculation formula for the initial objective function is: Where μ represents a loss function for measuring the difference between the predicted value and the true value; Perform iterative calculations on the initial objective function to update the initial prediction value and obtain the target prediction value, where the formula for the target prediction value is as follows: Where t represents the number of iterations; Updating the initial objective function according to the target predicted value to obtain a final objective function, where the calculation formula for the final objective function is: Among them, μ t represents the objective function of the t-th iteration, z represents the sample index, and RUL z represents the true value, represents the predicted value of the (t - 1)-th iteration, and F z (X z ) represents the predicted value of the t-th decision tree, and Ω(F t ) represents the regularization term; According to the final objective function, the target XGBoost model is obtained, where the calculation formula of the target XGBoost model is: Among them, OBJ represents the minimized objective function, G k represents the first-order derivative of the loss function, H k represents the second-order derivative of the loss function, δ and γ represent adjustment coefficients, and K represents the number of leaf nodes.

5. The device requirement method based on XGBoost and Kalman particle filter according to claim 1, wherein The step of using the target XGBoost model to predict the current standard data set of the device to obtain the initial predicted value of the device consumption demand includes: Obtain the initial current standard data set of the device; Perform noise elimination processing on the initial current standard data set to obtain the current data set; Input the current data set into the target XGBoost model to obtain the initial predicted value of the device consumption demand.

6. The device requirement method based on XGBoost and Kalman particle filter according to claim 1, characterized in that The step of using the Kalman particle filter to correct the initial predicted value of the device consumption demand to obtain the target predicted value of the device consumption demand includes: Generate an initial particle set according to the prior distribution Monte Carlo sampling, where the calculation formula for particle initialization is: Among them, α represents particle initialization, and Φ(·) represents the conditional probability distribution function. represents the state vector, and y 1:z-1 represents the measurement vector or system output. Use the non-linear state transition function to process the initial particle set to generate a predicted particle set; X z = F(X z-1 , G) → z ∈ N; where X z represents the current z state vector, G represents the system noise, and F(·) represents the nonlinear state transition function; According to the predicted particle set and the measurement noise, calculate the observed values of each predicted particle to obtain the observed values of each predicted particle, where the calculation formula for the observed values of each predicted particle in the observed value set is: y z =H(X z ,V z )→z∈N; where y z represents the observed value of z at the current moment, H(·) represents the nonlinear observation function, and V z represents the measurement noise; According to the observed values of each predicted particle, calculate the weights of each predicted particle and perform normalization to obtain the normalized weights of each predicted particle; Perform high-weight particle screening on the normalized weights of each predicted particle to obtain an updated particle set, where the calculation formula for the updated particle set is: The normalization calculation formula is: The calculation formula for high-weight particle screening is: Among them, n represents the posterior distribution, represents the weight of the particle, λ represents the Dirac function, and β is equal to φ(y z ∣X z )φ(y z ∣X z-1 ) / γ p (X z ∣X 0:z ,y 1:z ) represents the importance distribution; According to the updated particle set and the corresponding weights, correct the initial predicted value of the device consumption demand to obtain the target predicted value of the device consumption demand.

7. The method for device requirements based on XGBoost and Kalman particle filter according to claim 6, wherein The step of performing high-weight particle screening on the normalized weights of each predicted particle to obtain an updated particle set includes: Based on the EKPF decision rule, perform high-weight particle screening on the normalized weights of each predicted particle, eliminate the low-weight predicted particles, and supplement them through resampling to keep the total number unchanged.

8. A device demand system based on XGBoost and Kalman particle filter, which is applied to the device demand method based on XGBoost and Kalman particle filter according to any one of claims 1-7. The system includes: An initial unit for eliminating noise from the original device data to obtain a standard data set; A training unit for training the initial XGBoost model using the standard data set and adjusting the parameters of the initial XGBoost model to obtain the target XGBoost model; A processing unit for using the target XGBoost model to predict the current standard data set of the device to obtain the initial predicted value of the device consumption demand; A result unit for using the Kalman particle filter to correct the initial predicted value of the device consumption demand to obtain the target predicted value of the device consumption demand.

9. A computer storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Energy consumption dynamic management method in renewable resource production process

    CN121212756A