Power grid-weather fusion data correction and optimization method based on Pipeline integration

Through the power grid-meteorological fusion data correction and optimization method based on Pipeline, the problem of using meteorological data alone ignores the changes in the internal data of the power grid is solved, and more accurate and stable load prediction is achieved.

CN119808018APending Publication Date: 2025-04-11CHINA SOUTHERN POWER GRID NEW POWER SYSTEM (BEIJING) RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411805688.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

Existing load prediction models use meteorological data alone may ignore changes in the data within the power grid, resulting in the accuracy of the prediction being affected.

Method used

The grid-meteorological fusion data correction and optimization method based on Pipeline integration is adopted. By collecting and preprocessing the grid and meteorological data, time and space are aligned, the data is fused to create comprehensive features, and the grid data is corrected using the regression model.

Benefits of technology

By comprehensively considering the changes in the internal data of the power grid and meteorological data, the accuracy and stability of load prediction are improved, and the performance of load prediction is comprehensively improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808018A_ABST
    Figure CN119808018A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of electric power, relates to a power grid-meteorological fusion data correction and optimization method based on Pipeline integration, and provides basic data for subsequent analysis by collecting and generating time sequence records of power grid and meteorological data. The original data are preprocessed, noise and missing values are cleared, and the data quality is ensured. Through time alignment and space alignment technologies, power grid data and meteorological data are consistent at the same time point and the same space position, then the data are fused, comprehensive features are created, and representativeness and accuracy of the data are enhanced. And finally, inputting the preprocessed and fused data set into a regression model, and correcting the power grid data by using the model, thereby improving the prediction accuracy and stability. According to the method, the load prediction performance is comprehensively improved by comprehensively considering the change of the internal data and the meteorological data of the power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of electric power technology, and more specifically, to a method for correcting and optimizing power grid-meteorological fusion data based on Pipeline integration. Background Art

[0002] In power system management, load forecasting is a key link to ensure stable operation of the power grid and optimize resource allocation. Accurate load forecasting can help power companies conduct effective scheduling, reduce operating costs, and improve the reliability of the power grid. However, existing load forecasting models often have the following technical problems:

[0003] Limitations of power grid data: Traditional load forecasting models usually rely only on internal grid data, such as historical load data, power generation data, equipment status, etc. Although these data can reflect the operating status of the grid, they cannot fully capture the impact of external environmental factors on grid load.

[0004] Limitations of meteorological data: Meteorological data (such as temperature, humidity, precipitation, etc.) have a significant impact on the load of the power grid. For example, hot weather usually leads to an increase in the load of the power grid because the frequency of air conditioning use increases. However, using meteorological data alone for load forecasting may ignore the changes in the internal data of the power grid, thus affecting the accuracy of the forecast. Summary of the invention

[0005] The present invention provides a correction and optimization method for power grid-meteorological fusion data based on Pipeline integration, which is intended to solve the technical problem that the use of meteorological data alone for load forecasting may ignore the changes in internal data of the power grid, thereby affecting the accuracy of the forecast.

[0006] The power grid-meteorological fusion data correction and optimization method based on Pipeline integration includes the following steps:

[0007] Step 1: Collect power grid data and meteorological data to generate time series records of raw power grid data and meteorological data;

[0008] Step 2: Preprocess the time series records of the original power grid data and meteorological data to obtain a preprocessed data set;

[0009] Step 3: Time-align and space-align the power grid data and meteorological data in the data set, and then fuse the time-aligned and space-aligned power grid data and meteorological data to create new comprehensive features; the fused data set is obtained, which contains the comprehensive features of the power grid data and meteorological data;

[0010] Step 4: Use the preprocessed data set and the fused data set as inputs to the trained regression model, and output the corrected power grid data based on the regression model.

[0011] The present invention solves the problem that the change of internal data of the power grid may be ignored when using meteorological data alone through the correction and optimization method of power grid-meteorological fusion data based on Pipeline integration, thereby improving the accuracy of load forecasting. First, by collecting and generating time series records of power grid and meteorological data, basic data is provided for subsequent analysis. These raw data are preprocessed to clean noise and missing values ​​to ensure data quality. Through time alignment and space alignment technology, the power grid data and meteorological data are consistent at the same time point and spatial position, and then these data are fused to create comprehensive features and enhance the representativeness and accuracy of the data. Finally, the preprocessed and fused data set is input into the regression model, and the model is used to correct the power grid data, thereby improving the accuracy and stability of the prediction. This method comprehensively improves the performance of load forecasting by comprehensively considering the changes of internal data of the power grid and meteorological data.

[0012] Preferably, the time alignment and space alignment include the following steps:

[0013] For inconsistent timestamps, linear interpolation is used to ensure that the timestamps of power grid data and meteorological data are consistent:

[0014]

[0015] Where: Y(t) represents the difference result at time point t; Y2, Y1 represent the original data values ​​at time points t2 and t1; t represents the time point at which the difference is required;

[0016] The power grid and meteorological data are mapped to a unified spatial coordinate system using a geographic information system. For data that do not have a direct corresponding spatial location, Kriging interpolation is used to align the data spatially:

[0017]

[0018] Where: Z(x0) represents the interpolation result at the spatial position x0; Z(x i ) represents the known position x i The data value of λ i represents the difference weight, which is calculated by the Kriging equation; n represents the number of known locations.

[0019] Preferably, the specific steps of fusing the power grid data and meteorological data to create a new comprehensive feature are as follows:

[0020] Combining wind speed with power load generates a new composite feature:

[0021] F f =γ1×L+δ1×V;

[0022] Where: F f represents the comprehensive characteristics of wind speed and power load; L represents the grid load; V represents the wind speed; γ1 and δ1 represent the weight coefficients;

[0023] The interaction between temperature and humidity is combined with power grid data to generate new features:

[0024] F s =α2×(T×H)+β2×L;

[0025] Where: F s It represents the comprehensive impact characteristics of temperature and humidity on power load; T represents temperature; H represents humidity; α2 and β2 represent weight coefficients.

[0026] Preferably, the regression model adopts a support vector regression model; wherein the support vector regression model adopts a radial basis function to capture the nonlinear relationship in the input data;

[0027]

[0028] Where: f(x i ) represents the predicted value; α i represents the Lagrange multiplier, which represents the weight of the i-th support vector; K(x i ,x) represents the new sample x and the i-th support vector x i The kernel function value between ; b represents the bias term;

[0029] The model is trained by minimizing the following loss function:

[0030]

[0031] Where: f(x i ) represents the predicted value of the model; ∈ represents the allowable error range; y i Represents the true target value of the i-th sample.

[0032] Preferably, the training steps of the support vector regression model are as follows:

[0033] Construct input features: Integrate all the features required for input into a feature matrix X:

[0034] X=[L,V,T,H,F f ,F s ];

[0035] Where: L represents the grid load; V represents the wind speed; T represents the temperature; H represents the humidity; F f Indicates the comprehensive characteristics of wind speed and power load; F s Indicates the comprehensive impact characteristics of temperature and humidity on power load;

[0036] Target variable: The target variable y is the grid load data that needs to be corrected;

[0037] Model training: Minimize the loss function through the quadratic programming algorithm to obtain the model parameter α i and b.

[0038] Preferably, during the training process of the support vector regression model, the parameter α is adjusted by a quadratic programming algorithm. i and b to minimize the objective function while satisfying the following constraints:

[0039] y i -f(x i )≤∈+ξ i ;

[0040] f(x i )-y i ≤∈+ξ i ;

[0041] ξ i ≥0;

[0042] Where: y i represents the true target value of the i-th sample; f(x i ) represents the predicted value of the model; ∈ represents the error range allowed by the model; ξ i Represents the slack variable of the i-th sample, indicating the error between the predicted value and the true value exceeding the range ∈; when |y i -f(x i )| exceeds ∈, the slack variable ξ i Record the excess, which can be zero or a positive number:

[0043] If i =0, then y i With f(x i ) is within the allowable range; if ξ i >0, then y i With f(x i ) exceeds the range of ∈, indicating that the model needs to handle the excess error.

[0044] Preferably, the specific steps of minimizing the loss function by the quadratic programming algorithm are as follows:

[0045] The optimization problem of the support vector regression model is described as the following quadratic programming problem:

[0046]

[0047] Where: w represents the weight vector of the support vector regression model; ξ i represents the slack variable; C represents the penalty coefficient;

[0048] The objective function consists of the following two parts:

[0049] One part of the objective function: Represents the square norm of the weight, which is used to control the complexity of the model;

[0050] Another part of the objective function: represents the combination of slack variables used to control the forecast error;

[0051] Construct the Lagrangian function:

[0052]

[0053] y i -∈-ξ i ];

[0054] Where: α i and β i represents the Lagrange multiplier;

[0055] Solve the optimization problem: By calculating the Lagrangian function with respect to w, b, ξ i and the Lagrange multiplier α i , β i Taking partial derivatives and setting them to zero, we get the dual form of the optimization problem:

[0056] Partial derivatives with respect to w and b:

[0057]

[0058] Where: K(x i -x) represents the kernel function; represents the partial derivative with respect to w; represents the partial derivative with respect to b;

[0059] Yes i and the Lagrange multiplier α i , β i The partial derivative of :

[0060]

[0061] Where: Indicates that i The partial derivative of Indicates α i The partial derivative of Indicates β i The partial derivative of

[0062] The CVXPY quadratic programming solver is used to solve the above optimization problem and obtain the optimal α i , βi and b.

[0063] The beneficial effects of the present invention include:

[0064] The present invention solves the problem that the change of internal data of the power grid may be ignored when using meteorological data alone through the correction and optimization method of power grid-meteorological fusion data based on Pipeline integration, thereby improving the accuracy of load forecasting. First, by collecting and generating time series records of power grid and meteorological data, basic data is provided for subsequent analysis. These raw data are preprocessed to clean noise and missing values ​​to ensure data quality. Through time alignment and space alignment technology, the power grid data and meteorological data are consistent at the same time point and spatial position, and then these data are fused to create comprehensive features and enhance the representativeness and accuracy of the data. Finally, the preprocessed and fused data set is input into the regression model, and the model is used to correct the power grid data, thereby improving the accuracy and stability of the prediction. This method comprehensively improves the performance of load forecasting by comprehensively considering the changes of internal data of the power grid and meteorological data. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0066] Figure 1 An overall step block diagram provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0067] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0068] See also Figure 1 As shown, the best embodiment of the present invention is further described;

[0069] The power grid-meteorological fusion data correction and optimization method based on Pipeline integration includes the following steps:

[0070] Step 1: Collect power grid data and meteorological data to generate time series records of raw power grid data and meteorological data;

[0071] Step 2: Preprocess the time series records of the original power grid data and meteorological data to obtain a preprocessed data set;

[0072] Step 3: Time-align and space-align the power grid data and meteorological data in the data set, and then fuse the time-aligned and space-aligned power grid data and meteorological data to create new comprehensive features; the fused data set is obtained, which contains the comprehensive features of the power grid data and meteorological data;

[0073] Step 4: Use the preprocessed data set and the fused data set as inputs to the trained regression model, and output the corrected power grid data based on the regression model.

[0074] The present invention solves the problem that the change of internal data of the power grid may be ignored when using meteorological data alone through the correction and optimization method of power grid-meteorological fusion data based on Pipeline integration, thereby improving the accuracy of load forecasting. First, by collecting and generating time series records of power grid and meteorological data, basic data is provided for subsequent analysis. These raw data are preprocessed to clean noise and missing values ​​to ensure data quality. Through time alignment and space alignment technology, the power grid data and meteorological data are consistent at the same time point and spatial position, and then these data are fused to create comprehensive features and enhance the representativeness and accuracy of the data. Finally, the preprocessed and fused data set is input into the regression model, and the model is used to correct the power grid data, thereby improving the accuracy and stability of the prediction. This method comprehensively improves the performance of load forecasting by comprehensively considering the changes of internal data of the power grid and meteorological data.

[0075] As a possible implementation manner of this embodiment, the time alignment and space alignment include the following steps:

[0076] For inconsistent timestamps, linear interpolation is used to ensure that the timestamps of power grid data and meteorological data are consistent:

[0077]

[0078] Where: Y(t) represents the difference result at time point t; Y2, Y1 represent the original data values ​​at time points t2 and t1; t represents the time point at which the difference is required;

[0079] The power grid and meteorological data are mapped to a unified spatial coordinate system using a geographic information system. For data that do not have a direct corresponding spatial location, Kriging interpolation is used to align the data spatially:

[0080]

[0081] Where: Z(x0) represents the interpolation result at the spatial position x0; Z(x i ) represents the known position x i The data value of λ irepresents the difference weight, which is calculated by the Kriging equation; n represents the number of known locations.

[0082] As a possible implementation of this embodiment, the specific steps of fusing the power grid data and meteorological data to create a new comprehensive feature are as follows:

[0083] Combining wind speed with power load generates a new composite feature:

[0084] F f =γ1×L+δ1×V;

[0085] Where: F f represents the comprehensive characteristics of wind speed and power load; L represents the grid load; V represents the wind speed; γ1 and δ1 represent the weight coefficients;

[0086] The interaction between temperature and humidity is combined with power grid data to generate new features:

[0087] F s =α2×(T×H)+β2×L;

[0088] Where: F s It represents the comprehensive impact characteristics of temperature and humidity on power load; T represents temperature; H represents humidity; α2 and β2 represent weight coefficients.

[0089] As a possible implementation of this embodiment, the regression model adopts a support vector regression model; wherein the support vector regression model adopts a radial basis function to capture the nonlinear relationship in the input data;

[0090]

[0091] Where: f(x i ) represents the predicted value; α i represents the Lagrange multiplier, which represents the weight of the i-th support vector; K(x i ,x) represents the new sample x and the i-th support vector x i The kernel function value between ; b represents the bias term;

[0092] The model is trained to minimize the following loss function:

[0093]

[0094] Where: f(x i ) represents the predicted value of the model; ∈ represents the allowable error range; y i Represents the true target value of the i-th sample.

[0095] As a possible implementation of this embodiment, the training steps of the support vector regression model are as follows:

[0096] Construct input features: Integrate all the features required for input into a feature matrix X:

[0097] X=[L,V,T,H,F f ,F s ];

[0098] Where: L represents the grid load; V represents the wind speed; T represents the temperature; H represents the humidity; F f Indicates the comprehensive characteristics of wind speed and power load; F s Indicates the comprehensive impact characteristics of temperature and humidity on power load;

[0099] Target variable: The target variable y is the grid load data that needs to be corrected;

[0100] Model training: Minimize the loss function through the quadratic programming algorithm to obtain the model parameter α i and b.

[0101] As a possible implementation of this embodiment, during the training process of the support vector regression model, the parameter α is adjusted by a quadratic programming algorithm. i and b to minimize the objective function while satisfying the following constraints:

[0102] y i -f(x i )≤∈+ξ i ;

[0103] f(x i )-y i ≤∈+ξ i ;

[0104] ξ i ≥0;

[0105] Where: y i represents the true target value of the i-th sample; f(x i ) represents the predicted value of the model; ∈ represents the error range allowed by the model; ξ i Represents the slack variable of the i-th sample, indicating the error between the predicted value and the true value exceeding the range ∈; when |y i -f(x i )| exceeds ∈, the slack variable ξ i Record the excess, which can be zero or a positive number:

[0106] If i =0, then y i With f(x i ) is within the allowable range; if ξ i >0, then y iWith f(x i ) exceeds the range of ∈, indicating that the model needs to handle the excess error.

[0107] In this embodiment, the grid load, wind speed, temperature, humidity and other features are integrated into a feature matrix, which improves the integrity of feature engineering and the data quality of model training. The corrected grid load data is clarified as the target variable, which helps the model to accurately calibrate and predict. By combining factors such as wind speed, power load, temperature and humidity, new features are generated (such as the comprehensive features of wind speed and power load and the comprehensive impact features of temperature and humidity), which enhances the expressiveness and explanatory power of the data.

[0108] As a possible implementation of this embodiment, the specific steps of minimizing the loss function by using the quadratic programming algorithm are as follows:

[0109] The optimization problem of the support vector regression model is described as the following quadratic programming problem:

[0110]

[0111] Where: w represents the weight vector of the support vector regression model; ξ i represents the slack variable; C represents the penalty coefficient;

[0112] The objective function consists of the following two parts:

[0113] One part of the objective function: Represents the square norm of the weight, which is used to control the complexity of the model;

[0114] Another part of the objective function: represents the combination of slack variables used to control the forecast error;

[0115] Construct the Lagrangian function:

[0116]

[0117] Where: α i and β i represents the Lagrange multiplier;

[0118] Solve the optimization problem: By calculating the Lagrangian function with respect to w, b, ξ i and the Lagrange multiplier α i , β i Taking partial derivatives and setting them to zero, we get the dual form of the optimization problem:

[0119] Partial derivatives with respect to w and b:

[0120]

[0121] Where: K(x i -x) represents the kernel function; represents the partial derivative with respect to w; represents the partial derivative with respect to b;

[0122] Yes i and the Lagrange multiplier α i , β i The partial derivative of :

[0123]

[0124] Where: Indicates that i The partial derivative of Indicates α i The partial derivative of Indicates β i The partial derivative of

[0125] The CVXPY quadratic programming solver is used to solve the above optimization problem and obtain the optimal α i , β i and b.

[0126] In this embodiment, slack variables are introduced to handle the allowable error range, so that the model can be optimized within a certain error range, thereby enhancing the flexibility of the model. The use of slack variables also improves the robustness of the model to outliers and noise, making the model more stable and reliable in practical applications.

[0127] Secondly, the optimization problem of the support vector regression model is transformed into a quadratic programming problem, which clarifies the optimization objectives and constraints, making the model training process more systematic and standardized. By minimizing the loss function through the quadratic programming algorithm, the optimal model parameters can be effectively found, improving the training efficiency and model performance.

[0128] When integrating the Pipeline, you can combine the components using the following steps:

[0129] Create a data processing Pipeline:

[0130] Use Python's Pipeline class to integrate data preprocessing, alignment, and fusion steps into a pipeline.

[0131] Integrate data processing and model training to form a complete Pipeline.

[0132] Use the integrated Pipeline for training and data correction.

[0133] Use quadratic programming tools (such as CVXPY) to optimize the model and adjust the parameters.

[0134] By integrating data collection, preprocessing, alignment, fusion, model training and correction steps into a pipeline, data processing is automated and systematized, improving the efficiency and accuracy of the entire process.

[0135] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A power grid-meteorological fusion data correction and optimization method based on Pipeline integration, characterized in that: The following steps are involved: Step 1: Collect power grid data and meteorological data to generate time series records of raw power grid data and meteorological data; Step 2: Preprocess the time series records of the original power grid data and meteorological data to obtain a preprocessed data set; Step 3: Time and space alignment of the power grid data and meteorological data in the data set, and then fusion of the time-aligned and space-aligned power grid data and meteorological data to create new comprehensive features; The fused data set is obtained, which contains the comprehensive features of power grid data and meteorological data; Step 4: Use the preprocessed data set and the fused data set as inputs to the trained regression model, and output the corrected power grid data based on the regression model.

2. The method for correcting and optimizing power grid-meteorological fusion data based on pipeline integration according to claim 1 is characterized in that: The time alignment and space alignment include the following steps: For inconsistent timestamps, linear interpolation is used to ensure that the timestamps of power grid data and meteorological data are consistent: Where: Y(t) represents the difference result at time point t; Y2, Y1 represent the original data values ​​at time points t2 and t1; t represents the time point at which the difference is required; The power grid and meteorological data are mapped to a unified spatial coordinate system using a geographic information system. For data that do not have a direct corresponding spatial location, Kriging interpolation is used to align the data spatially: Where: Z(x0) represents the interpolation result at the spatial position x0; Z(x i ) represents the known position x i The data value of λ i represents the difference weight, which is calculated by the Kriging equation; n represents the number of known locations.

3. The method for correcting and optimizing power grid-meteorological fusion data based on pipeline integration according to claim 1 is characterized in that: The specific steps of fusing the power grid data and meteorological data to create a new comprehensive feature are as follows: Combining wind speed with power load generates a new composite feature: F f =γ1×L+δ1×V; Where: F f represents the comprehensive characteristics of wind speed and power load; L represents the grid load; V represents the wind speed; γ1 and δ1 represent the weight coefficients; The interaction between temperature and humidity is combined with power grid data to generate new features: F s =α2×(T×H)+β2×L; Where: F s It represents the comprehensive impact characteristics of temperature and humidity on power load; T represents temperature; H represents humidity; α2 and β2 represent weight coefficients.

4. The method for correcting and optimizing power grid-meteorological fusion data based on pipeline integration according to claim 1 is characterized in that: The regression model adopts a support vector regression model; wherein the support vector regression model adopts a radial basis function to capture the nonlinear relationship in the input data; Where: f(x i ) represents the predicted value; α i represents the Lagrange multiplier, which represents the weight of the i-th support vector; K(x i ,x) represents the new sample x and the i-th support vector x i The kernel function value between ; b represents the bias term; The model is trained by minimizing the following loss function: Where: f(x i ) represents the predicted value of the model; ∈ represents the allowable error range; y i Represents the true target value of the i-th sample.

5. The method for correcting and optimizing power grid-meteorological fusion data based on pipeline integration according to claim 4 is characterized in that: The training steps of the support vector regression model are as follows: Construct input features: Integrate all the features required for input into a feature matrix X: X=[L,V,T,H,F f ,F s ]; Where: L represents the grid load; V represents the wind speed; T represents the temperature; H represents the humidity; F f Indicates the comprehensive characteristics of wind speed and power load; F s Indicates the comprehensive impact characteristics of temperature and humidity on power load; Target variable: The target variable y is the grid load data that needs to be corrected; Model training: Minimize the loss function through the quadratic programming algorithm to obtain the model parameter α i and b.

6. The method for correcting and optimizing power grid-meteorological fusion data based on pipeline integration according to claim 5 is characterized in that: The support vector regression model is trained by adjusting the parameter α through the quadratic programming algorithm. i and b to minimize the objective function while satisfying the following constraints: y i -f(x i )≤∈+ξ i ; f(x i )-y i ≤∈+ξ i ; x i ≥0; Where: y i represents the true target value of the i-th sample; f(x i ) represents the predicted value of the model; ∈ represents the error range allowed by the model; ξ i Represents the slack variable of the i-th sample, indicating the error between the predicted value and the true value exceeding the range ∈; when |y i -f(x i )| exceeds ∈, the slack variable ξ i Record the excess, which can be zero or a positive number: If i =0, then y i With f(x i ) is within the allowable range; if ξ i >0, then y i With f(x i ) exceeds the range of ∈, indicating that the model needs to handle the excess error.

7. The method for correcting and optimizing power grid-meteorological fusion data based on pipeline integration according to claim 6 is characterized in that: The specific steps of minimizing the loss function by the quadratic programming algorithm are as follows: The optimization problem of the support vector regression model is described as the following quadratic programming problem: Where: w represents the weight vector of the support vector regression model; ξ i represents the slack variable; C represents the penalty coefficient; The objective function consists of the following two parts: One part of the objective function: Represents the square norm of the weight, which is used to control the complexity of the model; Another part of the objective function: represents the combination of slack variables used to control the forecast error; Construct the Lagrangian function: Where: α i and β i represents the Lagrange multiplier; Solve the optimization problem: By calculating the Lagrangian function with respect to w, b, ξ i and the Lagrange multiplier α i , β i Taking partial derivatives and setting them to zero, we get the dual form of the optimization problem: Partial derivatives with respect to w and b: Where: K(x i -x) represents the kernel function; represents the partial derivative with respect to w; represents the partial derivative with respect to b; Yes i and the Lagrange multiplier α i , β i The partial derivative of : Where: Indicates that i The partial derivative of Indicates α i The partial derivative of Indicates β i The partial derivative of The CVXPY quadratic programming solver is used to solve the above optimization problem and obtain the optimal α i , β i and b.