Power customer service risk processing method, device, equipment and medium

By analyzing the sentiment and behavior predictions of electricity customer dialogue text streams in real time, personalized response strategies are generated, which solves the problem of insufficient emotional understanding in electricity customer service, improves risk warning and response capabilities, and reduces service risks.

CN121961232APending Publication Date: 2026-05-01GUANGXI POWER GRID CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGXI POWER GRID CORP
Filing Date
2026-01-15
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing power customer service systems are unable to understand the semantics of conversations and quantify the intensity of customer emotions in real time, making it difficult to deal with situations where customers are emotionally agitated even without directly stating keywords, resulting in insufficient risk warnings.

Method used

By collecting real-time conversational text streams, using a sliding time window and a pre-trained sentiment analysis model to analyze customer sentiment types and intensity, and combining this with a behavioral prediction model to predict risks, personalized response script suggestions are generated.

Benefits of technology

It enables dynamic capture and risk assessment of changes in the emotions of electricity customers, improves the emergency response capabilities of customer service personnel, reduces the risk of service disputes and complaints, and increases customer satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121961232A_ABST
    Figure CN121961232A_ABST
Patent Text Reader

Abstract

The invention provides a power customer service risk processing method and device, equipment and a medium, and relates to the field of information processing.The method comprises the steps that a current dialogue text stream is collected, and a customer service staff text stream and a power customer text stream are separated from the current dialogue text stream; defining an analyzed limited text range for the client text flow, and performing sentiment analysis on the client text flow in the limited text range through a pre-trained sentiment analysis model to obtain a negative sentiment type and a negative sentiment intensity value of the client; processing the negative emotion type and the negative emotion intensity value to obtain a risk value; if the risk value is greater than or equal to a preset threshold value, predicting the probability of occurrence of the target negative behavior of the power customer based on the current dialogue text stream and the historical service record of the power customer; and according to the negative emotion type, the negative emotion intensity value, the type of the target negative behavior and the occurrence probability of the target negative behavior, generating and displaying response skill suggestions recommended to the customer service staff.
Need to check novelty before this filing date? Find Prior Art

Description

A method, apparatus, equipment, and medium for handling risks in electricity customer service. Technical Field

[0001] This application relates to the field of information processing, and in particular to a method, apparatus, computer equipment, and readable storage medium for handling risks in electricity customer service. Background Technology

[0002] As a fundamental service industry vital to the national economy and people's livelihood, the quality and stability of customer service in the power industry directly impact the public experience and the reputation of power companies. In daily service, customer service personnel must handle various complex customer inquiries and complaints, which may escalate into service disputes, customer complaints, or even negative public opinion due to unresolved issues. Therefore, timely early warning and effective intervention in the power customer service process are crucial for improving customer satisfaction, reducing service complaint rates, and maintaining the company's brand image.

[0003] Currently, risk warnings and interventions in electricity customer service mainly rely on matching call content with preset keywords, issuing an alarm once a keyword is triggered. However, this approach cannot understand the semantic context, quantify the intensity of the customer's emotions, or handle situations where the customer is highly agitated even without explicitly stating keywords. Summary of the Invention

[0004] In view of this, this application provides a method, apparatus, computer equipment, and readable storage medium for handling risks in electricity customer service, in order to solve the above-mentioned technical problems.

[0005] In a first aspect, embodiments of this application provide a method for handling risks in electricity customer service, comprising: real-time acquisition of the current dialogue text stream between customer service personnel and electricity customers; role separation of the current dialogue text stream to separate the customer service personnel text stream and the electricity customer text stream; real-time processing of the customer text stream through a preset sliding time window to limit the scope of the analyzed text, and performing sentiment analysis on the customer text stream within the limited text scope using a pre-trained sentiment analysis model to obtain the negative sentiment type of the electricity customer and its corresponding negative sentiment intensity value; processing and weighting the negative sentiment type and the negative sentiment intensity value to obtain a risk value of the current dialogue; if the risk value is greater than or equal to a preset threshold, then using a behavior prediction model to predict the probability of the electricity customer engaging in a target negative behavior based on the current dialogue text stream and the electricity customer's historical service records; and generating and displaying suggested response scripts for the customer service personnel based on the negative sentiment type, the negative sentiment intensity value, the type of the target negative behavior, and the probability of the target negative behavior.

[0006] Secondly, this application provides a power customer service risk processing device, comprising: a text processing module, used to collect the current dialogue text stream between customer service personnel and power customers in real time, and perform role separation on the current dialogue text stream to separate the customer service personnel text stream and the power customer text stream; a sentiment analysis module, used to process the customer text stream in real time through a preset sliding time window, limit the range of text to be analyzed, and perform sentiment analysis on the customer text stream within the text range through a pre-trained sentiment analysis model to obtain the negative sentiment type of the power customer and its corresponding sentiment intensity value; a risk prediction module, used to process the negative sentiment type and the negative sentiment intensity value, and perform weighted fusion to obtain the risk value of the current dialogue; a behavior analysis module, used to predict the probability of the power customer engaging in a target negative behavior based on the current dialogue text stream and the power customer's historical service records if the risk value is greater than or equal to a preset threshold; and a dialogue generation module, used to generate and display recommended response dialogue suggestions to the customer service personnel based on the negative sentiment type, the negative sentiment intensity value, the type of the target negative behavior, and the probability of the target negative behavior.

[0007] Thirdly, embodiments of this application provide a computer device including a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions implementing the steps of the method as described in the first aspect when executed by the processor.

[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method as described in the first aspect.

[0009] Fifthly, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method as described in the first aspect.

[0010] The power customer service risk handling method, apparatus, computer equipment, and readable storage medium of this application, by real-time acquisition and processing of dialogue text streams and combining sliding time window technology, can dynamically capture and analyze the latest emotional changes of customers, thus gaining valuable time for intervention. By weighting and fusing negative emotion types and intensity values ​​to calculate risk values, and introducing a behavior prediction model based on this, combined with real-time dialogue and customer history records, the probability of customers engaging in specific negative behaviors is predicted. This multi-dimensional, multi-factor assessment mechanism makes the risk assessment results more comprehensive and reliable. Furthermore, it goes beyond simply issuing alerts; it can automatically generate personalized response script suggestions based on specific risk types, intensity, and predicted behaviors, and push these suggestions to customer service personnel in real time via a sidebar, effectively improving their emergency response capabilities and service levels, achieving a transition from risk warning to precise intervention.

[0011] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0012] The accompanying drawings, which are included to provide a further understanding of this application and constitute a part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 shows a schematic flowchart of a power customer service risk handling method according to an embodiment of this application; Figure 2 shows a structural block diagram of a power customer service risk handling device according to an embodiment of this application; Figure 3 shows a structural block diagram of a computer device according to an embodiment of this application. Detailed Implementation

[0013] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0014] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0015] The following description, in conjunction with the accompanying drawings, details the power customer service risk handling method, apparatus, computer equipment, and readable storage medium provided in this application through specific embodiments and application scenarios. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0016] This application provides a method for handling risks in electricity customer service, as shown in Figure 1. The method includes: Step 101, real-time acquisition of the current dialogue text stream between customer service personnel and electricity customers, role separation of the current dialogue text stream, separating the customer service personnel text stream and the electricity customer text stream; Step 102, real-time processing of the customer text stream through a preset sliding time window, limiting the scope of the analyzed text, and performing sentiment analysis on the customer text stream within the limited text scope using a pre-trained sentiment analysis model to obtain the negative sentiment type of the electricity customer and its corresponding negative sentiment intensity value; Step 103, processing and weighting the negative sentiment type and negative sentiment intensity value to obtain the risk value of the current dialogue; Step 104, if the risk value is greater than or equal to a preset threshold, using a behavior prediction model based on the current dialogue text stream and the electricity customer's historical service records to predict the probability of the electricity customer engaging in a target negative behavior; Step 105, generating and displaying suggested response scripts for customer service personnel based on the negative sentiment type, negative sentiment intensity value, type of target negative behavior, and probability of target negative behavior.

[0017] This application provides a solution for risk warning and intervention in power customer service based on real-time data streams. By collecting and processing dialogue text streams in real time, combined with sliding time window technology, it can dynamically capture and analyze the latest emotional changes of customers, gaining valuable time for intervention. By weighting and fusing negative emotion types and intensity values ​​to calculate risk values, and introducing a behavior prediction model based on this, combined with real-time dialogue and customer history records, the probability of customers engaging in specific negative behaviors is predicted. This multi-dimensional, multi-factor assessment mechanism makes the risk assessment results more comprehensive and reliable. Furthermore, it goes beyond simply issuing alerts; it can automatically generate personalized response script suggestions based on specific risk types, intensity, and predicted behaviors, and push these suggestions to customer service personnel in real time via a sidebar, effectively improving their emergency response capabilities and service levels, achieving a transition from risk warning to precise intervention.

[0018] In one embodiment of this application, the current dialogue text stream between customer service personnel and electricity customers is collected in real time, and role separation is performed on the current dialogue text stream to separate the customer service personnel text stream and the electricity customer text stream. This includes: receiving the current dialogue voice stream between customer service personnel and electricity customers in real time through a speech recognition engine, and converting the current dialogue voice stream into a dialogue text stream, which is serialized text data containing timestamps; based on the physical separation characteristics of the voice channel, assigning independent role identification codes to customer service personnel and electricity customers respectively during the speech-to-text process, and binding the role identification codes to the corresponding voice sources; according to the bound role identification codes, separating the dialogue text stream into two independent text streams in real time according to the speaking roles, namely, the customer service personnel text stream carrying the customer service role identification and the electricity customer text stream carrying the customer role identification; and serializing and recombining the separated customer service personnel text stream and electricity customer text stream in chronological order to form a customer service personnel text sequence and an electricity customer text sequence with a unified timeline.

[0019] In this embodiment, a high-precision speech recognition engine is integrated to receive dual-channel speech streams from a customer service call system in real time. This engine converts continuous analog speech signals into digital text and automatically appends a high-precision timestamp to each recognition result, forming structured, serialized text data.

[0020] During call setup, the voices of customer service representatives and customers are typically assigned to independent physical or logical channels, such as different sound card inputs or independent audio streams. When initializing the speech recognition engine, unique role identifiers are pre-assigned to these two channels; for example, the customer service channel is bound to the identifier "AGENT_001," and the customer channel is bound to the identifier "CUSTOMER_001." The text stream output by the speech recognition engine, with the assigned role identifiers, is sent in real-time to a message queue such as Kafka or RabbitMQ. The role separation service subscribes to this queue and performs real-time routing and distribution of the text streams based on the identifiers. All text with the "AGENT_" prefix is ​​grouped into the customer service personnel text stream, while all text with the "CUSTOMER_" prefix is ​​grouped into the electricity customer text stream, forming two independent data streams.

[0021] The process involves serializing and reassembling two independent text streams. The reassembly is not a simple stacking process, but rather a time synchronization service that, based on timestamps, inserts each utterance from the two text streams into a unified timeline sequence, generating two parallel, strictly timestamp-aligned sequence files or data streams.

[0022] In one embodiment of this application, a customer text stream is processed in real time using a preset sliding time window to define the range of text to be analyzed. A pre-trained sentiment analysis model is then used to perform sentiment analysis on the customer text stream within the defined text range to obtain the negative sentiment type of the electricity customer and its corresponding negative sentiment intensity value. This includes: a preset sliding time window of fixed length with a set sliding step size; the sliding time window is used to dynamically capture the customer text stream within a specified time period before the current moment as an analysis sample; as the conversation continues, the sliding time window is advanced in real time according to the set sliding step size, discarding old text that exceeds the window's time range and retaining the latest customer text within the window to form a defined text range; the customer text stream within the defined text range is input into the pre-trained sentiment analysis model, which outputs the negative sentiment type of the electricity customer and its corresponding negative sentiment intensity value, where the negative sentiment intensity value is a quantified value calculated based on the model's confidence level.

[0023] In this embodiment, for example, a 90-second sliding time window is preset, and the sliding step size is set to 15 seconds. This window acts as a first-in-first-out text buffer, dynamically maintaining the customer conversation text within the 90 seconds preceding the current moment.

[0024] Remove older text snippets that exceed a 90-second timeframe, while incorporating the most recent 15 seconds of customer text into the window. This mechanism ensures that the window contains only the most recent 90 seconds of conversation content, creating a real-time updated, confined text range.

[0025] Furthermore, the customer text stream within a limited text range is input into a pre-trained sentiment analysis model, which outputs the negative sentiment type of the electricity customer and the corresponding negative sentiment intensity value, where the negative sentiment intensity value is a quantitative value calculated based on the model confidence.

[0026] In one embodiment, the training process of the sentiment analysis model includes the following steps: using a sentiment-annotated corpus specific to the power industry, samples are extracted from historical customer service dialogue texts, and each sample is labeled with fine-grained negative sentiment type and corresponding sentiment intensity level; using the BERT language model as the base model and performing domain-adaptive pre-training on it, the model parameters are optimized using professional text data from the power industry; on the sentiment-annotated corpus, the domain-adaptive pre-trained sentiment analysis model is subjected to supervised fine-tuning, and the output layer of the sentiment analysis model is constructed as a multi-task learning structure to simultaneously complete the classification of negative sentiment types and the prediction of sentiment intensity values.

[0027] The output layer of the multi-task learning structure is specifically constructed as follows: The model connects two independent sub-output layers in parallel on top of a shared low-level feature extractor: the first sub-output layer is a classification layer, used to determine the type of negative sentiment, which uses the Softmax activation function to output the probability distribution of each preset sentiment type; the second sub-output layer is a regression layer, used to predict the sentiment intensity value, which uses a linear activation function to output a continuous scalar value.

[0028] The fine-tuned model is evaluated and screened on the validation set. When the sentiment analysis model reaches the preset performance threshold in both the accuracy of sentiment type classification and the mean square error of sentiment intensity prediction, the model training is completed and the parameters are fixed.

[0029] In one embodiment of this application, the negative emotion type and the negative emotion intensity value are processed and weighted to obtain the risk value of the current dialogue. This includes: mapping the negative emotion type to a predefined type weight coefficient, and normalizing the negative emotion intensity value to obtain a standardized intensity influence factor; inputting the type weight coefficient and the intensity influence factor into a preset weighted summation formula for weighted fusion calculation to obtain the risk value of the current dialogue.

[0030] In this embodiment, a predefined weight mapping table is used: for example, the type weight coefficient of the negative emotion type "anger" is 0.8, the type weight coefficient of the negative emotion type "complaint" is 0.5, and the negative emotion intensity value is directly used as the intensity influence factor.

[0031] The type weight coefficient and intensity influence factor are input into the preset weighted summation formula for calculation. The weighted summation formula is: Risk value = Σ(Type weight coefficient_i × Intensity influence factor_i), where i represents the i-th negative emotion type.

[0032] The output of the weighted summation formula is nonlinearly transformed using the Tanh function to generate a final risk value within the interval [0,1].

[0033] In one embodiment of this application, if the risk value is greater than or equal to a preset threshold, a behavior prediction model is used to predict the probability of a target negative behavior occurring in the electricity customer based on the current dialogue text stream and the electricity customer's historical service records. This includes: if the risk value is greater than or equal to the preset threshold, obtaining the dialogue semantic feature vector of the current dialogue text stream, and extracting the historical service record feature vector of the electricity customer from the historical database based on the electricity customer's customer identifier. The historical service record feature vector includes the number of historical complaints, historical service dispute records, and labeled customer personality tendency tags; fusing the dialogue semantic feature vector and the historical service record feature vector to construct a comprehensive behavior prediction feature set; inputting the comprehensive behavior prediction feature set into a pre-trained behavior prediction model, and the behavior prediction model outputs the target negative behavior and its corresponding probability of occurrence. The target negative behavior includes at least one of the following: making a service complaint, requesting to be transferred to a supervisor, refusing to pay fees, and posting negative comments on social media.

[0034] In this embodiment, a pre-trained Sentence-BERT is used to encode the customer text within the current sliding window into a fixed-dimensional dialogue semantic feature vector to capture the core semantics of recent conversations. Simultaneously, based on the customer identifier associated with the call number, historical service records are queried and extracted from the customer relationship management database in real time. The number of historical complaints against the electricity customer is logarithmically scaled, historical service dispute records are one-hot encoded by type, and manually labeled customer personality traits such as "irritable" and "rational" are converted into numerical vectors, collectively forming the historical service record feature vector.

[0035] Vector fusion is performed using a feature concatenation method. First, the two types of feature vectors are normalized to the same dimension, and then they are directly concatenated into a high-dimensional comprehensive behavior prediction feature set.

[0036] The comprehensive behavioral prediction feature set is input into the pre-trained behavioral prediction model. The behavioral prediction model outputs a specific negative behavior (i.e., the target negative behavior) and the probability of occurrence of the specific negative behavior. The specific negative behavior includes, but is not limited to, making service complaints, requesting to be transferred to a supervisor, refusing to pay fees, and posting negative comments on social media.

[0037] In one embodiment, the training process of the behavior prediction model is as follows: A behavior prediction training sample set is constructed by extracting samples from historical customer service dialogue records and related subsequent customer behavior records. Each training sample contains a dialogue semantic feature vector, a customer history feature vector, and a multi-label target vector indicating whether the customer has engaged in a specific negative behavior after the dialogue. A deep neural network classification model is adopted, with the dimension of its input layer consistent with the total dimension of the concatenated dialogue semantic feature vector and customer history feature vector, and the number of nodes in the output layer being the same as the number of types of specific negative behaviors to be predicted. The Sigmoid function is used as the activation function of the output layer. The training sample set is input into the model, and the model parameters are optimized using the error backpropagation algorithm with the goal of minimizing the weighted binary cross-entropy loss function. The model performance is evaluated using a test set that was not involved in the training. When the model's macro-average F1 score on each negative behavior prediction reaches a preset standard, the training is completed, the model parameters are fixed, and the model is deployed to the real-time prediction service.

[0038] In one embodiment of this application, a suggested response script is generated and displayed for customer service personnel based on the type of negative emotion, the intensity value of negative emotion, the type of the target negative behavior, and the probability of the target negative behavior occurring. This includes: generating a comprehensive risk label based on the type of negative emotion, the intensity value of negative emotion, the type of the target negative behavior, and the probability of the target negative behavior occurring; matching the comprehensive risk label with a preset response script template library, which stores standardized script templates for different risk scenarios; generating a suggested response script based on the matched script template and the specific content of the current conversation, with dynamic parameters including the customer's name and the specific business issue currently involved; and displaying the suggested response script in a highlighted format in the sidebar of the interface.

[0039] In this embodiment, a comprehensive risk label is generated based on the negative sentiment type output by sentiment analysis, the quantified negative sentiment intensity value, and the target negative behavior and its probability of occurrence output by the behavior prediction model, according to a preset coding rule. This label adopts a structured format of "sentiment type-intensity level-primary risk behavior," for example, generating an "Anger-High-Complaint" label to accurately summarize the overall risk profile.

[0040] The generated risk tags are matched against a response script template library. This template library, indexed by risk tags, stores standardized response strategies for different scenarios. For example, for the "Anger-High-Complaint" tag, it automatically matches script templates containing sincere apologies, clear solutions, and a commitment to escalation.

[0041] The system extracts the customer's name (e.g., "Mr. Wang") and the identified specific business issue (e.g., "electricity bill dispute") from the current conversation record. These parameters are then automatically filled into the corresponding placeholders in the matched script template, creating a natural and fluent personalized suggestion. For example, "Mr. Wang, we are very sorry for the inconvenience caused by the electricity bill calculation. We will immediately verify the bill details for the past three months and give you a clear answer before 4 pm today."

[0042] By calling the application programming interface provided by the customer service system, the final personalized script is pushed to the front-end interface in JSON data format and persistently displayed in the right sidebar of the customer service workbench with a highlighted yellow background.

[0043] Real-time push notifications to customer service personnel via the sidebar of the user interface enable proactive intervention and effectively prevent a large number of potential service disputes and complaints, reducing operational and reputational risks for the company and ultimately improving customer satisfaction and loyalty.

[0044] As a specific implementation of the above-mentioned method for handling risks in electricity customer service, this application provides an electricity customer service risk handling device. As shown in Figure 2, the electricity customer service risk handling device 200 includes: a text processing module 201, a sentiment analysis module 202, a risk prediction module 203, a behavior analysis module 204, and a script generation module 205.

[0045] The system includes the following modules: Text Processing Module 201, which collects the current dialogue text stream between customer service personnel and electricity customers in real time, performs role separation on the current dialogue text stream, and separates the customer service personnel text stream from the electricity customer text stream; Sentiment Analysis Module 202, which processes the customer text stream in real time through a preset sliding time window, limits the scope of the analyzed text, and performs sentiment analysis on the customer text stream within the text scope using a pre-trained sentiment analysis model to obtain the negative sentiment type of the electricity customer and its corresponding sentiment intensity value; Risk Prediction Module 203, which processes and weights the negative sentiment type and negative sentiment intensity value to obtain the risk value of the current dialogue; Behavior Analysis Module 204, which, if the risk value is greater than or equal to a preset threshold, uses a behavior prediction model to predict the probability of the electricity customer engaging in the target negative behavior based on the current dialogue text stream and the electricity customer's historical service records; and Script Generation Module 205, which generates and displays recommended response scripts for customer service personnel based on the negative sentiment type, negative sentiment intensity value, type of target negative behavior, and probability of occurrence of the target negative behavior.

[0046] Furthermore, the text processing module 201 is specifically used for: receiving the current dialogue voice stream between customer service personnel and electricity customers in real time through a speech recognition engine, and converting the current dialogue voice stream into a dialogue text stream, which is serialized text data containing timestamps; based on the physical separation characteristics of the voice channel, assigning independent role identification codes to customer service personnel and electricity customers respectively during the speech-to-text process, and binding the role identification codes to the corresponding voice sources; according to the bound role identification codes, separating the dialogue text stream into two independent text streams in real time according to the speaking roles, namely, the customer service personnel text stream carrying the customer service role identification and the electricity customer text stream carrying the customer role identification; and serializing and recombining the separated customer service personnel text stream and electricity customer text stream in chronological order to form a customer service personnel text sequence and an electricity customer text sequence with a unified timeline.

[0047] Furthermore, the sentiment analysis module 202 is specifically used for: presetting a sliding time window of a fixed length and setting the sliding step size of the window; the sliding time window is used to dynamically extract customer text streams within a specified time period before the current moment as analysis samples; as the dialogue continues, the sliding time window is advanced in real time according to the set sliding step size, discarding old texts that exceed the window time range and retaining the latest customer texts within the window to form a limited text range; the customer text stream within the limited text range is input into a pre-trained sentiment analysis model, and the negative sentiment type of the electricity customer and its corresponding negative sentiment intensity value are output, where the negative sentiment intensity value is a quantitative value calculated based on the model confidence.

[0048] Furthermore, the risk prediction module 203 is specifically used to: map negative emotion types to predefined type weight coefficients, and normalize the negative emotion intensity values ​​to obtain standardized intensity influence factors; input the type weight coefficients and intensity influence factors into a preset weighted summation formula for weighted fusion calculation to obtain the risk value of the current dialogue.

[0049] Furthermore, the behavior analysis module 204 is specifically used for: if the risk value is greater than or equal to a preset threshold, obtaining the dialogue semantic feature vector of the current dialogue text stream, and extracting the historical service record feature vector of the electricity customer from the historical database based on the customer identifier of the electricity customer. The historical service record feature vector includes the number of historical complaints, historical service dispute records, and labeled customer personality tendency tags; fusing the dialogue semantic feature vector and the historical service record feature vector to construct a comprehensive behavior prediction feature set; inputting the comprehensive behavior prediction feature set into a pre-trained behavior prediction model, and the behavior prediction model outputs the target negative behavior and its corresponding probability of occurrence. The target negative behavior includes at least one of the following: making a service complaint, requesting to be transferred to a supervisor, refusing to pay fees, and posting negative comments on social media.

[0050] Furthermore, the script generation module 205 is specifically used for: generating a comprehensive risk label based on the type of negative emotion, the intensity value of negative emotion, the type of the target negative behavior, and the probability of the target negative behavior occurring; matching the comprehensive risk label with a preset response script template library, which stores standardized script templates for different risk scenarios; generating response script suggestions based on the matched script template and dynamic parameter filling in the specific content of the current dialogue, the dynamic parameters including the customer's name and the specific business issue currently involved; and displaying the response script suggestions in a highlighted form in the sidebar of the operation interface.

[0051] The power customer service risk processing device 200 in this application embodiment can be a computer device or a component within a computer device, such as an integrated circuit or a chip. The power customer service risk processing device 200 provided in this application embodiment can implement all the processes implemented in the power customer service risk processing method embodiment of FIG1; to avoid repetition, these will not be described again here.

[0052] This application also provides a computer device, as shown in FIG3. The computer device 300 includes a processor 301 and a memory 302. The memory 302 stores a program or instructions that can be executed on the processor 301. When the program or instructions are executed by the processor 301, they implement the various steps of the above-described embodiment of the power customer service risk handling method and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0053] The memory 302 can be used to store software programs and various data. The memory 302 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 302 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 302 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0054] Processor 301 may include one or more processing units; optionally, processor 301 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 301.

[0055] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described embodiments of the power customer service risk handling method and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0056] This application also provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described embodiment of the power customer service risk handling method, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0057] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0058] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for handling risks in electricity customer service, characterized in that, include: The system collects the current dialogue text stream between customer service personnel and electricity customers in real time. Role separation is performed on the current dialogue text stream to separate the customer service personnel's text stream and the electricity customer's text stream. The customer's text stream is processed in real time through a preset sliding time window to limit the scope of the analyzed text. A pre-trained sentiment analysis model is then used to perform sentiment analysis on the customer's text stream within the limited text scope to obtain the negative sentiment type and its corresponding negative sentiment intensity value for the electricity customer. The negative sentiment type and the negative sentiment intensity value are then processed and weighted to obtain the risk value of the current dialogue. If the risk value is greater than or equal to a preset threshold, then based on the current dialogue text stream and the electricity customer's historical service records, a behavior prediction model is used to predict the probability of the electricity customer engaging in the target negative behavior. Based on the type of negative emotion, the intensity value of the negative emotion, the type of the target negative behavior, and the probability of the target negative behavior occurring, suggested response scripts are generated and displayed for the customer service personnel.

2. The method for handling electricity customer service risks according to claim 1, characterized in that, The real-time acquisition of the current dialogue text stream between customer service personnel and electricity customers, and the role separation of the current dialogue text stream to separate the customer service personnel text stream and the electricity customer text stream, includes: receiving the current dialogue voice stream between customer service personnel and electricity customers in real time through a speech recognition engine, and converting the current dialogue voice stream into a dialogue text stream, wherein the dialogue text stream is serialized text data containing timestamps; based on the physical separation characteristics of the voice channel, during the speech-to-text process, assigning independent role identification codes to customer service personnel and electricity customers respectively, and binding the role identification codes to the corresponding voice sources; according to the bound role identification codes, separating the dialogue text stream into two independent text streams in real time according to the speaking role, namely the customer service personnel text stream carrying the customer service role identification and the electricity customer text stream carrying the customer role identification; and serializing and recombining the separated customer service personnel text stream and electricity customer text stream in chronological order to form a customer service personnel text sequence and an electricity customer text sequence with a unified timeline.

3. The method for handling electricity customer service risks according to claim 1, characterized in that, The process involves real-time processing of the customer text stream using a preset sliding time window to define the range of text to be analyzed. A pre-trained sentiment analysis model is then used to perform sentiment analysis on the customer text stream within this range, yielding the negative sentiment type and corresponding negative sentiment intensity value for the electricity customer. This includes: setting a fixed-length sliding time window and defining its sliding step size; dynamically capturing customer text streams within a specified time period prior to the current moment as analysis samples; advancing the sliding time window in real-time according to the defined sliding step size as the conversation continues, discarding older texts outside the window's time range, and retaining the latest customer text within the window to form the defined text range; inputting the customer text stream within the defined text range into the pre-trained sentiment analysis model, which outputs the negative sentiment type and corresponding negative sentiment intensity value for the electricity customer, where the negative sentiment intensity value is a quantified value calculated based on model confidence.

4. The method for handling electricity customer service risks according to claim 1, characterized in that, The step of processing the negative emotion type and the negative emotion intensity value, and weighting and fusing them to obtain the risk value of the current dialogue includes: mapping the negative emotion type to a predefined type weight coefficient, and normalizing the negative emotion intensity value to obtain a standardized intensity influence factor; inputting the type weight coefficient and the intensity influence factor into a preset weighted summation formula for weighted fusion calculation to obtain the risk value of the current dialogue.

5. The method for handling electricity customer service risks according to claim 1, characterized in that, If the risk value is greater than or equal to a preset threshold, then based on the current dialogue text stream and the electricity customer's historical service records, a behavior prediction model is used to predict the probability of the electricity customer engaging in a target negative behavior. This includes: if the risk value is greater than or equal to the preset threshold, obtaining the dialogue semantic feature vector of the current dialogue text stream, and extracting the electricity customer's historical service record feature vector from the historical database based on the electricity customer's customer identifier. The historical service record feature vector includes the number of historical complaints, historical service dispute records, and labeled customer personality tendency tags; fusing the dialogue semantic feature vector with the historical service record feature vector to construct a comprehensive behavior prediction feature set; inputting the comprehensive behavior prediction feature set into a pre-trained behavior prediction model, and the behavior prediction model outputs the target negative behavior and its corresponding probability of occurrence. The target negative behavior includes at least one of the following: making a service complaint, requesting to be transferred to a supervisor, refusing to pay fees, and posting negative comments on social media.

6. The method for handling electricity customer service risks according to claim 1, characterized in that, The step of generating and displaying suggested response scripts for customer service personnel based on the type of negative emotion, the intensity value of the negative emotion, the type of the target negative behavior, and the probability of the target negative behavior includes: generating a comprehensive risk tag based on the type of negative emotion, the intensity value of the negative emotion, the type of the target negative behavior, and the probability of the target negative behavior; matching the comprehensive risk tag with a preset response script template library, which stores standardized script templates for different risk scenarios; generating response script suggestions based on the matched script template and dynamic parameter filling in the specific content of the current conversation, wherein the dynamic parameters include the customer's name and the specific business issue currently involved; and displaying the response script suggestions in a highlighted form in the sidebar of the operation interface.

7. A power customer service risk processing device, characterized in that, include: The text processing module is used to collect the current dialogue text stream between customer service personnel and electricity customers in real time, and to perform role separation on the current dialogue text stream to separate the customer service personnel text stream and the electricity customer text stream; the sentiment analysis module is used to process the customer text stream in real time through a preset sliding time window, limit the range of text to be analyzed, and perform sentiment analysis on the customer text stream within the text range through a pre-trained sentiment analysis model to obtain the negative sentiment type of the electricity customer and its corresponding sentiment intensity value. The risk prediction module is used to process the negative emotion type and the negative emotion intensity value, and then weight and fuse them to obtain the risk value of the current conversation; The behavior analysis module is used to predict the probability of the electricity customer engaging in the target negative behavior based on the current dialogue text stream and the electricity customer's historical service records if the risk value is greater than or equal to a preset threshold. The script generation module is used to generate and display suggested response scripts for the customer service personnel based on the type of negative emotion, the intensity value of the negative emotion, the type of the target negative behavior, and the probability of the occurrence of the target negative behavior.

8. A computer device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that run on the processor, the program or instructions being executed by the processor to implement the steps of the power customer service risk handling method as described in any one of claims 1 to 6.

9. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the steps of the power customer service risk handling method as described in any one of claims 1 to 6.

10. A computer program product stored in a storage medium, characterized in that, The computer program product is executed by at least one processor to implement the steps of the power customer service risk handling method as described in any one of claims 1 to 6.