Intelligent customer service interactive response method and system based on semantic analysis
By constructing semantically reasonable values to judge phrase interference, the problem of inaccurate text segmentation caused by external environment interference in the intelligent customer service system is solved, the accuracy of semantic analysis is improved, and the accuracy of interactive responses is ensured.
Patent Information
- Application Number
- CN202510440287.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-04-09
AI Technical Summary
Existing intelligent customer service systems are affected by external environmental interference (such as background voices and scene noise) when users input, resulting in inaccurate text segmentation, which in turn affects the accuracy of semantic analysis.
By analyzing the average phrase length, phrase rationality, and unpopularity confidence of phrases, a semantic rationality value is constructed to determine whether the phrase is interfered with. When the text sentence is inaccurate, the accurate text sentence is retrieved and the BERT model is used for semantic analysis.
It improves the accuracy of semantic analysis, ensures the accuracy of intelligent customer service interactive responses, and solves the problem of semantic analysis deviation caused by inaccurate text segmentation.
Smart Images

Figure CN120353894B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of semantic analysis technology, and specifically to an intelligent customer service interactive response method and system based on semantic analysis. Background Art
[0002] With the widespread adoption of the internet and mobile internet, people's demand for customer service is increasing. Traditional customer service methods suffer from inefficiencies and long response times, making them inadequate for meeting user needs. However, AI-based intelligent customer service systems, which can automatically answer user questions and provide fast and accurate service, are becoming a key development direction in the customer service field.
[0003] Currently, intelligent customer service interactions primarily rely on speech recognition technology to convert user speech into text. Text preprocessing techniques are then used to segment the text and remove stop words. Deep learning models are then combined to achieve semantic analysis and understanding of user questions. Dialogue management techniques are then employed to facilitate smooth multi-round conversations. However, the accuracy of semantic analysis and understanding relies on the complete and clear content of the user conversation. Failure to accurately segment the text during text preprocessing can lead to semantic analysis errors, ultimately preventing smooth intelligent customer service interactions. Patent "CN116881444A: Text Preprocessing Method, Apparatus, Medium, and Device Based on a Text Classification Model" describes splitting the text to be preprocessed into multiple sentences, identifying the sentences containing key information, and finally sorting the sentences so that all sentences containing key information are closely aligned, thereby reducing the chance of key information being lost due to text truncation. However, the above methods still have certain flaws. During intelligent customer service interactions, the user conversation environment varies significantly. During text segmentation, external environmental interference (such as background voices and scene noise, known as the cocktail party effect) may cause the recognized text to be mixed with non-user input content, resulting in inaccurate word segmentation and ultimately affecting the accuracy of semantic analysis. Therefore, a method is urgently needed to address the low semantic analysis accuracy caused by inaccurate sentence segmentation. Summary of the Invention
[0004] In order to solve the above technical problems, the purpose of this application is to provide an intelligent customer service interactive response method and system based on semantic analysis. The technical solutions adopted are as follows:
[0005] In a first aspect, an embodiment of the present application provides an intelligent customer service interactive response method based on semantic analysis, the method comprising the following steps:
[0006] Obtain historical data of intelligent customer service and voice data currently input by the user, and convert the voice data into text sentences; preprocess the text sentences and perform word segmentation;
[0007] Based on the total number of words and the total number of phrases in the sentence where each phrase is located, the average phrase length of the sentence where each phrase is located is obtained. In addition, the phrase rationality of each phrase is obtained by combining the frequency of occurrence of each phrase in the historical data and the frequency of occurrence of each phrase in combination with the preceding and following adjacent phrases in the historical data.
[0008] Based on the number of consecutive phrases with the same part of speech in the sentence containing each phrase, the mean length of consecutive phrases with the same part of speech in the sentence containing each phrase is obtained, and the unpopularity confidence of each phrase is obtained by combining the frequency of occurrence of the preceding and following adjacent phrases of each phrase in historical data; the semantic rationality value of each phrase is obtained based on the phrase rationality and unpopularity confidence of each phrase; the segmentation threshold of the semantic rationality value is obtained, and the semantic rationality value of each phrase is compared with the segmentation threshold to determine whether each phrase is interfered with;
[0009] Based on the proportion of disturbed phrases in the current text sentence, the current text sentence is evaluated to obtain an accurate text sentence; and based on the accurate text sentence, the intelligent customer service interaction response is completed.
[0010] Preferably, the average phrase length of the sentence in which each phrase is located is the ratio of the total number of words in the sentence in which each phrase is located to the total number of phrases.
[0011] Preferably, the formula for calculating the rationality of each phrase is: i =B i +C i +V i Where A i is the phrase rationality of the i-th phrase, B i is the frequency of the i-th phrase in the historical data, C i is the frequency of the combination of the i-th phrase and the adjacent phrases in the historical data, V i is the average phrase length of the sentence containing the i-th phrase.
[0012] Preferably, the method for determining the mean continuous length of the same-part-of-speech phrases in the sentences where each phrase is located is as follows: when two or more consecutively arranged same-part-of-speech phrases appear in the sentence where each phrase is located, the number of phrases in each segment of consecutive same-part-of-speech phrases is counted, and the mean of the number of all the phrases in the sentence where each phrase is located is calculated as the mean continuous length of the same-part-of-speech phrases in the sentence where each phrase is located.
[0013] Preferably, the calculation formula for the unpopularity confidence of each phrase is: Where D iis the unpopularity confidence of the i-th phrase, E i is the sum of the frequencies of the adjacent phrases before and after the i-th phrase in the historical data, F i is the mean length of consecutive phrases with the same part of speech in the sentence where the i-th phrase is located, and τ is a preset parameter.
[0014] Preferably, the semantic rationality value of each phrase is a positive fusion result of the phrase rationality and unpopularity confidence of each phrase.
[0015] Preferably, the specific process of determining whether each phrase is interfered with is as follows: when the semantic rationality value of the phrase is greater than or equal to the segmentation threshold, the phrase is not interfered with; otherwise, the phrase is interfered with.
[0016] Preferably, the specific process of evaluating the current text sentence and obtaining an accurate text sentence is: if the proportion of phrases in the current sentence whose semantic rationality value is greater than or equal to the segmentation threshold exceeds a preset threshold, it means that the content of the current text sentence can accurately express what the user wants to express, and then the current text sentence is an accurate text sentence; otherwise, it means that the content of the current text sentence cannot accurately express what the user wants to express, and then the user needs to re-enter to obtain an accurate text sentence.
[0017] Preferably, the process of completing the intelligent customer service interactive response based on accurate text sentences is: after obtaining the accurate text sentences, using a semantic analysis model to perform semantic analysis on the text sentences to obtain semantic information data, and matching it with the content in the knowledge base; according to the matching results, the corresponding answers are retrieved in the question and answer knowledge base, and the content of the answers is rendered to obtain the response content, and the response content is used as the output of the intelligent customer service.
[0018] In the second aspect, an embodiment of the present application also provides an intelligent customer service interactive response system based on semantic analysis, comprising a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-mentioned intelligent customer service interactive response methods based on semantic analysis.
[0019] This application has at least the following beneficial effects:
[0020] This application analyzes the characteristics of phrases in text sentences affected by the cocktail party effect and constructs semantically reasonable values for each sentence. This allows the application to determine whether there is interference between phrases and whether the semantics expressed by the current text sentence are accurate. It can also retrieve accurate text sentences when the text sentence is inaccurate. This solves the current problem of semantic analysis and recognition errors caused by the inability to accurately segment user input text sentences during intelligent customer service interactions. This improves the accuracy of semantic analysis and provides more accurate decision support for intelligent customer service interactions. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] Figure 1 A flowchart of the steps of an intelligent customer service interactive response method based on semantic analysis provided in one embodiment of the present application;
[0023] Figure 2 A flowchart of processing acquired text sentences provided in one embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to further illustrate the technical means and effects adopted by this application to achieve the predetermined invention purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation methods, structures, features and effects of the intelligent customer service interactive response method and system based on semantic analysis proposed in this application. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0025] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0026] The specific solutions of the intelligent customer service interactive response method and system based on semantic analysis provided by this application are described in detail below with reference to the accompanying drawings.
[0027] See also Figure 1 , which shows a flowchart of the steps of an intelligent customer service interactive response method based on semantic analysis provided by an embodiment of the present application, the method comprising the following steps:
[0028] Step 1: Obtain historical data of intelligent customer service and voice data currently input by the user, and convert the voice data into text sentences; preprocess the text sentences and perform word segmentation.
[0029] The intelligent customer service interactive response system acquires historical data and receives voice input from users. The system first converts the user's voice input into text using Automatic Speech Recognition (ASR) technology, and then uses regular expressions to remove punctuation from the text. The text is then segmented using algorithms such as, but not limited to, forward maximum matching, reverse maximum matching, and minimum segmentation, which are not limited in this embodiment.
[0030] Step 2: Based on the total number of words and the total number of phrases in the sentence where each phrase is located, obtain the average phrase length of the sentence where each phrase is located, and combine the frequency of each phrase appearing in the historical data, as well as the frequency of each phrase appearing in combination with the previous and next adjacent phrases in the historical data, to obtain the phrase rationality of each phrase.
[0031] For user voice input, other voices in the background are a significant interference factor, which can ultimately cause the user's input to be mixed with the background voice content in the recognized text sentence, resulting in a decrease in the fluency of the recognized text sentence (the "cocktail party effect"). For example, if the user wants to input "I need to modify my user information" and the background voice is "It takes an hour to get to the central square by bus from here", the final recognized voice content after the content is mixed may be "I need to make minor changes to my user information", which will cause the word segmentation to fail to accurately separate "conduct" from "modify", making it impossible to recognize the user's actual input semantics during subsequent semantic analysis.
[0032] For AI customer service systems in the same field (such as those used in e-commerce, banking, and video software), the user input they receive is typically quite similar. For example, users of e-commerce AI customer service systems might typically enter phrases like "I need a refund," "When will it be shipped?", or "I need an exchange." Therefore, for AI customer service systems in the same field, correctly combined phrases are more likely to appear frequently, such as "need" and "refund," and two-character or word combinations are more likely to appear frequently, such as "I" and "need," "what" and "when." Therefore, if the cocktail party effect occurs in a user's input, word segmentation may reveal certain combinations that appear very rarely in historical data.
[0033] Furthermore, for normal sentences, the number of phrases after word segmentation is limited. However, when a sentence is affected by the cocktail party effect, it may cause the phrases in the sentence to be split, resulting in more single words appearing during word segmentation. For example, the sentence "I need to modify my user profile" mentioned above normally becomes "I need to modify my user profile." However, after the effect, the sentence becomes "I need to make minor changes to my user profile." Therefore, when a sentence is affected, the average phrase length after word segmentation will be shorter, and vice versa.
[0034] As a preferred implementation, the average phrase length of each phrase is obtained based on the total number of words and the total number of phrases in the sentence where each phrase is located. The phrase rationality of each phrase is obtained by combining the frequency of occurrence of each phrase in historical data and the frequency of occurrence of each phrase in combination with the preceding and following adjacent phrases in historical data.
[0035] In this embodiment, the phrase rationality of the i-th phrase is recorded as A i , its specific expression is: A i =B i +C i +V i Where A i is the phrase rationality of the i-th phrase, B i is the frequency of the i-th phrase in the historical data, C i is the frequency of the combination of the i-th phrase and the adjacent phrases in the historical data, V i is the average phrase length of the sentence containing the i-th phrase. The average phrase length refers to the ratio of the total number of words in the sentence containing the i-th phrase to the total number of phrases.
[0036] A i The larger the value of , the higher the frequency of the i-th phrase in the historical data, whether it appears independently or in combination with adjacent phrases. The longer the average phrase length in the sentence containing the i-th phrase, the greater the probability that the phrase is not interfered with by the cocktail party effect, and the more accurate the semantics expressed by the phrase.
[0037] Step 3: Based on the number of phrases with the same part of speech that appear consecutively in the sentence where each phrase is located, obtain the average length of the consecutive phrases with the same part of speech in the sentence where each phrase is located, and combine the frequency of occurrence of the preceding and following adjacent phrases of each phrase in historical data to obtain the unpopularity confidence of each phrase; obtain the semantic rationality value of each phrase based on the phrase rationality and unpopularity confidence of each phrase; obtain the segmentation threshold of the semantic rationality value, compare the semantic rationality value of each phrase with the segmentation threshold, and determine whether each phrase is interfered with.
[0038] Even though intelligent customer service may face a large number of user inputs every day, there will be some unpopular content in the intelligent customer service responses in each field. Compared with popular content, the number of user inputs is less, but it does not mean that no user input is made. When user input occurs, if only the above method is used for calculation, the unpopular phrases may be judged as disturbed phrases, and then their semantic expressions may be judged as inaccurate, leading to misjudgment of user input. Therefore, further analysis is needed for this situation.
[0039] For unpopular phrase combinations, even if their probability of occurrence in historical data is low, the overall semantics of the sentence containing the phrase is accurate if it is not interfered with. That is, the subject-verb-object relationship of each participle and the probability of occurrence of non-unpopular phrases in the sentence are all high. For example, in the sentence "I repair the oblique detonation engine," "I" and "repair" are both normal high-frequency phrases, and the subject-verb-object relationship of "I," "repair," and "oblique detonation engine" in the sentence is a normal subject, predicate, and object. However, when the cocktail party effect occurs, the phrases in the sentence are disrupted, resulting in a change in the subject-verb-object structure of the sentence, which may result in the superposition of multiple verbs or nouns.
[0040] In summary, by analyzing the independent occurrence frequency of the phrases before and after the phrase and the length of the phrases with the same part of speech in the sentence where the phrase is located, the unpopularity confidence of each phrase is constructed to represent the possibility that each phrase belongs to the undisturbed unpopular phrase. In this embodiment, the unpopularity confidence of the i-th phrase is denoted as D i , its specific expression is: Where D i is the unpopularity confidence of the i-th phrase, E i is the sum of the frequencies of the adjacent phrases before and after the i-th phrase in the historical data, F i is the mean continuous length of the phrases with the same part of speech in the sentence where the i-th phrase is located, τ is a preset parameter to prevent the denominator from being 0, and 0.1 is taken in this embodiment. Among them, the calculation method of the mean continuous length of the phrases with the same part of speech in the sentence where the i-th phrase is located is: when two or more consecutive phrases with the same part of speech appear in the sentence where the i-th phrase is located, the number of phrases in each section of consecutive phrases with the same part of speech is counted, and the mean of the number of all phrases in the sentence is calculated as the mean continuous length of the phrases with the same part of speech in the sentence. It should be noted that the present scheme adopts a rule-based approach to identify the part of speech of the phrase using the knowledge base content, and the implementer can use open AI platforms, deep learning and other methods to identify the part of speech according to actual efficiency requirements.
[0041] When the underdog confidence level D iThe larger the value is, the greater the frequency of the adjacent phrases of the i-th phrase in the historical data, and the smaller the average length of the consecutive appearances of the same part-of-speech phrases in the sentence where the phrase is located, which means that the phrase is more likely to be an undisturbed unpopular phrase.
[0042] Furthermore, as a preferred embodiment, based on the forward fusion results of the phrase rationality and unpopularity confidence of each phrase, a semantic rationality value of each phrase is constructed to characterize the possibility of each phrase being interfered with.
[0043] In this embodiment, the semantic reasonableness value of the i-th phrase is recorded as G i , its specific expression is: G i =A i +D i Where G i is the semantically reasonable value of the i-th phrase, A i is the phrase rationality of the i-th phrase, D i is the unpopularity confidence of the i-th phrase. The higher the phrase rationality of the i-th phrase and the higher the unpopularity confidence, the more likely the phrase is an undisturbed phrase in the sentence and the more reasonable the semantics expressed.
[0044] In another embodiment, the semantic reasonableness value of the i-th phrase can be calculated as follows: i =A i ×D i Where G i is the semantically reasonable value of the i-th phrase, A i is the phrase rationality of the i-th phrase, D i is the unpopularity confidence of the i-th phrase.
[0045] The semantically reasonable values of all phrases are taken as input, and the segmentation threshold of the semantically reasonable value is outputted by cross-validation. When the semantically reasonable value of a phrase is greater than or equal to the segmentation threshold, the phrase is not interfered with and the semantics expressed are more accurate. Otherwise, the phrase is interfered with and the semantics expressed are less accurate.
[0046] Step 4: Evaluate the current text sentence based on the proportion of disturbed phrases in the current text sentence to obtain an accurate text sentence; complete the intelligent customer service interaction response based on the accurate text sentence.
[0047] Through the above steps, the semantic rationality of each phrase in the text sentence of the current user can be determined. Further, the text sentence of the current user can be evaluated. The specific process is: when the proportion of phrases in the text sentence of the current user whose semantic rationality value is greater than or equal to the segmentation threshold exceeds H%, it means that the content of the current text sentence can accurately express what the user wants to express, and the current text sentence is an accurate text sentence; otherwise, it means that the content of the current text sentence cannot accurately express what the user wants to express, and the user needs to re-enter to obtain an accurate text sentence. It should be noted that in this embodiment, H is 95, and the implementer should adjust it according to the actual semantic analysis accuracy requirements. The processing flow chart for processing the acquired text sentences is shown in the following figure. Figure 2 shown.
[0048] In this embodiment, the BERT (Bidirectional Encoder Representations from Transformers) model is used to perform semantic analysis and recognition on the accurate text sentences obtained above to obtain semantic information data. The implementer may also use other semantic analysis models for analysis and recognition. The intelligent customer service matches the semantic information data with the relevant content in the knowledge base, retrieves the corresponding answer from the question and answer knowledge base based on the matching results, and finally renders the content of the retrieved answer to obtain the final response content, and uses the response content as the output of the intelligent customer service to complete the interactive response of the intelligent customer service.
[0049] At this point, an intelligent customer service interactive response method and system based on semantic analysis has been completed.
[0050] Based on the same inventive concept as the above method, an embodiment of the present application also provides an intelligent customer service interactive response system based on semantic analysis, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-mentioned intelligent customer service interactive response methods based on semantic analysis.
[0051] It should be noted that the order in which the embodiments of the present application are presented is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. Furthermore, the foregoing descriptions of specific embodiments of this specification are provided. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential sequence shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0052] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0053] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.
Claims
1. An intelligent customer service interactive response method based on semantic analysis, characterized in that: The method comprises the following steps: Obtain historical data of intelligent customer service and voice data currently input by the user, and convert the voice data into text sentences; preprocess the text sentences and perform word segmentation; Based on the total number of words and the total number of phrases in the sentence where each phrase is located, the average phrase length of the sentence where each phrase is located is obtained. In addition, the phrase rationality of each phrase is obtained by combining the frequency of occurrence of each phrase in the historical data and the frequency of occurrence of each phrase in combination with the preceding and following adjacent phrases in the historical data. Based on the number of consecutive phrases with the same part of speech in the sentence containing each phrase, the mean length of consecutive phrases with the same part of speech in the sentence containing each phrase is obtained, and the unpopularity confidence of each phrase is obtained by combining the frequency of occurrence of the preceding and following adjacent phrases of each phrase in historical data; the semantic rationality value of each phrase is obtained based on the phrase rationality and unpopularity confidence of each phrase; the segmentation threshold of the semantic rationality value is obtained, and the semantic rationality value of each phrase is compared with the segmentation threshold to determine whether each phrase is interfered with; Evaluate the current text sentence based on the proportion of disturbed phrases in the current text sentence to obtain the accurate text sentence; complete the intelligent customer service interactive response based on the accurate text sentence; The formula for calculating the phrase rationality of each phrase is: i =B i +C i +V i Where A i is the phrase rationality of the i-th phrase, B i is the frequency of the i-th phrase in the historical data, C i is the frequency of the combination of the i-th phrase and the adjacent phrases in the historical data, V i is the average phrase length of the sentence containing the i-th phrase; The calculation formula for the unpopularity confidence of each phrase is: Where D i is the unpopularity confidence of the i-th phrase, E i is the sum of the frequencies of the adjacent phrases before and after the i-th phrase in the historical data, F i is the mean length of consecutive phrases with the same part of speech in the sentence where the i-th phrase is located, and τ is a preset parameter.
2. The intelligent customer service interactive response method based on semantic analysis according to claim 1, characterized in that: The average phrase length of the sentence in which each phrase is located is the ratio of the total number of words in the sentence in which each phrase is located to the total number of phrases.
3. The intelligent customer service interactive response method based on semantic analysis according to claim 1, characterized in that: The method for determining the mean continuous length of the same-part-of-speech phrases in the sentences where each phrase is located is as follows: when two or more consecutively arranged same-part-of-speech phrases appear in the sentence where each phrase is located, the number of phrases in each segment of consecutive same-part-of-speech phrases is counted, and the mean of the number of all the phrases in the sentence where each phrase is located is calculated as the mean continuous length of the same-part-of-speech phrases in the sentence where each phrase is located.
4. The intelligent customer service interactive response method based on semantic analysis according to claim 1, characterized in that: The semantic rationality value of each phrase is a positive fusion result of the phrase rationality and unpopularity confidence of each phrase.
5. The intelligent customer service interactive response method based on semantic analysis according to claim 1, characterized in that: The specific process of judging whether each phrase is interfered with is as follows: when the semantic rationality value of the phrase is greater than or equal to the segmentation threshold, the phrase is not interfered with; otherwise, the phrase is interfered with.
6. The intelligent customer service interactive response method based on semantic analysis according to claim 1, characterized in that: The specific process of evaluating the current text sentence and obtaining an accurate text sentence is as follows: if the proportion of phrases in the current sentence whose semantic rationality value is greater than or equal to the segmentation threshold exceeds the preset threshold, it means that the content of the current text sentence can accurately express what the user wants to express, and then the current text sentence is an accurate text sentence; otherwise, it means that the content of the current text sentence cannot accurately express what the user wants to express, and then the user needs to re-enter to obtain an accurate text sentence.
7. The intelligent customer service interactive response method based on semantic analysis according to claim 1, characterized in that: The process of completing the intelligent customer service interactive response based on accurate text sentences is as follows: after obtaining the accurate text sentences, a semantic analysis model is used to perform semantic analysis on the text sentences to obtain semantic information data, and match it with the content in the knowledge base; based on the matching results, the corresponding answers are retrieved in the question and answer knowledge base, and the content of the answers is rendered to obtain the response content, and the response content is used as the output of the intelligent customer service.
8. An intelligent customer service interactive response system based on semantic analysis, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the intelligent customer service interactive response method based on semantic analysis as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Text preprocessing method and device based on text classification model, medium and equipment
CN116881444A
Semantic analysis method for smart phone customer service
CN110457684A
Speech recognition method and system for correcting noise text and storage medium
CN111326160A