Electricity charge sensitive user prediction method, system and device and storage medium

By combining LightGBM and Imbalance-XGBoost models with stacking ensemble strategies through word segmentation, denoising, and feature selection, the problems of multimodal feature fusion and class imbalance in the prediction of electricity-sensitive users are solved, thereby improving prediction accuracy and user satisfaction.

CN120975313APending Publication Date: 2025-11-18GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511101631.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient multimodal feature fusion, class imbalance, and contradictions in model efficiency when predicting electricity-sensitive users, resulting in low prediction accuracy.

Method used

The feature matrix is ​​obtained by word segmentation and denoising. Feature combination is selected by feature selection model. LightGBM and Imbalance-XGBoost models are trained by Stacking ensemble strategy to predict electricity cost sensitive users.

Benefits of technology

It improves the accuracy of predicting electricity-sensitive users, enhances the accuracy of minority class identification, and reduces service costs and the risk of user disputes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120975313A_ABST
    Figure CN120975313A_ABST
Patent Text Reader

Abstract

The invention discloses an electricity charge sensitive user prediction method, system and device and a storage medium, which are applied to an electric power big data analysis technology, and the method comprises the steps: obtaining first power grid user form data in a to-be-predicted electric power system; performing word segmentation and de-noising processing on the first power grid user form data to obtain a plurality of feature matrixes, and based on information of each feature matrix, classifying each feature matrix to obtain a plurality of feature combinations; the feature screening model is used for carrying out feature screening on all the feature combinations, all the screened feature combinations are input into the prediction model for prediction, an electricity charge sensitive user prediction result is obtained, the minority class recognition precision is improved through advantage complementation of heterogeneous models, and therefore the accuracy of the electricity charge sensitive user prediction result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electric power big data analysis, and in particular to a power-sensitive user prediction method, system, device and storage medium. BACKGROUND

[0002] Power-sensitive users refer to a user group that reacts significantly to abnormal electricity charges or billing disputes, which usually actively feedback through channels such as complaints and consultations, directly affecting the service cost and user satisfaction of power supply enterprises.

[0003] Power-sensitive users are the core objects of fine management of electric power services, and their behavior characteristics are implied in user basic attributes, power consumption timing data and service interaction texts. However, the proportion of such users in the data is usually less than 5%, which leads to the dual challenges of "class imbalance" and "high-dimensional heterogeneous data modeling" for traditional classification algorithms. The existing methods have the following shortcomings in data integration, feature mining and model optimization: 1) Insufficient multi-modal feature fusion. Traditional methods rely on manual screening or single-dimensional statistical features, and cannot effectively mine the cross-modal association of text semantics and payment behavior, resulting in the loss of key information; 2) Conflict between class imbalance and model efficiency. Traditional classification algorithms overfit the majority class samples, and the recall rate of the minority class is generally less than 75%. Classic oversampling techniques such as SMOTE (Synthetic Minority Oversampling Technique) are prone to introduce noise in high-dimensional sparse scenarios, and the combination of cost-sensitive learning and ensemble strategies is insufficient, resulting in limited recognition ability of the model for sensitive users. 3) The complementarity of heterogeneous algorithms is not utilized. Existing ensemble methods mostly use homogeneous base models, and the model generalization ability is limited. Therefore, there is an urgent need for an algorithm-level imbalance optimization and cross-modal feature dynamic fusion solution to solve the problem of low prediction accuracy caused by the low proportion of power-sensitive users in power user data and class imbalance. SUMMARY

[0004] To solve the above technical problems, the embodiments of the present application provide a power-sensitive user prediction method, system, device and storage medium to solve the technical problem of low accuracy of power-sensitive user prediction results in the prior art.

[0005] The first aspect of the embodiments of the present application provides a power-sensitive user prediction method, which comprises:

[0006] Obtaining first power grid user form data in a power system to be predicted;

[0007] Performing word segmentation and denoising processing on the first power grid user form data to obtain a plurality of feature matrices, classifying the feature matrices based on the information of each feature matrix, and obtaining a plurality of feature combinations;

[0008] The feature screening model is used for screening each feature combination to obtain a corresponding screened feature combination.

[0009] Each screened feature combination is input into a prediction model for prediction to obtain an electricity fee sensitive user prediction result, wherein the prediction model is obtained by training a LightGBM model and an Imbalance-XGBoost model using a stacking integration strategy.

[0010] In a possible implementation manner of the first aspect, the first power grid user form data is subjected to word segmentation and denoising processing to obtain a plurality of feature matrices, including:

[0011] The sensitive information in the first power grid user form data is replaced using a regular expression to obtain second power grid user form data;

[0012] Based on a custom dictionary, the second power grid user form data is subjected to word segmentation and filtering of stop words to obtain a word segmentation list;

[0013] The word segmentation list is subjected to phrase association to obtain a plurality of feature matrices.

[0014] In a possible implementation manner of the first aspect, the feature screening model is used for screening each feature combination to obtain a corresponding screened feature combination:

[0015] Each feature combination is input into the feature screening model for iteration to obtain a first potential split point of each feature matrix;

[0016] The gain value of each first potential split point is calculated using a gain formula, the feature matrix with the largest gain value is selected for splitting, and then each feature combination is iterated to obtain a second potential split point and calculate the corresponding gain value until a preset stop splitting condition is reached, the total gain value of each potential split point is output, and the total gain value is determined as the feature importance value of each feature matrix;

[0017] The feature matrix with a feature importance value satisfying a preset condition is selected as the feature of each feature combination to obtain a corresponding screened feature combination.

[0018] In a possible implementation manner of the first aspect, the prediction model is obtained by training a LightGBM model and an Imbalance-XGBoost model using a stacking integration strategy, including:

[0019] Obtain the sample feature data to be input, and divide the sample feature data to be input into a training set and a test set according to a preset ratio;

[0020] The LightGBM model is trained and predicted by using the training set to obtain a plurality of first prediction results, and the Imbalance-XGBoost model is trained and predicted by using the training set to obtain a plurality of second prediction results;

[0021] The first meta-feature is obtained by performing average value calculation on each first prediction result, the second meta-feature is obtained by performing average value calculation on each second prediction result, and the final prediction result is obtained by inputting the first meta-feature and the second meta-feature into the ridge regression model;

[0022] The target ridge regression model is obtained by adjusting the ridge regression model based on the final prediction result; if the evaluation result is greater than the preset threshold value, the target first base model and the target second base model are obtained by respectively evaluating each first base model and each second base model by using the test set data;

[0023] The prediction model is obtained according to the target first base model, the target second base model and the target ridge regression model.

[0024] In a possible implementation manner of the first aspect, the sample feature data to be input is obtained, including:

[0025] The first grid user form sample data in the power system to be predicted is obtained;

[0026] The first grid user form sample data is subjected to word segmentation and denoising processing to obtain a plurality of sample feature matrices, and each sample feature matrix is classified based on information of the sample feature matrix to obtain a plurality of sample feature combinations;

[0027] The feature screening model is used to screen each sample feature combination to obtain corresponding sample feature data to be input.

[0028] In a possible implementation manner of the first aspect, the LightGBM model is trained and predicted by using the training set to obtain a plurality of first prediction results, and the Imbalance-XGBoost model is trained and predicted by using the training set to obtain a plurality of second prediction results, including:

[0029] The training set is divided into a plurality of subsets, and the LightGBM model is trained by using feature sample data in the training set except for the plurality of subsets to obtain a plurality of first base models;

[0030] The Imbalance-XGBoost model is trained by using feature sample data in the training set except for the plurality of subsets to obtain a plurality of second base models;

[0031] Input the several subsets into the corresponding first base model respectively to obtain a plurality of first prediction results, and input the several subsets into the corresponding second base model respectively to obtain a plurality of second prediction results.

[0032] To solve the same technical problem, a second aspect of the embodiment of the application provides an electricity-sensitive user prediction system, comprising:

[0033] An acquisition module is configured to acquire first power grid user form data in a power system to be predicted.

[0034] A preprocessing module is configured to perform word segmentation and denoising processing on the first power grid user form data to obtain a plurality of feature matrices, and perform classification on the feature matrices based on information of the feature matrices to obtain a plurality of feature combinations.

[0035] A screening module is configured to perform feature screening on the feature combinations by using a feature screening model to obtain corresponding screened feature combinations.

[0036] A prediction module is configured to input the screened feature combinations into a prediction model for prediction to obtain an electricity-sensitive user prediction result, wherein the feature screening model and the prediction model are obtained by training a LightGBM model and an Imbalance-XGBoost model by using a stacking integration strategy.

[0037] A third aspect of the embodiment of the application provides a computer device, comprising:

[0038] A memory is configured to store a computer program.

[0039] A processor is configured to implement the steps of the electricity-sensitive user prediction method of the first aspect when executing the computer program.

[0040] A fourth aspect of the embodiment of the application provides a storage medium, and the storage medium stores a computer program. The computer program is executed by a processor to implement the steps of the electricity-sensitive user prediction method of the first aspect.

[0041] The technical scheme of the application has the following advantages:

[0042] The power-sensitive user prediction method provided by the embodiment of the present application comprises the following steps: obtaining first power grid user form data in a to-be-predicted power system; performing word segmentation and denoising processing on the first power grid user form data to obtain a plurality of feature matrices; classifying the feature matrices based on information of each feature matrix to obtain a plurality of feature combinations; performing feature screening on each feature combination by using a feature screening model to obtain corresponding screened feature combinations; and inputting each screened feature combination into a prediction model for prediction to obtain a power-sensitive user prediction result, wherein the prediction model is obtained by training a LightGBM model and an Imbalance-XGBoost model by using a Stacking integration strategy. Through the complementary advantages of the heterogeneous models, the above method improves the minority class recognition accuracy, thereby improving the accuracy of the power-sensitive user prediction result. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the description of the embodiments or the prior art. Obviously, the drawings described below are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.

[0044] Figure 1 The prediction flowchart of the power-sensitive user prediction method in the embodiment of the present application;

[0045] Figure 2 The model structure diagram of the power-sensitive user prediction method in the embodiment of the present application;

[0046] Figure 3 The unbalanced class power-sensitive user prediction method flowchart of the power-sensitive user prediction method in the embodiment of the present application;

[0047] Figure 4 The feature importance ranking diagram of the power-sensitive user prediction method in the embodiment of the present application;

[0048] Figure 5 The Stacking integration flowchart of the power-sensitive user prediction method in the embodiment of the present application;

[0049] Figure 6 The block diagram of the power-sensitive user prediction system in the embodiment of the present application;

[0050] The drawings are as follows: 600, power-sensitive user prediction system; 601, obtaining module; 602, preprocessing module; 603, screening module; 604, prediction module. DETAILED DESCRIPTION

[0051] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of the present application.

[0052] The power-sensitive user prediction method provided by the embodiments of the present application is as shown in Figure 1 Figure 1 The power-sensitive user prediction method flowchart includes steps S101 to S104, and each step is specifically as follows:

[0053] S101, obtaining first power grid user form data in a power system to be predicted.

[0054] In this embodiment, the first power grid user form data is extracted from the power system database, and the first power grid user form data includes multi-source heterogeneous data, including a work order table, a call record table, an electricity fee information table, and a training set label. Data cleaning includes removing records with empty or abnormal customer codes, deleting test work orders, formatting time fields, calculating call duration and normalizing.

[0055] S102, performing word segmentation and denoising processing on the first power grid user form data to obtain a plurality of feature matrices, and classifying the feature matrices based on information of each feature matrix to obtain a plurality of feature combinations.

[0056] In this embodiment, the first power grid user form data is then subjected to word segmentation and denoising processing to obtain a plurality of feature matrices. Specifically, the jieba word segmentation tool is used to process the work order content, a custom dictionary is added, stop words are filtered, and sensitive information is replaced, i.e. specific mobile phone numbers and account numbers are replaced with "mobile number" and "account number" through regular expressions; word group associations are captured through TF-IDF vectorization, low-frequency words are filtered, and a high-dimensional sparse feature matrix is generated.

[0057] Then, based on the information of each feature matrix, the feature matrices are classified to obtain a plurality of feature combinations. Specifically, according to the categories of each feature matrix, such as user basic information, power supply unit information and time characteristics, which belong to one type of information, they are combined into statistical features, and similarly, after classifying all the feature matrices, the feature combinations containing statistical features, financial features and text features are constructed, and the feature combination results are as shown in Table 2.

[0058] Table 2 Multidimensional feature table

[0059]

[0060]

[0061] In an embodiment, the first power grid user form data is subjected to word segmentation and denoising processing to obtain a plurality of feature matrices, including:

[0062] The sensitive information in the first power grid user form data is replaced by using a regular expression to obtain second power grid user form data;

[0063] Based on a custom dictionary, the second power grid user form data is subjected to word segmentation and stop word filtering to obtain a word segmentation list;

[0064] The word segmentation list is subjected to phrase association to obtain a plurality of feature matrices.

[0065] In this embodiment, a regular replacement rule is defined to replace the sensitive information, such as mobile phone number replacement, account number replacement, meter number replacement, etc. Specifically, the specific mobile phone number and account number are replaced with "mobile number" and "account number" to obtain the second power grid user form data. Then, the power industry terms such as tiered electricity price and distributed photovoltaic grid connection are collected to build a custom dictionary, and the jieba segmentation parameters are configured to perform structured segmentation processing on the second power grid user form data, and the power field stop word list such as "reflect", "of", "have", etc. is loaded to perform stop word screening on the second power grid user form data to obtain a word segmentation list. The TF-IDF method is used to capture phrase association, filter low-frequency words, and generate a feature matrix, i.e. a high-dimensional sparse feature matrix.

[0066] S103, using a feature screening model to screen each feature combination to obtain a corresponding screened feature combination.

[0067] In this embodiment, after obtaining the feature combination, the feature screening model is used to screen the feature combination obtained. For example, the statistical features and text features are first horizontally spliced, the merged feature dataset is loaded, the merged feature dataset is converted into a LightGMM specific Dataset format through lightgbm.Dataset, the continuous features are discretized into histogram buckets, and missing and infinite values are automatically processed, thereby optimizing memory usage and calculation speed. In this step, the histogram bucketing algorithm is used to speed up feature splitting and reduce the computational complexity of high-dimensional sparse feature matrices. Specifically, the single-sided sampling based on gradient is adopted, and the algorithm gradient g' i The improvement of the algorithm gradient based on GBDT is that the high-gradient samples are retained and the low-gradient samples are randomly sampled to improve the training efficiency, and the gradient calculation formula is:

[0068]

[0069] wherein g i is the first-order gradient of the feature matrix i, a is a preset reserved high gradient sample ratio, b is a random sampling ratio of the remaining (1-a) low gradient samples, represents the coefficient compensation of the low gradient samples. When a = 0.1 and b = 0.5, the coefficient compensation is 1.8.

[0070] The feature screening model is obtained by training a LightGBM model. Specifically, the LightGBM model is trained, and then the average information gain brought by each feature matrix in tree splitting is calculated to measure the feature importance ranking, and the feature matrix whose feature importance value meets the preset condition is selected as the input feature. By calculating the information gain of the feature matrix in the splitting node of the tree model, features that significantly contribute to the prediction of electricity bill sensitivity can be screened out, and the dimension of the high-dimensional sparse feature matrix is reduced.

[0071] It should be noted that the preset condition means that the feature importance value is in the top 5% in the feature importance ranking.

[0072] In an embodiment, the feature screening model is used to screen each feature combination to obtain a corresponding screened feature combination, including:

[0073] Each feature combination is input into the feature screening model for traversal to obtain a first potential splitting point of each feature matrix;

[0074] The gain value of each first potential splitting point is calculated using the gain formula, the feature matrix with the maximum gain value is selected for splitting, and then each feature combination is traversed to obtain a second potential splitting point and calculate the corresponding gain value until a preset stopping splitting condition is reached, and the total gain value of each potential splitting point is output. The total gain value is determined as the feature importance value of each feature matrix;

[0075] The feature matrix whose feature importance value meets the preset condition is selected as the feature of each feature combination to obtain a corresponding screened feature combination.

[0076] In this embodiment, for each sample, the first-order gradient and the second-order gradient are calculated; by traversing all feature matrices, all potential splitting points are obtained, the gain value of each potential splitting point is calculated using the gain formula, and then the feature matrix with the maximum gain value and the threshold value are selected for splitting. The gain formula is:

[0077]

[0078] wherein g i is the first-order gradient of the feature matrix i, λ and γ are regularization parameters, h i is the second-order gradient of the feature matrix i, and Gain represents the gain value.

[0079] Then the traversal of each feature matrix is continued, the potential split points are determined and the gain values of each potential split point are calculated, then the feature matrix and threshold with the maximum gain value are selected for splitting, if the same feature matrix is still split, the gain of each feature each time used for splitting is recorded, the importance ranking of the feature is measured by calculating the average information gain brought by the feature in the splitting of the tree, that is, the average information gain of each feature matrix is determined as the importance value of the feature, the importance value of each feature, that is, the importance score can be obtained as shown in the following formula: Figure 3 The top 5% of the text features in the importance value are reselected for subsequent model use.

[0080] S104, the filtered features are combined and input into a prediction model for prediction to obtain an electricity fee sensitive user prediction result, wherein the prediction model is obtained by training a LightGBM model and an Imbalance-XGBoost model using a stacking integration strategy.

[0081] In this embodiment, to solve the sample category imbalance problem, the loss function and algorithm parameters are improved to improve the recognition ability of the base model for the minority class, the prediction model is obtained by training a LightGBM model and an Imbalance-XGBoost model using a stacking integration strategy, and the electricity fee sensitive user prediction result is obtained by inputting the to-be-input features into the prediction model for prediction.

[0082] In an embodiment, the prediction model is obtained by training a LightGBM model and an Imbalance-XGBoost model using a stacking integration strategy, comprising:

[0083] Obtain the to-be-input sample feature data, and divide the to-be-input sample feature data into a training set and a test set according to a preset ratio;

[0084] Train and predict the LightGBM model using the training set to obtain a plurality of first prediction results, and train and predict the Imbalance-XGBoost model using the training set to obtain a plurality of second prediction results;

[0085] Calculate the average value of each first prediction result to obtain a first meta-feature, calculate the average value of each second prediction result to obtain a second meta-feature, and input the first meta-feature and the second meta-feature into a ridge regression model to obtain a final prediction result;

[0086] Adjust the ridge regression model based on the final prediction result to obtain a target ridge regression model; if the target ridge regression model is greater than a preset threshold, evaluate each first base model and each second base model using the test set data to obtain a target first base model and a target second base model.

[0087] According to the target first base model, the target second base model and the target ridge regression model, a prediction model is obtained.

[0088] In this embodiment, the sample feature data to be input is obtained, stratified sampling is performed according to customer codes, and the original training set is divided into a new training set and a test set according to a ratio of 9:1, so as to ensure consistent distribution of positive and negative samples. The user distribution obtained after the division is shown in Table 1.

[0089] Table 1 Training set and validation set user distribution table

[0090]

[0091] The loss function selection of the Imbalance-XGBoost model is performed by comparing the model performance in the weighted cross-entropy loss and the focal loss two modes, and finally the focal loss mode is selected. The performance comparison of the two modes is shown in Table 3.

[0092] Table 3 Imbalance-XGBoost two loss mode evaluation table

[0093]

[0094] It is found by comparison that in the weighted cross-entropy loss mode in this embodiment, the F1 value, recall rate and running time performance are slightly better than those in the focal loss mode. In the prediction task of unbalanced classes, the F1 value and recall rate can better reflect the performance of the model, and therefore the weighted cross-entropy loss mode is selected. Through the weighted cross-entropy loss function of the Imbalance-XGBoost, the class weight and sample difficulty weight are dynamically adjusted, the recall rate and F1 value of the minority class are significantly improved, and the model bias problem caused by the imbalance of class distribution is effectively alleviated.

[0095] The parameter optimization of the Imbalance-XGBoost base model in the weighted cross-entropy loss mode is realized through grid search, and the obtained model hyperparameter table is shown in Table 4.

[0096] Table 4 Imbalance-XGBoost hyperparameter optimization table

[0097]

[0098] The LightGBM base model hyperparameter optimization process is: the parameter optimization of the LightGBM base model is realized through grid search, and the obtained model hyperparameter table is shown in Table 5.

[0099] Table 5 LightGBM hyperparameter optimization table

[0100]

[0101] Through the ridge regression model, the advantages of two base models are fused by using the Stacking integration strategy, and the Stacking integration flow chart is as shown in Figure 4 First, the base model meta feature is generated, 5-fold cross-validation is used, Imbalance-XGBoost and LightGBM are trained respectively, and the prediction probability of the training set and the test set is generated as the meta feature. Then the weight is optimized by RidgeCV, w1=0.6, w2=0.4 is set, the proportion of Imbalance-XGBoost and LightGBM is determined, and the bias b is determined by L2 regularization optimization.

[0102] Through the L2 regularization loss function optimization of ridge regression, the formula is:

[0103]

[0104] In the formula, is the prediction probability output by the Imbalance-XGBoost base model, is the prediction probability output by the LightGBM base model.

[0105] The expression of the sigmoid function is Sig(x)=(1+e -x ) -1 The sigmoid function maps the linear output of ridge regression to the probability space.

[0106] Then, the F1 score maximization is taken as the target, the probability threshold is dynamically calibrated, and the final classification boundary is determined. Then the model training effect is evaluated on the validation set, and the evaluation indexes include precision (Precision), recall (Recall), F1 value and AUC, and the calculation formula is:

[0107]

[0108] In the formula, precision is the precision, recall is the recall, TP is the proportion of actual positive and predicted positive, FP is the proportion of actual negative and predicted positive, and FN is the proportion of actual positive and predicted negative.

[0109] By using the prediction model constructed, the electricity fee sensitive user is predicted, the electricity fee sensitive user is preferentially manually visited, the bill analysis and installment payment options are provided, the non-sensitive user is automatically triggered by short message or voice prompt, and the service cost is reduced. The high-sensitive user is provided with a fine reduction or temporary electricity fee subsidy; before the electricity price adjustment, the policy interpretation is directly pushed, the dispute risk is reduced, and the sensitive user electricity surge situation can also be monitored in real time, and the scene verification process is triggered.

[0110] In an embodiment, the feature data to be input is obtained, including:

[0111] Obtaining first grid user form sample data in the power system to be predicted;

[0112] Tokenizing and denoising the first grid user form sample data to obtain a plurality of sample feature matrices, classifying the sample feature matrices based on information of the sample feature matrices to obtain a plurality of sample feature combinations;

[0113] Using a feature screening model to screen the sample feature combinations to obtain corresponding feature data to be input.

[0114] In this embodiment, the first grid user form sample data is collected, and then tokenized and denoised to obtain a plurality of sample feature matrices. The specific process and steps are the same as those in step 102, and will not be repeated here.

[0115] Then, based on the information of each sample feature matrix, the sample feature matrices are classified to obtain a plurality of sample feature combinations. Then, the feature screening model is used to calculate the sample feature combinations to obtain the feature importance value of each sample feature combination. The feature matrix whose feature importance value meets the preset condition is selected as the feature of each sample feature combination, and then the feature data to be input of each sample feature combination is obtained.

[0116] In an embodiment, the LightGBM model is trained and predicted using the training set to obtain a plurality of first prediction results, and the Imbalance-XGBoost model is trained and predicted using the training set to obtain a plurality of second prediction results, including:

[0117] Dividing the training set into a plurality of subsets, and using the feature sample data in the training set except for the plurality of subsets to train the LightGBM model to obtain a plurality of first base models;

[0118] Using the feature sample data in the training set except for the plurality of subsets to train the Imbalance-XGBoost model to obtain a plurality of second base models;

[0119] Respectively inputting the plurality of subsets into the corresponding first base models to obtain a plurality of first prediction results, and respectively inputting the plurality of subsets into the corresponding second base models to obtain a plurality of second prediction results.

[0120] In the embodiment, the training set data is divided into five non-overlapping subsets D1, D2, D3, D4 and D5 of similar size for two different base models; for the ith fold, a base model is trained using all data except ; then the prediction probability of each sample in the trained pair is generated, and the corresponding prediction probability of the test set sample is also generated; for the training set sample, there are k base models, so the sample has k prediction probabilities, and the prediction probability of the sample is taken as the meta-feature of the subsequent ridge regression by averaging the results of k times, and it should be noted that k is 2.

[0121] The test set can obtain a prediction probability after each fold of the base model training, so the average value of five-fold cross-validation of Imbalance-XGBoost and LightGBM is taken as two meta-features for subsequent ridge regression model fusion.

[0122] The electricity fee sensitive user prediction system provided by the embodiment of the application is as shown in Figure 6 The system block diagram of the electricity fee sensitive user prediction system 600 includes: Figure 6 The system block diagram of the electricity fee sensitive user prediction system 600 includes:

[0123] The acquisition module 601 is configured to acquire first power grid user form data in a to-be-predicted power system.

[0124] The preprocessing module 602 is configured to perform word segmentation and denoising processing on the first power grid user form data to obtain a plurality of feature matrices, classify the plurality of feature matrices based on information of the plurality of feature matrices, and obtain a plurality of feature combinations.

[0125] The screening module 603 is configured to perform feature screening on the plurality of feature combinations by using a feature screening model to obtain corresponding screened feature combinations.

[0126] The prediction module 604 is configured to input the screened feature combinations into a prediction model for prediction to obtain an electricity fee sensitive user prediction result, wherein the prediction model is obtained by training a LightGBM model and an Imbalance-XGBoost model by using a stacking integration strategy.

[0127] In an embodiment, the preprocessing module includes:

[0128] The replacement unit is configured to replace sensitive information in the first power grid user form data by using a regularization expression to obtain second power grid user form data.

[0129] The word segmentation unit is configured to perform word segmentation and filter stop words in the second power grid user form data based on a self-defined dictionary to obtain a word segmentation list.

[0130] The association unit is configured to associate the word lists to obtain a plurality of feature matrices.

[0131] The specific implementation of the electricity-sensitive user prediction system is basically the same as the above-mentioned specific embodiments of the electricity-sensitive user prediction system, and will not be repeated here.

[0132] In an embodiment of the present application, a computer device is provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the above steps when executing the computer program; the computer device provided in the embodiment has similar implementation principles and technical effects to the above method embodiments, and will not be repeated here.

[0133] In an embodiment of the present application, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the above steps; the computer readable storage medium provided in the embodiment has similar implementation principles and technical effects to the above method embodiments, and will not be repeated here.

[0134] The technical features of the above embodiments can be combined arbitrarily, and to make the description concise, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.

[0135] The above specific embodiments further illustrate the purpose, technical solutions and advantages of the present application, and it should be understood that the above description is only for specific embodiments of the present application and is not used to limit the protection scope of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for electricity price sensitive customer forecasting, the method comprising: The utility model relates to: Obtain first power grid user form data in the power system to be predicted; The first power grid user form data is carried out word segmentation and denoising processing, and a plurality of feature matrices are obtained, based on the information of each feature matrix, each feature matrix is classified to obtain a plurality of feature combinations; Each feature combination is screened by a feature screening model to obtain a corresponding screened feature combination; Each screened feature combination is input into a prediction model for prediction to obtain an electricity fee sensitive user prediction result, wherein the prediction model is obtained by training a LightGBM model and an Imbalance-XGBoost model using a stacking integration strategy.

2. The electricity price sensitive customer forecasting method of claim 1, wherein, The first power grid user form data is carried out word segmentation and denoising processing, and a plurality of feature matrices are obtained, including: Sensitive information in the first power grid user form data is replaced by a regularization expression to obtain second power grid user form data; Based on a self-defined dictionary, the second power grid user form data is segmented and filtered to obtain a segmented list; The segmented list is associated with a word group to obtain a plurality of feature matrices.

3. The electricity price sensitive customer forecasting method of claim 2, wherein, Each feature combination is screened by a feature screening model to obtain a corresponding screened feature combination, including: Each feature combination is input into the feature screening model for traversal to obtain a first potential split point of each feature matrix; The gain value of each first potential split point is calculated using a gain formula, the feature matrix with the maximum gain value is selected for splitting, and then each feature combination is traversed to obtain a second potential split point and calculate the corresponding gain value until a preset stop splitting condition is reached, the total gain value of each potential split point is output, and the total gain value is determined as the feature importance value of each feature matrix; The feature matrix whose feature importance value meets the preset condition is selected as the feature of each feature combination to obtain a corresponding screened feature combination.

4. The electricity price sensitive customer forecasting method of claim 1, wherein, The prediction model is obtained by training a LightGBM model and an Imbalance-XGBoost model using a stacking integration strategy, including: Obtain the sample feature data to be input, and divide the sample feature data to be input into a training set and a test set according to a preset ratio; The LightGBM model is trained and predicted using the training set to obtain a plurality of first prediction results, and the Imbalance-XGBoost model is trained and predicted using the training set to obtain a plurality of second prediction results; The first prediction result is calculated by averaging to obtain a first meta-feature, and the second prediction result is calculated by averaging to obtain a second meta-feature, and the first meta-feature and the second meta-feature are input into a ridge regression model to obtain a final prediction result. Adjust the ridge regression model based on the final prediction result to obtain a target ridge regression model; if the final prediction result is greater than a preset threshold, evaluate each first base model and each second base model using test set data to obtain a target first base model and a target second base model; Obtain a prediction model according to the target first base model, the target second base model, and the target ridge regression model.

5. The electricity price sensitive customer forecasting method of claim 4, wherein, The obtained sample feature data to be input includes: Obtain first power grid user form sample data in a power system to be predicted; Perform word segmentation and denoising processing on the first power grid user form sample data to obtain a plurality of sample feature matrices, classify each sample feature matrix based on the type of the sample feature matrix, and obtain a plurality of sample feature combinations; Perform feature screening on each sample feature combination using a feature screening model to obtain corresponding sample feature data to be input.

6. The electricity price sensitive customer forecasting method of claim 4, wherein, The training set is used to train and predict the LightGBM model to obtain a plurality of first prediction results, and the training set is used to train and predict the Imbalance-XGBoost model to obtain a plurality of second prediction results, including: Divide the training set into several subsets, and use feature sample data in the training set except for the several subsets to train the LightGBM model to obtain several first base models; Use feature sample data in the training set except for the several subsets to train the Imbalance-XGBoost model to obtain several second base models; Input the several subsets into the corresponding first base model to obtain a plurality of first prediction results, and input the several subsets into the corresponding second base model to obtain a plurality of second prediction results.

7. An electricity price sensitive consumer prediction system characterized by, It includes: An acquisition module is configured to acquire first power grid user form data in a power system to be predicted; A preprocessing module is configured to perform word segmentation and denoising processing on the first power grid user form data to obtain a plurality of feature matrices, classify each feature matrix based on information of the feature matrix, and obtain a plurality of feature combinations; A screening module is configured to calculate each feature combination using a feature screening model to obtain a feature importance value of each feature combination, and select the feature combination whose feature importance value meets a preset condition as input feature; A prediction module is configured to input the input feature into a prediction model for prediction to obtain a power cost sensitive user prediction result, wherein the prediction model is obtained by training a LightGBM model and an Imbalance-XGBoost model using a stacking integration strategy.

8. The electricity price sensitive customer forecasting system of claim 7 wherein, The preprocessing module includes: A replacement unit is configured to replace sensitive information in the first power grid user form data using a regularization expression to obtain second power grid user form data; A word segmentation unit is configured to perform word segmentation and filter stop words in the second power grid user form data based on a self-defined dictionary to obtain a word segmentation list; An association unit is configured to associate the word lists to obtain a plurality of feature matrices.

9. A computer device, comprising: The application relates to a computer program product and a computer program. The application relates to a computer program product and a computer program. The application relates to a computer program product and a computer program.

10. A storage medium, characterized by The application relates to a computer program product and a computer program.

Citation Information

Patent Citations

  • Electricity fee sensitive user analysis method based on stacking and bagging algorithms

    CN107507038A

  • A method and a system for constructing a portrait of a power grid user

    CN109359868A

  • Network fraud number detection method and system, storage medium and terminal equipment

    CN113591924A

  • Office building rent prediction method and system based on Stacking ensemble learning algorithm

    CN117635280A