Algorithmic AI customer service dialogue management method and system based on big data
By using big data-based algorithms in the AI customer service system to process user input content and speech maps, the problem of insufficient adaptability and flexibility in handling new problems or special circumstances is solved, and more efficient dialogue management and user experience is achieved.
Patent Information
- Application Number
- CN202510157821.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-02-13
AI Technical Summary
When traditional AI customer service systems deal with new problems or special circumstances beyond the preset range, they have poor adaptability and flexibility, resulting in users not getting satisfactory answers and inefficient conversations between users and customer service.
The algorithm AI customer service dialogue management method based on big data is adopted. By obtaining user input content and speech map, keyword search, speech priority list construction, emotional state evaluation and convergence calculation are carried out, dialogue process is optimized, and when the dialogue is intelligently judged.
It improves the efficiency of AI customer service conversations, ensures that users have a better experience, avoids meaningless conversation extensions, and improves the adaptability and flexibility of the system.
Smart Images

Figure CN119621955B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of dialogue management, and in particular to a method and system for managing dialogue between AI customers based on big data algorithms. Background Art
[0002] In today's digital age, with the booming development of industries such as e-commerce and online services, the customer service system, as an important bridge for communication between enterprises and users, has a direct impact on the quality of user experience through its efficiency and quality. Traditional customer service methods rely on manual agents, which have slow response speeds and unstable service quality. In order to solve these problems, the AI customer service dialogue management method based on big data algorithms has emerged. This method uses advanced technologies such as natural language processing (NLP) and machine learning to automatically understand the user's query intent and provide accurate services or answers based on preset speech graphs, thereby achieving efficient customer service automation.
[0003] One existing technology uses a traditional AI customer service system based on rules or template matching. This type of system responds to user queries by presetting a series of questions and answers or a fixed flow of words. Specifically, when receiving user input, the system first parses the text content, looks for question patterns similar to those in the built-in knowledge base, and then selects the most matching answer to respond. In addition, some systems have begun to introduce simple machine learning models to improve intent recognition and increase the accuracy of answers.
[0004] Although the above traditional AI customer service systems have improved service efficiency to a certain extent, they also have obvious limitations. Since they mainly rely on fixed rule sets or templates, the system has poor adaptability and flexibility for new questions or special situations beyond the preset scope, which can easily lead to users not getting satisfactory answers, resulting in inefficient conversations between users and customer service. Summary of the invention
[0005] The present invention provides an algorithmic AI customer service dialogue management method and system based on big data to improve the efficiency of AI customer service dialogue.
[0006] In the first aspect, in order to solve the above technical problems, the present invention provides an algorithmic AI customer service dialogue management method based on big data, comprising:
[0007] Get user input content and speech graph;
[0008] Perform keyword search based on the user input content and the speech graph to obtain speech tags and activate corresponding speech content;
[0009] A directed graph of speech techniques is constructed according to the speech technique labels and the speech technique graph, and greedy optimization is performed to obtain a speech technique priority list;
[0010] Output all activated speech contents according to the speech priority list, and end the conversation after completing the speech output;
[0011] Evaluate the emotional state of the user based on the user input content, and when it is detected that the user is in a negative mood, output soothing words and end the conversation;
[0012] The convergence degree is calculated according to the user input content, and when the topic convergence degree is greater than a preset convergence degree threshold, the conversation is ended.
[0013] In an optional implementation, performing keyword search based on the user input content and the speech graph to obtain speech tags and activate corresponding speech content includes:
[0014] Extracting keywords from the user input content to obtain user keywords;
[0015] Compare and match the user keywords in the speech graph to find speech tags corresponding to the user keywords;
[0016] When the corresponding speech tag is found, the speech tag is recorded and the corresponding speech content is activated;
[0017] When no directly corresponding speech tag is found, semantic recognition is performed on the user input content to obtain the speech tag with the closest semantics, and the corresponding speech content is activated.
[0018] In an optional implementation, the speech directed graph is constructed according to the speech tag and the speech graph, and greedy optimization is performed to obtain a speech priority list, including:
[0019] Take each speech as a node, establish directed edges between nodes according to the preset initial speech search order, and construct a speech directed graph;
[0020] Get the tag priority list;
[0021] When traversing the directed graph of speech, the speech corresponding to the speech tag with high priority in the tag priority list is traversed first;
[0022] After traversing the directed graph of speech, all activated speech contents are output in the traversal order to obtain a speech priority list.
[0023] In an optional implementation, the emotional state assessment is performed according to the user input content, and when it is detected that the user is in a negative mood, a soothing speech is output and the conversation is ended, including:
[0024] Inputting the user input content into a pre-trained sentiment analysis model, and outputting a user sentiment value;
[0025] When the user's emotion value is lower than the preset negative emotion threshold, it indicates that the user has negative emotions, and the current round is recorded;
[0026] When the number of negative emotions exceeds the preset emotional limit, output soothing words and end the conversation;
[0027] The training process of the sentiment analysis model includes:
[0028] Build a sentiment analysis model based on historical user texts, train the model, and determine that the training is complete after detecting that the model's loss function meets the conditions, and obtain the trained model;
[0029] The user input content is input into the trained sentiment analysis model to obtain the user emotion value.
[0030] In an optional implementation, the calculating of the convergence degree according to the user input content and ending the conversation when the topic convergence degree is greater than a preset convergence degree threshold value includes:
[0031] Extract key content according to the user input content to obtain user keywords;
[0032] Vectorize the user keywords to obtain a text vector;
[0033] Calculate the similarity of the text vectors of two adjacent rounds to obtain text similarity;
[0034] When the text similarity is greater than a preset topic convergence threshold, it indicates that the topic has converged, and the current round is recorded;
[0035] When the number of consecutive rounds of topic convergence exceeds the preset convergence limit, polite words are output and the conversation ends.
[0036] In an optional implementation, before outputting all activated speech contents according to the speech priority list and ending the conversation after completing the speech output, the method further includes:
[0037] The semantic confidence is calculated by the following formula:
[0038]
[0039] in, is the semantic confidence, Indicates the number of matching nodes, Represents the total number of nodes, represents the number of matching edges, represents the total number of edges, and is the weight coefficient;
[0040] When the sentiment tendency of the user input content and the speech content is consistent, a preset first confidence difference is added to the semantic confidence to obtain an optimized semantic confidence;
[0041] When the optimized semantic confidence is less than a preset confidence threshold, the speech content is converted to an inactivated state.
[0042] In an optional implementation, when the sentiment orientation of the user input content and the speech content is consistent, before adding a preset first confidence difference to the semantic confidence to obtain an optimized semantic confidence, the method further includes:
[0043] Inputting the user input content into a pre-trained sentiment analysis model, and outputting a user sentiment value;
[0044] Input the speech content into a pre-trained sentiment analysis model, and output a human-machine sentiment value;
[0045] When the emotion difference between the user emotion value and the human-machine emotion value is less than a preset emotion threshold, it indicates that the emotion tendencies are consistent.
[0046] In a second aspect, the present invention provides an algorithmic AI customer service dialogue management system based on big data, comprising:
[0047] Data acquisition module, used to obtain user input content and speech graph;
[0048] A speech retrieval module, used to perform keyword retrieval based on the user input content and the speech graph, obtain speech tags and activate corresponding speech content;
[0049] A speech list module is used to construct a speech directed graph according to the speech label and the speech graph, and perform greedy optimization to obtain a speech priority list;
[0050] A speech output module, used to output all activated speech contents according to the speech priority list, and end the conversation after completing the speech output;
[0051] An emotional soothing module is used to evaluate the emotional state of the user based on the user input content, and when it is detected that the user is in a negative mood, output soothing words and end the conversation;
[0052] The topic convergence module is used to calculate the convergence degree according to the user input content, and end the conversation when the topic convergence degree is greater than a preset convergence degree threshold.
[0053] In a third aspect, the present invention also provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements any one of the above-mentioned big data-based algorithmic AI customer service dialogue management methods.
[0054] In a fourth aspect, the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned big data-based algorithmic AI customer service dialogue management methods.
[0055] Compared with the prior art, the present invention has the following beneficial effects: the present invention discloses an algorithmic AI customer service dialogue management method and system based on big data, the method comprising obtaining user input content and speech graph; performing keyword retrieval according to the user input content and the speech graph, obtaining speech tags and activating corresponding speech content; constructing a speech directed graph according to the speech tags and the speech graph, and performing greedy optimization to obtain a speech priority list; outputting all activated speech contents according to the speech priority list, and ending the dialogue after completing the speech output; performing emotional state evaluation according to the user input content, and outputting soothing speech and ending the dialogue when it is detected that the user is in a negative mood; performing convergence calculation according to the user input content, and ending the dialogue when the topic convergence is greater than a preset convergence threshold. The present method has the following effects: the present method can optimize the efficiency of customer service dialogue.
[0056] Specifically, this method introduces a mechanism for intelligently determining when to end a conversation with a user. The mechanism first extracts key content from the user input to identify keywords that can represent the user's intention and the direction of the topic. By converting these keywords into text vectors, unstructured text information can be converted into a mathematically processable form. Subsequently, by calculating the similarity of the text vectors in two adjacent rounds of conversation, the degree of change in the topic in the conversation can be quantitatively evaluated.
[0057] When the text similarity of multiple consecutive rounds of conversations exceeds the preset topic convergence threshold, it means that the content of the conversation tends to be repetitive or no new information is generated. At this time, the system will record the current round. If this high similarity state continues to appear and exceeds the preset convergence upper limit, it means that the conversation has reached a stable state and lacks further in-depth communication. At this time, the system will take measures to output polite words to end the conversation gracefully, avoiding meaningless extension of the conversation. It helps to improve the efficiency of the AI customer service system and ensure that users have a better experience because the conversation will neither end prematurely nor be overly extended.
[0058] Furthermore, this method introduces an emotional state assessment mechanism to enhance the customer service experience. Specifically, this method quantifies the user's current emotional state by passing the user input content to a pre-trained sentiment analysis model, and outputs an emotional value that reflects the degree of positive or negative emotions of the user. This process relies on advanced natural language processing technology and deep learning models, which are trained on large-scale annotated datasets to accurately capture and understand the emotional information in the text.
[0059] When it is detected that the user's emotion value is lower than the set negative emotion threshold, it indicates that the user is in a state of dissatisfaction, frustration or other negative emotions, and the system will record the rounds in which this occurs. If the number of consecutive negative emotions exceeds the preset emotion upper limit, it is considered that the user's emotions have reached a level that requires special attention. At this time, the system will take measures to first output soothing words to try to ease the user's emotions, and then end the conversation to avoid further aggravating the user's negative emotions or causing more complicated situations. This emotion recognition and response mechanism not only helps to promptly discover and deal with users' emotional needs, but also effectively prevents the escalation of problems caused by the accumulation of negative emotions. By terminating conversations that cause more problems in advance and providing appropriate comfort, user satisfaction can be improved.
[0060] The present invention also introduces a greedy optimization algorithm to construct a directed graph of speech and generate a speech priority list. Specifically, each speech is used as a node, and directed edges between nodes are established according to a preset initial search order to form a structured dialogue flow network. Then, when traversing this graph, priority is given to those speech paths that are given high priority, so that important and urgent issues can be responded to in a timely manner. In addition, the system will also calculate the semantic confidence to evaluate the degree of fit between the user input and the speech that the system is ready to respond to; when the semantic confidence is lower than a certain threshold, the relevant speech will not be selected as the final answer, thereby avoiding low-quality communication due to misunderstanding of user intentions. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a flowchart of an algorithmic AI customer service dialogue management method based on big data provided by the first embodiment of the present invention;
[0062] Figure 2 It is a structural diagram of an algorithmic AI customer service dialogue management system based on big data provided by the second embodiment of the present invention. DETAILED DESCRIPTION
[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] In today's digital age, with the booming development of industries such as e-commerce and online services, the customer service system, as an important bridge for communication between enterprises and users, has a direct impact on the quality of user experience through its efficiency and quality. Traditional customer service methods rely on manual agents, which have slow response speeds and unstable service quality. In order to solve these problems, the AI customer service dialogue management method based on big data algorithms has emerged. This method uses advanced technologies such as natural language processing (NLP) and machine learning to automatically understand the user's query intent and provide accurate services or answers based on preset speech graphs, thereby achieving efficient customer service automation.
[0065] One existing technology uses a traditional AI customer service system based on rules or template matching. This type of system responds to user queries by presetting a series of questions and answers or a fixed flow of words. Specifically, when receiving user input, the system first parses the text content, looks for question patterns similar to those in the built-in knowledge base, and then selects the most matching answer to respond. In addition, some systems have begun to introduce simple machine learning models to improve intent recognition and increase the accuracy of answers.
[0066] Although the above traditional AI customer service systems have improved service efficiency to a certain extent, they also have obvious limitations. Since they mainly rely on fixed rule sets or templates, the system has poor adaptability and flexibility for new questions or special situations beyond the preset scope, which can easily lead to users not getting satisfactory answers, resulting in inefficient conversations between users and customer service.
[0067] To solve the above problems, refer to Figure 1 The first embodiment of the present invention provides an algorithmic AI customer service dialogue management method based on big data, comprising the following steps:
[0068] S11, obtaining user input content and speech graph;
[0069] S12, performing keyword search based on the user input content and the speech graph, obtaining speech tags and activating corresponding speech content;
[0070] S13, constructing a speech directed graph according to the speech label and the speech graph, and performing greedy optimization to obtain a speech priority list;
[0071] S14, outputting all activated speech contents according to the speech priority list, and ending the conversation after the speech output is completed;
[0072] S15, evaluating the emotional state of the user according to the user input content, and when it is detected that the user is in a negative mood, outputting soothing words and ending the conversation;
[0073] S16, calculating the convergence degree according to the user input content, and ending the conversation when the topic convergence degree is greater than a preset convergence degree threshold.
[0074] In step S11, the user input content and speech graph are obtained.
[0075] In one implementation, user input refers to information sent by the user to the AI customer service system through a chat interface, voice interaction, or other forms. This information can be in text format (for example, questions typed in a chat box) or in non-text format (such as voice input, which is then converted into text). The AI system needs to parse these inputs, understand the user's intent, and prepare for the next response.
[0076] It is worth noting that the conversation graph is a structured knowledge base that contains a large number of predefined conversation patterns, question-answer pairs, and conversation strategies for handling specific situations. This graph is organized in a graph structure, where nodes represent different conversation states or topics, and edges represent the transition path from one state to another, that is, the candidate conversation flow. The conversation graph is stored in a graph database.
[0077] In step S12, a keyword search is performed based on the user input content and the speech graph to obtain speech tags and activate corresponding speech content.
[0078] In one implementation, keyword extraction is performed on the user input content to obtain user keywords; the user keywords are compared and matched in the speech graph to find speech tags corresponding to the user keywords; when the corresponding speech tags are found, the speech tags are recorded and the corresponding speech content is activated; when no directly corresponding speech tags are found, semantic recognition is performed on the user input content to obtain the speech tags with the closest semantics, and the corresponding speech content is activated.
[0079] It is worth noting that the extracted user keywords are then compared and matched with the keyword library in the pre-stored speech graph. For example, if a user asks "How do I change my password?", the system will extract "change" and "password" as keywords, and find related tags in the speech graph, such as "Account Security-Change Password". If no directly corresponding keywords are found, the system will further use natural language processing (NLP) technology to perform semantic analysis. The so-called "activating the corresponding speech content" means that once the appropriate speech tag is determined, the system will prepare a response according to the content indicated by the tag. Specifically, the status of the corresponding speech tag is changed to the activated state. In the subsequent output, all speech contents in the activated state will be output.
[0080] In step S13, a speech directed graph is constructed based on the speech tags and the speech graph, and greedy optimization is performed to obtain a speech priority list.
[0081] In one implementation, each speech is used as a node, directed edges between nodes are established according to a preset initial speech search order, and a speech directed graph is constructed; a label priority list is obtained; when traversing the speech directed graph, the speech corresponding to the speech label with a high priority in the label priority list is traversed first; after traversing the speech directed graph, all activated speech contents are output in the traversal order to obtain a speech priority list.
[0082] It is worth noting that each node represents a specific speech or dialogue state. For example, "Account Security-Change Password", "Order Inquiry-Logistics Information", etc. A directed edge represents the conversion relationship from one speech to another, that is, the estimated development path of the dialogue. For example, from "Order Inquiry-Logistics Information", you can turn to "Order Inquiry-Estimated Delivery Time". According to the preset initial search order, directed edges are established between different speech. This order is based on historical data. Most users will ask about the estimated delivery time immediately after asking about logistics information, so there will be a directed edge between these two speech.
[0083] It is worth mentioning that the system maintains a tag priority list, which defines the importance and urgency of different types of conversations. For example, conversations involving sensitive topics such as payment issues and account security will be given a higher priority; while some non-critical issues such as product recommendations will be ranked behind.
[0084] It is worth noting that when traversing the directed graph of words, the system will first select words marked as high priority for processing. This means that when a user enters certain keywords, the system will prioritize those topics that are considered most important or need an immediate response. For example, if a user mentions "unable to log in", the system will quickly locate high-priority words related to this, such as "Account security-forgot password".
[0085] It is worth noting that the greedy algorithm selects the current optimal selection point each time, and gradually builds an optimal path from the starting node to the target node. For example, when solving the user's problem of "unable to place an order", the system will first check whether there is insufficient inventory, then check whether the payment gateway is working properly, and finally confirm the user's network connection status - this order is arranged according to the common reasons that appear in big data, with the aim of solving the problem as soon as possible. For example, suppose the user says: "I want to know when my package will be delivered." The system will activate the following script sequence: "Confirm the order number -> Check the logistics status -> Provide an estimated delivery time". This is the final script priority list.
[0086] In step S14, all activated speech contents are output according to the speech priority list, and the conversation ends after the speech output is completed.
[0087] In one implementation, the semantic confidence is calculated using the following formula:
[0088]
[0089] in, is the semantic confidence, Indicates the number of matching nodes, Represents the total number of nodes, represents the number of matching edges, represents the total number of edges, and is the weight coefficient;
[0090] Inputting the user input content into a pre-trained sentiment analysis model, and outputting a user sentiment value;
[0091] Input the speech content into a pre-trained sentiment analysis model, and output a human-machine sentiment value;
[0092] When the emotional difference between the user's emotional value and the human-machine emotional value is less than a preset emotional threshold, it indicates that the emotional tendencies are consistent;
[0093] When the sentiment tendency of the user input content and the speech content is consistent, a preset first confidence difference is added to the semantic confidence to obtain an optimized semantic confidence;
[0094] When the optimized semantic confidence is less than a preset confidence threshold, the speech content is converted to an inactivated state.
[0095] It is worth noting that semantic confidence is an indicator that measures the degree of semantic similarity between user input and the content of the speech prepared by the system. The number of matching nodes and the total number of nodes respectively represent the number of nodes matched by the user input keywords and the total number of nodes in the entire graph in the constructed speech directed graph. The number of matching edges and the total number of edges respectively represent the number of edges matched by the user input keywords and the total number of edges in the entire graph. The above formula calculates a value between 0 and 1, which reflects the semantic fit between the user input and the speech prepared by the system. The higher the value, the closer the two are.
[0096] It is worth noting that the system feeds the user input content into a pre-trained sentiment analysis model to obtain the sentiment value (user sentiment value) that reflects the user's current emotional state. Similarly, the system also feeds the speech content to be output into the same sentiment analysis model to obtain the human-machine sentiment value that reflects the emotional color of the speech. If the difference between the user sentiment value and the human-machine sentiment value is less than the preset sentiment difference threshold, it is considered that the emotional tendencies of the two are consistent. For example, if the user expresses a positive or neutral emotion, and the answer provided by the system is also positive or neutral, the emotion is considered to be consistent, the confidence is increased, and the optimized semantic confidence is obtained. If after all the above calculations, the optimized semantic confidence is still lower than the preset confidence threshold, the system will mark the speech content as inactive, which means that it will not be selected as the final answer. This is because low confidence means that the system does not fully understand the user's intention, and directly using such an answer will result in a poor user experience.
[0097] In step S15, an emotional state assessment is performed based on the user input content. When it is detected that the user is in a negative mood, soothing words are output and the conversation ends.
[0098] In one embodiment, the user input content is input into a pre-trained sentiment analysis model, and the user emotion value is output; when the user emotion value is lower than a preset negative emotion threshold, it indicates that the user has negative emotions, and the current round is recorded; when the round of negative emotions is greater than a preset emotion upper limit, soothing words are output and the conversation ends; wherein, the training process of the sentiment analysis model includes: constructing a sentiment analysis model based on historical user texts, training the model, determining that the training is completed after detecting that the loss function of the model meets the conditions, and obtaining a trained model; inputting the user input content into the trained sentiment analysis model to obtain the user emotion value.
[0099] In one implementation, the sentiment analysis model uses an LSTM (Long Short-Term Memory Network) model that introduces an attention mechanism, and the sentiment analysis model uses an encoder-decoder architecture. The encoder is responsible for converting the input sentence into a fixed-length context vector, and the decoder generates the final sentiment classification result based on this vector. During the encoding process, the attention layer calculates the importance score of each word for the entire sentence. These scores determine which words should be given more weight. For example, in a sentence, words such as "very angry" will receive higher attention because they directly express strong emotions. Then, by weighted summation, the state of each time step is multiplied by the corresponding attention weight and then summed to obtain a new context representation, and finally an emotion value. The sentiment analysis model uses historical conversation content and historical emotion values as training sets for training.
[0100] In step S16, the convergence degree is calculated based on the user input content, and when the topic convergence degree is greater than a preset convergence degree threshold, the conversation is ended.
[0101] In one implementation, key content is extracted based on the user input content to obtain user keywords; the user keywords are vectorized to obtain text vectors; similarity is calculated between two adjacent rounds of the text vectors to obtain text similarity; when the text similarity is greater than a preset topic convergence threshold, it indicates that the topic has converged, and the current round is recorded; when the number of consecutive rounds of topic convergence is greater than a preset convergence upper limit, polite words are output and the conversation ends.
[0102] In one implementation, the process of vectorizing the user keywords to obtain text vectors uses word embedding technology, which can map words to points in a high-dimensional space so that words with similar semantics are closer in the space.
[0103] In one implementation, cosine similarity is used to calculate similarity, and the formula is as follows:
[0104]
[0105] in, For vector and vector The cosine similarity of For vector and vector The dot product of For vector The module length, For vector The mold length.
[0106] Suppose in a customer service scenario, the user asks different aspects of the same question for several consecutive rounds, but does not actually introduce new information. For example, the user first asks "Where is my order?" and then asks "How is the order now?" The system calculates the text vectors of these two sentences through the above process and finds that the cosine similarity between them is very high. When this happens several times, the system realizes that the conversation has begun to repeat, so it chooses to output a phrase like "We have tried our best to provide you with the latest information. If you have any other questions, please feel free to contact us" and ends the conversation.
[0107] In summary, the present invention discloses an algorithmic AI customer service dialogue management method based on big data, which aims to optimize the efficiency of customer service dialogue in the process of human-computer interaction. The method first involves the acquisition of user input content and speech graph, where user input content refers to various forms of information sent by users to the system, and speech graph is a pre-built knowledge base containing a large number of predefined dialogue modes, question-answer pairs, and dialogue strategies for handling specific situations.
[0108] After receiving user input, the system will perform keyword extraction to identify key information that can represent user intent and topic direction. These keywords are then compared and matched with the keyword library in the speech graph to find the corresponding tags and activate the corresponding speech content. If no match is found directly, semantic recognition technology will be further used to determine the closest speech tag based on semantic similarity.
[0109] It is worth noting that the present invention particularly emphasizes the importance of emotional state assessment. It uses a pre-trained sentiment analysis model to quantify the user's current emotional state and outputs an emotional value that reflects the degree of positive or negative emotions of the user. Once it is detected that the user's emotional value is lower than the set negative emotional threshold, it indicates that the user is in a state of dissatisfaction or frustration. At this time, the system will record the specific rounds in which this situation occurs. If the number of consecutive negative emotions exceeds the preset emotional upper limit, it is considered necessary to take measures to alleviate the user's emotions, such as outputting soothing words and ending the conversation in time to prevent the accumulation of negative emotions from causing more serious problems.
[0110] At the same time, the present invention proposes a method based on convergence calculation to intelligently determine when to end the conversation with the user. By calculating the similarity of the text vectors extracted from two adjacent rounds of conversations, the degree of change of the topic in the conversation can be quantitatively evaluated. When the text similarity of multiple consecutive rounds of conversations exceeds the preset topic convergence threshold, it means that the content of the conversation tends to be repetitive or no new information is generated. At this time, the system will output polite words to end the conversation gracefully. This not only helps to improve the efficiency of the AI customer service system, but also ensures that users have a good experience, because the conversation will neither end prematurely nor be overly extended.
[0111] To sum up, the big data-based algorithm AI customer service dialogue management method proposed in the present invention covers technical innovations in multiple aspects from user input analysis, speech matching, priority sorting to emotion monitoring, to achieve more efficient, intelligent and humane customer service.
[0112] Reference Figure 2 The second embodiment of the present invention provides an algorithmic AI customer service dialogue management system based on big data, including:
[0113] Data acquisition module, used to obtain user input content and speech graph;
[0114] A speech retrieval module, used to perform keyword retrieval based on the user input content and the speech graph, obtain speech tags and activate corresponding speech content;
[0115] A speech list module is used to construct a speech directed graph according to the speech label and the speech graph, and perform greedy optimization to obtain a speech priority list;
[0116] A speech output module, used to output all activated speech contents according to the speech priority list, and end the conversation after completing the speech output;
[0117] An emotional soothing module is used to evaluate the emotional state of the user based on the user input content, and when it is detected that the user is in a negative mood, output soothing words and end the conversation;
[0118] The topic convergence module is used to calculate the convergence degree according to the user input content, and end the conversation when the topic convergence degree is greater than a preset convergence degree threshold.
[0119] Preferably, the data acquisition module is used to:
[0120] Get user input content and speech graph.
[0121] Preferably, the speech retrieval module is used to:
[0122] Perform keyword search based on the user input content and the speech graph, obtain speech tags and activate corresponding speech content, including:
[0123] Extracting keywords from the user input content to obtain user keywords;
[0124] Compare and match the user keywords in the speech graph to find speech tags corresponding to the user keywords;
[0125] When the corresponding speech tag is found, the speech tag is recorded and the corresponding speech content is activated;
[0126] When no directly corresponding speech tag is found, semantic recognition is performed on the user input content to obtain the speech tag with the closest semantics, and the corresponding speech content is activated.
[0127] Preferably, the speech list module is used to:
[0128] A directed graph of speech techniques is constructed according to the speech technique labels and the speech technique graph, and greedy optimization is performed to obtain a speech technique priority list, including:
[0129] Take each speech as a node, establish directed edges between nodes according to the preset initial speech search order, and construct a speech directed graph;
[0130] Get the tag priority list;
[0131] When traversing the directed graph of speech, the speech corresponding to the speech tag with high priority in the tag priority list is traversed first;
[0132] After traversing the directed graph of speech, all activated speech contents are output in the traversal order to obtain a speech priority list.
[0133] Preferably, the speech output module is used to:
[0134] Output all activated speech contents according to the speech priority list, and end the conversation after completing the speech output;
[0135] Inputting the user input content into a pre-trained sentiment analysis model, and outputting a user sentiment value;
[0136] Input the speech content into a pre-trained sentiment analysis model, and output a human-machine sentiment value;
[0137] When the emotion difference between the user emotion value and the human-machine emotion value is less than a preset emotion threshold, it indicates that the emotion tendencies are consistent.
[0138] The semantic confidence is calculated by the following formula:
[0139]
[0140] in, is the semantic confidence, Indicates the number of matching nodes, Represents the total number of nodes, represents the number of matching edges, represents the total number of edges, and is the weight coefficient;
[0141] When the sentiment tendency of the user input content and the speech content is consistent, a preset first confidence difference is added to the semantic confidence to obtain an optimized semantic confidence;
[0142] When the optimized semantic confidence is less than a preset confidence threshold, the speech content is converted to an inactivated state.
[0143] Preferably, the emotion soothing module is used to:
[0144] Evaluate the emotional state of the user based on the user input content, and when it is detected that the user is in a negative mood, output soothing words and end the conversation, including:
[0145] Inputting the user input content into a pre-trained sentiment analysis model, and outputting a user sentiment value;
[0146] When the user's emotion value is lower than the preset negative emotion threshold, it indicates that the user has negative emotions, and the current round is recorded;
[0147] When the number of negative emotions exceeds the preset emotional limit, output soothing words and end the conversation;
[0148] The training process of the sentiment analysis model includes:
[0149] Build a sentiment analysis model based on historical user texts, train the model, and determine that the training is complete after detecting that the model's loss function meets the conditions, and obtain the trained model;
[0150] The user input content is input into the trained sentiment analysis model to obtain the user emotion value.
[0151] Preferably, the topic convergence module is used to:
[0152] Calculating the convergence degree according to the user input content, and ending the conversation when the topic convergence degree is greater than a preset convergence degree threshold, including:
[0153] Extract key content according to the user input content to obtain user keywords;
[0154] Vectorize the user keywords to obtain a text vector;
[0155] Calculate the similarity of the text vectors of two adjacent rounds to obtain text similarity;
[0156] When the text similarity is greater than a preset topic convergence threshold, it indicates that the topic has converged, and the current round is recorded;
[0157] When the number of consecutive rounds of topic convergence exceeds the preset convergence limit, polite words are output and the conversation ends.
[0158] It should be noted that the algorithm AI customer service dialogue management system based on big data provided in an embodiment of the present invention is used to execute all the process steps of the algorithm AI customer service dialogue management method based on big data in the above-mentioned embodiment. The working principles and beneficial effects of the two correspond one to one, so they will not be repeated here.
[0159] The embodiment of the present invention also provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a data acquisition program. When the processor executes the computer program, the steps in the above-mentioned embodiments of the algorithmic AI customer service dialogue management method based on big data are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, such as the data acquisition module.
[0160] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.
[0161] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0162] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.
[0163] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0164] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0165] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0166] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for managing customer service dialogues using an algorithm based on big data, characterized in that: include: Get user input content and speech graph; Perform keyword search based on the user input content and the speech graph to obtain speech tags and activate corresponding speech content; A directed graph of speech techniques is constructed according to the speech technique labels and the speech technique graph, and greedy optimization is performed to obtain a speech technique priority list; Output all activated speech contents according to the speech priority list, and end the conversation after completing the speech output; Evaluate the emotional state of the user based on the user input content, and when it is detected that the user is in a negative mood, output soothing words and end the conversation; Calculating the convergence degree according to the user input content, and ending the conversation when the topic convergence degree is greater than a preset convergence degree threshold; The method of constructing a speech directed graph according to the speech tags and the speech graph, and performing greedy optimization to obtain a speech priority list includes: Take each speech as a node, establish directed edges between nodes according to the preset initial speech search order, and construct a speech directed graph; Get the tag priority list; When traversing the directed graph of speech, the speech corresponding to the speech tag with high priority in the tag priority list is traversed first; After traversing the directed graph of speech, all activated speech contents are output in the traversal order to obtain a speech priority list; Wherein, before outputting all activated speech contents according to the speech priority list and ending the conversation after completing the speech output, it also includes: The semantic confidence is calculated by the following formula: in, is the semantic confidence, Indicates the number of matching nodes, Represents the total number of nodes, represents the number of matching edges, represents the total number of edges, and is the weight coefficient; When the sentiment tendency of the user input content and the speech content is consistent, a preset first confidence difference is added to the semantic confidence to obtain an optimized semantic confidence; When the optimized semantic confidence is less than a preset confidence threshold, the speech content is converted to an inactivated state.
2. The method for managing customer service dialogue using an algorithm based on big data according to claim 1, characterized in that: The keyword search is performed according to the user input content and the speech graph to obtain speech tags and activate corresponding speech content, including: Extracting keywords from the user input content to obtain user keywords; Compare and match the user keywords in the speech graph to find speech tags corresponding to the user keywords; When the corresponding speech tag is found, the speech tag is recorded and the corresponding speech content is activated; When no directly corresponding speech tag is found, semantic recognition is performed on the user input content to obtain the speech tag with the closest semantics, and the corresponding speech content is activated.
3. The algorithmic AI customer service dialogue management method based on big data according to claim 1 is characterized in that: The step of evaluating the emotional state according to the user input content and outputting soothing words and ending the conversation when it is detected that the user is in a negative mood includes: Inputting the user input content into a pre-trained sentiment analysis model, and outputting a user sentiment value; When the user's emotion value is lower than the preset negative emotion threshold, it indicates that the user has negative emotions, and the current round is recorded; When the number of negative emotions exceeds the preset emotional limit, output soothing words and end the conversation; The training process of the sentiment analysis model includes: Build a sentiment analysis model based on historical user texts, train the model, and determine that the training is complete after detecting that the model's loss function meets the conditions, and obtain the trained model; The user input content is input into the trained sentiment analysis model to obtain the user emotion value.
4. The method for managing customer service dialogues using an algorithm based on big data according to claim 1, characterized in that: The step of calculating the convergence degree according to the user input content and ending the conversation when the topic convergence degree is greater than a preset convergence degree threshold value includes: Extract key content according to the user input content to obtain user keywords; Vectorize the user keywords to obtain a text vector; Calculate the similarity of the text vectors of two adjacent rounds to obtain text similarity; When the text similarity is greater than a preset topic convergence threshold, it indicates that the topic has converged, and the current round is recorded; When the number of consecutive rounds of topic convergence exceeds the preset convergence limit, polite words are output and the conversation ends.
5. The algorithmic AI customer service dialogue management method based on big data according to claim 1 is characterized in that: When the sentiment tendency of the user input content and the speech content is consistent, before adding a preset first confidence difference value to the semantic confidence to obtain an optimized semantic confidence, the method further includes: Inputting the user input content into a pre-trained sentiment analysis model, and outputting a user sentiment value; Input the speech content into a pre-trained sentiment analysis model, and output a human-machine sentiment value; When the emotion difference between the user emotion value and the human-machine emotion value is less than a preset emotion threshold, it indicates that the emotion tendencies are consistent.
6. An algorithmic AI customer service dialogue management system based on big data, characterized in that: The method for managing an algorithmic AI customer service dialogue based on big data as claimed in any one of claims 1 to 5 comprises: Data acquisition module, used to obtain user input content and speech graph; A speech retrieval module, used to perform keyword retrieval based on the user input content and the speech graph, obtain speech tags and activate corresponding speech content; A speech list module is used to construct a speech directed graph according to the speech label and the speech graph, and perform greedy optimization to obtain a speech priority list; A speech output module, used to output all activated speech contents according to the speech priority list, and end the conversation after completing the speech output; An emotional soothing module is used to evaluate the emotional state of the user based on the user input content, and when it is detected that the user is in a negative mood, output soothing words and end the conversation; The topic convergence module is used to calculate the convergence degree according to the user input content, and end the conversation when the topic convergence degree is greater than a preset convergence degree threshold.
7. An electronic device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements the algorithmic AI customer service dialogue management method based on big data as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the big data-based algorithmic AI customer service dialogue management method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Response processing method, intelligent equipment and storage medium
CN112559700A
Dialogue guiding method and device based on atlas, equipment and medium
CN114218375A
Intelligent return visit method and device for fraud-related number verification
CN119311923A