Event priority ranking and distributing method and system

By using Hidden Markov Models and Context-Aware Sentiment Analysis Models, customer sentiment is tracked in real time and risk scores are calculated. Work order priorities are dynamically adjusted, solving the passive response problem of traditional customer service models and achieving efficient customer service and risk warning.

CN121073228AActive Publication Date: 2025-12-05SHANGHAI SUQING SOFTWARE CO LTD

Patent Information

Application Number
CN202511621156.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2025-12-05
Estimated Expiration
2045-11-07

AI Technical Summary

Technical Problem

Traditional customer service models, which rely on passive responses, lead to a backlog of work orders, low operational efficiency, and customer service staff burnout, making it difficult to prevent customer dissatisfaction and churn.

Method used

Hidden Markov Models (HMMs) are used for unsupervised training, combined with a context-aware sentiment analysis model, to track customer sentiment in real time and calculate negative escalation risk scores, and dynamically adjust work order priorities.

Benefits of technology

It enabled proactive customer service, improved the efficiency of solving key issues, reduced the time spent on repetitive tasks, and enhanced customer satisfaction and brand loyalty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121073228A_ABST
    Figure CN121073228A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of customer service work order processing, and discloses an event priority ranking distribution method and system, and the method comprises the steps: converting historical multi-round dialogue data into a numeralized historical work order emotion score sequence set; the Hidden Markov model is trained by using a Boem-Weili algorithm, and core dynamic parameters of customer emotional evolution are learned; an optimal risk score threshold value after calibration is obtained through calibration; for each work order in progress, the probability distribution of each current hidden state is deduced in real time, and a forward-looking negative upgrading risk score is calculated; and when the negative upgrading risk score exceeds the calibrated risk score threshold, automatically triggering priority adjustment, and generating an updated work order record. According to the invention, a quantifiable framework based on probability prediction is provided, and customer support is converted from passive and post-response type work order processing into an active and pre-warning type risk management normal form.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of customer service order processing, and more particularly to an event priority ranking and allocation method and system. BACKGROUND

[0002] In the modern customer service field, enterprises are facing growing customer expectations that require support services to be instant, personalized, and consistent across multiple channels. Traditional customer support models are essentially passive and rely on customers to initiate contact after encountering problems. This model puts support teams in a constant state of firefighting, which not only makes it difficult to fundamentally prevent customer dissatisfaction, but also often leads to order backlog, low operational efficiency, and customer service personnel burnout. To address these challenges, the industry is undergoing a fundamental strategic transformation from passive response to proactive service. The core of this new paradigm is no longer waiting for problem reports, but using data-driven signals to anticipate potential customer needs and friction points and intervene before problems escalate into serious dissatisfaction. Artificial intelligence technology, especially natural language processing and probabilistic models, is a key enabling technology for realizing the scale and effectiveness of this proactive service model, providing enterprises with the ability to identify opportunities from massive interaction data and take preventive measures.

[0003] In view of this, the present application proposes an event priority ranking and allocation method and system to solve the above problems. SUMMARY

[0004] In order to overcome the above-mentioned defects of the prior art and achieve the above-mentioned purposes, the present application provides the following technical solutions: an event priority ranking and allocation method, comprising:

[0005] Step S1, incrementally collecting and preprocessing the collected original multi-round dialogue flow to obtain a structured dialogue sequence set;

[0006] Step S2, based on the structured dialogue sequence set and the pre-trained context-aware sentiment analysis model, performing context-aware round-by-round sentiment scoring to obtain a historical order emotion score sequence set;

[0007] Step S3, based on the historical order emotion score sequence set, a pre-defined hidden state set, a configured hidden Markov model training convergence threshold and a configured maximum number of iterations of the hidden Markov model, using the Baum-Welch algorithm to perform unsupervised training on the hidden Markov model (HMM) to obtain an initial state probability distribution , state transition probability matrix and emission probability distribution ;

[0008] Step S4, based on the historical work order emotion score sequence set, the collected historical work order result label, the pre-defined high-risk state definition set and the trained initial state probability distribution , state transition probability matrix and emission probability distribution , perform receiver operating characteristic curve analysis to obtain a calibrated risk score threshold value;

[0009] Step S5, for each work order in the collected ongoing work order stream, based on the pre-trained context-aware emotion analysis model, the configured context window size , initial state probability distribution , state transition probability matrix , emission probability distribution , pre-defined high-risk state definition set and calibrated risk score threshold value, perform real-time emotion tracking and risk prediction, and aggregate all results to obtain a work order processing result set;

[0010] Step S6, based on the work order processing result set, update the priority of the corresponding work order in the collected original work order record to obtain an updated work order record.

[0011] Further, the implementation method of step S3 includes: step S3S1, based on the number of pre-defined hidden state sets, randomly initialize the parameters of initial state probability distribution , state transition probability matrix and emission probability distribution ; step S3S2, when the improvement of the model log-likelihood is greater than the configured hidden Markov model training convergence threshold value and the iteration number is less than the configured maximum number of hidden Markov model iterations, looply execute the expectation maximization step to obtain the converged initial state probability distribution , state transition probability matrix and emission probability distribution .

[0012] Further, the implementation method of step S4 includes: step S4S1, for each emotion score sequence in the historical work order emotion score sequence set, perform a reusable step hidden state probability distribution inference based on the emotion score sequence and the initial state probability distribution , state transition probability matrix and emission probability distribution , and each current hidden state probability distribution is aggregated to obtain a hidden state probability distribution set of the historical work order; step S4S2, for each current hidden state probability distribution in the hidden state probability distribution set of the historical work order, a reusable step of negative upgrade risk score calculation is performed, based on the current hidden state probability distribution, a state transition probability matrix , and a predefined high-risk state definition set, a negative upgrade risk score is calculated, and each negative upgrade risk score is aggregated to obtain a historical risk score sequence; step S4S3, each negative upgrade risk score in the historical risk score sequence is extracted together with its corresponding work order ID to construct a flattened risk score list; step S4S4, the flattened risk score list is aligned with the collected historical work order result label based on the work order ID to obtain a labeled risk score dataset; step S4S5, based on the labeled risk score dataset, a receiver operating characteristic curve is generated, and the negative upgrade risk score corresponding to the coordinate point closest to the upper left corner (0, 1) point on the receiver operating characteristic curve is determined to obtain a calibrated risk score threshold.

[0013] Further, the implementation method of step S5 includes: for each work order in the collected ongoing work order stream, the following steps are cyclically executed: step S5S1, extracting a new user utterance from the structured dialogue sequence of the ongoing work order and performing context-aware round-by-round sentiment scoring to obtain a new sentiment score; step S5S2, checking whether the ongoing work order already has a sentiment score sequence, if so, appending the new sentiment score to the end of the sentiment score sequence, if not, using the new sentiment score to create a new sequence to obtain an updated sentiment score sequence; step S5S3, performing a reusable step of hidden state probability distribution inference, based on the updated sentiment score sequence, an initial state probability distribution , a state transition probability matrix , and an emission probability distribution , the current hidden state probability distribution is inferred and updated; step S5S4, performing a reusable step of negative upgrade risk score calculation, based on the current hidden state probability distribution, a state transition probability matrix , and a predefined high-risk state definition set, a negative upgrade risk score is calculated; step S5S5, when the negative upgrade risk score is greater than the calibrated risk score threshold, based on the ongoing work order and the configured priority upgrade mapping, a work order processing result containing a new priority is generated; step S5S6, all work order processing results generated in step S5S5 are aggregated to obtain a work order processing result set.

[0014] Further, the implementation method of step S3S2 includes: when the improvement of the model log-likelihood is greater than a configured hidden Markov model training convergence threshold and the number of iterations is less than the configured maximum number of iterations of the Hidden Markov Model, the following steps are cyclically executed: step S3S2S1, for each of the set of emotion score sequences of historical work orders, the forward-backward algorithm is executed to calculate a forward probability matrix and a backward probability matrix ; step S3S2S2, based on the forward probability matrix , the backward probability matrix , the state transition probability matrix , and the emission probability distribution , the set of expected statistics is calculated from the set of emotion score sequences of historical work orders, to obtain a set of state expected probabilities and a set of transition expected probabilities ; step S3S2S3, based on the set of state expected probabilities , the set of transition expected probabilities , and the set of emotion score sequences of historical work orders, the Hidden Markov Model parameters are re-estimated to obtain an updated initial state probability distribution , an updated state transition probability matrix , and an updated emission probability distribution ; step S3S2S4, using the updated initial state probability distribution , the updated state transition probability matrix , and the updated emission probability distribution , the total log-likelihood of the Hidden Markov Model on the set of emotion score sequences of historical work orders is calculated, and the difference from the previous iteration is recorded; step S3S2S5, the updated initial state probability distribution is determined as the initial state probability distribution , the updated state transition probability matrix is determined as the state transition probability matrix , and the updated emission probability distribution is determined as the emission probability distribution , for use in the next cyclic iteration.

[0015] Further, the implementation method of step S3S2S1 includes: for each of the set of emotion score sequences of historical work orders, the following steps are cyclically executed: step S3S2S1S1, based on the emotion score sequence, the initial state probability distribution , the state transition probability matrix , and the emission probability distribution , the recursive calculation of the forward algorithm is executed to obtain a forward probability matrix ; step S3S2S1S2, based on the emotion score sequence, the state transition probability matrix and emission probability distribution , performing recursive computation of the backward algorithm to obtain a backward probability matrix ;

[0016] The implementation method of step S3S2S2 includes: step S3S2S2S1, based on the forward probability matrix and the backward probability matrix , calculating the expected probability of being in state at each time step to obtain a state expected probability set ; step S3S2S2S2, based on the forward probability matrix , the backward probability matrix , the state transition probability matrix , the emission probability distribution and the sequence set of emotion scores of historical work orders, calculating the expected probability of transitioning from state to state at each time step to obtain a transition expected probability set ;

[0017] The implementation method of step S3S2S3 includes: step S3S2S3S1, based on the expected value of the state expected probability set at time step , updating the initial state probability distribution to obtain an updated initial state probability distribution ; step S3S2S3S2, based on the cumulative value of the state expected probability set and the transition expected probability set , updating the state transition probability matrix to obtain an updated state transition probability matrix ; step S3S2S3S3, based on the weighted statistics of the state expected probability set and the sequence set of emotion scores of historical work orders, updating the parameters of the emission probability distribution to obtain an updated emission probability distribution ;

[0018] Further, the implementation method of the reusable step hidden state probability distribution inference includes: step R1S0, receiving a sequence of emotion scores; step R1S1, performing the initialization step of the forward algorithm to calculate an initial forward probability vector ; step R1S2, from time step At the end of the emotion rating sequence, the induction step of the forward algorithm is executed cyclically to obtain the final forward probability matrix; in step R1S3, all elements in the last column of the final forward probability matrix are summed to obtain the total probability of the observation sequence; in step R1S4, each element in the last column of the final forward probability matrix is ​​divided by the total probability of the observation sequence to obtain the probability distribution of each hidden state.

[0019] The reusable step-based negative upgrade risk score calculation method includes: Step R2S0, receiving the probability distribution of each current hidden state, the state transition probability matrix, and the high-risk state definition set; Step R2S1, for each current state in the predefined hidden state set... The state transition probability matrix from state The probability of transitioning to each state in the set of high-risk states is summed to obtain the state. Upgrade risks; Step R2S2, each state The upgrade risk and the probability distribution of the current hidden states Corresponding probability Multiply, for The hidden state at time t, obtaining the state The weighted upgrade risk is calculated; in step R2S3, the weighted upgrade risks of all states are summed to obtain the negative upgrade risk score.

[0020] The implementation method of step R1S1 includes: step R1S1S1, extracting the first observation of the updated sentiment rating sequence. Step R1S1S2, based on the emission probability distribution and observed values For each state in the predefined set of hidden states Calculate its emission probability Step R1S1S3, for each state in the predefined set of hidden states The initial state probability distribution The corresponding initial probability Compared with the launch probability calculated in the previous step Multiply, we get Step R1S1S4, all states Combined into a single vector, we obtain the initial forward probability vector. ;

[0021] The implementation method of step R1S2 includes: from time step Towards the end of the updated sentiment rating sequence, repeat the following steps: Step R1S2S1, extract the current time step. Observations ; step R1S2S2, for each state in the predefined set of latent states as a target state, compute the joint probability of transitioning from all preceding states to the state and observing , resulting in a forward probability for the current time step ; step R1S2S3, combine the forward probabilities for all target states into a vector and append to the final forward probability matrix.

[0022] Further, the implementation of step R1S1S2 comprises, for each Gaussian component of the Gaussian mixture model associated with state in the emission probability distribution , the following steps are performed in a loop: step R1S1S2S1, compute the probability density value of the observation under the Gaussian distribution using the mean and covariance matrix of the Gaussian component ; step R1S1S2S2, multiply the computed probability density value with the mixing weight of the Gaussian component , resulting in a weighted probability density value; after the loop, the following step is performed: step R1S1S2S3, sum the weighted probability density values of all Gaussian components, resulting in the emission probability .

[0023] Further, the implementation of step S4S5 comprises: step S4S5S1, extract all unique risk score values from the labeled risk score dataset and sort them in ascending order, resulting in a list of candidate thresholds; step S4S5S2, for each candidate threshold in the list of candidate thresholds, compute the true positive rate and false positive rate corresponding to the candidate threshold using the labeled risk score dataset, combine the true positive rate and false positive rate corresponding to each candidate threshold into a coordinate point, and aggregate all formed coordinate points to obtain a set of ROC curve data points; step S4S5S3, for each data point in the set of ROC curve data points, compute the Euclidean distance between the data point and the ideal point (0, 1), resulting in a list of distances; step S4S5S4, find the minimum value in the list of distances and locate the data point in the set of ROC curve data points corresponding to the minimum value and the candidate threshold in the list of candidate thresholds corresponding to the data point, and determine the candidate threshold as the calibrated risk score threshold.

[0024] ​​​Further, the implementation method of step S5S5 includes: if the negative upgrade risk score is greater than the calibrated risk score threshold, the following steps are performed: step S5S5S1, searching and obtaining a corresponding value in a configured priority upgrade mapping with the current priority of the ongoing work order as a key, and determining the value as an upgraded priority; and step S5S5S2, constructing a work order processing result containing the work order ID of the ongoing work order and the upgraded priority.

[0025] An event priority assignment system implementing the event priority assignment method, the system comprising:

[0026] A dialogue sequence module incrementally collects and pre-processes collected raw multi-turn dialogue flow to obtain a structured dialogue sequence set;

[0027] An emotion scoring module performs context-aware round-by-round emotion scoring based on the structured dialogue sequence set and a pre-trained context-aware emotion analysis model to obtain a set of emotion score sequences of historical work orders;

[0028] A model parameter module performs unsupervised training on a Hidden Markov Model (HMM) using the Baum-Welch Algorithm based on the set of emotion score sequences of historical work orders, a pre-defined set of hidden states, a configured Hidden Markov Model training convergence threshold and a configured maximum number of iterations of the Hidden Markov Model to obtain an initial state probability distribution , a state transition probability matrix and an emission probability distribution ;

[0029] A score threshold module performs a receiver operating characteristic curve analysis based on the set of emotion score sequences of historical work orders, collected historical work order result labels, a pre-defined set of high-risk state definitions and the trained initial state probability distribution , state transition probability matrix and emission probability distribution to obtain a calibrated risk score threshold;

[0030] A work order processing module, for each work order in the collected ongoing work order stream, performs context-aware emotion analysis based on the pre-trained context-aware emotion analysis model, a configured context window size , the initial state probability distribution , the state transition probability matrix , the emission probability distribution , a pre-defined high-risk state definition set and a calibrated risk score threshold, perform real-time emotion tracking and risk prediction, and aggregate all results to obtain a work order processing result set;

[0031] A priority module updates the priority of the corresponding work order in the collected original work order record based on the work order processing result set to obtain an updated work order record.

[0032] The event priority sorting and distribution method and system have the following advantages:

[0033] Firstly, by introducing a hidden Markov model to model customer emotions, the application can go beyond the surface emotion score of a single utterance and instead infer a more stable and closer-to-real-business-situation potential emotion state sequence, effectively filtering transient noise and ambiguity in the dialogue, thereby providing more reliable and robust basis for decision-making.

[0034] Secondly, the calculation of the negative upgrade risk score provides a specific and quantifiable risk indicator for active customer service; this risk indicator enables the application to issue a warning before the customer's emotions deteriorate beyond repair, allowing human intervention at a critical moment, thereby effectively preventing customer loss and the spread of negative publicity.

[0035] In addition, the application dynamically adjusts the work order priority based on the negative upgrade risk score, ensuring that limited customer service resources can be accurately allocated to work orders with the highest risk and the greatest intervention value, which not only improves the efficiency of solving critical problems, but also improves the overall work efficiency and productivity of customer service personnel by reducing their time consumption on low-risk and repetitive tasks.

[0036] Finally, the application transforms the intelligent work order system from a passive work order distribution tool to an active and real-time risk management platform, systematically improving customer satisfaction and brand loyalty by intervening in the early stages of experience damage. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 The method flowchart of the event priority sorting and distribution method of the application;

[0038] Figure 2 The system module schematic diagram of the event priority sorting and distribution system of the application;

[0039] Figure 3 The application scenario schematic diagram of the event priority sorting and distribution method of the application. DETAILED DESCRIPTION

[0040] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of the present application.

[0041] Embodiment 1

[0042] Referring to Figure 1 The event priority assignment method described in this embodiment includes steps S1 to S6.

[0043] This embodiment will elaborate the end-to-end technical process of implementing the dynamic work order priority adjustment system. The whole process is logically divided into two core stages: first, in an offline environment, an unsupervised training is performed on a hidden Markov model by using historical work order data, aiming to learn the internal probability law of the evolution of customer emotional state from the data; second, in an online real-time environment, the fully trained and calibrated model is applied to the collected ongoing work order flow to perform real-time emotional risk assessment, and the corresponding priority adjustment operation is generated and performed according to the assessment result. The application scenario of the method flow of the present application is shown in Figure 3 .

[0044] Step S1, incrementally collect and pre-process the collected original multi-turn conversation flow to obtain a structured conversation sequence set.

[0045] The implementation method of step S1 includes: step S1S1, for each conversation message in the collected original multi-turn conversation flow, performing text normalization operation, including removing HTML tags and irrelevant system metadata, to obtain normalized message text. Step S1S2, recombine the normalized message text with the original timestamp and speaker role information, and group them by work order ID to obtain a structured conversation sequence set.

[0046] The collected original multi-turn conversation flow is derived from the interaction log recording component of the customer service platform. Each time the system captures a user or customer service utterance, the component generates a record. This record is quantized as a JSON object, which contains three key fields: a timestamp generated by the server when the message is received, following the Unix timestamp standard; a string speaker role value taken from a fixed enumeration set [‘user’, ‘agent’]; and the message text content after UTF-8 encoding.

[0047] The structured conversation sequence set generated in step S1 is a set with ticket ID as key and a list of time-ordered conversation turn objects as value. In logic, the structured conversation sequence set represents the normalized version of all original conversation records after cleaning, sorting and grouping, which converts the unstructured conversation flow into structured data that can be directly processed by machines. The structured conversation sequence set will be directly input for the next step, providing the pre-trained context-aware sentiment analysis model with the complete context text sequence necessary for sentiment scoring.

[0048] The original structured conversation sequence set is composed of natural language texts, which cannot be directly used for subsequent time series probability modeling. Therefore, before conducting deeper analysis, these text sequences must first be converted into numerical sequences that can quantitatively represent emotional dynamics. Considering the complexity of language, such as sarcasm, context dependence and specific domain terminology, it is crucial to use an advanced model that can understand the context of the conversation to perform this conversion, which can ensure that the generated numerical sequences accurately reflect the true fluctuations of emotions, rather than simple and easily misjudged estimates based on keyword matching.

[0049] In step S2, based on the structured conversation sequence set and the pre-trained context-aware sentiment analysis model, context-aware round-by-round sentiment scoring is performed to obtain the emotion score sequence set of the historical ticket.

[0050] The core of step S2 is to use a model with context understanding ability to perform sentiment analysis. Traditional keyword-based or bag-of-words model-based sentiment analysis methods cannot handle complex situations such as sarcasm and context switching. However, models based on the Transformer architecture (such as BERT) can capture long-range dependencies through their self-attention mechanism. By inputting the current utterance and the previous N rounds of conversation history together when making predictions, the model can better understand the dynamics of the conversation and specific domain terminology, thus generating more accurate and robust sentiment scores. This continuous emotion score sequence is the basis for the observation of the subsequent Hidden Markov Model for probability inference.

[0051] The technical rationality of the pre-trained context-aware sentiment analysis model relied on by step S2 is derived from its core self-attention mechanism. This mechanism has been mathematically proven to dynamically calculate a weight distribution for each word in the input sequence, allowing it to nonlinearly and selectively focus on the most relevant parts of the previous conversation when processing the current utterance. This enables it to capture complex context dependencies beyond fixed windows or linear order, making it fundamentally superior to traditional sequence models (such as RNN) in understanding conversation history.

[0052] The implementation method of step S2 includes: step S2S1, for each structured dialogue sequence in the structured dialogue sequence set, extracting all user utterances and calling a pre-trained context-aware sentiment analysis model for scoring to obtain an unordered ticket sentiment score tuple list containing all tickets (each tuple contains a ticket ID, a timestamp, and a sentiment score). Step S2S2, based on the ticket sentiment score tuple list, grouping by ticket ID and sorting the tuples in each group in ascending order of timestamp, finally constructing a set of historical ticket emotion score sequences.

[0053] The pre-trained context-aware sentiment analysis model is a deep learning model asset based on a Transformer architecture (such as BERT). The generation of the pre-trained context-aware sentiment analysis model undergoes two stages of training: first, pre-training on a public corpus containing a vast amount of general text to learn the general structure and semantics of language; second, fine-tuning on a proprietary dataset consisting of tens of thousands of customer service domain dialogues annotated by human emotion to adapt to the language style and emotional expression of a specific domain. Finally, the pre-trained context-aware sentiment analysis model is quantized and packaged as an independent callable service interface that receives a JSON-formatted request and returns a floating-point number between -1.0 and 1.0 as a sentiment score.

[0054] The set of historical ticket emotion score sequences generated in step S2 is a set with ticket ID as key and a time-ordered floating-point number list as value. Logically, the set of historical ticket emotion score sequences converts the unstructured text dialogue history of each ticket into a structured, quantized emotion trajectory time series. This set constitutes the "observation sequence" dataset necessary for the subsequent learning of the Hidden Markov Model, and its quality directly determines the effectiveness of model training. The set of historical ticket emotion score sequences will be used as the core training input of the Baum-Welch algorithm in step S3 to learn the underlying dynamics of emotion evolution.

[0055] There is a core problem in directly using the set of historical ticket emotion score sequences for decision-making: the sequence itself is volatile and may contain noise caused by model misjudgment or customer expression ambiguity. An occasional negative score does not necessarily represent the deterioration of the overall state of the customer. Therefore, in order to make a more robust judgment, a method is needed to penetrate these superficial, noisy observations to infer a smoother, more essential underlying customer state. The Hidden Markov Model is an ideal probabilistic tool designed to solve such problems, and it is naturally suitable for modeling systems with hidden states that cannot be directly observed but produce observable signals.

[0056] Step S3: Based on the set of sentiment rating sequences from historical work orders, the predefined set of hidden states, and the configured hidden Markov model training convergence threshold. Given the maximum number of iterations configured for the Hidden Markov Model (HMM), the Baum-Welch Algorithm is used to perform unsupervised training on the HMM to obtain the initial state probability distribution. State transition probability matrix and emission probability distribution .

[0057] Step S3 is one of the core innovations of this invention. Step S3 treats the customer's true emotions (such as "calm" and "worry") as a non-observable Markov process that evolves over time, while considering the observable emotion rating as the "emission symbol" of this process. Hidden Markov Models (HMMs) are ideal tools for establishing probabilistic relationships between such hidden states and observed values. Table 1 shows the definition and examples of HMM hidden states.

[0058] Since there are no labels for the true emotional states of each round in the historical dialogue, this is an unsupervised learning problem. The Baum-Welch algorithm is a standard approach for solving such problems; it is essentially a special case of the Expectation-Maximization (EM) algorithm on Hidden Models (HMMs). This algorithm learns the model's three core parameter sets by iteratively executing the E-step (expectation step, which uses a forward-backward algorithm to calculate the expectation of each hidden state at each time step under the current model parameters) and the M-step (maximization step, which re-estimates the model parameters based on the expectation statistics of the E-step) to maximize the total probability of the observed sequence set. A vector representing the initial probability of the client being in each hidden state at the start of a new conversation. State transition probability matrix. A square matrix containing elements Indicates the customer's emotions from state Transition to state The probability of emission. (Emission probability distribution) : Describes a state that is a hidden state Below, a specific emotion score was observed. probability .

[0059] Since emotion scores are continuous values, the emission probability distribution for each state... This cannot be represented using a simple discrete probability table; instead, a Gaussian mixture model (GMM) is used for modeling. This means that the emission probability distribution... It is a complex parameter object itself, in which a set of GMM parameters is defined for each hidden state, including the weight, mean and variance of each Gaussian component.

[0060] Compared with the traditional method of directly using the sentiment score, the present application infers a more stable and real potential sentiment state through probabilistic inference, effectively smooths out the noise and ambiguity brought by a single utterance, and thus makes a more robust judgment.

[0061] Table 1 HMM hidden state definition and example

[0062]

[0063] The parameter update formula of Baum-Welch algorithm is derived by maximizing the log-likelihood function of the observed data , where represents the complete historical emotion score sequence set of the work order, represents the joint probability of observing the data set under the condition of given model parameters (including the initial state probability distribution , the state transition probability matrix and the emission probability distribution ), and is the logarithm of the probability. This formula defines the optimization objective of the Baum-Welch algorithm, i.e., to find the model parameters that maximize the probability of observing the data. The Baum-Welch algorithm ensures that the likelihood of the model is non-decreasing after each iteration, so as to converge to a local optimal solution.

[0064] The implementation method of step S3 includes: step S3S1, randomly initializing the parameters of the initial state probability distribution , the state transition probability matrix and the emission probability distribution based on the number of the predefined hidden state set. Step S3S2, when the improvement of the model log-likelihood, i.e., the difference between the total log-likelihood of the current iteration and the total log-likelihood of the last iteration, is greater than the configured hidden Markov model training convergence threshold and the number of iterations is less than the configured maximum number of iterations of the hidden Markov model, the expectation maximization step is cyclically executed to obtain the converged initial state probability distribution , the state transition probability matrix and the emission probability distribution .

[0065] The predefined set of hidden states is derived from a qualitative study. The study is performed by a panel of domain experts who identify and induce typical discrete emotional phases that recur in customer service interactions by conducting a thematic analysis of a random sample containing 500 archived ticket dialogue records. The identified themes are then named to form a final list of string enumerations that ensure the hidden states in the model have clear, interpretable business meanings.

[0066] configured hidden markov model training convergence threshold The configured hidden markov model maximum number of iterations is a standard hyperparameter used to control the termination condition of the iterative optimization algorithm. Their specific values are determined by observing the convergence behavior of the Baum-Welch algorithm on an independent validation dataset. The configured hidden markov model maximum number of iterations is set to a sufficiently large integer to ensure the algorithm has sufficient number of iterations to reach convergence. The configured hidden markov model training convergence threshold is set to a sufficiently small positive float number that corresponds to the point where the model log-likelihood curve on the validation set tends to flatten, indicating that further iterations bring marginal improvement to the model performance.

[0067] The implementation method of step S3S2 includes: when the improvement of the model log-likelihood is greater than the configured hidden markov model training convergence threshold and the number of iterations is less than the configured hidden markov model maximum number of iterations, the following steps are cyclically executed: step S3S2S1, for each of the set of historical ticket emotion score sequences, execute the forward-backward algorithm to calculate the forward probability matrix and the backward probability matrix . Step S3S2S2, based on the forward probability matrix , the backward probability matrix , the state transition probability matrix , the emission probability distribution and the set of historical ticket emotion score sequences, calculate the expected statistics to obtain the state expected probability set and the transition expected probability set . Step S3S2S3, based on the state expected probability set , the transition expected probability set and the set of historical ticket emotion score sequences, re-estimate the hidden markov model parameters to obtain the updated initial state probability distribution , the updated state transition probability matrix and the updated emission probability distribution . Step S3S2S4, use the updated initial state probability distribution Updated state transition probability matrix and the updated launch probability distribution Calculate the total log-likelihood of the Hidden Markov Model on the set of sentiment rating sequences of historical work orders, and record the difference between it and the previous iteration. Steps S3, S2, and S5 involve updating the initial state probability distribution. Determined as the initial state probability distribution The updated state transition probability matrix Determined as the state transition probability matrix and the updated launch probability distribution Determined as the launch probability distribution This is used for the next loop iteration.

[0068] The implementation method of steps S3S2S1 includes: for each emotion rating sequence in the set of emotion rating sequences of historical work orders, the following steps are executed iteratively: Step S3S2S1S1, based on the emotion rating sequence and the initial state probability distribution State transition probability matrix and emission probability distribution The forward algorithm is recursively calculated to obtain the forward probability matrix. Steps S3S2S1S2 are based on the emotion rating sequence and the state transition probability matrix. and emission probability distribution The backward algorithm is recursively calculated to obtain the backward probability matrix. .

[0069] The implementation method of step S3S2S2 includes: step S3S2S2S1, based on the forward probability matrix and backward probability matrix Calculate at each time step In state The expected probability is used to obtain the set of expected probabilities for the state. Steps S3S2S2S2, based on the forward probability matrix Backward probability matrix State transition probability matrix Launch probability distribution Based on the set of sentiment rating sequences from historical work orders, calculate the sentiment rating at each time step. From state Transition to state The expected probability is used to obtain the transition expected probability set. .

[0070] The implementation method of steps S3S2S3 includes: step S3S2S3S1, based on the state expectation probability set At time step , update the initial state probability distribution , to obtain the updated initial state probability distribution . Step S3S2S3S2, update the state transition probability matrix , based on the accumulated values of the state expectation probability set and the transition expectation probability set , to obtain the updated state transition probability matrix . Step S3S2S3S3, update the emission probability distribution of the Gaussian mixture model) based on the weighted statistics of the state expectation probability set and the sequence set of historical ticket sentiment scores, to obtain the updated emission probability distribution .

[0071] The initial state probability distribution , the state transition probability matrix and the emission probability distribution generated in step S3 are three independent mathematical objects that collectively define a trained hidden Markov model. The initial state probability distribution is a probability vector, the state transition probability matrix is a square matrix, and the emission probability distribution is a set of Gaussian mixture model parameters defined for each hidden state. Logically, these three parameter sets collectively constitute the core prediction engine of the entire solution, encoding all the knowledge learned from historical data about the evolution of customer sentiment. These parameters will serve as the basis for all probability inference and risk calculation in subsequent steps S4 and S5.

[0072] The Baum-Welch algorithm employed in step S3 is a standard method for finding the maximum likelihood estimate of hidden Markov model parameters in the presence of unlabeled data (i.e., unknown hidden states). This algorithm is a special case of the expectation-maximization algorithm (EM), and its theoretical foundation guarantees that the likelihood of the model with respect to the observed data is non-decreasing at each iteration. This property ensures that the algorithm can stably converge to a locally optimal parameter solution, thus providing a solid theoretical basis and convergence guarantee for unsupervised learning tasks.

[0073] The implementation method of the reusable step of hidden state probability distribution inference includes: step R1S0, receiving a sequence of sentiment scores; step R1S1, performing the initialization step of the forward algorithm to calculate the initial forward probability vector . Step R1S2, from time step At the end of the emotion rating sequence, the induction step of the forward algorithm is executed iteratively to obtain the final forward probability matrix. Step R1S3: Summate all elements in the last column of the final forward probability matrix to obtain the total probability of the observed sequence. Step R1S4: Divide each element in the last column of the final forward probability matrix by the total probability of the observed sequence to obtain the probability distribution of each hidden state.

[0074] Reusable step-based hidden state probability distribution inference is used to infer the potential emotional state of customers in real time. For an ongoing work order, the updated emotional rating sequence is updated whenever a new user dialogue is generated. At this time, it is necessary to use a pre-trained HMM model to calculate the posterior probability of the customer being in each hidden state, given that all current emotional ratings have been observed.

[0075] The forward algorithm is an efficient dynamic programming method for accomplishing this task. It calculates the forward probabilities recursively. That is, "in the model" Below, the observed sequence arrive And in time step In state The joint probability of "; where, Represents the forward probability, that is, given a model Under these conditions, observations were made from time step 1 to time step 2. sequence And in time step The system is in a state The joint probability at time, i.e. This formula defines the core computational objective of the forward algorithm, namely, at any given time step... The joint probability of the system being in a specific state and having generated the corresponding observation sequence forms the basis for all subsequent probability inferences.

[0076] By normalizing the final forward probabilities of all states, we can obtain... That is, the current time step The hidden state at that time The probability distribution. This probability distribution vector represents the system's confidence assessment of the customer's current potential emotional state and is the basis for subsequent risk prediction. This expression represents the probability distribution under a given model. and from time step 1 to time step Complete observation sequence Under these conditions, the system at the final time step In state The posterior probability. This formula is used to calculate the final inference result of the current customer's potential emotional state, that is, the system's confidence distribution of the customer's possible latent states. This represents the observation value at time step T.

[0077] The implementation method of step R1S1 includes: step R1S1S1, extracting the first observation of the updated sentiment rating sequence. Step R1S1S2, based on the emission probability distribution and observed values For each state in the predefined set of hidden states Calculate its emission probability Step R1S1S3 involves processing each state in the predefined set of hidden states. The initial state probability distribution The corresponding initial probability Compared with the launch probability calculated in the previous step Multiply, we get Step R1S1S4 involves all states... Combined into a single vector, we obtain the initial forward probability vector. .

[0078] The initialization formula for the forward algorithm is: In the formula, This represents the forward probability at time step 1. Representing state The initial probability, and Represents the state The first symbol observed The probability of emission. This represents the state at the start of time step 1, where the system is in state . (probability is) And from the state The first observation was launched. (probability is) The joint probability of ). This formula is used to initialize the recursive computation process of the forward algorithm, providing a starting point for subsequent time steps.

[0079] The implementation method of step R1S1S2 includes: for the emission probability distribution Neutral State Each Gaussian component of the associated Gaussian mixture model The following steps are executed repeatedly: Step R1S1S2S1, using Gaussian components. mean Covariance Matrix Calculate the observed values probability density value under this Gaussian distribution Step R1S1S2S2 involves combining the probability density value calculated in the previous step with the Gaussian component. Mixed weights The multiplication results in the weighted probability density value. After the loop ends, the following step is performed: Step R1S1S2S3, summing up the weighted probability density values of all Gaussian components to obtain the emission probability .

[0080] The probability density function of a Gaussian Mixture Model (GMM) is defined as the weighted sum of the probability density functions of the Gaussian components: where represents the observation The total probability density under the Gaussian Mixture Model, is the total number of Gaussian components in the mixture model, is the mixture weight of the th Gaussian component, is the probability density value of the th Gaussian component (whose mean is and whose covariance matrix is ) at point . This formula is used to calculate the probability density of a continuous observation (such as an emotion score) being observed from a complex probability distribution that is a mixture of multiple Gaussian distributions. Step R1S1S2 precisely implements the calculation of this formula.

[0081] The implementation method of Step R1S2 includes: from time step to the end of the updated emotion score sequence, loop the following steps: Step R1S2S1, extract the observation of the current time step . Step R1S2S2, for each state in the predefined set of hidden states as the target state, calculate the joint probability of transitioning from all previous states to state and observing to obtain the forward probability of the current time step. Step R1S2S3, combine the forward probabilities of all target states into a vector and append it to the final forward probability matrix.

[0082] The formula of the induction step (or the recursive step) of the forward algorithm is:

[0083] where denotes the total number of states, represents the forward probability of being in state at time step , is the forward probability of being in state at time step , is the forward probability of transitioning from state to state is the emission probability of observing a symbol in state . The meaning of this formula is: the probability of the system being in state at time step and observing is equal to the sum over all possible preceding states of the probability of being in state at time step ("P(state at time step ) times the probability of transitioning from state to state ") times the probability of emitting observation from state ("P(observation from state )"). This formula is the core recursive step of the forward algorithm for efficiently deriving the probability distribution at the current time step from the probability distribution at the previous time step.

[0084] The implementation method of the reusable step negative upgrade risk score calculation includes: step R2S0, receiving the probability distribution of the current hidden state, the state transition probability matrix and the high-risk state definition set; step R2S1, for each current state in the predefined hidden state set , sum the probabilities of transitioning from state to each state in the high-risk state definition set in the state transition probability matrix to obtain the upgrade risk of state . Step R2S2, multiply the upgrade risk of each state by the probability corresponding to state in the probability distribution of the hidden state at the current time step , to obtain the weighted upgrade risk of state for the hidden state at the moment. Step R2S3, sum the weighted upgrade risks of all states to obtain the negative upgrade risk score. The reusable step negative upgrade risk score calculation is a key innovation to realize proactive intervention. It uses the state transition probability matrix trained by HMM for forward-looking prediction, rather than reacting after detecting explicit negative signals as traditional methods do.

[0085] The calculation logic of the negative upgrade risk score is based on the total probability formula. It calculates the probability of the next round of dialogue

[0086] ​​), the probability of the customer emotion state transferring to a predefined high risk state. The mathematical expression is: , where represents the negative escalation risk score calculated at time step , is the probability of the system being in a latent state from the predefined set of latent states at time step , is the probability of the current latent state (i.e., one element in the probability distribution of the current latent states), is the predefined set of high risk states; is the probability of transferring from state to state (i.e., one element in the state transition probability matrix ). The reusable step negative escalation risk score calculation precisely implements this formula. This makes the trigger point of the decision move from “post-confirmation” to “pre-prediction”, which is the core of the service proactivity. This formula is used to quantify the probability of a ticket’s emotion state deteriorating to a high risk state in the next round of conversation, providing a forward-looking decision basis for proactive intervention.

[0087] The negative escalation risk score is a continuous probability value between 0 and 1. However, in actual business operations, a binary, either-or decision needs to be made: whether to trigger priority escalation or not. This requires a clear decision threshold to be set to map the continuous risk score to discrete actions. Simply setting the threshold to 0.5 or any other arbitrary value often cannot achieve the best balance between identifying real risks and avoiding false alarms. Therefore, a systematic, data-driven method is logically required to determine this optimal threshold to ensure that the final decision strategy is the most efficient in business.

[0088] Step S4, based on the set of emotion score sequences of historical tickets, the collected historical ticket result labels, the predefined set of high risk state definitions, and the trained initial state probability distribution , state transition probability matrix and emission probability distribution , perform receiver operating characteristic curve analysis to obtain the calibrated risk score threshold.

[0089] The negative escalation risk score is a continuous probability value, and a clear threshold is needed to convert it into a binary “need escalation” or “no need escalation” decision signal. Simply choosing 0.5 as the threshold is usually not optimal. The receiver operating characteristic curve (ROC Curve) is a standard tool for selecting the best threshold.

[0090] The ROC curve visualizes the performance of a classifier by plotting the True Positive Rate (TPR) against the False Positive Rate (FPR) at all possible thresholds, where the TPR is the proportion of cases correctly identified as should-upgrade tickets, and the FPR is the proportion of cases incorrectly labeled as should-upgrade tickets.

[0091] An ideal classifier has an ROC curve that is as close as possible to the upper left corner of the plot, which corresponds to a FPR of 0 and a TPR of 1. Therefore, selecting the point on the curve that is closest to the point (0, 1) in Euclidean distance is a common strategy to balance between TPR and FPR, and the risk score corresponding to this point is the calibrated risk score threshold.

[0092] The implementation method of step S4 includes: step S4S1, for each emotion score sequence in the set of emotion score sequences of the historical tickets, performing the reusable step of hidden state probability distribution inference, inferring the probability distribution of each current hidden state based on the emotion score sequence and the initial state probability distribution , the state transition probability matrix and the emission probability distribution , and collecting each current hidden state probability distribution to obtain the set of hidden state probability distributions of the historical tickets. Step S4S2, for each current hidden state probability distribution in the set of hidden state probability distributions of the historical tickets, performing the reusable step of negative upgrade risk score calculation, calculating the negative upgrade risk score based on the current hidden state probability distribution, the state transition probability matrix and the predefined high-risk state definition set, and collecting each negative upgrade risk score to obtain the sequence of historical risk scores. Step S4S3, extracting each negative upgrade risk score in the sequence of historical risk scores and its corresponding ticket ID to construct a flattened risk score list. Step S4S4, aligning the flattened risk score list with the collected historical ticket result labels based on the ticket ID to obtain a labeled risk score dataset. Step S4S5, generating a receiver operating characteristic curve based on the labeled risk score dataset, and determining the risk score corresponding to the coordinate point on the curve closest to the upper left corner (0, 1) point to obtain the calibrated risk score threshold.

[0093] The collected historical ticket outcome labels are derived from a process that combines automated rules and human review. First, tickets that are likely to have escalated are automatically flagged by preset rules, such as detecting explicit complaint keywords or tickets that are reopened repeatedly by the customer. Subsequently, a team of quality assurance experts manually reviews these flagged tickets and finally confirms whether the service level escalation actually occurred based on explicit business criteria. This final judgment is quantified as a Boolean value (true or false) and stored in a CSV file along with the corresponding ticket IDs for later model calibration.

[0094] The predefined high-risk state definition set is a subset of the predefined latent state set, which is defined from a business policy decision. It is determined by senior management from the customer service and risk management departments, among all the defined potential sentiment states, which states (e.g., "depressed", "angry") represent the level of customer dissatisfaction that poses a direct threat to the business, which may lead to customer churn or damage to brand reputation. This decision result is solidified as a string list as the basis for risk calculation.

[0095] The implementation method of step S4S5 includes: step S4S5S1, extracting all unique risk score values from the labeled risk score dataset and sorting them in ascending order to obtain a candidate threshold list. Step S4S5S2, for each candidate threshold in the candidate threshold list, calculate the true positive rate and false positive rate corresponding to the candidate threshold using the labeled risk score dataset, combine the true positive rate and false positive rate corresponding to each candidate threshold into a coordinate point, and collect all the formed coordinate points to obtain the ROC curve data point set. Step S4S5S3, for each data point in the ROC curve data point set, calculate the Euclidean distance between the data point and the ideal point (0, 1) to obtain a distance list. Step S4S5S4, find the minimum value in the distance list and locate the data point corresponding to the minimum value in the ROC curve data point set and the candidate threshold corresponding to the data point in the candidate threshold list, and determine this candidate threshold as the calibrated risk score threshold.

[0096] The calibrated risk score threshold generated by step S4S5 is a single floating-point scalar. Logically, the calibrated risk score threshold represents an empirically verified, optimal decision boundary that balances between maximizing the identification of true risk tickets (true positives) and minimizing false alarms (false positives). The calibrated risk score threshold will serve as the key comparison benchmark for real-time decision-making in the next step S5, which is used to convert the probabilistic negative escalation risk score into a deterministic "escalate" or "not escalate" business operation.

[0097] Step S5, for each of the collected in-progress work orders in the in-progress work order stream, perform real-time emotion tracking and risk prediction based on the pre-trained context-aware emotion analysis model, the configured context window size , the initial state probability distribution , the state transition probability matrix , the emission probability distribution , the pre-defined high-risk state definition set and the calibrated risk score threshold, and aggregate all results to obtain a set of work order processing results.

[0098] The implementation method of step S5 includes: for each of the collected in-progress work orders in the in-progress work order stream, cyclically performing the following steps: step S5S1, extracting a new user utterance from the structured dialogue sequence of the in-progress work order and performing context-aware round-by-round emotion scoring to obtain a new emotion score. Step S5S2, checking whether the in-progress work order already has an emotion score sequence, if so, appending the new emotion score to the end of the emotion score sequence, if not, using the new emotion score to create a new sequence to obtain an updated emotion score sequence. Step S5S3, performing the reusable step of hidden state probability distribution inference, based on the updated emotion score sequence, the initial state probability distribution , the state transition probability matrix and the emission probability distribution , inferring and updating the probability distribution of the current hidden state. Step S5S4, performing the reusable step of negative escalation risk score calculation, based on the probability distribution of the current hidden state, the state transition probability matrix and the pre-defined high-risk state definition set, calculating the negative escalation risk score. Step S5S5, when the negative escalation risk score is greater than the calibrated risk score threshold, generating a work order processing result containing a new priority based on the in-progress work order and the configured priority escalation mapping. Step S5S6, aggregating all work order processing results generated in step S5S5 to obtain a set of work order processing results.

[0099] The collected in-progress work order stream is derived from a real-time message bus system (such as Apache Kafka or RabbitMQ), which is responsible for broadcasting various events occurring in the customer service platform. Whenever a work order in the "open" state has a new message recorded, the system will publish an event. The event is quantified as a JSON-formatted data object, whose structure is consistent with a single record in the collected original multi-turn dialogue stream, but it is pushed and consumed in the form of a near-real-time data stream.

[0100] The configured context window size is a positive integer hyper-parameter whose value is determined by systematic empirical tests. On a reserved validation dataset, researchers evaluate the pre-trained context-aware sentiment analysis model in different configurations of context window size and report the prediction accuracy at different values (e.g. 1, 3, 5, 10). The final selected value is the one that achieves the best trade-off between model prediction accuracy and computational latency of a single invocation.

[0101] Step S5 applies an offline-trained Hidden Markov Model to online, real-time data stream for state estimation and future prediction, which is a typical and mature application paradigm of Hidden Markov Model in time series analysis. The high-efficiency inference algorithm of the model itself, such as the forward algorithm, combined with the state transition probability matrix learned from historical data with predictive power make it an ideal technical tool for building dynamic online monitoring and early warning systems.

[0102] The implementation method of step S5S5 includes the following steps: if the negative escalation risk score is greater than the calibrated risk score threshold, then perform the following steps: step S5S5S1, look up and obtain the corresponding value in the configured priority escalation mapping table with the current priority of the in-process work order as the key, and determine the value as the escalated priority. Step S5S5S2, construct a work order processing result containing the work order ID of the in-process work order and the escalated priority.

[0103] The configured priority escalation mapping table is a direct digital encoding of the existing, written standard operating procedures (SOP) of the enterprise customer service department regarding the rules of event escalation path. The rules define the fixed flow path of different priority work orders when they need to be escalated. This business rule is quantified as a key-value pair mapping table stored in a JSON object to facilitate fast and unambiguous queries in the program.

[0104] Step S6, based on the set of work order processing results, updates the priority of the corresponding work order in the collected original work order records to obtain the updated work order records.

[0105] The implementation method of step S6 includes the following steps: for each work order processing result in the set of work order processing results, loop the following steps: step S6S1, extract the work order ID and the escalated priority from the work order processing result. Step S6S2, look up the work order record matching the work order ID in the collected original work order records. Step S6S3, update the priority field of the matched work order record to the escalated priority. After the loop, perform the following steps: step S6S4, determine the collected original work order records after all the priority updates as the updated work order records.

[0106] The raw ticket records collected originate from the core database of the Customer Relationship Management (CRM) system in the production environment. The generation of each raw ticket record is triggered by the creation event of a new customer service case. The record is quantified as a JSON document, where fields such as ticket ID are globally unique identifiers generated by the system (e.g., UUID), while references to the original multi-turn conversation flow point to the relevant conversation entries stored in another dataset.

[0107] The implementation of this invention begins with parsing and quantifying the unstructured, raw multi-turn dialogue stream, transforming it into a structured set of sentiment rating sequences from historical work orders. This numerical time-series data is then used to train a Hidden Markov Model, producing the core set of probability parameters (initial state probability distribution). State transition probability matrix Launch probability distribution These parameters, combined with historical label data, are used to calibrate a key post-calibration risk score threshold through receiver operation characteristic curve analysis. Finally, in the real-time phase, the products of all these offline training and calibrations are applied to the collected in-process work order flow. Through a series of probabilistic inferences and comparisons, a set of work order processing results is generated, ultimately manifesting as modifications to the collected original work order records, producing updated work order records, thus completing a full closed loop from raw data to final decision.

[0108] The core contribution of this invention lies in constructing a complete automated decision-making framework that learns from data and applies it to real-time prediction. By introducing a probabilistic model, it successfully transforms a subjective customer emotional state problem into an objective and quantifiable problem of future risk probability. This transformation not only improves the accuracy and robustness of decision-making but also provides a technical foundation for customer service operations to shift from a passive response model to a proactive risk management model, thereby achieving optimal resource allocation and a systematic improvement in customer experience.

[0109] The core innovation of this invention lies in reconstructing the risk assessment problem of customer service work orders from a traditional static classification task into a dynamic, probabilistic time series prediction problem. The fundamental principle is that the emotional ratings expressed by customers during conversations are merely a noisy, observable representation of their true emotional state; the real reasons determining their behavior, such as escalating to a complaint or leaving satisfied, are the unobservable, evolving latent emotional states. Therefore, the core strategy of this invention is to employ the classic probabilistic graphical model, the Hidden Markov Model, to explicitly establish the mathematical relationship between the invisible internal state and the visible external observation. Through unsupervised training on a large set of historical work order emotional rating sequences, this invention learns the inherent laws governing the evolution of emotional states, and these laws are solidified in the state transition probability matrix. This process signifies that the invention possesses a profound understanding of emotional dynamics. The ultimate breakthrough of this invention lies in its use of Hidden Markov Models to predict the future, rather than explaining the past. By calculating a negative escalation risk score—the expected probability that a customer will enter any high-risk state in the next round of conversation—the invention shifts the focus of decision-making from current emotions to predicting future emotions. This logical leap from classification to prediction provides a solid theoretical and technical foundation for realizing a business model transformation from passive response to proactive intervention.

[0110] Example 2

[0111] See Figure 2 As shown, this embodiment provides an event priority sorting and allocation system, the system including:

[0112] The dialogue sequence module incrementally collects and preprocesses the collected raw multi-turn dialogue streams to obtain a set of structured dialogue sequences.

[0113] The emotion scoring module, based on a set of structured dialogue sequences and a pre-trained context-aware emotion analysis model, performs context-aware round-by-round emotion scoring to obtain a set of emotion scoring sequences for historical work orders.

[0114] The model parameter module is based on a set of sentiment rating sequences from historical work orders, a predefined set of hidden states, and a configured hidden Markov model training convergence threshold. Given the maximum number of iterations configured for the Hidden Markov Model (HMM), the Baum-Welch Algorithm is used to perform unsupervised training on the HMM to obtain the initial state probability distribution. State transition probability matrix and emission probability distribution ;

[0115] The scoring threshold module is based on a set of sentiment scoring sequences from historical work orders, collected historical work order result labels, a predefined set of high-risk state definitions, and an initial state probability distribution obtained through training. State transition probability matrix and emission probability distribution Receiver operation characteristic curve analysis is performed to obtain the calibrated risk score threshold;

[0116] The work order processing module, for each ongoing work order in the collected ongoing work order stream, uses a pre-trained context-aware sentiment analysis model and the configured context window size. Initial state probability distribution State transition probability matrix Launch probability distribution A predefined set of high-risk status definitions and calibrated risk scoring thresholds are used to perform real-time sentiment tracking and risk prediction, and all results are aggregated to obtain a set of work order processing results.

[0117] The priority module updates the priority of the corresponding work orders in the collected original work order records based on the work order processing result set, and obtains the updated work order records.

[0118] For any parts not mentioned in this application, existing technologies may be used or referenced.

[0119] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0120] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method of event prioritization assignment, the method comprising: Comprising: Step S1, incrementally collecting and preprocessing the collected original multi-turn dialogue flow to obtain a structured dialogue sequence set; Step S2, based on the structured dialogue sequence set and the pre-trained context-aware emotion analysis model, performing context-aware round-by-round emotion scoring to obtain an emotion score sequence set of the historical work order; Step S3, based on the historical work order emotion score sequence set, the pre-defined hidden state set, the configured hidden Markov model training convergence threshold And the configured maximum number of iterations of the hidden Markov model, the Baum-Welch algorithm is used to unsupervised train the hidden Markov model to obtain the initial state probability distribution , the state transition probability matrix And the emission probability distribution ; Step S4, based on the historical work order emotion score sequence set, the collected historical work order result label, the pre-defined high-risk state definition set and the trained initial state probability distribution , state transition probability matrix and emission probability distribution , perform receiver operating characteristic curve analysis to obtain a calibrated risk score threshold; Step S5, for each of the collected ongoing work orders in the flow, based on the pre-trained context-aware sentiment analysis model, the configured context window size , initial state probability distribution , state transition probability matrix , emission probability distribution , a set of predefined high-risk state definitions and calibrated risk score thresholds, perform real-time emotion tracking and risk prediction, and aggregate all results to obtain a set of work order processing results; Step S6, based on the work order processing result set, updating the priority of the corresponding work order in the collected original work order record to obtain an updated work order record.

2. The method of claim 1, wherein, The implementation method of step S3 includes: step S3S1, randomly initializing the initial state probability distribution based on the number of the predefined hidden state set , the state transition probability matrix and the emission probability distribution ; step S3S2, when the improvement of the model log-likelihood is greater than the configured hidden Markov model training convergence threshold and the iteration number is less than the configured hidden Markov model maximum iteration number, cyclically performing the expectation maximization step to obtain the converged initial state probability distribution , the state transition probability matrix and the emission probability distribution .

3. The method of claim 1, wherein, The implementation method of step S4 includes: step S4S1, for each emotion score sequence in the emotion score sequence set of the historical work order, performing a reusable step of hidden state probability distribution inference, inferring the probability distribution of each current hidden state based on the emotion score sequence and the initial state probability distribution , the state transition probability matrix and the emission probability distribution , and collecting the probability distribution of each current hidden state to obtain a hidden state probability distribution set of the historical work order; step S4S2, for each probability distribution of the current hidden state in the hidden state probability distribution set of the historical work order, performing a reusable step of negative escalation risk score calculation, calculating the negative escalation risk score based on the probability distribution of the current hidden state, the state transition probability matrix and the predefined high-risk state definition set, and collecting each negative escalation risk score to obtain a historical risk score sequence; step S4S3, extracting each negative escalation risk score in the historical risk score sequence and the work order ID corresponding thereto, and constructing a flattened risk score list; step S4S4, aligning the flattened risk score list with the collected historical work order result label based on the work order ID to obtain a labeled risk score dataset; and step S4S5, generating a receiver operating characteristic curve based on the labeled risk score dataset, and determining the negative escalation risk score corresponding to the coordinate point closest to the upper left corner (0, 1) point on the receiver operating characteristic curve to obtain a calibrated risk score threshold.

4. The method of claim 1, wherein, The implementation method of step S5 includes: for each of the collected in-process work orders, the following steps are executed in a loop: step S5S1, extracting a new user utterance from the structured dialogue sequence of the in-process work order, and performing a context-aware round-by-round sentiment scoring to obtain a new sentiment score; step S5S2, checking whether the in-process work order already has a sequence of sentiment scores, if so, appending the new sentiment score to the end of the sequence of sentiment scores, if not, using the new sentiment score to create a new sequence to obtain an updated sequence of sentiment scores; step S5S3, performing the reusable step of hidden state probability distribution inference, based on the updated sequence of sentiment scores, the initial state probability distribution , the state transition probability matrix and the emission probability distribution , inferring and updating the probability distribution of the current hidden states; step S5S4, performing the reusable step of negative escalation risk score calculation, based on the probability distribution of the current hidden states, the state transition probability matrix and the predefined high-risk state definition set, calculating the negative escalation risk score; step S5S5, when the negative escalation risk score is greater than the calibrated risk score threshold, generating a work order processing result containing a new priority based on the in-process work order and the configured priority escalation mapping; step S5S6, summarizing all work order processing results generated in step S5S5 to obtain a set of work order processing results.

5. The method of claim 2, wherein, The implementation method of step S3S2 comprises: when the improvement of the model log-likelihood is greater than a configured hidden Markov model training convergence threshold and the number of iterations is less than a configured maximum number of hidden Markov model iterations, the following steps are cyclically executed: step S3S2S1, for each emotion score sequence in the set of emotion score sequences of the historical work orders, performing a forward-backward algorithm to calculate a forward probability matrix and a backward probability matrix; step S3S2S2, based on the forward probability matrix, the backward probability matrix, a state transition probability matrix, an emission probability distribution, and the set of emotion score sequences of the historical work orders, calculating expected statistics to obtain a set of state expected probabilities and a set of transition expected probabilities; step S3S2S3, based on the set of state expected probabilities, the set of transition expected probabilities, and the set of emotion score sequences of the historical work orders, re-estimating hidden Markov model parameters to obtain an updated initial state probability distribution, an updated state transition probability matrix, and an updated emission probability distribution; step S3S2S4, using the updated initial state probability distribution, the updated state transition probability matrix, and the updated emission probability distribution to calculate the total log-likelihood of the hidden Markov model on the set of emotion score sequences of the historical work orders, and recording the difference with the last iteration; step S3S2S5, determining the updated initial state probability distribution as the initial state probability distribution, the updated state transition probability matrix as the state transition probability matrix, and the updated emission probability distribution as the emission probability distribution, for use in the next cyclic iteration. ​​​​​​​​​​​​​​​​​​​​​​​ 6. A method of event prioritization assignment according to claim 5, wherein, The implementation method of step S3S2S1 includes: for each of the set of emotion score sequences of the historical work orders, cyclically performing the following steps: step S3S2S1S1, performing a recursive calculation of a forward algorithm based on the emotion score sequence, the initial state probability distribution , the state transition probability matrix , and the emission probability distribution to obtain a forward probability matrix ; step S3S2S1S2, performing a recursive calculation of a backward algorithm based on the emotion score sequence, the state transition probability matrix , and the emission probability distribution to obtain a backward probability matrix ; The implementation method of step S3S2S2 includes: step S3S2S2S1, based on the forward probability matrix and the backward probability matrix , calculating the expected probability of being in state at each time step , to obtain a state expected probability set ; step S3S2S2S2, based on the forward probability matrix , the backward probability matrix , the state transition probability matrix , the emission probability distribution and the historical work order emotion score sequence set, calculating the expected probability of transitioning from state to state at each time step , to obtain a transition expected probability set ; The implementation method of steps S3S2S3 includes: step S3S2S3S1, based on the state expectation probability set At time step The expected value is used to update the initial state probability distribution. The updated initial state probability distribution is obtained. Step S3S2S3S2, based on the expected probability set of the state and the expected probability set of transitions The accumulated value is used to update the state transition probability matrix. The updated state transition probability matrix is ​​obtained. Steps S3S2S3S3, based on the expected probability set of the state The launch probability distribution is updated using a weighted statistic of the set of sentiment rating sequences from historical work orders. The parameters are used to obtain the updated emission probability distribution. .

7. The method of claim 3, wherein, The implementation method of the reusable step hidden state probability distribution inference includes: step R1S0, receiving an emotion score sequence; step R1S1, performing an initialization step of a forward algorithm to calculate an initial forward probability vector ; step R1S2, performing an induction step of the forward algorithm from a time step to the end of the emotion score sequence to obtain a final forward probability matrix; step R1S3, summing all elements of the last column of the final forward probability matrix to obtain a total probability of the observation sequence; and step R1S4, dividing each element of the last column of the final forward probability matrix by the total probability of the observation sequence to obtain a probability distribution of the current hidden state. The reusable step-based negative upgrade risk score calculation method includes: Step R2S0, receiving the probability distribution of each current hidden state, the state transition probability matrix, and the high-risk state definition set; Step R2S1, for each current state in the predefined hidden state set... The state transition probability matrix from state The probability of transitioning to each state in the set of high-risk states is summed to obtain the state. Upgrade risks; Step R2S2, each state The upgrade risk and the probability distribution of the current hidden states Corresponding probability Multiply, for The hidden state at time t, obtaining the state The weighted upgrade risk is calculated; in step R2S3, the weighted upgrade risks of all states are summed to obtain the negative upgrade risk score.

8. The event priority assignment method according to claim 7, wherein the implementation method of steps S4S5 comprises: step S4S5S1, extracting all unique risk score values from the labeled risk score dataset and sorting them in ascending order to obtain a candidate threshold list; step S4S5S2, for each candidate threshold in the candidate threshold list, using the labeled risk score dataset to calculate the true positive rate and false positive rate corresponding to the candidate threshold, and combining the true positive rate and false positive rate corresponding to each candidate threshold into a coordinate point, and collecting all formed coordinate points to obtain an ROC curve data point set; step S4S5S3, for each data point in the ROC curve data point set, calculating the Euclidean distance between the data point and the ideal point (0, 1) to obtain a distance list; step S4S5S4, finding the minimum value in the distance list and locating the data point corresponding to the minimum value in the ROC curve data point set and the candidate threshold corresponding to the data point in the candidate threshold list, and determining this candidate threshold as the calibrated risk score threshold. The implementation method of step R1S1 includes: step R1S1S1, extracting the first observation of the updated sentiment rating sequence. Step R1S1S2, based on the emission probability distribution and observed values For each state in the predefined set of hidden states Calculate its emission probability Step R1S1S3, for each state in the predefined set of hidden states The initial state probability distribution The corresponding initial probability Compared with the launch probability calculated in the previous step Multiply, we get Step R1S1S4, all states Combined into a single vector, we obtain the initial forward probability vector. ; The implementation of step R1S2 comprises: from the time step to the end of the updated emotion score sequence, the following steps are executed in a loop: step R1S2S1, extracting the observation value of the current time step ; step R1S2S2, for each state in the predefined hidden state set as a target state , calculating the joint probability of transitioning from all previous states to the state and observing , obtaining the forward probability of the current time step; step R1S2S3, combining the forward probabilities of all target states into a vector, and appending it to the final forward probability matrix.

9. A method of event prioritization assignment according to claim 8, wherein, The implementation method of step R1S1S2 includes: for the emission probability distribution Neutral State Each Gaussian component of the associated Gaussian mixture model The following steps are executed repeatedly: Step R1S1S2S1, using Gaussian components. mean Covariance Matrix Calculate the observed values probability density value under Gaussian distribution Step R1S1S2S2 involves combining the calculated probability density values ​​with the Gaussian components. Mixed weights Multiply to obtain the weighted probability density value; after the loop ends, perform the following steps: Step R1S1S2S3, sum the weighted probability density values ​​of all Gaussian components to obtain the emission probability. .

10. The method of claim 3, wherein, The implementation method of step S5S5 comprises: if the negative upgrade risk score is greater than the calibrated risk score threshold, then performing the following steps: step S5S5S1, using the current priority of the ongoing work order as the key to search and obtain its corresponding value in the configured priority upgrade mapping, and determining the value as the upgraded priority; step S5S5S2, constructing a work order processing result containing the work order ID and the upgraded priority of the ongoing work order.

11. The method of claim 4, wherein, A system for implementing the event priority assignment method of any one of claims 1-11, comprising:

12. An event prioritization assignment system characterized by, A dialogue sequence module that incrementally collects and preprocesses the collected original multi-turn dialogue flow to obtain a structured dialogue sequence set; An emotion scoring module that, based on the structured dialogue sequence set and the pre-trained context-aware emotion analysis model, performs context-aware round-by-round emotion scoring to obtain an emotion score sequence set of the historical work order; A priority module that, based on the work order processing result set, updates the priority of the corresponding work order in the collected original work order record to obtain an updated work order record. The model parameter module is based on a set of sentiment rating sequences from historical work orders, a predefined set of hidden states, and a configured hidden Markov model training convergence threshold. Given the maximum number of iterations of the configured Hidden Markov Model (HMM), the Baum-Welch algorithm is used to perform unsupervised training on the HMM to obtain the initial state probability distribution. State transition probability matrix and emission probability distribution ; The scoring threshold module is based on a set of sentiment scoring sequences from historical work orders, collected historical work order result labels, a predefined set of high-risk state definitions, and an initial state probability distribution obtained through training. State transition probability matrix and emission probability distribution Receiver operation characteristic curve analysis is performed to obtain the calibrated risk score threshold; The work order processing module, for each work order in the collected ongoing work order flow, based on a pre-trained context-aware sentiment analysis model, a configured context window size , an initial state probability distribution , a state transition probability matrix , an emission probability distribution , a set of predefined high-risk state definitions and a calibrated risk score threshold, performs real-time emotion tracking and risk prediction, and aggregates all results to obtain a work order processing result set; ​

Citation Information

Patent Citations

  • Hidden Markov model food safety risk assessment method based on cuckoo search

    CN111291967A

  • Aero-engine continuous health state evaluation method based on SAE-HMM

    CN111652461A

  • Automatic work order assignment method based on natural language processing

    CN117808251A

  • Multi-model fusion operation and maintenance work order satisfaction early warning method

    CN118014560A

  • Large-model complaint intention recognition method based on sentiment analysis

    CN120146056A

Cited By

  • Emotional behavior visual analysis method, system and device based on artificial intelligence

    CN121542896A

  • Emotion behavior visual analysis method, system and device based on artificial intelligence

    CN121542896B