Intelligent customer service system based on large language model
By integrating user input module, sentiment analysis module, intelligent reply module and performance detection module in the intelligent customer service system, using large language model and emotional dictionary, the difficulties of intention recognition and sentiment analysis in complex user demand scenarios are solved, and the balance between personalized reply and service quality is achieved.
Patent Information
- Application Number
- CN202510037843.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-06
AI Technical Summary
It is difficult for the prior art to achieve accurate and personalized intention recognition and emotional analysis in complex and changing user demand scenarios, especially in the case of large emotional fluctuations or fuzzy user needs, how to effectively switch between manual and intelligent customer service to ensure the balance of service quality and response speed.
An intelligent customer service system based on a large language model, including user input module, sentiment analysis module, intelligent reply module and performance detection module. Through natural language processing, user needs are analyzed, emotional dictionary recognizes user emotions, combines large language models to generate personalized replies, and ensures stable operation of the system through performance monitoring.
It realizes more accurate intention recognition and personalized responses in complex user demand scenarios, timely identify emotional fluctuations and switch between manual customer service, ensures the balance of service quality and response speed, and improves user experience and system stability.
Smart Images

Figure CN119938850A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and more specifically to an intelligent customer service system based on a large language model. Background Art
[0002] The large language model can understand and generate natural language through deep learning algorithms, allowing machines to have more fluent and accurate conversations with users. Using this technology, the intelligent customer service system can handle a large number of user inquiries and questions without human intervention, which can not only significantly improve service efficiency, but also provide personalized answers when dealing with complex problems and improve user experience. The traditional customer service model often relies on manual customer service. Although it can provide high-quality services, it is prone to response delays or service quality fluctuations during peak periods or when facing a large number of repetitive problems. The introduction of the large language model effectively solves this problem. It can automatically identify user intent, understand context, generate logical responses, and even imitate human conversation style to a certain extent, reducing the cost of customer service while improving response speed and accuracy.
[0003] A Chinese patent application with publication number CN117235213A discloses an interactive customer service method and system, the method comprising: receiving a conversation submitted by a user; sending the received conversation to a large language model, and receiving keywords extracted and filtered for the conversation fed back by the large language model; searching according to the keywords fed back by the large language model to obtain search results; generating humanized prompt words for the conversation based on the search results; sending the humanized prompt words to the large language model, receiving personalized replies fed back by the large language model for the conversation and the humanized prompt words, and feeding back the personalized replies generated for the conversation to the user.
[0004] Although the existing technology combines the robot customer service system with a large language model to provide a more intelligent and humanized customer service experience, improve customer service efficiency, and increase customer satisfaction, it still fails to solve the problem of how to achieve more accurate and personalized intent recognition and sentiment analysis in complex and changeable user demand scenarios, especially in the case of large emotional fluctuations or vague user needs, how to effectively switch between manual and intelligent customer service to ensure the balance between service quality and response speed. Therefore, in order to overcome these limitations, the present invention proposes an intelligent customer service system based on a large language model. Summary of the invention
[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to provide an intelligent customer service system based on a large language model, which solves the problem of how to accurately identify user intentions and provide personalized responses, while automatically triggering manual customer service access in abnormal emotional states. Through intelligent demand identification, sentiment analysis and system performance monitoring, the efficiency and quality of customer service are improved, while the customer experience is optimized to ensure the long-term stable operation of the system.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] Intelligent customer service system based on large language model, including user input module, intelligent reply module, sentiment analysis module and performance detection module;
[0008] The user input module is used to receive user input information, analyze user needs through natural language processing, and use adaptive multi-round information interaction to identify the type of needs and preliminarily classify user needs;
[0009] The sentiment analysis module is used to perform sentiment analysis on the user's input information, identify the user's emotion type, track the user's emotion changes, calculate the emotion fluctuation value, and determine whether to transfer to manual customer service based on the emotion fluctuation value;
[0010] The intelligent reply module is used to retrieve relevant information from the knowledge base based on user input information and user historical data, determine the reply tone type based on sentiment analysis results, and generate natural language replies through a large language model;
[0011] The performance detection module is used to evaluate system load and responsiveness by tracking the response time of system requests in real time, and to generate detection reports by automatically aggregating monitoring data, calculating key performance indicators, and using visualization tools.
[0012] Specifically, the user input module includes a data receiving unit and a demand classification unit;
[0013] The data receiving unit is configured with a semantic parsing strategy, which is used to perform data preprocessing on the input information and convert the input information into structured data;
[0014] An adaptive recognition strategy is configured in the demand classification unit. The adaptive recognition strategy is used to construct a demand type keyword library, calculate the matching degree of the demand type, evaluate the overall matching degree and generate a demand type importance score, and adaptively perform multiple rounds of information interaction to obtain the user's target demand type.
[0015] Specifically, the steps of the adaptive recognition strategy include:
[0016] Define demand types, classify user demands into multiple types, construct a demand type keyword library, and configure a set of keywords for each demand type;
[0017] In the structured data input by the user, the vocabulary unit is matched with the keyword library of the demand type, and the matching degree between the vocabulary unit and each keyword of the demand type is calculated, that is:
[0018] sim(ω i ,T j )=α×Φ(ω i ,T j )+β×Ψ(ω i ,T j )
[0019]
[0020] Ψ(ω i ,T j )=Similarity(V(ω i ),V(T j ))
[0021] Among them, sim(ω i ,T j ) is the i-th vocabulary unit ω i and the jth demand type T j The matching degree, Φ(ω i ,T j ) is the i-th vocabulary unit ω i and the jth demand type T j The overlap degree, Ψ(ω i ,T j ) is the i-th vocabulary unit ω i and the jth demand type T j The semantic similarity of Tokens(ω i ) is used to represent the i-th vocabulary unit ω i The word segmentation result, Tokens(T j ) is used to represent the jth requirement type T j The word segmentation result, Similarity(·) is the semantic similarity function, V(ω i ) is the i-th vocabulary unit ω i The vector representation of V(T j ) is the jth demand type T j The vector representation of , α and β are the weighted coefficients of overlap and semantic similarity between vocabulary units and demand types, ∩ represents set intersection operation, and ∪ represents set union operation;
[0022] After matching all vocabulary units with the keywords of the demand type, the overall matching degree of each demand type is calculated. For a given demand type, its overall matching degree is obtained by summing up the matching degrees of all vocabulary units, that is:
[0023]
[0024] Among them, sim(T j ) is the requirement type T j The overall matching degree of , N is the number of vocabulary units in the user input text data, sim(ω i ,T j ) is the i-th vocabulary unit ω i With the jth demand type T j degree of matching.
[0025] Specifically, the steps of the adaptive recognition strategy also include:
[0026] The demand type with the largest overall matching degree is obtained as the target demand type, and the importance score of the target demand type is generated by comparing the matching degree differences of different demand types according to the matching degree of the demand type, that is:
[0027]
[0028] Among them, Score(T max ) is the target demand type T max The importance score of sim(T max ) is the target demand type T max The overall matching degree of sim max and sim min are the maximum and minimum values of the overall matching degree of all demand types respectively;
[0029] Configure the requirement classification threshold. If the importance score of the target requirement type is lower than the requirement classification threshold, information interaction is automatically started. Further input text information is obtained through inquiry and requirement type matching is performed again. Otherwise, the target requirement type is output.
[0030] Specifically, the sentiment analysis module includes an emotion recognition unit and an anomaly monitoring unit;
[0031] The emotion recognition unit is configured with an emotion classification strategy, which is used to identify the emotion type of the structured data of the user input information, and obtain the dominant emotion type through the emotion dictionary and the emotion scores of the historical emotion types;
[0032] The abnormal monitoring unit is equipped with an emotion fluctuation strategy, which is used to monitor abnormal changes in the emotional fluctuations in the user's input information, and determine whether to automatically transfer to manual customer service based on the emotion fluctuation value and emotion polarity.
[0033] Specifically, the steps of the sentiment classification strategy include:
[0034] Collect sentiment words to construct sentiment dictionaries, and label each sentiment word with sentiment polarity, sentiment type, and sentiment intensity;
[0035] Perform sentiment type matching on the vocabulary units in the structured data of the user's input information, search for sentiment words and synonymous expansion words matching each vocabulary unit in the sentiment dictionary, and construct a matching vocabulary set for each vocabulary unit;
[0036] The frequency of each emotion type in the matching vocabulary is counted, and the emotion score of each emotion type is calculated based on the emotion intensity, that is:
[0037]
[0038] Among them, S(C τ ) is the τth emotion type C τ The sentiment score, N p is the number of sentiment words in the matching vocabulary set, It is an emotional word Type of emotion, It is an emotional word The emotional intensity, is the indicator function, when the sentiment word The emotion type is C τ hour, Take 1, otherwise take 0, γ 1 and γ 2 is a non-negative weight coefficient.
[0039] Specifically, the steps of the sentiment classification strategy also include:
[0040] Configure the association threshold T g If the number of times the user inputs information is greater than or equal to the associated threshold, then the previous T g The sentiment score of the information input by the user; if the number of times the user inputs information is less than the associated threshold, the sentiment scores of all the user input information are obtained;
[0041] Combined with the historical sentiment scores, the comprehensive score of each sentiment type is calculated to determine the dominant sentiment type of the user input information. The calculation method of the comprehensive score of the sentiment type is as follows:
[0042]
[0043] Among them, S * (C τ ) is the τth emotion type C τ The comprehensive score of S(C τ ) is the emotion type C of the current user input information τ The sentiment score, S q (C τ ) is the sentiment type C of the previous q user input information τ The sentiment score of q ranges from [0,T g ] is an integer, η is the weight coefficient of the current input, λ q is the weighting coefficient of historical input;
[0044] According to the comprehensive scores of the emotion types, the emotion type with the maximum score is selected as the dominant emotion type.
[0045] Specifically, the steps of the mood swing strategy include:
[0046] When it is recognized that the user's input information is not unique, the user's emotion fluctuation detection is performed;
[0047] When receiving the user's input information, determining whether the dominant emotion type of the user's input information changes;
[0048] If the dominant emotion type changes, determine whether the current emotion polarity is negative. If the emotion polarity is negative, automatically transfer to manual customer service; if the emotion polarity is not negative, obtain the comprehensive score of the dominant emotion type and calculate the emotion fluctuation value;
[0049] If the dominant emotion type does not change, the emotional fluctuation value of the comprehensive score of the dominant emotion type is calculated;
[0050] Configure the abnormal fluctuation threshold. When the emotional fluctuation value is less than the abnormal fluctuation threshold, the call is automatically transferred to the manual customer service. Otherwise, the emotional polarity of the dominant emotional type is obtained.
[0051] Configure the abnormal duration threshold. If the emotional polarity of the dominant emotional type is negative, obtain the duration of the dominant emotional type. If the duration of the dominant emotional type is greater than the abnormal duration threshold, automatically transfer to manual customer service, otherwise continue with intelligent customer service.
[0052] Specifically, the intelligent reply module includes an element aggregation unit and an information reply unit;
[0053] The element aggregation unit is configured with an information aggregation strategy, which is used to match the knowledge base module with the user's target demand type, extract relevant items, and optimize to generate an element set;
[0054] The message reply unit is configured with a tone adjustment strategy, which is used to limit the tone type of the message reply according to the emotional type of the user's input information, and to generate a natural language reply that conforms to the context and tone type by combining a set of elements and using a large language generation model.
[0055] Specifically, the specific steps of the information aggregation strategy include:
[0056] After receiving the user input, the target demand type of the user input information is obtained, and according to the target demand type, relevant items are extracted from the knowledge base module, metadata is marked for each relevant item, and a preliminary element set is constructed;
[0057] Perform data processing on the preliminary element set, detect and remove duplicate related entries through text similarity algorithm, sort the related entries according to their release time, and remove outdated related entries by setting the validity period threshold;
[0058] According to the structured data of the user input information, the relevant items of the preliminary element set after data processing are optimized, and the relevance scores of the relevant items are calculated. The calculation method of the relevance scores is as follows:
[0059] Y(Ω m )=-μ 1 ×T Ωm +μ 2 ×R Ωm +μ 3 ×L Ωm
[0060] Among them, Y(Ω m ) is the relevant entry Ω m The correlation score, T Ωm Is the relevant entry Ω m The difference between the release time and the current time, R Ωm Is the relevant entry Ω m The correlation score with the user's target demand type, L Ωm Under the same target requirement type, related items Ω m The number of matches, μ 1 , μ 2 and μ 3 are non-negative weights;
[0061] A relevance threshold is configured. If the relevance score of a related item is less than the relevance threshold, the related item is removed from the preliminary element set to form an element set, and the related items of the element set are sorted according to the calculated relevance score.
[0062] Beneficial effects of the present invention:
[0063] 1. Through the demand classification and sentiment analysis of the user input module, it can quickly identify the demand type after receiving the user request and provide targeted feedback. Through the adaptive multi-round information interaction mechanism, it can understand the user's intention more accurately, avoid the deviation of manual customer service in understanding the demand, and improve the response efficiency.
[0064] 2. The sentiment analysis module can adjust the tone and response method of the service content according to the user's emotional state, making the customer experience more personalized and considerate. Especially when dealing with negative emotions or complex problems, it can automatically identify emotional fluctuations and promptly guide users to manual customer service, thus avoiding unnecessary friction caused by intense user emotions.
[0065] 3. The performance detection module provides a guarantee for the long-term healthy operation of the system. By real-time monitoring of key performance indicators such as system load and response time, it automatically generates detection reports, identifies bottlenecks in a timely manner, and avoids service interruptions caused by excessive system load. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 It is a structural diagram of the intelligent customer service system based on a large language model of the present invention;
[0067] Figure 2 A flowchart of the specific steps of the adaptive recognition strategy of the present invention;
[0068] Figure 3 A schematic diagram of the specific steps of the sentiment classification strategy of the present invention;
[0069] Figure 4 A flowchart of the specific steps of the mood swing strategy of the present invention;
[0070] Figure 5 The figure is a flow chart of the specific steps of the information aggregation strategy of the present invention. DETAILED DESCRIPTION
[0071] See also Figure 1 ,This embodiment introduces an intelligent customer service system based on a large language model, including a user input module, a sentiment analysis module, an intelligent reply module, and a performance detection module;
[0072] The user input module is used to receive user input information, analyze user needs through natural language processing, and use adaptive multi-round information interaction to identify the type of needs and preliminarily classify user needs;
[0073] In this embodiment, the user can ask questions or ask needs to the intelligent customer service system through a variety of methods such as text boxes and voice input. After receiving the user's input information, language processing is performed to determine the form of the user's input, identify different input methods such as text and voice and convert them into text data formats to ensure the correctness of subsequent processing, format the text data, including removing redundant spaces, unifying punctuation marks, converting character encodings, etc., to ensure that the text data meets the processing standards; denoising the text data to remove irrelevant information, such as spelling errors, redundant words, and noise text, to improve the accuracy of intent recognition. The formatted text data is segmented to extract words or phrases, and part-of-speech tagging is performed at the same time to identify grammatical elements such as nouns, verbs, and adjectives, providing a basis for subsequent analysis. The user's needs are analyzed through a natural language processing model, and semantic understanding is performed based on the trained intent recognition model, and the user's input needs are classified into different intent types, including inquiries, complaints, suggestions, and operation requests. According to the user's historical interaction records and current input, the intent is recognized in combination with context information, and a multi-round interaction mechanism is supported to provide a more accurate response. For example, if a user asks "I want to know the weather today", understand and maintain the continuity of the conversation based on the user's follow-up questions such as "Will it rain tomorrow?"
[0074] Preferably, the user input module includes a data receiving unit and a demand classification unit, wherein the data receiving unit is provided with a semantic parsing strategy, and the semantic parsing strategy is used to perform data preprocessing on the input information and convert the input information into structured data; the data preprocessing includes input type recognition, text formatting, text denoising, text segmentation and part-of-speech tagging;
[0075] An adaptive recognition strategy is configured in the demand classification unit. The adaptive recognition strategy is used to construct a demand type keyword library, calculate the matching degree of the demand type, evaluate the overall matching degree and generate a demand type importance score, and adaptively perform multiple rounds of information interaction to obtain the user's target demand type.
[0076] Preferably, the specific steps of the semantic parsing strategy include:
[0077] Receive user input information, determine the user input form, if the input form is not text input, convert the user input information into input text data, if the output form is text input, record the input information as input text data;
[0078] Format the input text data, use regular expressions and character processing libraries to uniformly process special characters in the input text data, including punctuation marks, line breaks, and spaces;
[0079] Perform text denoising on input text data, identify and correct spelling errors through spell checking and automatic error correction algorithms, and identify and remove irrelevant redundant words in input text data, including stop words and meaningless filler words;
[0080] Perform text segmentation on the input text data after text formatting and text denoising, break the input text data into separate vocabulary units, and perform part-of-speech tagging;
[0081] Based on the results of text segmentation and part-of-speech tagging, syntactic analysis is performed to construct the dependency relationship between words in the input text data. By analyzing the grammatical connection between words, a tree structure or graph structure is formed to convert the input text data into structured data.
[0082] See also Figure 2 , preferably, the specific steps of the adaptive recognition strategy include:
[0083] Define demand types, divide user demands into multiple types, including queries, operation instructions, and request suggestions, construct a demand type keyword library, and configure a set of keywords for each demand type; by building a demand type keyword library, collect corresponding keywords and common phrases for each demand type. Keywords include words, phrases, or sentences. Each demand type includes a large number of positive keywords and their variants to provide a reference for subsequent matching.
[0084] In the structured data input by the user, the vocabulary unit is matched with the keyword library of the demand type, and the matching degree between the vocabulary unit and each keyword of the demand type is calculated, that is:
[0085] sim(ω i ,T j )=α×Φ(ω i ,T j )+β×Ψ(ω i ,T j )
[0086]
[0087] Ψ(ω i ,T j )=Similarity(V(ω i ),V(T j ))
[0088] Among them, sim(ω i ,T j ) is the i-th vocabulary unit ω i and the jth demand type T j The matching degree, Φ(ω i ,T j) is the i-th vocabulary unit ω i and the jth demand type T j The overlap degree is used to measure the matching degree between the vocabulary unit and the demand type keyword, Ψ(ω i ,T j ) is the i-th vocabulary unit ω i and the jth demand type T j The semantic similarity is used to measure the semantic similarity between vocabulary units and demand type keywords. Tokens(ω i ) is used to represent the i-th vocabulary unit ω i The word segmentation result, Tokens(T j ) is used to represent the jth requirement type T j The word segmentation result, Similarity(·) is the semantic similarity function, calculated by the edit distance, V(ω i ) is the i-th vocabulary unit ω i The vector representation of V(T j ) is the jth demand type T j is a vector representation of , α and β are the weighted coefficients of the overlap and semantic similarity between the vocabulary unit and the demand type, ∩ represents the set intersection operation, and ∪ represents the set union operation. Through the calculation of overlap and semantic similarity, the matching degree between each vocabulary unit and different demand types can be carefully evaluated, thus providing a basis for subsequent demand classification.
[0089] After matching all vocabulary units with the keywords of the demand type, the overall matching degree of each demand type can be calculated. For a given demand type, its overall matching degree is obtained by summing up the matching degrees of all vocabulary units, that is:
[0090]
[0091] Among them, sim(T j ) is the requirement type T j The overall matching degree of , N is the number of vocabulary units in the user input text data, sim(ω i ,T j ) is the i-th vocabulary unit ω i With the jth demand type T j The matching degree of each vocabulary unit is accumulated to calculate the overall matching degree of each demand type, so as to sort the priorities of different demand types.
[0092] The demand type with the largest overall matching degree is obtained as the target demand type, and the importance score of the target demand type is generated by comparing the matching degree differences of different demand types according to the matching degree of the demand type, that is:
[0093]
[0094] Among them, Score(T max ) is the target demand type T max The importance score of sim(T max ) is the target demand type T max The overall matching degree of sim max and sim min They are the maximum and minimum values of the overall matching degree of all demand types respectively; by normalizing the matching degrees of different demand types, an importance score is generated so that subsequent responses can be made according to the priority of the demand type.
[0095] Configure the requirement classification threshold. If the importance score of the target requirement type is lower than the requirement classification threshold, information interaction is automatically started. Further input text information is obtained through inquiry, and the requirement type is matched again. Otherwise, the target requirement type is output. By setting the threshold, it is ensured that further interaction with the user can be triggered when the matching degree is low to supplement more information and optimize the accuracy of requirement identification.
[0096] The sentiment analysis module is used to perform sentiment analysis on the user's input information, identify the user's emotion type, track the user's emotion changes, calculate the emotion fluctuation value, and determine whether to transfer to manual customer service based on the emotion fluctuation value;
[0097] In this embodiment, the structured data of the user's input information is obtained from the user input module, and based on the sentiment dictionary, the sentiment words and syntactic patterns in the text are identified, the words in the text are matched and associated with the sentiment polarity, each sentiment word is weighted, and the sentiment intensity is judged in combination with the context. According to the sentiment classification strategy, an emotion type is assigned to each user's input information, including happiness, anger, frustration, etc., and the response of the intelligent customer service is supported by the sentiment dimension. And the user's emotional fluctuation is monitored by real-time calculation of the emotional fluctuation value. After each user input, the current emotional fluctuation value is calculated according to the sentiment analysis result, and the emotional fluctuation value is mapped to a range. The user's emotional change trend is tracked and the fluctuation amplitude of the emotion is calculated. Exemplarily, if the emotion deteriorates sharply in several consecutive inputs, it is identified as an abnormal fluctuation. By accumulating the emotional fluctuation value, the changes in the user's emotions over a period of time are recorded. If the emotional fluctuation exceeds a predetermined threshold, the manual customer service transfer is automatically triggered according to the preset rules. Exemplarily, if the user's emotional fluctuation value is lower than the predetermined threshold and lasts for a period of time, it is judged that the user may have a dissatisfied experience due to emotional problems. At this time, the user is prompted to intervene in the manual customer service to avoid affecting the user experience due to emotional problems. When transferring to manual customer service, the user's emotional data is automatically recorded and the emotional change process is transmitted to the manual customer service so that the manual customer service can make appropriate responses based on the user's emotional state.
[0098] Preferably, the sentiment analysis module includes a sentiment recognition unit and an abnormality monitoring unit. The sentiment recognition unit is configured with a sentiment classification strategy, which is used to identify the sentiment type of the structured data of the user input information, obtain the dominant sentiment type through the sentiment dictionary and the sentiment scores of the historical sentiment types, and provide support for the sentiment dimension for intelligent replies;
[0099] The abnormal monitoring unit is equipped with an emotion fluctuation strategy, which is used to monitor abnormal changes in emotional fluctuations in user input information, and determine whether to automatically transfer to manual customer service based on the emotion fluctuation value and emotion polarity to avoid unsatisfactory experience caused by emotional problems.
[0100] See also Figure 3 ,Preferably, the specific steps of the sentiment classification strategy include:
[0101] Collect emotional words to build an emotional dictionary, and annotate each emotional word with emotional polarity, emotional type, and emotional intensity. Emotional polarity includes positive, neutral, and negative; emotional types include happiness, anger, frustration, and anxiety. Emotional intensity is used to quantify the strength of emotions. Emotional intensity is quantified by scores. For example, 0 to 1 represents weak emotions to strong emotions.
[0102] Perform sentiment type matching on the vocabulary units in the structured data of the user's input information, find the sentiment words and synonymous expansion words that match each vocabulary unit in the sentiment dictionary, and build a matching vocabulary set for each vocabulary unit Among them, M(ω i ) is related to the vocabulary unit ω i The matching sentiment matching vocabulary set, is the sentiment word in the sentiment dictionary D, Syn(ω i ) is the vocabulary unit ω i A set of synonyms for ;
[0103] The frequency of each emotion type in the matching vocabulary is counted, and the emotion score of each emotion type is calculated based on the emotion intensity, that is:
[0104]
[0105] Among them, S(C τ ) is the τth emotion type C τ The sentiment score, N p is the number of sentiment words in the matching vocabulary set, It is an emotional word Type of emotion, It is an emotional word The emotional intensity, is the indicator function, when the sentiment word The emotion type is C τ hour, Take 1, otherwise take 0, γ 1 and γ 2 It is a non-negative weight coefficient, which is used to balance the influence of the frequency of occurrence of sentiment type and the sentiment intensity of sentiment type on the sentiment score. According to the frequency and sentiment intensity of sentiment words, a score is calculated for each sentiment type. This score reflects the importance and sentiment intensity of the category in the input text, which is helpful for subsequent decision-making.
[0106] Configure the association threshold T g If the number of times the user inputs information is greater than or equal to the associated threshold, then the previous T g The sentiment score of the information input by the user is obtained; if the number of times the user inputs information is less than the associated threshold, the sentiment scores of all the user input information are obtained; historical data is introduced to consider the user's past emotional state, making the sentiment analysis more time-continuous and context-related, avoiding excessive reliance on a single input emotion, thereby improving the stability and accuracy of the analysis.
[0107] Combined with the historical sentiment scores, the comprehensive score of each sentiment type is calculated to determine the dominant sentiment type of the user input information. The calculation method of the comprehensive score of the sentiment type is as follows:
[0108]
[0109] Among them, S * (C τ ) is the τth emotion type C τ The comprehensive score of S(C τ ) is the emotion type C of the current user input information τ The sentiment score, S q (C τ ) is the sentiment type C of the previous q user input information τ The sentiment score of q ranges from [0,T g ] is an integer in the input, η is the weight coefficient of the current input, ranging from (0,1), which is used to determine the impact of the current input on the comprehensive score, λ q is the weighting coefficient of historical input, with a value range of (0,1) and decreases as q increases to ensure that the most recent input has a higher weight; combining the current input and historical sentiment scores to calculate the comprehensive score of each sentiment type can not only reflect the current sentiment state, but also incorporate historical information to ensure that the sentiment analysis results are more consistent and accurate.
[0110] According to the comprehensive score of the emotion type, the emotion type with the highest score is selected as the dominant emotion type. By selecting the emotion type with the highest score, the user's current main emotion is accurately identified, helping the system provide more accurate and personalized emotion feedback.
[0111] See also Figure 4 , preferably, the specific steps of the mood swing strategy include:
[0112] When it is recognized that the user's input information is not unique, the user's emotion fluctuation detection is performed;
[0113] When receiving the user's input information, determining whether the dominant emotion type of the user's input information changes;
[0114] If the dominant emotion type changes, determine whether the current emotion polarity is negative. If the emotion polarity is negative, the call is automatically transferred to manual customer service. If the emotion polarity is not negative, obtain the comprehensive score of the dominant emotion type and calculate the emotion fluctuation value. The calculation method of the emotion fluctuation value is as follows:
[0115]
[0116] in, This is the first time that the dominant emotion type is C 2 The dominant emotion type of the ι-1st time is C 1 The emotional fluctuation value, Λ C2 The emotion type is C 2 The emotional polarity, The emotion type is C 1 The emotional polarity of When the sentiment polarity is positive, Γ 1 (·) takes the value of 1, when Sentiment polarity is neutral and When the sentiment polarity is negative, Γ 1 (·) takes the value of 1, when Sentiment polarity is neutral and When the sentiment polarity is positive, Γ 1 (·) takes the value of -1. When the sentiment polarity is neutral, Γ 1 (·) takes the value of 0, This is the first time that the dominant emotion type is C 2 The overall rating of The dominant emotion type is C for the ι-1th time 1 The overall score of
[0117] If the dominant emotion type does not change, calculate the emotional fluctuation value of the comprehensive score of the dominant emotion type, that is:
[0118]
[0119] in, is the emotional fluctuation value of the ιth dominant emotional type C, Λ C is the sentiment polarity of sentiment type C. When the sentiment polarity is positive, Γ 2 (·) takes the value of 1, when the sentiment polarity is negative, Γ 2 (·) takes the value of -1, when the sentiment polarity is neutral, Γ 2 (·) takes the value of 0, is the comprehensive score of the first dominant emotion type C, is the comprehensive score of the ι-1th dominant emotion type C;
[0120] Configure the abnormal fluctuation threshold. When the emotional fluctuation value is less than the abnormal fluctuation threshold, the call is automatically transferred to the manual customer service. Otherwise, the emotional polarity of the dominant emotional type is obtained.
[0121] Configure the abnormal duration threshold. If the emotional polarity of the dominant emotional type is negative, obtain the duration of the dominant emotional type. If the duration of the dominant emotional type is greater than the abnormal duration threshold, automatically transfer to manual customer service, otherwise continue with intelligent customer service.
[0122] The intelligent reply module is used to retrieve relevant information from the knowledge base based on user input information and user historical data, combined with the user's target demand type, and determine the reply tone type based on the sentiment analysis results, and generate natural language replies through a large language model;
[0123] In this embodiment, user input information is received, such as user questions, requests, or any text message. A database or user's personal information storage is accessed to extract the user's historical interaction records, including the user's past questions, conversation history, preference settings, etc. The knowledge base stores a variety of information sources, including FAQs, product documents, service manuals, user feedback data, etc. Knowledge fragments or answers related to the current user input information are retrieved from the knowledge base through natural language processing technology. By analyzing the user input and historical data, the context of the current question can be understood to ensure that the retrieved information is not only related to the question, but also meets the user's historical preferences and contextual requirements. Before generating a reply, the user's input information is sentimentally classified through a sentiment analysis model to identify the user's emotional state, and the appropriate tone type is selected according to the results of the sentiment analysis. For example, if the user shows anger, the reply adopts a more soothing and soothing tone; if the user is in a positive mood, the reply uses a more pleasant and friendly tone. Based on the retrieved information and sentiment analysis results, the large language model is called to generate a natural language reply. During the generation process, the large language model not only considers the question itself, but also combines the user's emotions and tone requirements to generate a reply text that conforms to the context.
[0124] Preferably, the intelligent reply module includes an element aggregation unit and an information reply unit, wherein the element aggregation unit is configured with an information aggregation strategy, which is used to match the knowledge base module with the user's target demand type, extract relevant items, and optimize to generate an element set, so as to provide the most accurate and relevant information as the basis for the reply;
[0125] The message reply unit is configured with a tone adjustment strategy, which is used to limit the tone type of the message reply according to the emotional type of the user's input information, and to generate a natural language reply that conforms to the context and tone type by combining a set of elements and using a large language generation model.
[0126] See also Figure 5 , preferably, the specific steps of the information aggregation strategy include:
[0127] After receiving the user input, the target demand type of the user input information is obtained, and according to the target demand type, relevant items are extracted from the knowledge base module, and metadata is marked for each relevant item to construct a preliminary element set; the knowledge base module includes a FAQ module, a product document module, and a user feedback data module, and the metadata includes the source of information and the release time;
[0128] Perform data processing on the preliminary element set, detect and remove duplicate related entries through text similarity algorithm, sort the related entries according to their release time, and remove outdated related entries by setting the validity period threshold;
[0129] According to the structured data of the user input information, the relevant items of the preliminary element set after data processing are optimized, the relevance scores of the relevant items are calculated, and the relevant items are further sorted. The calculation method of the relevance score is as follows:
[0130] Y(Ω m )=-μ 1 ×T Ωm +μ 2 ×R Ωm +μ 3 ×L Ωm
[0131] Among them, Y(Ω m ) is the relevant entry Ω m The correlation score, T Ωm Is the relevant entry Ω m The difference between the release time and the current time, R Ωm Is the relevant entry Ω m The correlation score with the user's target demand type, L Ωm Under the same target requirement type, related items Ω m The number of matches, μ 1 , μ 2 and μ 3 is a non-negative weight representing the weight of timeliness, relevance, and user preference matching, which determines the importance of each factor in the final score. Ωm Derived by calculating text similarity or semantic matching;
[0132] Configure the relevance threshold. If the relevance score of a related item is less than the relevance threshold, the related item is removed from the preliminary feature set to form a feature set. The related items in the feature set are sorted according to the calculated relevance score. The higher the relevance score, the higher the priority. Items with high relevance scores are ranked first to show the most relevant and timely information to users.
[0133] Preferably, the specific steps of the tone adjustment strategy include:
[0134] Define the corresponding rules between emotion type and tone, and define the corresponding tone type according to different emotion types, namely:
[0135] For users whose emotional polarity is positive, choose a warm, friendly, and encouraging tone. For example, use encouraging and appreciative words, and the tone is more relaxed and pleasant;
[0136] For users whose emotional polarity is neutral, choose to maintain a professional, objective and concise tone to avoid excessive emotional interference;
[0137] For users whose emotional polarity is negative, choose a soothing, understanding, and sympathetic tone, avoid overly blunt or cold responses, and use more considerate and gentle words to demonstrate understanding and care.
[0138] Based on the user input information, determine the dominant emotion type and its emotion polarity, and select the reply tone according to the tone correspondence rules; use a large language model, combined with the entry information of the element set, to generate a natural language reply that complies with the tone correspondence rules.
[0139] The performance detection module is used to evaluate the system load and response capability by tracking the response time of system requests in real time, and to generate detection reports by automatically aggregating monitoring data, calculating key performance indicators, and using visualization tools;
[0140] In this embodiment, the performance detection module is used to accurately calculate the time consumed by request processing by recording the timestamp of user requests. The entire process of each request from reception to completion of processing is recorded, including the request arrival timestamp, response timestamp, response time calculation, and response efficiency evaluation; and according to the evaluation results, a performance detection report is automatically generated and visualized, and data such as response time, system load, concurrency, and customer satisfaction feedback are automatically collected for summary and processing. The summarized data is statistically analyzed to obtain the performance of the system under different time periods and different load conditions, including average response time, maximum response time, request success rate, etc., and data visualization tools are integrated to present performance detection results in the form of charts, line charts, bar charts, etc. The report content includes: System performance overview: including an overview of data such as overall response time, request volume, and processing time. User feedback analysis: summarize user satisfaction data and associate it with performance indicators such as system response time to analyze whether there is a negative correlation between performance and user experience. Abnormal report: Displays the time period and specific circumstances when performance exceeds the standard or the system is abnormal in the past period of time. Performance reports are automatically generated according to the set cycle and sent to relevant personnel via email, system message or other means.
[0141] Preferably, the performance detection module includes a performance evaluation unit and a report generation unit. The performance evaluation unit is configured with an efficiency analysis strategy, which is used to detect the response time of the system in real time, and accurately track the time consumption of the system processing requests through timestamp recording, so as to optimize system performance and user experience;
[0142] The report generation unit is configured with an automatic summary strategy, which is used to automatically generate a test report based on the performance test results through a data visualization tool, providing data support for system optimization and user experience improvement.
[0143] Preferably, the specific steps of the efficiency analysis strategy include:
[0144] Every time a user inputs information request, the arrival timestamp of the request is automatically recorded. When the processing is completed and a reply response is generated, the response timestamp is recorded. The response time of each request is obtained by calculating the difference between the request arrival timestamp and the response timestamp.
[0145] Configure the response threshold. During each request processing, monitor the response time of the request in real time. If the response time exceeds the response threshold, it will be marked as a potential exception.
[0146] Count the number of requests and potential abnormality marks per unit time to calculate the success response rate and evaluate the responsiveness of the system under load;
[0147] Configure the warning threshold. When the success response rate is lower than the warning threshold, an abnormal warning is issued to promptly troubleshoot performance bottlenecks, including server resource allocation, code optimization, or architecture expansion.
[0148] Preferably, the specific steps of the automatic aggregation strategy include:
[0149] Obtain the relevant data of response time, potential abnormality marks, successful response rate, number of requests, abnormality warnings for each request, and store them in structured data storage;
[0150] The data in each time period is classified and sorted, and the units are converted and the response time is standardized. The time periods include hours, days and weeks;
[0151] Calculate key performance indicators, including:
[0152] Average response time: The average response time of the overall responsiveness is obtained by taking a weighted average of the response time of all requests;
[0153] Successful response rate: calculated based on the percentage of requests whose response time is lower than the response threshold;
[0154] Potential abnormality ratio: calculates the proportion of requests that exceed the response threshold;
[0155] Abnormal warning frequency: the warning trigger frequency when the successful response rate is lower than the warning threshold;
[0156] Based on historical data, conduct time series analysis to identify trend changes in data such as response time, number of requests, and abnormal frequency;
[0157] Based on the data analysis results, intuitive inspection reports are generated using visualization tools, including:
[0158] Response time distribution chart: shows the distribution of response times for different requests;
[0159] Success response rate trend chart: shows the changes in the system's success response rate in different time periods;
[0160] Abnormal request marking graph: Marks the number and ratio of potential abnormal requests in different time periods;
[0161] Load and bottleneck detection charts: Identify the bottleneck areas of the system based on indicators such as successful response rate, number of requests, and exception rate;
[0162] Predefined report templates, including charts, data analysis results and text descriptions, automatically fill in the report template content based on the data analysis results and visual charts, and generate a complete test report.
[0163] Working principle and effect:
[0164] The intelligent customer service system based on the large language model includes the following core modules:
[0165] The user input module is responsible for receiving and parsing user input and converting natural language into structured data. Through word segmentation, named entity recognition and syntactic analysis, it identifies the type of user demand, classifies the demand according to the matching degree, and initiates multiple rounds of dialogue to accurately identify the demand. The sentiment analysis module identifies user emotions through sentiment dictionaries, calculates sentiment scores, and monitors sentiment fluctuations. When the sentiment fluctuates violently or negative emotions persist, it triggers manual customer service transfer. The intelligent reply module extracts relevant information from the knowledge base according to the demand classification, optimizes the screening and adjusts the tone of the reply, and combines sentiment analysis to generate natural language replies that better meet user expectations. The performance detection module monitors system performance in real time, generates detection reports and visualizes key indicators to help the operation and maintenance team optimize.
[0166] Adopt an adaptive multi-round dialogue strategy and demand classification mechanism to accurately identify user needs and optimize the quality of responses. Sentiment analysis can timely capture emotional changes, adjust the tone, and improve user experience. If the emotion is too negative, the system can intervene through manual customer service to avoid escalation of conflicts. The intelligent reply module generates accurate and emotionally matching replies to improve user satisfaction. Performance monitoring ensures that the system runs stably under high load and optimizes response speed and processing capacity. The system will also continuously improve the accuracy of demand identification and sentiment analysis with the accumulation and interaction of historical data, and provide personalized services. The intelligent customer service system based on the large language model provides users with efficient, accurate and emotionally friendly services through accurate demand identification, sentiment analysis, personalized response generation, and real-time performance monitoring.
[0167] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. Intelligent customer service system based on large language model, characterized by: It includes user input module, intelligent reply module, sentiment analysis module and performance detection module; The user input module is used to receive user input information, analyze user needs through natural language processing, and use adaptive multi-round information interaction to identify the type of needs and preliminarily classify user needs; The sentiment analysis module is used to perform sentiment analysis on the user's input information, identify the user's sentiment type, track the user's sentiment changes, calculate the sentiment fluctuation value, and determine whether to transfer to manual customer service according to the sentiment fluctuation value; The intelligent reply module is used to retrieve relevant information from the knowledge base based on user input information and user historical data, determine the reply tone type in combination with the sentiment analysis result, and generate a natural language reply through a large language model; The performance detection module is used to evaluate the system load and response capability by real-time tracking of the response time of system requests, and to generate a detection report by automatically aggregating monitoring data, calculating key performance indicators, and using visualization tools.
2. The intelligent customer service system based on a large language model as claimed in claim 1, characterized in that: The user input module includes a data receiving unit and a demand classification unit; The data receiving unit is provided with a semantic parsing strategy, and the semantic parsing strategy is used to perform data preprocessing on the input information and convert the input information into structured data; The demand classification unit is configured with an adaptive recognition strategy, which is used to construct a demand type keyword library, calculate the matching degree of the demand type, evaluate the overall matching degree and generate a demand type importance score, and adaptively perform multiple rounds of information interaction to obtain the user's target demand type.
3. The intelligent customer service system based on a large language model as claimed in claim 2, characterized in that: The steps of the adaptive recognition strategy include: Define demand types, classify user demands into multiple types, construct a demand type keyword library, and configure a set of keywords for each demand type; In the structured data input by the user, the vocabulary unit is matched with the keyword library of the demand type, and the matching degree between the vocabulary unit and each keyword of the demand type is calculated, that is: sim(ω i ,T j )=α×Φ(ω i ,T j )+β×Ψ(ω i ,T j ) Ψ(ω i ,T j )=Similarity(V(ω i ),V(T j )) Among them, sim(ω i , T j ) is the i-th vocabulary unit ω i and the jth demand type T j The matching degree, Φ(ω i , T j ) is the i-th vocabulary unit ω i and the jth demand type T j The overlap degree, Ψ(ω i , T j ) is the i-th vocabulary unit ω i and the jth demand type T j The semantic similarity of Tokens(ω i ) is used to represent the i-th vocabulary unit ω i The word segmentation result, Tokens(T j ) is used to represent the jth requirement type T j The word segmentation result, Similarity(·) is the semantic similarity function, V(ω i ) is the i-th vocabulary unit ω i The vector representation of V(T j ) is the jth demand type T j The vector representation of , α and β are the weighted coefficients of overlap and semantic similarity between vocabulary units and demand types, ∩ represents set intersection operation, and ∪ represents set union operation; After matching all vocabulary units with the keywords of the demand type, the overall matching degree of each demand type is calculated. For a given demand type, its overall matching degree is obtained by summing up the matching degrees of all vocabulary units, that is: Among them, sim(T j ) is the requirement type T j The overall matching degree of , N is the number of vocabulary units in the user input text data, sim(ω i , T j ) is the i-th vocabulary unit ω i With the jth demand type T j degree of matching.
4. The intelligent customer service system based on a large language model as claimed in claim 3, characterized in that: The steps of the adaptive recognition strategy also include: The demand type with the largest overall matching degree is obtained as the target demand type, and the importance score of the target demand type is generated by comparing the matching degree differences of different demand types according to the matching degree of the demand type, that is: Among them, Score(T max ) is the importance score of the target demand type, sim(T max ) is the target demand type T max The overall matching degree of sim max and sim min are the maximum and minimum values of the overall matching degree of all demand types respectively; Configure the requirement classification threshold. If the importance score of the target requirement type is lower than the requirement classification threshold, information interaction is automatically started. Further input text information is obtained through inquiry and requirement type matching is performed again. Otherwise, the target requirement type is output.
5. The intelligent customer service system based on a large language model as claimed in claim 1, characterized in that: The sentiment analysis module includes a sentiment recognition unit and an abnormality monitoring unit; The emotion recognition unit is configured with an emotion classification strategy, which is used to identify the emotion type of the structured data of the user input information, and obtain the dominant emotion type through the emotion dictionary and the emotion scores of the historical emotion types; The abnormal monitoring unit is configured with an emotion fluctuation strategy, which is used to monitor abnormal changes in emotion fluctuations in user input information, and determine whether to automatically transfer to manual customer service based on the emotion fluctuation value and emotion polarity.
6. The intelligent customer service system based on a large language model as claimed in claim 5, characterized in that: The steps of the sentiment classification strategy include: Collect sentiment words to construct sentiment dictionaries, and label each sentiment word with sentiment polarity, sentiment type, and sentiment intensity; Perform sentiment type matching on the vocabulary units in the structured data of the user's input information, search for sentiment words and synonymous expansion words matching each vocabulary unit in the sentiment dictionary, and construct a matching vocabulary set for each vocabulary unit; The frequency of each emotion type in the matching vocabulary is counted, and the emotion score of each emotion type is calculated based on the emotion intensity, that is: Among them, S(C τ ) is the τth emotion type C τ The sentiment score, N p is the number of sentiment words in the matching vocabulary set, It is an emotional word Type of emotion, It is an emotional word The emotional intensity, is the indicator function, when the sentiment word The emotion type is C τ hour, Takes 1, otherwise takes 0, γ1 and γ2 are non-negative weight coefficients.
7. The intelligent customer service system based on a large language model as claimed in claim 6, characterized in that: The steps of the sentiment classification strategy also include: Configure the association threshold T g If the number of times the user inputs information is greater than or equal to the associated threshold, then the previous T g The sentiment score of the information input by the user; if the number of times the user inputs information is less than the associated threshold, the sentiment scores of all the user input information are obtained; Combined with the historical sentiment scores, the comprehensive score of each sentiment type is calculated to determine the dominant sentiment type of the user input information. The calculation method of the comprehensive score of the sentiment type is as follows: Among them, S * (C τ ) is the τth emotion type C τ The comprehensive score of S(C τ ) is the emotion type C of the current user input information τ The sentiment score, S q (C τ ) is the sentiment type C of the previous q user input information τ The sentiment score of q ranges from [0,T g ] is an integer, η is the weight coefficient of the current input, λ q is the weighting coefficient of historical input; According to the comprehensive scores of the emotion types, the emotion type with the maximum score is selected as the dominant emotion type.
8. The intelligent customer service system based on a large language model as claimed in claim 5, characterized in that: The steps of the mood swing strategy include: When receiving the user's input information, determining whether the dominant emotion type of the user's input information changes; If the dominant emotion type changes, determine whether the current emotion polarity is negative. If the emotion polarity is negative, automatically transfer to manual customer service; if the emotion polarity is not negative, obtain the comprehensive score of the dominant emotion type and calculate the emotion fluctuation value; If the dominant emotion type does not change, the emotional fluctuation value of the comprehensive score of the dominant emotion type is calculated; Configure the abnormal fluctuation threshold. When the emotional fluctuation value is less than the abnormal fluctuation threshold, the call is automatically transferred to the manual customer service. Otherwise, the emotional polarity of the dominant emotional type is obtained. Configure the abnormal duration threshold. If the emotional polarity of the dominant emotional type is negative, obtain the duration of the dominant emotional type. If the duration of the dominant emotional type is greater than the abnormal duration threshold, automatically transfer to manual customer service, otherwise continue with intelligent customer service.
9. The intelligent customer service system based on a large language model as claimed in claim 1, characterized in that: The intelligent reply module includes an element aggregation unit and an information reply unit; The element aggregation unit is configured with an information aggregation strategy, which is used to match the knowledge base module with the user's target demand type, extract relevant items, and optimize to generate an element set; The information reply unit is configured with a tone adjustment strategy, which is used to limit the tone type of the information reply according to the emotional type of the user input information, and combine the element set to generate a natural language reply that conforms to the context and tone type through a large language generation model.
10. The intelligent customer service system based on a large language model as claimed in claim 9, characterized in that: The specific steps of the information aggregation strategy include: After receiving the user input, the target demand type of the user input information is obtained, and according to the target demand type, relevant items are extracted from the knowledge base module, metadata is marked for each relevant item, and a preliminary element set is constructed; Perform data processing on the preliminary element set, detect and remove duplicate related entries through text similarity algorithm, sort the related entries according to their release time, and remove outdated related entries by setting the validity period threshold; According to the structured data of the user input information, the relevant items of the preliminary element set after data processing are optimized, and the relevance scores of the relevant items are calculated. The calculation method of the relevance scores is as follows: Y(Ω m )=-μ1×T Ωm +μ2×R Ωm +μ3×L Ωm Among them, Y(Ω m ) is the relevant entry Ω m The correlation score, T Ωm Is the relevant entry Ω m The difference between the release time and the current time, R Ωm Is the relevant entry Ω m The correlation score with the user's target demand type, L Ωm Under the same target requirement type, related items Ω m The number of matches, μ1, μ2 and μ3 are non-negative weights; A relevance threshold is configured. If the relevance score of a related item is less than the relevance threshold, the related item is removed from the preliminary element set to form an element set, and the related items of the element set are sorted according to the calculated relevance score.
Citation Information
Patent Citations
Interactive customer service method and system
CN117235213A
Cited By
Artificial intelligence customer service system based on natural language processing
CN120632078A
An artificial intelligence customer service system based on natural language processing
CN120632078B
Customer demand management method and system based on big data analysis
CN120672354A
Telephone sales verbal skill generation method and device, equipment and medium
CN120708604A
Customer service message generation method and system based on Pjsip and large model technology
CN121171220A