A power customer appeal escalation risk assessment method and system based on causal reasoning
Patent Information
- Application Number
- CN202610859172.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-15
- Publication Date
- 2026-08-21
AI Technical Summary
[0011]鉴于上述或现有因混淆变量干扰导致预测偏差大、无法解释风险成因以及预警滞后的问题,提出了本发明一种基于因果推理的电力客户诉求升级风险评估方法及系统
[0063]从源头上显著提升因果图构建的准确性和鲁棒性,解决了纯数据驱动方法在电力领域的核心痛点
Smart Images

Figure CN122617152A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity marketing and customer service technology, and in particular to a method and system for assessing the risk of escalating customer demands based on causal reasoning, which is used to classify customer demands into four levels of risk and trigger differentiated handling strategies. Background Technology
[0002] Statistics show that in recent years, the annual call volume handled by national power customer service centers has exceeded 100 million. While the vast majority of these calls can be resolved properly through standard procedures, approximately 5%-15% escalate into repeated requests, escalated complaints, or even public relations crises due to untimely or incomplete handling, or heightened customer emotions. Escalating demands not only increase the company's operating costs (including labor costs, administrative coordination costs, and potential compensation costs) but also severely damage the power company's brand image and public credibility. Therefore, accurately identifying potentially high-risk work orders with "escalation risk" from the massive volume of calls, shifting from "post-event remediation" to "pre-event prevention," and from "passive response" to "proactive service," has become a core pain point that urgently needs to be addressed in the current power marketing and service sector.
[0003] Early technologies for assessing electricity customer complaints primarily relied on correlation-based machine learning models, such as the "Method and Device for Predicting Electricity User Complaint Risks" disclosed in Chinese patent application CN118917663A. This method extracts user features and inputs them into classification models like Random Forest and XGBoost to output complaint risk probabilities. While these methods improved prediction efficiency to some extent, they fundamentally depended on correlation analysis between features and labels, rather than causal analysis. They could not distinguish the direction of cause and effect and were susceptible to spurious correlations caused by confounding variables such as customer type, electricity consumption level, and seasonal factors. This resulted in systematic biases in the prediction results, and the output risk probabilities lacked interpretability, failing to guide targeted service interventions.
[0004] To address the aforementioned issues, the industry has begun to introduce causal reasoning techniques to construct risk assessment models. For example, the "Bayes-based method for predicting the risk level of power services" disclosed in reference document CN121599469A, quantifies causal contributions and performs weighted predictions by constructing causal graphs, thus improving the model's interpretability to some extent. However, existing causal reasoning-based power risk assessment techniques still suffer from a fundamental, unresolved flaw: causal graph construction methods cannot adapt to the business characteristics of the power sector, specifically manifested in the following ways:
[0005] 1. Purely data-driven causal discovery methods have extremely poor robustness in power scenarios;
[0006] Electricity customer service work order data is characterized by high noise levels, a severe imbalance between positive and negative samples (escalation complaints account for only 5%-15%), and insufficient data samples despite some clear causal relationships. Purely data-driven causal discovery algorithms (such as temporal Bayesian networks and standard PC algorithms) are highly susceptible to data noise and sample bias, generating numerous false causal edges and incorrect V-structures. For example, they might invert the causal relationship between "customer complaint history" and "service response speed," or incorrectly identify causal relationships that defy common sense, such as "seasonal factors → complaint history." Incorrect causal graphs directly lead to completely distorted estimations of subsequent causal effects, ultimately rendering the entire risk assessment model ineffective.
[0007] 2. The application of expert knowledge has inherent limitations;
[0008] In existing technologies, expert knowledge in the power sector is only used for post-hoc manual correction of generated causal graphs, which is a "better late than never" remedial measure and cannot prevent erroneous causal relationships from occurring at the source. Moreover, expert knowledge often exists in the form of scattered experience without being structured and encapsulated. This not only leads to inconsistent correction results from different experts but also significantly increases the cost of model deployment and maintenance, making it difficult to quickly promote the model to power grid companies in different regions.
[0009] The aforementioned fundamental defects further lead to problems such as large causal effect estimation bias, low accuracy in identifying high-risk work orders, and insufficient interpretability in existing causal risk assessment models, which cannot meet the actual needs of power customer service centers for "early detection, early intervention, and early handling" of escalating demand risks.
[0010] In view of this, the present invention proposes a method and system for risk assessment of power customer demand upgrades based on causal reasoning. It encapsulates and deeply embeds the knowledge of power industry experts into the core execution link of the PC algorithm in a structured manner, avoiding the generation of erroneous causal relationships from the source stage of causal graph construction, thereby significantly improving the prediction accuracy, robustness and interpretability of the model. Summary of the Invention
[0011] In view of the above-mentioned or existing problems such as large prediction bias, inability to explain the causes of risks, and delayed early warning due to interference from confounding variables, this invention proposes a risk assessment method and system for upgrading electricity customer demands based on causal reasoning.
[0012] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0013] This invention provides a method and system for risk assessment of escalating electricity customer demands based on causal reasoning, including:
[0014] Includes the following steps:
[0015] S1: Collect multi-source heterogeneous data related to electricity customer service, fuse and preprocess the data, and construct a standardized work order sample set; the variables in the sample set include at least processing variables, outcome variables, confounding variables, and mediating variables;
[0016] S2: A directed acyclic graph is constructed as a structural causal model using the PC algorithm combined with expert knowledge constraints in the power field. Specifically, this includes:
[0017] S21: Predefine three types of structured expert knowledge rule tables, including a deterministic causal edge rule table, a prohibited causal edge rule table, and a variable role definition table; the variable role definition table clearly indicates the role type and time stage of each variable;
[0018] S22: Use the PC algorithm to perform conditional independence tests on the variables in the sample set and generate an initial causal graph skeleton;
[0019] S23: During the V-structure identification stage, execute the expert knowledge conflict handling rules: if the deterministic causal edge rule table has defined a one-way causal edge between any two variables and a third variable, then force the formation of the corresponding V-structure.
[0020] S24: Integrate the initial causal graph skeleton with the three types of structured expert knowledge rule tables using the constrained posterior adjustment method to output the final structural causal model;
[0021] S3: Based on the aforementioned structural causal model, estimate the causal effect of the treatment variable relative to the outcome variable, and output the average treatment effect and / or the conditional average treatment effect;
[0022] S4: Globally normalize the absolute value of the average treatment effect or conditional average treatment effect to obtain the causal weights of each treatment variable; use the causal weights to weight the original feature vector to construct a weighted feature vector;
[0023] S5: Input the weighted feature vector into the risk prediction model and output the risk probability of escalating customer demands.
[0024] Furthermore:
[0025] In step S24, a constrained posterior adjustment method is used to integrate the initial causal graph and the expert knowledge rule table.
[0026] Specifically, this includes: forcibly adding necessary causal edges defined in the deterministic causal edge rule table to the causal graph, regardless of the output of the PC algorithm;
[0027] For the prohibited causal directions defined in the prohibited causal edge rule table, the edges in the corresponding directions are forcibly deleted from the causal graph;
[0028] When the edge direction output by the PC algorithm conflicts with the direction defined in the deterministic causal edge rule table, the direction is adjusted according to expert knowledge; based on the time stage information in the variable role definition table, the causal graph is checked for time sequence consistency, and edges that violate time causal constraints are deleted.
[0029] Furthermore:
[0030] In step S23, the V-structure identification is further constrained by the following boundary conditions:
[0031] Adjacency condition: Forming a triplet of and They must not be adjacent;
[0032] Separator condition: Cannot be included and Conditional independence separation of concentration;
[0033] Conditional dependency verification: In a given Under the conditions, and The conditional independence test was rejected;
[0034] Time sequence verification: and The time periods are all earlier than The time phase.
[0035] Furthermore:
[0036] Step S3 employs a dual machine learning framework to estimate causal effects, specifically including: dividing the sample set into a training set and an estimation set, and training the processing model and the result model in parallel on the training set;
[0037] The processing model is used to learn the mapping relationship between the confusion variables and the processing variables, and the result model is used to learn the mapping relationship between the confusion variables and the result variables.
[0038] On the estimation set, the orthogonal residuals of the treatment variables and the orthogonal residuals of the outcome variables are calculated using the trained treatment model and outcome model, respectively; based on the orthogonal residuals, the average treatment effect is calculated using the augmented inverse probability weighted formula.
[0039] Furthermore:
[0040] The multi-source heterogeneous data in step S1 includes: basic customer information collected from the power marketing system, request record data and audio-transcribed text collected from the hotline platform, electricity consumption behavior data collected from the electricity consumption information collection system, power grid operation status data collected from the dispatch automation system, and meteorological environment data collected from the meteorological service interface; wherein, the sentiment polarity of the audio-transcribed text is calculated, a pre-trained language model is used to output sentiment scores, and the sentiment is divided into three levels: negative, neutral, and positive according to a preset threshold; negative sentiment is used as a mediating variable in the construction of the structural causal model.
[0041] Furthermore:
[0042] After constructing the final structural causal model in step S2, the step of verifying the causal graph using the structural risk score is also included: calculating the structural risk score S(G) = -2 × log L(D|G) + λ × d based on the Bayesian information criterion.
[0043] Where L(D|G) is the likelihood function of the causal graph G with respect to the data D, d is the number of edges of the causal graph, λ is the regularization parameter and defaults to λ=ln(n), and n is the sample size;
[0044] When the structural risk score is not greater than the qualified threshold, the causal graph structure is determined to be reasonable; the qualified threshold is the sum of 0.3 times the difference between the empty graph score and the complete graph score and the smaller of the two.
[0045] Furthermore:
[0046] Step S3 further includes a step of statistically inferring the average treatment effect: constructing a 95% confidence interval by calculating the variance of the estimator; if the confidence interval does not contain 0, then the causal effect of the treatment variable is determined to be significant.
[0047] Among them, the normal approximation method is used when the sample size is not less than 50 and the normality test is passed; otherwise, the Bootstrap resampling method is used.
[0048] Furthermore:
[0049] The risk prediction model in step S5 adopts the Stacking ensemble model.
[0050] The first layer of the Stacking ensemble model includes a logistic regression model and a gradient boosting tree model, and the second layer includes a logistic regression meta-model.
[0051] Furthermore:
[0052] In step S3, the conditional average treatment effect is estimated, and heterogeneous causal effect values are output for different customer groups or demand characteristics.
[0053] In step S4, the absolute value of the conditional average treatment effect can be used to calculate the dynamic causal weight of each sample and construct a personalized weighted feature vector for the sample.
[0054] A risk assessment system for escalating electricity customer demands based on causal reasoning, comprising:
[0055] The data acquisition and preprocessing module collects multi-source heterogeneous data related to power customer service, integrates and preprocesses it, and constructs a standardized work order sample set.
[0056] The variables in the sample set include at least treatment variables, outcome variables, confounding variables, and mediating variables;
[0057] The causal graph construction module uses a PC algorithm combined with expert knowledge constraints in the power field to construct a directed acyclic graph as a structural causal model.
[0058] The structural causal model specifically includes three predefined types of structured expert knowledge rule tables, generating an initial causal graph skeleton, executing expert knowledge conflict handling rules in the V-structure recognition stage, and outputting the final structural causal model using a constrained posterior adjustment method.
[0059] The causal effect estimation module, based on the structural causal model, estimates the causal effect of the treatment variable relative to the outcome variable and outputs the average treatment effect and / or the conditional average treatment effect.
[0060] The feature weighting module globally normalizes the absolute values of the average treatment effect or conditional average treatment effect to obtain the causal weights of each treatment variable; and uses the causal weights to weight the original feature vector to construct a weighted feature vector.
[0061] The risk assessment module inputs the weighted feature vector into the risk prediction model and outputs the probability of escalating customer demands.
[0062] The beneficial effects of this invention are as follows:
[0063] This significantly improves the accuracy and robustness of causal graph construction from the source, solving the core pain points of purely data-driven methods in the power industry.
[0064] This invention breaks through the conventional model of "data-driven learning + post-event expert correction" in existing technologies. It is the first to encapsulate expert knowledge in the power field into three types of rule tables and embed them into the core V-structure recognition stage of the PC algorithm, imposing constraints at the source stage of causal relationship formation. Through the conflict handling rule of "if an expert has defined a unidirectional causal edge, then no corresponding V-structure will be formed," it completely avoids false causal relationships caused by high noise and uneven sample distribution in pure data-driven methods.
[0065] Ablation experiments show that, compared with the traditional pure data-driven PC algorithm, the number of erroneous edges in the causal graph generated by this invention is reduced from 12 to 3, and the structural accuracy is improved by 75%. Due to the improved accuracy of the causal graph alone, the final risk prediction AUC is improved by 6.1%, which lays the foundation for subsequent accurate causal effect estimation and risk prediction.
[0066] It possesses dual robustness in estimating causal effects and effectively isolates the interference of multidimensional confounding variables.
[0067] This method employs a dual machine learning framework combined with augmented inverse probability weighted (AIPW) estimators. Through orthogonal residual processing, it simultaneously fits the processing model and the outcome model. As long as either model is correctly configured, the causal effect estimation results remain consistent. This approach effectively eliminates the interference of confounding variables such as customer type, electricity consumption level, complaint history, and seasonal factors, accurately quantifying the marginal contribution of core service behaviors such as "whether power was not restored within the specified time" and "whether there was any shirking of responsibility" to the risk of escalating complaints.
[0068] Experiments show that the present invention reduces the causal effect estimation bias of the core processing variable by 42% compared with the traditional do operator method, and improves the statistical significance test pass rate by 35%.
[0069] Supports the identification of heterogeneous causal effects and dynamic feature weighting, enabling refined risk assessment.
[0070] The causal forest algorithm can output the conditional average treatment effect (CATE) for different customer groups (such as industrial users and customers with multiple complaint histories) and different types of demands, and calculate personalized dynamic causal weights for each work order sample accordingly, which solves the problem that traditional global uniform weights cannot adapt to the risk characteristics of different groups.
[0071] For example, this invention can automatically identify the heterogeneity characteristic that "customers with more than two complaint histories have a 2.15 times higher risk of escalation than ordinary customers when processing times exceed the limit," supporting the system to prioritize the allocation of service resources to high-risk groups. Compared with a fixed global weighting scheme, dynamic weighting improves the model's F1-score by 8.2%.
[0072] Balancing high predictive performance with strong interpretability, it enables a seamless transition from data insights to business intervention.
[0073] By employing a stacking ensemble strategy to combine the linear explanatory power of the logistic regression model with the nonlinear fitting capability of the gradient boosting tree model, the risk prediction AUC can reach 0.872 in scenarios where the proportion of positive and negative samples in the power demand upgrade sample is only 5%-15%, which is more than 12% higher than that of traditional correlation prediction models.
[0074] Meanwhile, the risk results output by this invention not only include the probability of escalation, but also include the causal contribution ranking of each processing variable, which can clearly inform customer service personnel that "the core reason for the high risk of this work order is the processing timeout, which contributes 32.6%", providing a direct basis for frontline personnel to formulate targeted intervention measures.
[0075] The technical solution is highly configurable and easy for power grid companies in different regions to implement quickly.
[0076] All business rules in the power sector are configured through a structured expert knowledge rule table, allowing adaptation to different service standards, business processes, and data characteristics in various regions without modifying the core algorithm code. This invention forms a complete technical chain of "causal discovery → causal effect quantification → causal weighted prediction → tiered response and handling." Practical applications show that after the system goes live, it can reduce the escalation rate of power customer requests by more than 30%. Attached Figure Description
[0077] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0078] Figure 1 A flowchart of causal steps provided for embodiments of the present invention.
[0079] Figure 2 A cause-effect graph of claims provided for embodiments of the present invention. Detailed Implementation
[0080] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0081] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0082] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0083] Example 1
[0084] This embodiment uses work order data received by a provincial power company's 95598 customer service center from April 2025 to March 2026 as an example to illustrate the complete implementation process of the present invention.
[0085] Step S1: Collect multi-source heterogeneous data and construct a standardized work order sample set;
[0086] The system collects basic customer information (user ID, electricity address, power supply unit, contract capacity, voltage level) from the electricity marketing system; it collects complaint record data (complaint number, acceptance channel, complaint type, transcript of complaint recording, acceptance timestamp, processing status) from the 95598 hotline platform; it collects electricity consumption behavior data (average electricity consumption in the past 3 months, daily load factor, payment timeliness) from the electricity consumption information collection system; it collects power grid operation status data (number of regional power outages, duration of faults) from the dispatch automation system; it collects meteorological environmental data (temperature, precipitation, extreme weather warnings) from the meteorological service API; and it collects time calendar data (weekdays / holidays, peak and off-peak periods) from the internal calendar system.
[0087] The BERT sentiment classification model was used to perform semantic analysis on the transcribed text of the requests, and the output sentiment score was in the range of [-1, 1]. The sentiment level was determined according to a preset threshold: a score ≤ -0.3 was negative, -0.3 < score < 0.3 was neutral, and a score ≥ 0.3 was positive. Negative sentiment was labeled as a mediating variable.
[0088] Time series alignment was performed on the collected multi-source data to construct a standardized work order sample set. The variables in the sample set include:
[0089] Processing variables: whether the power was not restored within the time limit (two values 0 / 1), whether a shirking of responsibility occurred (two values 0 / 1);
[0090] Outcome variable: Whether the complaint is escalated (binary value 0 / 1);
[0091] Confounding variables: Customer type (residential / industrial / commercial), electricity consumption level (high / medium / low), number of complaints in history (integer), seasonal factors (spring, summer, autumn and winter);
[0092] Mediating variables: affective polarity (-1 / 0 / 1), customer satisfaction rating (0-100).
[0093] After the above processing, a total of 47,283 valid work order samples were obtained.
[0094] Step S2: Construct a structural causal model
[0095] This step is the core innovation of this invention. By structurally encapsulating expert knowledge in the power field and deeply embedding it into the core execution of the PC algorithm, the accuracy of causal graph construction is improved from the source. See Example 2 for details of the implementation process.
[0096] Step S3: Estimate causal effects
[0097] Based on the structural causal model constructed in step S2, a dual machine learning framework is used to estimate the causal effect of the treatment variable relative to the outcome variable, and output the average treatment effect and the conditional average treatment effect. See Example 3 for details of the implementation process.
[0098] Step S4: Construct weighted feature vectors
[0099] The average absolute value of the treatment effect obtained in step S3 is globally normalized to obtain the causal weights of each treatment variable. The average absolute value of the treatment effect for each treatment variable is extracted: whether the call was not answered within the specified time (0.312), whether there was any passing the buck (0.284), response speed rating (0.198), and service attitude rating (0.163), summed to obtain 0.957. The causal weights of each variable are calculated as follows: 0.312 / 0.957≈0.326, 0.284 / 0.957≈0.297, 0.198 / 0.957≈0.207, and 0.163 / 0.957≈0.170. The sum of the weights is verified to be 1.
[0100] The original feature vector (containing 87 dimensions including original variables and derived features) is linearly weighted using the above weights to construct a weighted feature vector.
[0101] Step S5: Output the risk probability
[0102] The weighted feature vectors are input into the Stacking ensemble model, which outputs the probability of escalating customer demands. The Stacking ensemble model is constructed as follows: the first base model consists of logistic regression (L2 regularization, C=1.0) and a gradient boosting tree (n_estimators=100, max_depth=5); the second meta-model is logistic regression, using the probabilities output by the base models as input features. Five-fold cross-validation is used to prevent overfitting.
[0103] The system achieved an AUC of 0.872 and an F1-score of 0.684 on the test set. It identified 12 extremely high-risk work orders, 10 of which were verified as escalation risks, resulting in a warning accuracy rate of 83.3%. After the system went live, the escalation complaint rate decreased from 4.0% to 2.7%, a relative decrease of 32.5%.
[0104] Example 2
[0105] This embodiment focuses on describing the refined construction and verification process of the structural causal model in step S2, highlighting the core innovation of this invention and the difference from existing technologies.
[0106] Step S21: Predefine three types of structured expert knowledge rule tables
[0107] This invention is the first to encapsulate the knowledge of experts in the power field into three types of rule tables in a structured manner, rather than in the form of scattered experience descriptions. All rules are derived from long-term practical experience in power customer service and have clear business basis.
[0108] Table 1. Deterministic Causal Edge Rule Table (Partial)
[0109] R01 Customer types Response Priority Z1→X2 Prioritize responses for major clients R02 Complaint history Attitude rating Z2→X3 Customers with a history of complaints should be treated with more caution. R03 Seasonal factors Response speed Z3→X1 During the summer peak electricity consumption period, there are more faults and the response speed decreases. R04 Electricity consumption level Service resource allocation Z4→X4 Allocate more service resources to users with high power consumption
[0110] Table 2. Rules for Prohibiting Causal Edges (Partial)
[0111] F01 Escalation of complaints Customer types Y→Z1 The results must not affect the customer's inherent attributes. F02 Seasonal factors Complaint history Z3→Z2 Season does not affect historical complaint records. F03 Processing time Customer Number T→Z0 The processing time does not change the customer's identity.
[0112] Table 3. Variable Role Definition Table (Partial)
[0113] Z1 Customer types Confusion variables Before accepting the work order Z2 Complaint history Confusion variables Before accepting the work order X1 Has the power not been restored within the specified time? Processing variables Processing M1 Emotional polarity Mediator variables During the processing Y Should the complaint be escalated? Outcome variable After the processing is completed
[0114] Step S22: Generate the initial cause-effect graph skeleton
[0115] The PC algorithm is used to test the conditional independence of the variables in the sample set constructed in step S1, generating an initial causal graph skeleton. For continuous variables (such as response time), the partial correlation coefficient test is used with a significance level of α=0.05; for discrete variables (such as customer type, whether or not they pass the buck), the G² test is used.
[0116] Step S23: Perform V-structure recognition and expert knowledge conflict resolution.
[0117] V-structure recognition is a core step in causal graph construction, directly determining the correctness of the causal direction. This invention adds expert knowledge conflict handling rules to the standard V-structure recognition boundary conditions, a key innovation not disclosed in existing technologies.
[0118] Standard V-structure identification boundary conditions include:
[0119] Adjacency condition: Forming a triple Vᵢ−Vⱼ−V k Vᵢ and V k They must not be adjacent;
[0120] Separation set condition: Vⱼ cannot be contained within Vᵢ and V k Conditional independence separation of concentration;
[0121] Conditional dependency verification: Given Vⱼ, Vᵢ and Vk The conditional independence test was rejected;
[0122] Time sequence verification: Vᵢ and V k The time phases are all earlier than the time phase of Vⱼ.
[0123] The expert knowledge conflict handling rule added in this invention is as follows: if the deterministic causal edge rule table has defined a one-way causal edge between any two variables and a third variable, then the corresponding V-structure is forcibly not formed.
[0124] Specific Case 1: The normal V-structure formation process is illustrated by the ternary set "electricity consumption level - processing time - seasonal factors":
[0125] The adjacency condition is met: the electricity consumption level and seasonal factors are not adjacent in the framework;
[0126] The condition for a split set is: the split set does not contain processing time.
[0127] Conditional dependency validation passed: p = 0.0002 < 0.05;
[0128] The time sequence is satisfied: both the electricity consumption level and seasonal factors occur before the processing time;
[0129] No expert conflict: The deterministic causal edge rule table does not define the electricity consumption level → processing time or seasonal factors → processing time unidirectional causal edge.
[0130] Therefore, a V-structure is formed: "Electricity consumption level → Processing timeliness ← Seasonal factors".
[0131] Specific Case 2: Expert Conflict Resolution Process Taking the Triad of "Customer Type - Response Priority - Complaint History" as an Example:
[0132] The adjacency condition is met: the customer type and complaint history are not adjacent in the skeleton;
[0133] The condition for a split set is that the split set contains no response priorities.
[0134] Conditional dependency validation passed: p = 0.0015 < 0.05;
[0135] The chronological order is satisfied: both customer type and complaint history occur before response priority;
[0136] There is an expert conflict: the deterministic causal edge rule table R01 has defined a one-way causal edge of "customer type → response priority".
[0137] According to the expert knowledge conflict handling rules of this invention, the formation of a V-structure of "customer type → response priority ← complaint history" is prohibited, thus avoiding the generation of erroneous causal relationships. Traditional pure data-driven PC algorithms, on the other hand, generate incorrect V-structures at this point, leading to completely distorted estimations of subsequent causal effects.
[0138] Step S24: Constraint Posterior Adjustment and Cause-Effect Graph Verification
[0139] The initial causal graph skeleton and three types of expert knowledge rule tables are integrated using a constrained posterior adjustment method, specifically including:
[0140] Force the addition of all deterministic causal edges;
[0141] Forcefully delete all prohibited causal edges;
[0142] Adjust the direction of the conflict with expert knowledge;
[0143] Perform time sequence consistency checks and delete edges that violate time causality constraints.
[0144] After outputting the final structural causal model, the structural risk score was used for verification. The calculated values were S(G)=1623.7, empty graph S(G_empty)=2012.4, complete graph S(G_complete)=1780.5, and the acceptable threshold S_threshold=1850.1. Since S(G) < the threshold, the causal graph structure was determined to be reasonable.
[0145] Ablation experiment verification
[0146] To demonstrate the technical contribution of the core innovation of this invention, the following ablation experiments were conducted:
[0147] Option 1: Pure data-driven PC algorithm (no three-class rule table + no V-structure conflict handling) 12 0.821 - Option 2: PC algorithm + three-class rule table (no V-structure conflict handling) 5 0.840 2.3% Option 3: The complete solution of this invention (PC algorithm + three types of rule tables + V-structure conflict handling) 3 0.872 6.2%
[0148] Experimental results show that all three types of rule tables and V-structure conflict handling rules contribute significantly to improving model performance, with the V-structure conflict handling rules making a greater contribution. This proves that the idea of embedding expert knowledge into the core of the algorithm is correct and effective.
[0149] Example 3
[0150] This embodiment focuses on describing the detailed process of dual machine learning causal effect estimation in step S3 and dynamic feature weighting in step S4.
[0151] Step S3: Dual Machine Learning Causal Effect Estimation
[0152] The processing variable is "whether the power was not restored within the time limit" (X1), the outcome variable is "whether the complaint was escalated" (Y), and the confounding variables include: customer type (Z1), electricity consumption level (Z2), number of complaints in history (Z3), seasonal factors (Z4), number of power outages in the area (Z5), and average electricity consumption in the past 3 months (Z6).
[0153] The samples were divided into a training set (n=33,098) and an estimation set (n=14,185) in a 7:3 ratio. On the training set:
[0154] Model used: XGBoost regression, objective function mean squared error, number of trees 200, maximum depth 4, tendency score ê(Z)=P(X=1|Z);
[0155] Resulting model: Random forest classification, objective function log loss, number of trees 300, maximum depth 5, fitted result predicted value m^(Z)=E[Y∣Z].
[0156] Compute orthogonal residuals on the estimation set: X~ᵢ=Xᵢ−ê(Zᵢ)Y~ᵢ=Yᵢ−m^(Zᵢ)
[0157] The average treatment effect was estimated using an augmented inverse probability weighted formula, and the propensity score was truncated: ê(Zᵢ)=max(min(ê_raw,0.99),0.01) to avoid a denominator of 0. The calculated τ^DR was 0.312. A 95% confidence interval [0.287,0.338] was constructed using the Bootstrap method (1000 resampling cycles), which does not include 0, thus determining the causal effect to be significant.
[0158] The causal forest algorithm was used to estimate the conditional average treatment effect (CATE). The parameters were set as follows: number of trees B = 1000, subsampling ratio 0.5, and each tree was split to maximize the heterogeneity of the treatment effect. The CATE estimate was a weighted average of the estimates from all trees.
[0159] Grouped by "Number of Complaints in History":
[0160] Complaint history = 0 (n=31,204): CATE=0.187, 95%CI [0.165, 0.209]
[0161] Complaint history = 1 time (n=11,027): CATE=0.297, 95%CI [0.268, 0.326]
[0162] Complaint history ≥ 2 times (n=5,052): CATE=0.402, 95%CI [0.361, 0.443]
[0163] Grouped by "Customer Type":
[0164] Residential users (n=35,871): CATE=0.289, 95%CI[0.262,0.316]
[0165] Business users (n=8,924): CATE=0.341, 95% CI [0.298, 0.384]
[0166] Industrial users (n=2,488): CATE=0.387, 95% CI [0.329, 0.445]
[0167] The results show that customers with a history of complaints and industrial users have a stronger causal effect on the risk of escalation when processing timeouts occur.
[0168] Step S4: Dynamic Feature Weighting
[0169] This invention supports two feature weighting methods:
[0170] Globally uniform weighting: The global uniform weight is calculated using the absolute value of the average treatment effect, which is suitable for general scenarios;
[0171] Personalized weighted sampling: The dynamic weight of each sample is calculated using the absolute value of the conditional average treatment effect, which is suitable for refined risk assessment scenarios.
[0172] For example, for industrial users with ≥2 complaint history, the dynamic weight of "whether the power was not restored within the time limit" is 0.402 / (0.402+0.365+0.253+0.211)≈0.327, which is slightly higher than the global weight of 0.326; while for residential users with no complaint history, the dynamic weight is 0.187 / (0.187+0.169+0.121+0.102)≈0.322, which is slightly lower than the global weight.
[0173] Compared with the fixed global weight scheme, dynamic weighting improved the model's F1-score from 0.684 to 0.740, an improvement of 8.2%, enabling more accurate identification of high-risk work orders from different groups.
[0174] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0175] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0176] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0177] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0178] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0179] Furthermore, although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
Claims
1. A risk assessment method for escalating electricity customer demands based on causal reasoning. Its features are, Includes the following steps: S1: Collect multi-source heterogeneous data related to electricity customer service, fuse and preprocess the data, and construct a standardized work order sample set; the variables in the sample set include at least processing variables, outcome variables, confounding variables, and mediating variables; S2: A directed acyclic graph is constructed as a structural causal model using the PC algorithm combined with expert knowledge constraints in the power field. Specifically, this includes: S21: Predefine three types of structured expert knowledge rule tables, including a deterministic causal edge rule table, a prohibited causal edge rule table, and a variable role definition table; the variable role definition table clearly indicates the role type and time stage of each variable; S22: Use the PC algorithm to perform conditional independence tests on the variables in the sample set and generate an initial causal graph skeleton; S23: During the V-structure identification stage, execute the expert knowledge conflict handling rules: if the deterministic causal edge rule table has defined a one-way causal edge between any two variables and a third variable, then force the formation of the corresponding V-structure. S24: Integrate the initial causal graph skeleton with the three types of structured expert knowledge rule tables using the constrained posterior adjustment method to output the final structural causal model; S3: Based on the aforementioned structural causal model, estimate the causal effect of the treatment variable relative to the outcome variable, and output the average treatment effect and / or the conditional average treatment effect; S4: Globally normalize the absolute value of the average treatment effect or conditional average treatment effect to obtain the causal weights of each treatment variable; use the causal weights to weight the original feature vector to construct a weighted feature vector; S5: Input the weighted feature vector into the risk prediction model and output the risk probability of escalating customer demands.
2. The method according to claim 1, Its features are, In step S24, a constrained posterior adjustment method is used to integrate the initial causal graph and the expert knowledge rule table. Specifically, this includes: forcibly adding necessary causal edges defined in the deterministic causal edge rule table to the causal graph, regardless of the output of the PC algorithm; For the prohibited causal directions defined in the prohibited causal edge rule table, the edges in the corresponding directions are forcibly deleted from the causal graph; When the edge direction output by the PC algorithm conflicts with the direction defined in the deterministic causal edge rule table, the direction is adjusted according to expert knowledge; based on the time stage information in the variable role definition table, the causal graph is checked for time sequence consistency, and edges that violate the time causal constraints are deleted.
3. The method according to claim 1, Its features are, In step S23, the V-structure identification is further constrained by the following boundary conditions: Adjacency condition: Forming a triplet of and They must not be adjacent; Separator condition: Cannot be included and Conditional independence separation of concentration; Conditional dependency verification: In a given Under the conditions, and The conditional independence test was rejected; Time sequence verification: and The time periods are all earlier than The time phase.
4. The method according to claim 1, Its features are, Step S3 employs a dual machine learning framework to estimate causal effects, specifically including: dividing the sample set into a training set and an estimation set, and training the processing model and the result model in parallel on the training set; The processing model is used to learn the mapping relationship between the confusion variables and the processing variables, and the result model is used to learn the mapping relationship between the confusion variables and the result variables. On the estimation set, the orthogonal residuals of the treatment variables and the orthogonal residuals of the outcome variables are calculated using the trained treatment model and outcome model, respectively; based on the orthogonal residuals, the average treatment effect is calculated using the augmented inverse probability weighted formula.
5. The method according to claim 1, Its features are, The multi-source heterogeneous data in step S1 includes: basic customer information collected from the power marketing system, request record data and audio-transcribed text collected from the hotline platform, electricity consumption behavior data collected from the electricity consumption information collection system, power grid operation status data collected from the dispatch automation system, and meteorological environment data collected from the meteorological service interface; wherein, the sentiment polarity of the audio-transcribed text is calculated, a pre-trained language model is used to output sentiment scores, and the sentiment is divided into three levels: negative, neutral, and positive according to a preset threshold; negative sentiment is used as a mediating variable in the construction of the structural causal model.
6. The method according to claim 1, Its features are, After constructing the final structural causal model in step S2, the step of verifying the causal graph using the structural risk score is also included: calculating the structural risk score S(G) = -2 × logL(D|G) + λ × d based on the Bayesian information criterion. Where L(D|G) is the likelihood function of the causal graph G with respect to the data D, d is the number of edges of the causal graph, λ is the regularization parameter and defaults to λ=ln(n), and n is the sample size; When the structural risk score is not greater than the qualified threshold, the causal graph structure is determined to be reasonable; the qualified threshold is the sum of 0.3 times the difference between the empty graph score and the complete graph score and the smaller of the two.
7. The method according to claim 1, Its features are, Step S3 further includes a step of statistically inferring the average treatment effect: constructing a 95% confidence interval by calculating the variance of the estimator; if the confidence interval does not contain 0, then the causal effect of the treatment variable is determined to be significant. Among them, the normal approximation method is used when the sample size is not less than 50 and the normality test is passed; otherwise, the Bootstrap resampling method is used.
8. The method according to claim 1, Its features are, The risk prediction model in step S5 adopts the Stacking ensemble model. The first layer of the Stacking ensemble model includes a logistic regression model and a gradient boosting tree model, and the second layer includes a logistic regression meta-model.
9. The method according to claim 1, Its features are, In step S3, the conditional average treatment effect is estimated, and heterogeneous causal effect values are output for different customer groups or demand characteristics. In step S4, the absolute value of the conditional average treatment effect can be used to calculate the dynamic causal weight of each sample and construct a personalized weighted feature vector for the sample.
10. A risk assessment system for escalating electricity customer demands based on causal reasoning. Its features are, include: The data acquisition and preprocessing module collects multi-source heterogeneous data related to power customer service, integrates and preprocesses it, and constructs a standardized work order sample set. The variables in the sample set include at least treatment variables, outcome variables, confounding variables, and mediating variables; The causal graph construction module uses a PC algorithm combined with expert knowledge constraints in the power field to construct a directed acyclic graph as a structural causal model. The structural causal model specifically includes three predefined types of structured expert knowledge rule tables, generating an initial causal graph skeleton, executing expert knowledge conflict handling rules in the V-structure recognition stage, and outputting the final structural causal model using a constrained posterior adjustment method. The causal effect estimation module, based on the structural causal model, estimates the causal effect of the treatment variable relative to the outcome variable and outputs the average treatment effect and / or the conditional average treatment effect. The feature weighting module globally normalizes the absolute values of the average treatment effect or conditional average treatment effect to obtain the causal weights of each treatment variable; and uses the causal weights to weight the original feature vector to construct a weighted feature vector. The risk assessment module inputs the weighted feature vector into the risk prediction model and outputs the probability of escalating customer demands.
Citation Information
Patent Citations
Power consumer complaint risk prediction method and device
CN118917663A
Bayesian-based electric power service risk level prediction method, device and equipment
CN121599469A