Electricity charge collection exception checking and management method based on big data

CN122840353APending Publication Date: 2026-09-29MARKETING SERVICE CENT OF STATE GRID HENAN ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611209270.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

异常数据识别后,缺乏自动化分析工具,需人工逐户制定整改方案

Benefits of technology

[0028]本发明的总体技术方案通过数据驱动与人工智能深度融合,实现了电费计收异常核查治理的全流程智能化,其技术效果体现在以下三个方面:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122840353A_ABST
    Figure CN122840353A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of power grid electricity charge verification, and relates to an electricity charge collection anomaly verification management method based on big data, which comprises the steps of data preparation, model construction, model training, anomaly management and the like. The present application is aimed at the abnormal problems in electricity charge collection, such as inconsistent industry classification, power consumption category and electricity price setting, and less basic electricity charge collection, integrates marketing 2.0 system archives and industrial and commercial data, and technically innovatively adopts a "multi-modal feature fusion + deep semantic modeling" framework to accurately analyze and judge the user industry classification, power consumption category and executed electricity price. In the management link, the online and offline modes are combined to complete the anomaly data rectification relying on the model recommendation. The intelligent identification and risk prevention and control of the electricity charge collection anomaly are realized, and the special verification of maximum demand charge collection and reduced capacity power and the like is further expanded. Through the cooperation of management and technical measures, the stock zero and incremental management of the electricity charge collection problems are promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power grid electricity bill verification technology, specifically involving a method for verifying and managing abnormal electricity billing based on big data. Background Technology

[0002] Currently, the verification of abnormal electricity billing in the power industry generally relies on a manual, specialized inspection model. The core process involves marketing personnel manually comparing data in the marketing system archives with on-site verification records based on static rules such as the "Correspondence Table between Industry Categories and Electricity Consumption Categories" and the "Electricity Price Implementation Standards." Technically, this primarily employs single-dimensional rule verification, matching a fixed mapping relationship of "industry classification - electricity consumption category - electricity price" using Excel or simple scripts, such as "agriculture" corresponding to "agricultural production electricity consumption." This approach fails to integrate multi-source heterogeneous data, such as business scope, user electricity consumption behavior, and regional characteristics. After identifying abnormal data, there is a lack of automated analysis tools, requiring manual development of rectification plans for each customer.

[0003] The existing technology has the following drawbacks: First, the data extraction, screening and verification process involves a high degree of human involvement. The on-site verification content and data caliber confirmation rely on expert experience, the standardization and intelligence are insufficient, the cross-professional collaboration efficiency is low, and the real-time and accuracy of abnormal data identification are low. Second, the analysis dimensions are too few. It does not combine multi-dimensional information such as the electricity consumption characteristics of other users in the region, user voltage level, and line, making it difficult to comprehensively and accurately identify anomalies. Summary of the Invention

[0004] This invention provides a big data-based method for investigating and managing anomalies in electricity billing. It focuses on issues such as inconsistencies in user industry classification, electricity usage categories, and electricity pricing, as well as undercharging basic electricity fees based on demand. Based on marketing data and external data, it uses artificial intelligence technology to build a data model to intelligently analyze user industry classification, electricity usage categories, and consistency in electricity pricing. This assists in conducting electricity price verification and data governance, improves the level of intelligence, avoids the risk of abnormal electricity billing, and achieves the goal of reducing costs and increasing efficiency.

[0005] The technical solution adopted in this invention is: a method for investigating and managing abnormal electricity billing based on big data, comprising the following steps:

[0006] Data preparation involves collecting and fusing multi-source data for correlation analysis, identifying key influencing factors through correlation analysis, using anomaly rules to statistically analyze abnormal data, confirming correct sample data for use in machine learning models, and selecting pilot units for pilot testing.

[0007] The model is constructed by using context-aware preprocessing to form the data layer, multimodal dynamic feature fusion to form the feature layer, and fine-tuning the BERT classifier to form the model layer.

[0008] The training model, based on the provided unified social credit code and the business scope of the enterprise, performs text feature concatenation on the obtained dataset, divides it into training and validation sets, loads the model for training, and intelligently outputs the user's industry classification, electricity category, and applicable electricity price through model training, thereby achieving intelligent data analysis.

[0009] Anomaly management combines online and offline batch management to address abnormal data.

[0010] The multi-source data includes basic marketing data and external data. The basic marketing data and external data are aggregated to construct a three-dimensional structure of "attribute-behavior-strategy" for correlation analysis.

[0011] The marketing basic data and external data are obtained from the Marketing 2.0 system archives and business registration data, including power supply unit, account number, account name, industry classification, electricity consumption category, user voltage, urban and rural category, user classification, contract capacity, operating capacity, business scope of business license, and applicable electricity price.

[0012] The attribute dimension covers the business scope of the business license and static characteristics of urban and rural categories; the behavioral dimension includes contract capacity and operating capacity electricity consumption characteristics; and the strategy dimension focuses on the execution of electricity price information.

[0013] The multi-source data fusion process includes fusion analysis using Pearson correlation coefficient, chi-square test, and decision tree split importance to clarify the correlation between industry classification, electricity consumption category, and electricity price setting.

[0014] Furthermore, based on the "Correspondence Table of Industry Categories and Electricity Consumption Categories," 43 anomaly rules were generated. These anomaly rules were used to analyze data where industry classifications and electricity consumption categories were inconsistent. Since electricity consumption categories are closely related to the applied electricity price, these anomaly data were used to verify the correctness of the user's electricity price application. Simultaneously, the correct application of user electricity prices also facilitated the confirmation and correct selection of industry classifications and electricity consumption categories.

[0015] When collecting abnormal data, the results of correlation analysis are combined with the abnormality rules to collect detailed abnormalities where there are inconsistencies in industry classification, electricity consumption category, and user electricity price implementation.

[0016] When confirming the correct sample data, the data is matched according to information such as industry classification, electricity consumption category, user voltage, urban and rural category, user classification, contract capacity, operating capacity, business scope of business license, and applicable electricity price. The data details of correct data that match the industry classification and electricity consumption category in the whole province are compiled and used as correct sample data for the model's machine learning.

[0017] When selecting pilot units, regions with relatively fewer anomalies should be chosen as pilot units based on the total number of anomalies across the province.

[0018] When constructing the model, the data layer employs context-aware preprocessing to clean the business scope text, encode urban and rural categories, and solve the problem of noise in the original data, providing high-quality input for semantic modeling. The feature layer uses multimodal dynamic feature fusion, extracts context-aware vectors from text semantic features through BERT, and combines the localized urban and rural categories with the business scope to quantify the influence of region on the industry. The model layer uses a fine-tuned BERT classifier to output the industry probability distribution, supporting the matching output of electricity consumption categories and electricity prices.

[0019] During the model fine-tuning and optimization process, a hierarchical fine-tuning strategy is adopted to retain general semantic understanding capabilities and avoid overfitting to small samples; class weighting and adversarial training are used to improve the model's generalization ability.

[0020] The hierarchical fine-tuning strategy is as follows: during the training initialization phase, the pre-trained BERT model is loaded, and the weight parameters of the bottom 6 Transformer layers are frozen to maintain the general language representation ability learned in the pre-training phase; gradient updates are only opened for the parameters of the top 6 Transformer layers and the newly added fully connected classification head; this significantly reduces the number of trainable parameters and effectively prevents the model from suffering catastrophic forgetting and overfitting on small sample data.

[0021] The model training process specifically involves: loading pre-trained BERT model weights, setting model parameters, training using a GPU training accelerator, monitoring training / validation set loss and accuracy, and saving the optimal model parameters.

[0022] During model training, the training and validation sets are divided in an 8:2 ratio. A fixed random seed (random_state=42) is used to randomly sample the training set to ensure reproducibility. The validation set is sampled sequentially to evaluate model performance. Then, the model is loaded for training. Pre-trained BERT model weights are loaded, model parameters are set, and training is performed using a GPU training accelerator (model.cuda()). The training / validation set loss and accuracy are monitored, and the optimal model parameters are saved.

[0023] The training iterations are set to 10 epochs, adjustable based on training conditions. The specific training process is as follows: gradient clearing → forward propagation → loss calculation → backpropagation → gradient pruning → parameter update → learning rate update. During the validation phase, gradient calculation is disabled to improve efficiency; loss and accuracy are calculated. The trained model is saved using an optimal model saving mechanism: the model is saved only when the validation set accuracy improves, preventing overfitting and saving a worse model. The model parameters that best perform on the validation set are retained. The trained model is then evaluated, outputting training set loss and accuracy, and validation set loss and accuracy for preliminary model assessment. Through model training, the system intelligently outputs the user's industry classification, electricity usage category, and applicable electricity price, achieving intelligent data analysis.

[0024] Online governance involves daily queries of abnormal details by city and county companies, obtaining users' business scope through marketing licenses, intelligently determining users' industry classification and applicable electricity prices, and reporting missing or abnormal data to complete the governance of abnormal data. Offline batch governance targets abnormal information that can be processed in batches, combining recommendations from the model output with the established governance methods and processes for batch governance.

[0025] The model is further extended so that when users make business changes in Marketing 2.0, the system verifies whether there are any issues with the user's selected electricity category based on the user's industry category, checks the compliance of electricity price implementation, confirms the user's electricity category based on the implemented electricity price, and further confirms whether the user's industry category is correct. The two are interconnected and mutually verify each other to ensure that the user's electricity price is implemented accurately and in accordance with regulations, and to ensure that the user's industry category and electricity category are consistent to avoid contradictions. The system also recommends reasonable industry classification, electricity category, and implemented electricity price information.

[0026] During on-site verification, the app program allows users to input their account number information. It intelligently analyzes the consistency between the user's electricity usage category, industry classification, and applicable electricity price. Then, it uses OCR to identify the business scope on the user's business license and intelligently recommends the user's industry classification, electricity usage category, and electricity price information to assist in conducting electricity price verification and data governance.

[0027] The beneficial effects of this invention are:

[0028] The overall technical solution of this invention achieves intelligent management of the entire process of electricity billing anomaly verification and control through the deep integration of data-driven approaches and artificial intelligence. Its technical effects are reflected in the following three aspects:

[0029] The accuracy of anomaly identification has been significantly improved, including: overcoming the limitations of traditional semantics: adopting BERT deep semantic modeling, it solves the semantic metaphors that traditional methods such as TF-IDF cannot understand, and correlation analysis confirms that industry classification and electricity consumption category are strongly correlated. The model accurately captures features based on this, avoiding the subjectivity and misjudgment of manual review; multimodal feature fusion: combining the text features of business scope and the regional features of urban and rural categories, through a 12-layer Transformer self-attention mechanism, it achieves accurate classification of complex scenarios, ensuring the compliance of matching industry classification and electricity consumption category.

[0030] Intelligent and streamlined business processes include: Intelligent decision support: After the model is embedded in the Marketing 2.0 system, it can provide accurate industry classifications, electricity categories, and electricity prices in real time during business expansion applications or changes, freeing frontline staff from tedious file verification and reducing their burden; Closed-loop risk control mechanism: A closed loop of "online early warning + offline governance" has been established. Online, business licenses can be recognized and intelligently analyzed by entering the account number through the APP; offline, batch rectification is carried out based on the high-risk list output by the model, realizing the transformation from "passive rectification" to "proactive defense".

[0031] System compatibility and scalability include: dynamic iterative optimization: by freezing the bottom 6 layers of BERT, fine-tuning the top layer, and adversarial training (FGM), it still maintains high generalization ability under small sample and class imbalance conditions, adapting to different electricity price implementation standards in various cities, such as differences in maintenance fees; scenario reuse and promotion: the technical solution has good portability and can be extended to multiple marketing audit scenarios, such as power supply operation mode specifications and transformer loss calculation verification, in addition to electricity fee verification, forming a continuous governance capability of "one theme per month". Attached Figure Description

[0032] Figure 1 To construct a correlation heatmap for correlation analysis of "attribute-behavior-strategy" in this invention;

[0033] Figure 2 This is a flowchart illustrating the relationship between user industry classification and electricity consumption category in this invention.

[0034] Figure 3 The flowchart for constructing the industry classification intelligent recognition model in this invention is shown below. Detailed Implementation

[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention, and will be specifically described below with reference to the embodiments.

[0036] like Figure 1-3 As shown, the present invention includes the following steps:

[0037] Data preparation involves collecting and fusing multi-source data for correlation analysis to identify key influencing factors, using anomaly rules to statistically analyze outlier data, confirming correct sample data for use in the machine learning model, and selecting pilot units for implementation. The specific process is as follows:

[0038] The multi-source data includes marketing basic data and external data, which are obtained from the Marketing 2.0 system archives and business registration data, including power supply unit, account number, account name, industry classification, electricity consumption category, user voltage, urban and rural category, user classification, contract capacity, operating capacity, business scope of business license, and applicable electricity price.

[0039] Correlation analysis is conducted by constructing an "attribute-behavior-strategy" framework. The attribute dimension covers static characteristics such as the business scope of the business license and urban / rural category; the behavior dimension includes electricity consumption characteristics of contracted capacity and operating capacity; and the strategy dimension focuses on the implementation of electricity price information.

[0040] The fusion analysis process includes Pearson correlation coefficient, chi-square test, and decision tree splitting importance fusion analysis to clarify the correlation between industry classification, electricity consumption category and electricity price setting.

[0041] The specific analysis process and fusion mechanism are as follows:

[0042] Pearson correlation coefficient analysis: For continuous variables, such as average electricity consumption, electricity price gradient, enterprise revenue scale, and electricity load rate, the Pearson correlation coefficient r between each pair of variables is calculated to quantify the strength and direction of linear correlation; a grading threshold is set: |r| ≥ 0.6 is judged as strong linear correlation; 0.3 ≤ |r| < 0.6 is moderate correlation; |r| < 0.3 is weak correlation. Only feature pairs that pass the significance test (p < 0.05) and reach the moderate or higher threshold are retained.

[0043] Chi-square test analysis: For discrete / categorical variables, such as industry categories, electricity consumption categories, electricity price policy labels, and business operation status, a contingency table is constructed to calculate the chi-square statistic and corresponding p-value; p < 0.05 is used to determine whether the variable distribution deviates from the independence hypothesis, and Cramer's V coefficient is further calculated to measure the effect size, distinguishing between "policy-driven association" and "market-spontaneous association".

[0044] Importance analysis of decision tree splits: Multi-source features are input into the gradient boosting decision tree model, and the importance score of each feature in the node splitting process is calculated iteratively based on Gini impurity or information gain. K-fold cross-validation is used to remove collinear redundant features, retain the top N% of importance ranking, and select key variables with N=15 to capture the nonlinear mapping and high-order interaction effects between industry classification, electricity consumption category and electricity price setting.

[0045] Pearson correlation coefficient focuses on the linear trend of continuous variables, chi-square test characterizes the distribution deviation and independence test of categorical variables, and decision tree split importance reveals feature interactions and nonlinear threshold effects. These three methods complement each other in terms of variable type suitability, relationship capture dimensions, and statistical hypotheses. Their integration effectively avoids the false positive / false negative bias of single methods, improving the robustness, interpretability, and engineering feasibility of determining the correlation between industry classification, electricity consumption category, and electricity price settings.

[0046] Figure 1 To construct a correlation heatmap for correlation analysis of "attribute-behavior-strategy", Figure 1 The color intensity indicates the degree of correlation between variables, with darker colors representing stronger correlations. There is a certain correlation between electricity price settings and various anomalous factors, while there is a strong positive correlation between industry classification and electricity consumption category (correlation coefficient close to 0.87). Industry classification and electricity consumption category also have a strong influence on electricity price settings, while urban / rural category becomes the key moderating variable.

[0047] Figure 2 To analyze the flowchart of the "Relationship between User Industry Classification and Electricity Consumption Category," 43 anomaly rules were generated based on the "Correspondence Table between Industry Category and Electricity Consumption Category." These anomaly rules were used to analyze data where industry classification and electricity consumption category were inconsistent. Since electricity consumption category is closely related to the applied electricity price, these anomaly data were used to verify the correctness of the user's applied electricity price. Furthermore, the correct application of user electricity prices facilitated the confirmation and correct selection of industry classification and electricity consumption category.

[0048] Figure 3 To construct the flowchart of the "Industry Classification Intelligent Recognition Model", when collecting abnormal data, the results of correlation analysis are combined to collect detailed abnormalities of inconsistent industry classification, electricity category and user electricity price execution according to the abnormality rules.

[0049] When confirming the correct sample data, matching was performed according to information such as industry classification, electricity consumption category, user voltage, urban and rural category, user classification, contract capacity, operating capacity, business scope of business license, and applicable electricity price. A total of 320,400 correct data entries matching the industry classification and electricity consumption category were compiled for use as correct sample data in the model's machine learning.

[0050] When selecting pilot units, regions with relatively fewer anomalies were chosen based on the total number of anomalies across the province. The province had a total of 3,297,400 anomalies, of which Luohe City had 50,200, a relatively small number, and was therefore selected as a pilot unit.

[0051] The model is constructed by using context-aware preprocessing to form the data layer, multimodal dynamic feature fusion to form the feature layer, and fine-tuning the BERT classifier to form the model layer.

[0052] When constructing the model, the data layer adopts context-aware preprocessing to clean the business scope text, remove special characters and specific prefixes, such as "general projects" and "main business", standardize the text, encode urban and rural categories, and assign numerical labels to urban / rural areas to solve the problem of noise in the original data, thus providing high-quality input for semantic modeling.

[0053] The feature layer employs multimodal dynamic feature fusion, and text semantic features are extracted using BERT to extract context-aware vectors, which facilitates the capture of long-distance dependencies, such as the association between "cross-border" and "e-commerce" in "cross-border e-commerce". The regional features combine urban and rural categories with the scope of business to quantify the influence of region on industry trends.

[0054] The model layer employs a fine-tuned BERT classifier to output industry probability distributions, supporting the matching of electricity categories with electricity prices. The business scope text contains industry metaphors; for example, "supply chain management" actually belongs to the wholesale and retail industry. BERT's Transformer architecture captures long-distance dependencies through a 12-layer self-attention mechanism, such as the association between "cross-border" and "e-commerce" in "cross-border e-commerce." BERT's pre-trained transfer learning capabilities significantly alleviate the data sparsity problem, and the convergence speed is improved after fine-tuning. Urban and rural categories are integrated through a feature concatenation layer, avoiding the shortcomings of traditional NLP models (such as TF-IDF+LR) that ignore regional context. The specific mechanism is as follows:

[0055] ① Pre-training process based on MLM and NSP and long-distance dependency capture: BERT's pre-training process adopts an unsupervised bidirectional Transformer architecture, constructing general deep language representations through two core tasks: First, Masked Language Model (MLM), which randomly masks a predetermined proportion of tokens in the input text during the pre-training stage, such as 15%, for example, masking "supply chain" in "supply chain management," forcing the model to predict the masked words based on the bidirectional context, thereby gaining a deep understanding of the metaphors and potential semantic connections of industry terms; Second, Next Sentence Prediction (NSP), used to learn the logical coherence between text segments. This pre-training mechanism enables the model to effectively capture long-distance semantic dependencies across word units, such as in "cross-border e-commerce," breaking through the limitations of the traditional bag-of-words model.

[0056] ② Principle of Supervised Fine-Tuning and Convergence Speed ​​Improvement Based on Transfer Learning: In downstream industry classification tasks, this application adopts a task-specific supervised fine-tuning method. Since the pre-trained model has learned rich syntactic and semantic prior knowledge on massive general corpora, its network parameter initialization state is already in a relatively optimal region of the loss function surface, i.e., it possesses a powerful general feature extraction basis. Compared to random initialization training, this application uses a smaller learning rate in the fine-tuning stage, preferably 2×10⁻⁵, and combines it with a layered freezing strategy, requiring only the top-level network weights to be updated to adapt to specific industry classification boundaries. This transfer learning mechanism significantly reduces the dimensionality of the optimization space, effectively avoiding gradient vanishing or severe oscillations in the early stages of training, thus enabling the model to quickly find local optima with a small number of labeled samples, significantly improving convergence speed, and greatly alleviating the overfitting problem caused by data sparsity in the power industry's segmented scenarios.

[0057] The specific process of model construction is as follows:

[0058] The deep fusion mechanism of "textual semantics + regional features" involves multimodal fusion of the extracted BERT textual semantic vectors with urban / rural category feature vectors. Specifically, it employs a strategy combining feature concatenation and nonlinear interaction: the two types of vectors are concatenated along the feature dimension to form a preliminary joint feature representation; dynamic weights are generated using urban / rural category features to adaptively weight key dimensions in the textual semantic vectors, thereby achieving regionalized correction and supplementation of textual semantics and accurately depicting the comprehensive profile of enterprises in specific regional environments.

[0059] Semantic extraction of business scope text based on BERT: First, the business scope text of the enterprise is preprocessed by denoising and removing stop words; then, the Tokenizer of the pre-trained BERT model is used to convert the text into a Token ID sequence containing special markers (such as the beginning of the sentence [CLS] and the end of the sentence [SEP]) and an attention mask; the sequence is input into the BERT model, and bidirectional contextual features are extracted through a multi-layer Transformer encoder. Finally, the vector corresponding to the [CLS] marker in the last hidden state is extracted or the mean-pooling strategy is used to use it as a high-dimensional dense vector representing the global contextual semantics of the business scope.

[0060] Vectorized representation of urban-rural category features: For discrete urban-rural category numerical labels, such as town, village or specific administrative division codes, they are mapped into low-dimensional dense feature vectors through an embedding layer; or one-hot encoding is performed first, and then dimensionality reduction mapping is performed through a fully connected layer, thereby transforming discrete regional labels into continuous feature representations that can participate in neural network calculations.

[0061] During the fine-tuning and optimization of the BERT model, the bottom 6 layers of the pre-trained BERT Transformer were frozen, and only the top 6 layers and the classification head were trained to alleviate overfitting on small samples. The AdamW optimizer (learning rate 2e-5), class weighting (ClassWeighting='balanced'), and adversarial training (FGM) were set to improve the model's generalization ability.

[0062] The specific model fine-tuning training and optimization process is as follows:

[0063] A layered fine-tuning strategy mitigates overfitting on small sample data: During the initial training phase, a pre-trained BERT model is loaded. By setting the gradient calculation properties of the parameters, the weight parameters of the bottom 6 Transformer layers are frozen to maintain the general language representation capabilities learned during pre-training. Gradient updates are only made available for the parameters of the top 6 Transformer layers and the newly added fully connected Classification Head. This significantly reduces the number of trainable parameters and effectively prevents catastrophic forgetting and overfitting on small sample data.

[0064] To address the issue of imbalanced samples, a loss function based on dynamic class weighting is constructed. This addresses the problem of uneven distribution and long-tailed distribution of samples across different industries or electricity consumption categories in the dataset. A class weighting mechanism (class weighting='balanced') is introduced when calculating the cross-entropy loss. Specifically, the system automatically calculates the corresponding weight coefficient for each class based on the inverse of its sample frequency in the training set. That is, classes with fewer samples are assigned higher penalty weights, and the predicted losses for each class are weighted and summed in the loss function. This process forces the model to give more gradient attention to minority class samples during backpropagation, thereby improving the model's accuracy in identifying low-frequency classes.

[0065] An adversarial training mechanism (FGM) is introduced to improve model generalization and robustness: In each parameter update iteration, a fast gradient method adversarial training step is embedded to enhance the model's robustness to minor perturbations in the input text. The specific execution process is as follows:

[0066] Step a (Normal Forward Propagation): The input sample undergoes normal forward propagation through the model, and the initial loss L is calculated;

[0067] Step b (Calculate adversarial perturbation): Calculate the gradient of the loss L with respect to the parameters of the word embedding layer, and then calculate the gradient direction based on the preset perturbation threshold. (Preferred, (Set to 1.0), calculate the optimal counter-disturbance amount radv;

[0068] Step c (Adversarial forward propagation): The perturbation radv is superimposed on the original word embedding vector to construct adversarial examples, and a second forward propagation is performed to calculate the adversarial loss Ladv;

[0069] Step d (gradient accumulation and update): Clear the perturbations in the embedding layer to restore the original state, accumulate the gradients of the normal loss L and the adversarial loss Ladv, and then perform backpropagation to update the model parameters.

[0070] AdamW Optimizer Configuration and Parameter Update: The AdamW optimizer is used to perform the final gradient backpropagation and parameter update. Specifically, the configuration is as follows: a base learning rate of 2×10⁻⁵ is set, which ensures that pre-trained knowledge is not significantly corrupted; simultaneously, decoupled weight decay is enabled, preferably set to 1×10⁻², separating the L2 regularization term from the adaptive learning rate update step to avoid the adverse effects of weight decay on sparse gradients. Preferably, a linear warmup strategy is used, where the learning rate linearly increases from 0 to the set value within the first 10% of training steps, further stabilizing gradient oscillations in the early stages of training.

[0071] The training model, based on the provided unified social credit code and the business scope of the enterprise, performs text feature concatenation on the obtained dataset, divides it into training and validation sets, loads the model for training, and intelligently outputs the user's industry classification, electricity category, and applicable electricity price through model training, thereby achieving intelligent data analysis.

[0072] During model training, the model parameters are set by loading pre-trained BERT model weights, using a GPU training accelerator for training, monitoring training / validation set loss and accuracy, and saving the optimal model parameters.

[0073] The specific process is as follows:

[0074] Stratified random partitioning method: A stratified sampling strategy is employed to divide the preprocessed fused dataset into training and validation sets in an 8:2 ratio. Specifically, during the partitioning process, the sample proportions of each target category in the training and validation sets, such as specific industry classifications and electricity consumption categories, are forced to remain completely consistent with the original global dataset. This effectively avoids the problems of missing validation set categories or data distribution shifts caused by purely random partitioning. Simultaneously, a fixed random seed (e.g., random_state=42) ensures the absolute reproducibility of data partitioning and model parameter initialization under different experimental environments.

[0075] GPU-accelerated and mixed-precision training: Model parameters and batch data are loaded into GPU memory for parallel computation. Preferably, Automatic Mixed Precision (AMP) technology is introduced to reduce memory usage and significantly improve the computation speed of forward and backward propagation while maintaining model prediction accuracy.

[0076] Dynamic monitoring and early stopping mechanism: During training, iterations are performed with a preset batch size. After each training epoch, the loss values ​​and evaluation metrics, such as accuracy or F1-score, for both the training and validation sets are calculated synchronously. The system monitors the validation set metrics in real time. If, for several consecutive epochs (e.g., with Patience set to 3), the validation set loss no longer decreases or the evaluation metric no longer improves, the early stopping mechanism is triggered, terminating training and automatically rolling back and saving the model weight parameter file (e.g., .bin or .pth file) showing the best performance on the validation set, thus obtaining the final model with the strongest generalization ability.

[0077] During model training, the training and validation sets are divided in an 8:2 ratio. A fixed random seed (random_state=42) is used to randomly sample the training set to ensure training reproducibility, while the validation set is sampled sequentially to evaluate model performance. Then, the model is loaded for training by loading pre-trained BERT model weights, setting model parameters, and using a GPU training accelerator (model.cuda()).

[0078] During model training, the AdamW optimizer is set to prevent overfitting and improve the model's generalization performance; the adaptive learning rate is set to ensure that the model can effectively update the model parameters to adapt to the classification task, and the learning rate is preferably designed to be 2e-5; class weighting is set to handle the imbalance of classes in the training set.

[0079] The training iterations are set to 10 epochs, adjustable based on training conditions. The specific training process is as follows: gradient clearing → forward propagation → loss calculation → backpropagation → gradient pruning → parameter update → learning rate update. During the validation phase, gradient calculation is disabled to improve efficiency; loss and accuracy are calculated. The trained model is saved using an optimal model saving mechanism: the model is saved only when the validation set accuracy improves, preventing overfitting and saving a worse model. The model parameters that best perform on the validation set are retained. The trained model is then evaluated, outputting training set loss and accuracy, and validation set loss and accuracy for preliminary model assessment. Through model training, the system intelligently outputs the user's industry classification, electricity usage category, and applicable electricity price, achieving intelligent data analysis.

[0080] The actual acquired data was concatenated into text, divided in an 8:1:1 ratio, preserving the original concatenation format. Key parameters included a maximum sequence length of 256, 6 frozen layers, and the AdamW optimizer. Training resources were a GPU server. Overfitting prevention strategies included adversarial training (FGM) and class weighting. The model was continuously evaluated using metrics such as accuracy, recall, and F1 score.

[0081] Anomaly management combines online and offline batch management to address abnormal data.

[0082] Online governance involves daily queries of abnormal details by city and county companies, obtaining users' business scope through marketing licenses, intelligently determining users' industry classification and applicable electricity prices, and reporting missing or abnormal data to complete the governance of abnormal data. Offline batch governance targets abnormal information that can be processed in batches, combining recommendations from the model output with the established governance methods and processes for batch governance.

[0083] The model is further extended so that when users make business changes in Marketing 2.0, the system verifies whether there are any issues with the user's selected electricity category based on the user's industry category, checks the compliance of electricity price implementation, confirms the user's electricity category based on the implemented electricity price, and further confirms whether the user's industry category is correct. The two are interconnected and mutually verify each other to ensure that the user's electricity price is implemented accurately and in accordance with regulations, and to ensure that the user's industry category and electricity category are consistent to avoid contradictions. The system also recommends reasonable industry classification, electricity category, and implemented electricity price information.

[0084] During on-site verification, the app program allows users to input their account number information. It intelligently analyzes the consistency between the user's electricity usage category, industry classification, and applicable electricity price. Then, it uses OCR to identify the business scope on the user's business license and intelligently recommends the user's industry classification, electricity usage category, and electricity price information to assist in conducting electricity price verification and data governance.

[0085] This invention addresses anomalies in electricity billing, such as inconsistencies in industry classification, electricity usage category, and electricity price settings, as well as under-collection of basic electricity fees. First, it integrates Marketing 2.0 system archives and business registration data, identifying key influencing factors through correlation analysis. Based on 43 anomaly rules, 320,400 correct sample data entries were selected, and Luohe was chosen as a pilot city. Technically, it innovatively adopts a "multimodal feature fusion + deep semantic modeling" framework, fine-tuning the BERT model. Through context-aware preprocessing, multimodal feature fusion, and hierarchical training, it accurately determines user industry classification, electricity usage category, and applicable electricity price. The governance phase combines online and offline methods, relying on model recommendations to rectify anomalies. This solution enables intelligent identification and risk control of electricity billing anomalies, and can be further extended to specific checks such as maximum demand billing and reduced capacity electricity usage. Through the synergy of management and technical measures, it promotes the elimination of existing electricity billing problems and the management of new ones.

Claims

1. A method for investigating and managing anomalies in electricity billing based on big data, characterized in that: Includes the following steps: Data preparation involves collecting and fusing multi-source data for correlation analysis, identifying key influencing factors through correlation analysis, using anomaly rules to statistically analyze abnormal data, confirming correct sample data for use in machine learning models, and selecting pilot units for pilot testing. The model is constructed by using context-aware preprocessing to form the data layer and multimodal dynamic feature fusion to form the feature layer. The model layers are composed of fine-tuned BERT classifiers; The training model, based on the provided unified social credit code and the business scope of the enterprise, performs text feature concatenation on the obtained dataset, divides it into training and validation sets, loads the model for training, and intelligently outputs the user's industry classification, electricity category, and applicable electricity price through model training, thereby achieving intelligent data analysis. Anomaly management combines online and offline batch management to address abnormal data.

2. The method for investigating and managing abnormal electricity billing based on big data as described in claim 1, characterized in that: The multi-source data includes basic marketing data and external data. The basic marketing data and external data are aggregated to construct a three-dimensional structure of "attribute-behavior-strategy" for correlation analysis.

3. The method for investigating and managing abnormal electricity billing based on big data as described in claim 2, characterized in that: The marketing basic data and external data are obtained from the Marketing 2.0 system archives and business registration data, including power supply unit, account number, account name, industry classification, electricity consumption category, user voltage, urban and rural category, user classification, contract capacity, operating capacity, business scope of business license, and applicable electricity price.

4. The method for investigating and managing abnormal electricity billing based on big data as described in claim 3, characterized in that: The attribute dimensions cover static features such as the business scope and urban / rural category of the business license. The behavioral dimension includes contracted capacity and operational capacity electricity consumption characteristics; the strategy dimension focuses on the execution of electricity price information.

5. The method for investigating and managing abnormal electricity billing based on big data as described in claim 1, characterized in that: The multi-source data fusion process includes fusion analysis using Pearson correlation coefficient, chi-square test, and decision tree split importance to clarify the correlation between industry classification, electricity consumption category, and electricity price setting.

6. The method for investigating and managing abnormal electricity billing based on big data as described in claim 1, characterized in that: When constructing the model, the data layer employs context-aware preprocessing to clean the business scope text, encode urban and rural categories, and solve the problem of noise in the original data, providing high-quality input for semantic modeling. The feature layer uses multimodal dynamic feature fusion, extracts context-aware vectors from text semantic features through BERT, and combines the localized urban and rural categories with the business scope to quantify the influence of region on the industry. The model layer uses a fine-tuned BERT classifier to output the industry probability distribution, supporting the matching output of electricity consumption categories and electricity prices.

7. The method for investigating and managing abnormal electricity billing based on big data as described in claim 6, characterized in that: During the model fine-tuning and optimization process, a hierarchical fine-tuning strategy is adopted to retain general semantic understanding capabilities and avoid overfitting to small samples; class weighting and adversarial training are used to improve the model's generalization ability.

8. The method for investigating and managing abnormal electricity billing based on big data as described in claim 7, characterized in that: The hierarchical fine-tuning strategy is as follows: during the training initialization phase, the pre-trained BERT model is loaded, and the weight parameters of the bottom 6 Transformer layers are frozen to maintain the general language representation ability learned in the pre-training phase; gradient updates are only opened for the parameters of the top 6 Transformer layers and the newly added fully connected classification head; this significantly reduces the number of trainable parameters and effectively prevents the model from suffering catastrophic forgetting and overfitting on small sample data.

9. The method for investigating and managing abnormal electricity billing based on big data as described in claim 1, characterized in that: The model training process specifically involves: loading pre-trained BERT model weights, setting model parameters, training using a GPU training accelerator, monitoring training / validation set loss and accuracy, and saving the optimal model parameters.

10. The method for investigating and managing abnormal electricity billing based on big data according to claim 1, characterized in that: The online governance involves the city and county companies querying abnormal details daily, obtaining the user's business scope through the marketing license, intelligently determining the user's industry classification and the electricity price applied, and reporting missing or abnormal data to complete the governance of abnormal data. The offline batch governance targets abnormal information that can be processed in batches, combining the recommendations output by the model, and carrying out batch governance according to the established governance methods and processes.