Intelligent customer service dialogue automatic reply method and system based on large model
By using a large-scale intelligent customer service dialogue auto-response method, and employing technologies such as word segmentation and part-of-speech tagging, the problem of inaccurate intent recognition and rigid service scope in intelligent customer service systems has been solved. This has enabled precise intent stratification and accurate responses, thereby improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Filing Date
- 2026-04-14
- Publication Date
- 2026-07-14
AI Technical Summary
Existing intelligent customer service systems are inaccurate in recognizing user intent, cannot effectively handle ambiguity of polysemous words, emoticons, web links and other noisy information, and cannot dynamically adapt the service scope, resulting in intent recognition deviation and rigid matching of service scope.
We adopt an intelligent customer service dialogue automatic response method based on a large model. Through closed-loop text preprocessing, including word segmentation, part-of-speech tagging, confidence assessment, and rule correction, combined with an intent recognition strategy that integrates an initial pattern library and secondary weight optimization, we can achieve hierarchical classification of intent and determination of service boundaries, thereby generating accurate business responses or guidance responses.
It significantly improves the accuracy of intent recognition, ensures that responses align with business rules and user needs, provides user-friendly guidance, and solves the problems of ambiguous intent recognition and rigid service boundaries in traditional methods, thereby enhancing the user experience.
Smart Images

Figure CN122388091A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent interaction technology, and in particular to an intelligent customer service dialogue automatic response method and system based on a large model. Background Technology
[0002] Currently, with the popularization of digital services, intelligent customer service systems have become a core support for optimizing service resource allocation and improving the efficiency of user inquiry response.
[0003] In one existing technology, machine-based question-and-answer dialogue response technology for intelligent customer service is mainly based on a preset rule base, traditional machine learning models, or basic pre-trained models. It identifies user intent through keyword matching and simple semantic feature extraction, and then matches the corresponding response template. Traditional methods typically assume that the semantic structure of user inquiry text is fixed and the service scope definition is statically unchanged, relying on a manually maintained intent template library for matching. While some systems introduce large models, they fail to customize and optimize for core needs such as intent recognition accuracy and dynamic adaptation of service scope in customer service scenarios. Existing technologies have significant limitations. User inquiry text often contains polysemous ambiguities, emoticons, web links, and other noisy information. Traditional word segmentation and semantic analysis methods lack effective ambiguity resolution and accuracy verification mechanisms, leading to intent recognition bias and difficulty in accurately capturing core user needs. Furthermore, user inquiry scenarios are becoming increasingly complex, and the service scope may dynamically update with business rules. The static template library and fixed service boundary definition of existing technologies cannot adapt to this dynamic change, making it difficult to solve the semantic alignment problem of multi-source heterogeneous inquiry data and lacking a flexible guidance mechanism, resulting in rigid service scope matching.
[0004] Existing technologies suffer from inaccurate user intent recognition. Summary of the Invention
[0005] This invention provides an intelligent customer service dialogue automatic response method and system based on a large model to solve the problem of inaccurate user intent recognition.
[0006] Firstly, to address the aforementioned technical problems, this invention provides an intelligent customer service dialogue automatic response method based on a large model, comprising: Obtain the consultation text input by the user, preprocess the consultation text to obtain a structured vocabulary sequence; The structured vocabulary sequence is labeled with an accuracy evaluation value to obtain an accuracy detection value. If the accuracy detection value is lower than a preset accuracy threshold, the erroneous labels in the structured vocabulary sequence are corrected to obtain a word sequence labeled version. Intent features are obtained by extracting keywords, sentence structure and part of speech from the word sequence annotation version, encoding the intent features to obtain an intent feature set, and performing similarity matching between the intent feature set and a preset product intent pattern library to obtain intent category hierarchical results; A secondary intent matching is performed on the intent category hierarchical results to obtain a candidate intent list sorted by matching priority. Based on the comparison result between the matching similarity value corresponding to the first intent in the candidate intent list and the preset service boundary judgment threshold, a service scope matching conclusion is determined. The service scope matching conclusion includes in-service intents and out-of-service intents. If the service scope matching conclusion is an in-service intent, then the corresponding business response text is generated based on the matching result of the intent category hierarchical result and the preset standard response library. If the service scope matching conclusion is an intention outside the service, then the corresponding initial guidance template is extracted from the preset guidance template library, the semantic consistency between the initial guidance template and the consultation text is checked, and the initial guidance template is dynamically semantically adapted according to the check result to generate customized guidance response text; Based on the business response text or the guidance response text, semantic association analysis is performed to determine the focus of the next round of dialogue and complete the update of this interaction record.
[0007] Secondly, the present invention provides an intelligent customer service dialogue automatic response system based on a large model, comprising: The consultation text parsing module is used to obtain the consultation text input by the user, preprocess the consultation text, and obtain a structured vocabulary sequence. The annotation accuracy verification module is used to evaluate the annotation accuracy of the structured vocabulary sequence to obtain an accuracy detection value. If the accuracy detection value is lower than a preset accuracy threshold, the erroneous annotations in the structured vocabulary sequence are corrected to obtain a word sequence annotation version. The intent feature matching module is used to extract keywords, sentence structure and part of speech from the word sequence annotation version to obtain intent features, encode the intent features to obtain an intent feature set, and perform similarity matching between the intent feature set and a preset product intent pattern library to obtain intent category hierarchical results; The service scope determination module is used to perform secondary intent matching on the intent category hierarchical results to obtain a candidate intent list sorted by matching priority. Based on the comparison result between the matching similarity value corresponding to the first intent in the candidate intent list and the preset service boundary determination threshold, the service scope matching conclusion is determined. The service scope matching conclusion includes in-service intents and out-of-service intents. The business response generation module is used to generate corresponding business response text based on the service scope matching conclusion of the service scope matching conclusion and the preset standard response library, and to match the result of the intent category hierarchical matching with the result of the matching. The guided response generation module is used to extract the corresponding initial guided template from the preset guided template library if the service scope matching conclusion is an intention outside the service, perform semantic consistency verification between the initial guided template and the consultation text, and dynamically adapt the initial guided template semantically according to the verification result to generate customized guided response text. The dialogue interaction update module is used to perform semantic association analysis based on the business response text or the guidance response text, determine the focus direction of the next round of dialogue, and complete the update of the current interaction record.
[0008] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention constructs a closed-loop text preprocessing system that includes word segmentation, part-of-speech tagging, confidence assessment, error localization, and rule correction. It achieves quantitative evaluation of tagging accuracy through a set of confidence scores and a matrix of accuracy detection results. It also corrects confidence tagging nodes by combining domain dictionaries, thus solving the part-of-speech ambiguity caused by polysemous words, business terms, and colloquial expressions. It transforms unstructured consultation text into a standardized structured vocabulary sequence, laying a precise text foundation for the semantic understanding of machine question answering and providing a zero-noise, high-confidence text foundation for the semantic understanding of large models. This avoids misjudgment of intent caused by defects in text preprocessing from the source.
[0009] (2) This invention first completes the hierarchical classification of intents based on the product intent pattern library through a two-layer intent recognition strategy of initial coarse matching of the pattern library and secondary weight optimization fine matching. Then, it redistributes weights according to the distinguishability index of features in different intent subclasses, strengthens high-discrimination features and weakens redundant features, significantly improving the recognition accuracy of edge intents and composite intents. At the same time, it combines the service boundary judgment threshold to realize the automatic differentiation of intents inside and outside the service, solving the technical problems of fuzzy intent recognition, rigid service boundaries and inability to decompose composite demands in traditional methods, and realizing the upgrade of user demands from fuzzy matching to precise hierarchical positioning.
[0010] (3) This invention adopts the generation logic of core intent node matching and semantic tone adaptation for service intents to ensure that the reply fits the business rules and the specific needs of users; for service intents, it avoids stiff rejection by checking semantic consistency and optimizing the guidance content. While clarifying the service boundaries, it provides effective alternatives and greatly improves the user experience. The two mechanisms work together to achieve accurate business reply and humanized guidance reply, breaking the limitations of traditional template reply that is stiff and has poor adaptability. Attached Figure Description
[0011] Figure 1This is a schematic diagram of the automatic response method for intelligent customer service dialogue based on a large model provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the intelligent customer service dialogue automatic response system based on a large model provided in the second embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] Reference Figure 1 The first embodiment of the present invention provides an intelligent customer service dialogue automatic response method based on a large model, including the following steps: S11, Obtain the consultation text input by the user, preprocess the consultation text to obtain a structured vocabulary sequence; S12, the accuracy of the annotation of the structured vocabulary sequence is evaluated to obtain an accuracy detection value. If the accuracy detection value is lower than a preset accuracy threshold, the erroneous annotations in the structured vocabulary sequence are corrected to obtain a word sequence annotation version. S13, extract keywords, sentence structure and part of speech from the word sequence annotation version to obtain intent features, encode the intent features to obtain an intent feature set, and perform similarity matching between the intent feature set and a preset product intent pattern library to obtain intent category hierarchical results; S14, perform secondary intent matching on the intent category hierarchical results to obtain a candidate intent list sorted by matching priority. Based on the comparison result between the matching similarity value corresponding to the first intent in the candidate intent list and the preset service boundary judgment threshold, determine the service scope matching conclusion. The service scope matching conclusion includes in-service intents and out-of-service intents. S15, if the service scope matching conclusion is an in-service intent, then the corresponding business response text is generated based on the matching result of the intent category hierarchical result and the preset standard response library. S16, if the service scope matching conclusion is an intention outside the service, then extract the corresponding initial guidance template from the preset guidance template library, perform semantic consistency verification between the initial guidance template and the consultation text, and perform dynamic semantic adaptation of the initial guidance template according to the verification result to generate customized guidance response text; S17. Perform semantic association analysis based on the business response text or the guidance response text to determine the focus direction of the next round of dialogue and complete the update of this interaction record.
[0014] In step S11, the user-input consultation text is obtained, and the consultation text is preprocessed to obtain a structured vocabulary sequence, including: Obtain the user-inputted consultation text, remove irrelevant symbols and noise characters from the consultation text to obtain clean text; The clean text is segmented based on a preset word segmentation rule library to obtain a set of segmented word elements; Part-of-speech tagging is performed on the segmented word set to obtain an initial tagging sequence. Then, the initial tagging sequence is disambiguated by combining contextual semantic analysis to obtain an accurate tagging sequence. A multidimensional feature matrix is constructed based on the precisely labeled sequence. The multidimensional feature matrix is first standardized and then vectorized and concatenated to obtain a structured vocabulary sequence.
[0015] In one implementation, to obtain clean text from user-inputted consultation text, this embodiment first establishes a multi-channel standardized consultation text access interface, compatible with user input formats from web pages, apps, mini-programs, and intelligent speech-to-text conversion. All types of input text are uniformly converted to UTF-8 encoded plain text format, enabling unified reception of mixed consultation text containing emoticons, web links, special punctuation, redundant spaces, and meaningless interjections. Subsequently, a three-level text cleaning operation is performed. The first level is noise character filtering, identifying and removing web links, non-business-related emoticons, consecutively repeated special punctuation (such as ###, *), and invisible whitespace placeholders. The second level is text normalization, converting traditional Chinese to simplified Chinese, uniformly converting English characters to lowercase, directly removing popular internet abbreviations without actual business semantics (such as pinyin abbreviations and homophones without clear meaning), and mapping industry colloquial expressions to standardized business terms. The third level is invalid sentence removal, eliminating invalid short sentences without actual business semantics, resulting in noise-free, standardized, and semantically complete clean text.
[0016] It should be noted that for the set of segmented word units obtained by segmenting the pure text based on the preset word segmentation rule library, the customized word segmentation rule library constructed in this embodiment uses the general Chinese word segmentation dictionary as the base library. The base library selects the conventional Chinese word segmentation dictionary in the technical field to which it belongs. At the same time, it integrates product terms, business process vocabulary, and core keywords of common consultation questions in the business field of intelligent customer service to complete the dictionary expansion. The expanded vocabulary needs to be double-checked by business personnel and technical personnel to ensure business relevance. The formulation of custom word segmentation rules takes the accurate expression of business semantics as the core principle. For words that appear continuously and form a fixed business meaning, the forced merging rule is executed. For words that are easily confused and can better reflect business semantics after splitting, the forced splitting rule is executed. Both the forced merging and splitting rules are adapted to the actual business consultation scenarios of intelligent customer service, and the rule library reserves an expansion interface to supplement new word segmentation rules according to business updates.
[0017] Furthermore, in this embodiment, the forward maximum matching method is used in combination with the customized word segmentation rule library to segment the pure text. Starting from the first character of the text, the words in the rule library are matched in the order from long to short, and the longest successfully matched word is selected as an independent word unit, and the entire pure text is traversed in turn to complete the segmentation. After segmentation, meaningless stop words in the text (such as "de", "le", "ma", "a", etc.) are removed, and finally a set of segmented word units composed of business-related valid words is obtained, providing an accurate vocabulary basis for subsequent词性标注.
[0018] In one implementation, the set of segmented word units is subjected to词性标注 and disambiguation processing to obtain an accurate annotation sequence. In this embodiment, the set of segmented word units is automatically词性标注 to identify general word types such as nouns, verbs, adjectives, numeral-classifiers, adverbs, etc., and at the same time supports the identification and annotation of business-specific word types (such as product names, business actions, question types, service scenarios, etc.), and outputs an initial annotation sequence containing word units and corresponding word type tags. For the problem of polysemous word type ambiguity in the initial annotation sequence, this embodiment performs ambiguity resolution processing in combination with context semantic analysis. A context semantic window is constructed centered on the ambiguous word unit, and the front and back word unit features, sentence structure features, and word unit position features within the window are extracted to re-determine and correct the word type of the ambiguous word unit to obtain an accurate annotation sequence.
[0019] It should be noted that, for constructing a multidimensional feature matrix based on the precisely labeled sequence and obtaining a structured vocabulary sequence, this embodiment first constructs a multidimensional feature vector of a unified dimension for each word in the precisely labeled sequence. The feature dimensions include five core dimensions: first, word form features, which include one-hot vectors of the word's pinyin encoding and stroke count encoding; second, part-of-speech features, which include one-hot encoded vectors of part-of-speech tags; third, positional features, which include encoded vectors of the word's position in the consultation text; fourth, semantic features; and fifth, business features, which include encoded vectors of the business module and service scenario to which the word belongs. Subsequently, a two-dimensional multidimensional feature matrix is constructed using the word order of the precisely labeled sequence as rows and the dimensions of the multidimensional features as columns. Each element in the matrix represents the value of the corresponding feature dimension for the word. Z-Score standardization is then applied to this multidimensional feature matrix to eliminate the dimensional differences between different feature dimensions and avoid the impact of numerical magnitude differences on subsequent feature analysis. Finally, the standardized multidimensional feature matrix is vectorized and concatenated according to the word order to generate a structured vocabulary sequence output containing words, parts of speech, semantics, location, and business information. This structured vocabulary converts unstructured natural language consultation text into a standardized feature form that can be parsed by machines, laying a precise text feature foundation for subsequent intent feature extraction, similarity matching, and other steps.
[0020] In step S12, the structured vocabulary sequence is subjected to an annotation accuracy evaluation to obtain an accuracy detection value. If the accuracy detection value is lower than a preset accuracy threshold, the erroneous annotations in the structured vocabulary sequence are corrected to obtain a word sequence annotation version, including: The structured vocabulary sequence is labeled with an accuracy evaluation to obtain a set of confidence scores. An accuracy detection result matrix is constructed based on the set of confidence scores, and the values in the accuracy detection result matrix are accuracy detection values. If the accuracy detection value is lower than the preset accuracy threshold, the part-of-speech sequence to be corrected is obtained, the erroneous labeled nodes in the part-of-speech sequence to be corrected are located, and the preset domain dictionary is called to perform rule correction on the erroneous labeled nodes to obtain the corrected part-of-speech sequence. The corresponding nodes in the structured vocabulary sequence are replaced with the corrected part-of-speech sequence to obtain the word sequence annotation version.
[0021] In one implementation, this embodiment performs a quantitative evaluation of annotation accuracy based on the correlation and matching degree between each word element in the structured vocabulary sequence and its corresponding part-of-speech tag. First, the structured word sequence output is traversed. For each word element and its labeled part-of-speech, the reliability value of the part-of-speech label in the current context is calculated. The reliability values of all word elements together form a confidence score set, where the confidence score ranges from 0 to 1. A higher value indicates a higher accuracy of the corresponding part-of-speech label. The confidence score is compared with a preset ambiguous word list using a rule-based matching method. If the word element is not in the ambiguous word list, it is assigned a value of 0.9. If it is in the ambiguous word list, it is linearly mapped to a value between 0.5 and 0.8 based on the context matching degree. Specifically, the context matching degree is calculated based on the semantic similarity between the ambiguous word element and the two words before and after it. A similarity greater than 0.8 is mapped to 0.8, a linear mapping between 0.5 and 0.8 is used, and a similarity less than 0.5 is mapped to 0.5. The ambiguous word list is constructed by collecting polysemous words in the business domain, and each word is labeled with its possible parts of speech and corresponding examples in different contexts. Subsequently, the system constructs an accuracy detection result matrix based on the confidence score set. This matrix uses the order of lexical units in the sequence as its row dimension and multiple subdivisions for accuracy evaluation as its column dimensions. These subdivisions include, but are not limited to, word form matching degree, contextual semantic consistency, and part-of-speech distribution rationality. Each element in the matrix represents the accuracy detection value of the corresponding lexical unit in its corresponding dimension, thereby achieving a structured and multi-dimensional quantitative representation of the accuracy of the entire word sequence annotation.
[0022] It should be noted that, regarding the accuracy threshold comparison and the acquisition of the part-of-speech tagging sequence to be corrected, this embodiment pre-sets a unified tagging accuracy threshold based on the business scenario requirements of intelligent customer service and the accuracy requirements of part-of-speech tagging. This threshold is a fixed value obtained based on historical tagging data and business error tolerance statistics, and it supports flexible adjustment according to changes in the business scenario. All accuracy detection values in the accuracy detection result matrix are compared against the threshold one by one. If the accuracy detection value corresponding to a certain word element is lower than the preset accuracy threshold, it is determined that the part-of-speech tagging of that word element has an error risk. The system extracts the risky word element and its two preceding and following adjacent words to form a local part-of-speech tagging sequence. All such local sequences are integrated into the part-of-speech tagging sequence to be corrected, providing complete contextual information for subsequent error node location.
[0023] It is worth noting that the annotation accuracy threshold preset in this embodiment is based on the statistical data of user consultation text and part-of-speech tagging of the enterprise to which the intelligent customer service belongs in the past 6 months, with a statistical sample size of no less than 100,000. The business fault tolerance rate quantitative indicator is set according to the enterprise's core business and non-core business, with the fault tolerance rate of core business not exceeding 5% and the fault tolerance rate of non-core business not exceeding 10%. The initial value of the annotation accuracy threshold is set to 0.8. This initial value has been verified and adapted to the actual business scenario of the enterprise, and can be flexibly adjusted within the range of 0.5-0.9 according to the enterprise's service accuracy requirements and changes in user consultation scenarios.
[0024] In one implementation, this embodiment first performs contextual semantic analysis on each part-of-speech sequence to be corrected. Combining the word collocation relationships within the sequence, business semantic logic, and a part-of-speech tagging rule library, it performs dual verification of the accuracy detection value and the rationality of the part-of-speech tagging for each word in the sequence. This accurately locates erroneous tagging nodes in the sequence that do not conform to semantic logic and tagging rules, clarifying the word content, original tagging part-of-speech, and location of the erroneous tagging node. Subsequently, a preset intelligent customer service domain dictionary is invoked. This domain dictionary contains business-specific vocabulary, fixed collocation vocabulary, industry terms, and their corresponding standard part-of-speech tags, and also includes built-in part-of-speech tagging correction rules. For different types of erroneous tagging nodes, the standard part-of-speech in the domain dictionary is matched with the correction rules: for erroneous tags of a single word, the standard part-of-speech in the corresponding business scenario in the domain dictionary is directly replaced; for erroneous tags of multiple word collocations, the overall part-of-speech tagging is collaboratively corrected according to the fixed collocation rules in the dictionary. After correction, a corrected part-of-speech sequence is obtained, ensuring that the corrected part-of-speech tagging conforms to business semantics and tagging specifications.
[0025] It is worth noting that the preset intelligent customer service domain dictionary called in this embodiment includes high-frequency exclusive words, fixed collocation words, and industry terms in the intelligent customer service business domain. All words have been statistically verified by enterprises to be commonly used words in user inquiries. The business-specific parts of speech are divided according to the function of words in business scenarios, specifically including four categories: product name, business action, question type, and service scenario. Each category of exclusive parts of speech corresponds to a clear business semantic connotation. The mapping rule between parts of speech and words adopts a "one-to-one as the main method and one-to-many as the auxiliary method" construction method, that is, a word corresponds to a unique standard part of speech in a single business scenario.
[0026] It should be noted that, in order to replace erroneous nodes and determine the final word sequence annotation version, this embodiment traverses all proofread part-of-speech sequences, extracts the positions of erroneous annotation nodes and the corrected standard part-of-speech information, and accurately locates the corresponding erroneous annotation nodes in the original structured vocabulary sequence according to the position index of the lexical units. The original erroneous part-of-speech annotations are replaced with the proofread standard part-of-speech, and the lexical unit arrangement order, multi-dimensional feature information, and other correct part-of-speech annotation information in the word sequence output remain unchanged during the replacement process. After replacing all erroneous annotation nodes, the corrected structured vocabulary sequence is checked for completeness and consistency. The checks include confirming that all nodes marked as erroneous have been corrected without omission; confirming that there are no new conflicts between the corrected part-of-speech and the lexical units themselves and their context; and confirming that the overall structure of the sequence has not been destroyed. Only when all checks pass successfully will the system officially determine this corrected, high-quality vocabulary sequence as the final word sequence annotation version.
[0027] In step S13, keywords, sentence structure, and parts of speech are extracted from the word sequence annotation version to obtain intent features. These intent features are then encoded to obtain an intent feature set. The intent feature set is then matched with a preset product intent pattern library to obtain intent category hierarchical results, including: Based on the word sequence annotation version, keywords and sentence patterns are identified using preset intent feature extraction rules. The keywords are mapped into keyword vectors, and the sentence patterns are encoded into sentence pattern sequences. An intent feature set is constructed by combining the keyword vectors and the sentence pattern sequences. Calculate the similarity between the intent feature set and each standard intent pattern in the preset product intent pattern library, and generate a similarity score matrix; If the values in the similarity score matrix meet the preset matching conditions, the subset of patterns with the highest matching degree is extracted to obtain the preliminary intent category label; The initial intent category labels are hierarchically divided to generate an intent category hierarchical structure. The intent category hierarchical structure is then corrected for deviations to obtain the intent category hierarchical result.
[0028] In one implementation, this embodiment first sorts out the core service scenarios, product-related consultation types, and typical user demands of the business domain to which intelligent customer service belongs, forming a standardized intent classification system. This system includes a first-level core intent and multi-level subdivided intents. Then, for each type of standard intent, typical keywords, common sentence patterns, and business semantic features are extracted. Keywords are vectorized and sentence patterns are serialized and encoded to form a standard intent pattern that includes standard intent tags, a keyword vector library, a sentence pattern sequence library, and business semantic feature rules. Finally, all standard intent patterns in the business domain are classified and stored hierarchically to build a structured and scalable product intent pattern library. At the same time, a unique identifier code is configured for each standard intent pattern in the library to support subsequent fast retrieval and matching.
[0029] It should be noted that extracting keywords, sentence structures, and parts of speech to obtain intent features from the labeled word sequence versions requires clearly defining the core business parts of speech (nouns representing product names, verbs representing business actions, and adjectives representing problem descriptions) as the keyword extraction scope. Simultaneously, it's necessary to define typical sentence patterns (such as interrogative, declarative, and plea-based) and sentence structure features (such as subject-verb-object collocation and adverbial-head structures) for different consultation requests. The process involves iterating through the labeled word sequence versions, first selecting words that fit the extraction scope as keywords for the user's consultation, and converting these keywords into fixed-dimensional keyword vector representations, with the vector dimensions consistent with those in the product intent pattern library. Second, the sentence structure of the labeled word sequence versions is analyzed to identify the corresponding sentence patterns, and these patterns are converted into sentence pattern sequences according to the coding specifications of the product intent pattern library. Finally, all extracted keyword vector representations are integrated with the sentence pattern sequences to form a unique set of intent features representing the current user's consultation intent.
[0030] In one implementation, this embodiment employs a cosine similarity calculation method. Using each standard intent pattern in the product intent pattern library as a comparison object, the similarity between the current intent feature set and each standard intent pattern is calculated one by one. First, the keyword vector library and sentence pattern sequence library of the standard intent patterns are extracted respectively. The average cosine similarity between the keyword vector representation in the current intent feature set and the keyword vector library of the standard intent patterns is calculated as the keyword similarity score. Then, the structural matching similarity between the sentence pattern sequence in the current intent feature set and the sentence pattern sequence library of the standard intent patterns is calculated as the sentence pattern similarity score. Subsequently, the two scores are weighted and summed to obtain the comprehensive similarity value between the current intent feature set and the standard intent pattern. For example, the minimum threshold for the comprehensive similarity is set according to the business matching accuracy requirements, with an initial value of 0.6. If it is lower than 0.6, the matching is considered unreliable. After traversing all standard intent patterns in the product intent pattern library, the current intent feature set is used as the only row dimension, and the standard intent patterns in the product intent pattern library are used as the column dimension. All comprehensive similarity values are filled in the corresponding positions to generate a structured similarity score matrix. Each value in the matrix represents the degree of matching between the current user's consultation intent and the corresponding standard intent pattern.
[0031] It should be noted that, regarding the determination of the matching threshold and the acquisition of the initial intent category label, preset matching conditions are set in advance based on the business matching accuracy requirements and the statistical results of historical consultation data. These conditions include the minimum threshold for the comprehensive similarity value and the basic judgment rules for matching validity. First, all comprehensive similarity values in the similarity score matrix are filtered, and values below the minimum threshold are removed, retaining the valid similarity values that meet the preset matching conditions and their corresponding standard intent patterns. If valid similarity values exist, the standard intent pattern corresponding to the highest comprehensive similarity value is extracted as the subset of patterns with the highest matching degree, and the standard intent label of this subset of patterns is used as the initial intent category label for the current user's consultation. If no valid similarity values exist, it is marked as no clear intent has been matched, and a manual review or intent pattern library expansion process is triggered to ensure that the acquisition of the initial intent category label meets the business matching requirements.
[0032] In one implementation, this embodiment first divides the initial intent category tags hierarchically based on the standardized intent classification system of the product intent pattern library. If the initial intent category tag is a first-level core intent, then all sub-intents under this core intent are matched downwards. Combining the keyword and sentence pattern features of the current intent feature set, the most fitting sub-intent is selected, forming an intent category hierarchical structure containing first-level core intent, second-level sub-intents, and multi-level specific intents. If the initial intent category tag is a sub-intent, then the first-level core intent to which it belongs is traced upwards, and the corresponding specific intents are added downwards to improve the hierarchical structure. Subsequently, the hierarchical structure of intent categories is semantically extended based on the semantic association rule library of the business domain. The business extension semantics and related appeal features related to the current intent features are added to the hierarchical structure to enrich the completeness of intent representation. Finally, deviation correction is performed. Combining the standard semantic rules of the product intent pattern library, the hierarchical nodes in the hierarchical structure that do not match the current user consultation intent features or have semantic association deviations are adjusted or removed. At the same time, the hierarchical logic of the hierarchical structure is verified to be consistent with the business semantics. After the correction is completed, the initial intent category hierarchical result is obtained.
[0033] In step S14, a secondary intent matching is performed on the intent category hierarchical results to obtain a candidate intent list sorted by matching priority. Based on the comparison between the matching similarity value corresponding to the first intent in the candidate intent list and a preset service boundary determination threshold, a service scope matching conclusion is determined. The service scope matching conclusion includes in-service intents and out-of-service intents, including: Obtain the intent category hierarchical results and the corresponding associated original semantic feature distribution data, and calculate the discriminant index of each feature in different intent subclasses; Weights are assigned to the original semantic feature distribution data based on the discriminant index to obtain a set of weighted feature vectors; The weighted feature vector set is matched with a preset standard intent template library for secondary similarity to generate a candidate intent list containing matching priorities; Extract the similarity value corresponding to the first highest priority intent in the candidate intent list. If the similarity value is greater than the preset service boundary determination threshold, the service scope matching conclusion is determined to be an in-service intent; otherwise, it is determined to be an out-of-service intent.
[0034] In one implementation, this embodiment first extracts the intent category hierarchical results obtained in step S13, and simultaneously retrieves the corresponding original semantic feature distribution data. This data includes keyword features, sentence pattern features, business semantic features, and the frequency and distribution ratio of each feature in different intent subcategories, corresponding to each level of intent nodes in the hierarchical results. Based on the above data, the discriminancy index of each feature in different intent subcategories is calculated. The calculation is based on the difference between the feature's occurrence ratio in the target intent subcategory and its average occurrence ratio in other non-target intent subcategories, combined with the feature's semantic importance coefficient in the business scenario for weighted calculation. The discriminancy index ranges from 0 to 1; the higher the value, the stronger the feature's recognition and directionality towards the target intent subcategory, and the more effectively it can distinguish different intent subcategories. This method completes the calculation of the discriminancy index of all original semantic features one by one, forming a feature-discriminancy index correspondence table.
[0035] Specifically, the discrimination index is calculated by taking the proportion of the frequency of a statistical feature in the target intent subclass as the first proportion; then, the proportion of the frequency of a statistical feature in all non-target intent subclasses is calculated, and its arithmetic mean is taken as the second proportion; the difference between the first proportion and the second proportion is calculated, and if the difference is negative, it is taken as zero; the difference is multiplied by a preset semantic importance coefficient, which is assigned a value in the range of 0.5 to 1.5 according to the contribution of the feature to the intent discrimination; finally, the product result is normalized to the interval between zero and one to obtain the discrimination index.
[0036] It should be noted that, for the weighted feature vector set obtained by redistributing weights based on the discrimination index, the discrimination index of each feature is used as the core basis for weight allocation. The higher the discrimination index, the greater the weight of the corresponding feature. At the same time, to avoid excessively high weights for a single high-discrimination feature, a weight upper limit threshold is set and the weights of all features are normalized to ensure that the sum of the weights is 1; the normalization uses the Softmax function. Weight redistribution is performed on each feature in the original semantic feature distribution data. After determining the weight coefficients, the system begins to construct the weighted feature vector set. Specifically, the original feature vector (a numerical sequence of fixed dimensions) of each feature in the original semantic feature distribution data is multiplied element-wise with its corresponding new weight coefficient determined by the above strategy to obtain the weighted feature vector of that feature. Subsequently, the system concatenates the weighted feature vectors of all features according to a preset feature dimension order strictly aligned with the standard intent template library, forming a long vector with uniform dimensions and complete content. Finally, in order to eliminate the influence of differences in the units of measurement between different features, the system performs Z-Score standardization on the concatenated long vector, so that the data distribution of each dimension presents a standard form with a mean of 0 and a variance of 1, and finally generates a high-quality set of weighted feature vectors that can be directly used for secondary matching.
[0037] In one implementation, the preset standard intent template library in this embodiment is a refined set of intent templates optimized based on the product intent pattern library. It includes standard feature templates for all in-service intents within the intelligent customer service business domain. Each template is configured with a unique intent identifier, a complete weighted feature vector standard value, and a business semantic description. Secondary similarity matching uses the same cosine similarity calculation method as in step S13, combined with business feature matching rules, to calculate the comprehensive similarity between the weighted feature vector set and each standard template in the standard intent template library. First, the cosine similarity at the feature vector level is calculated, then the score is adjusted based on the matching degree of the business features to obtain the secondary matching similarity value corresponding to each standard template. After completing the matching calculation for all templates, all secondary matching similarity values are sorted in descending order. Invalid templates with a similarity value of 0 are removed, and the remaining standard templates are organized according to the sorting results. Simultaneously, the intent name and similarity value corresponding to each template are labeled, generating a candidate intent list containing matching priorities. The priorities in the list correspond one-to-one with the similarity values from largest to smallest.
[0038] It should be noted that the preset service boundary judgment threshold in this embodiment, used to compare with the service boundary judgment threshold and obtain a service scope matching conclusion, is a quantitative value based on the core service scope, business processing capabilities, and historical consultation data statistics of the intelligent customer service. This threshold has been verified through business scenarios and can be flexibly configured according to adjustments in the service scope. Its core function is to define whether the user's consultation intent falls within the scope that the intelligent customer service can handle. The secondary matching similarity value corresponding to the highest priority first intent is extracted from the candidate intent list, and this value is precisely compared with the preset service boundary judgment threshold: if the similarity value is greater than the service boundary judgment threshold, it means that the matching degree between the first intent and the standard intent template meets the judgment standard for in-service intent, and the service scope matching conclusion is determined to be an in-service intent; if the similarity value is less than or equal to the service boundary judgment threshold, it means that the matching degree between the first intent and the standard intent template does not meet the judgment standard for in-service intent, and the service scope matching conclusion is determined to be an out-of-service intent.
[0039] Specifically, the preset service boundary determination threshold is determined based on experimental statistical methods. A sample of 100,000 real inquiries and intent annotations from the enterprise over the past six months is used. Multiple candidate thresholds are set in the range of 0.5-0.9 with a step size of 0.05. For each candidate threshold, a simulated matching experiment is conducted on the sample set, and three key performance indicators are observed: the accuracy rate of core service intent determination (i.e., the proportion correctly determined as in-service intent), the false negative rate of marginal intent (i.e., the proportion that should belong to in-service intent but is misjudged as out-of-service intent), and the false positive rate of out-of-service intent (i.e., the proportion that should belong to out-of-service intent but is misjudged as in-service intent). Experimental results show that when the threshold is set to 0.7, the three indicators reach an optimal balance. Therefore, 0.7 is determined as the optimal initial threshold that balances determination accuracy and business adaptability. Furthermore, this threshold can be flexibly configured according to dynamic adjustments to the business scope or changes in service strategies during specific periods.
[0040] In step S15, if the service scope matching conclusion is an in-service intent, then based on the intent category hierarchical result and the preset standard response library, a corresponding business response text is generated according to the matching result, including: If the service scope matching conclusion is an in-service intent, then extract the core intent node and related business features from the intent category hierarchical results; The core intent node is matched with the response templates in the preset standard response library, and the basic response template with the highest matching degree is selected. Based on the associated business characteristics, the basic reply template is sequentially filled with parameters and semantically adapted to generate business reply text that fits the user's inquiry needs.
[0041] In one implementation, this embodiment first parses the intent category hierarchy result obtained in step S13. This hierarchy structure contains a complete hierarchical relationship of "first-level core intent - second-level sub-intent - multi-level specific intent". The extraction of core intent nodes is based on the principle of best matching the user's direct needs. If there are clear specific intent nodes in the hierarchy result (such as "mobile phone after-sales service - appearance damage - screen breakage - replacement application"), then the lowest-level specific intent node is determined as the core intent node; if the hierarchy result only contains core intent and sub-intent (such as "account service - password reset"), then the sub-intent node is determined as the core intent node, ensuring that the core intent node can accurately represent the user's core needs. Subsequently, business features strongly associated with the core intent nodes are extracted, including entity features (such as product name, order number, service period, and other key entities clearly mentioned in the user's consultation), scenario features (such as consultation time period, user identity type, historical service records, and other contextual scenario information), and demand features (such as the user's expected processing method, time requirements, and other demand details). All extracted business features are organized in the form of key-value pairs of "feature name - feature value" to form a structured set of associated business features.
[0042] It should be noted that the preset standard response library in this embodiment is a structured template library built according to intent hierarchy. The library stores response templates corresponding to all in-service intents. Each template is associated with a unique intent node identifier, the appropriate intent hierarchy, and a complete response text framework. The templates are stored according to a hierarchical relationship of "core intent - subdivided intent - specific intent" for easy retrieval. Specifically, the preset standard response library forms an initial library by writing corresponding standard response texts or guiding dialogue templates for each standard intent pattern (in-service) or typical out-of-service scenario. During the system trial operation phase, the templates are optimized and expanded based on actual user interaction feedback with the intelligent customer service, such as satisfaction and problem resolution rate. The accurate matching process adopts a hierarchical progressive matching method. First, the hierarchical identifier of the core intent node is used as the search condition to locate the template subset of the corresponding level in the standard response library; then, the intent name and semantic features of the core intent node are accurately compared with the template related intent in the template subset, and the semantic matching degree is calculated (the matching degree is calculated based on the weighted sum of keyword overlap rate and semantic relevance); finally, the template with the highest semantic matching degree is selected as the basic response template. If there are multiple templates with the same highest matching degree, the templates that are suitable for the scenario are further selected based on the scenario features in the associated business features.
[0043] It is worth further explaining that, regarding the parameter filling and semantic adaptation based on related business features, this embodiment first parses the text structure of the basic response template and identifies the preset parameter placeholders in the template (such as "{product name}", "{order number}", "{processing time limit}", etc.), each placeholder corresponding to a specific business feature name. During parameter filling, the set of related business features is traversed, and the feature values corresponding to the placeholders are accurately filled into the template. If a placeholder does not have a corresponding business feature value (such as the user not mentioning the order number), a preset general expression (such as "related order" or "corresponding business") or guiding statement (such as "If you need precise processing, you can provide your order number") is filled in to avoid blank placeholders or semantic breaks in the template. After parameter filling is completed, semantic adaptation optimization is performed. First, adjust the fluency of the sentences by adjusting the original sentence structure of the template according to the filled parameters to ensure that the reply text is grammatically correct and naturally expressed. Second, adapt to the user's tone by adjusting the wording of the reply in accordance with the urgency and emotional tendency of the user's request in the context of related business characteristics (e.g., the tone of complaint requests is more formal and rigorous, while the tone of consultation requests is more friendly and easy to understand). Third, supplement the information related to business logic by adding extended service prompts related to the core intent in the reply (e.g., "After the password reset is successful, it is recommended that you update the bound mobile phone number to improve account security") to enhance the practicality and guidance of the reply.
[0044] In one implementation, after generating and validating the final business response text and completing semantic adaptation, a preliminary business response text is obtained. The system then performs dual verification. First, a completeness verification checks whether the response text contains key processing information corresponding to the core intent (such as process descriptions, processing channels, precautions, etc.), ensuring no core information is omitted. Second, a compliance verification ensures the response text does not contain illegal statements or sensitive information and complies with industry standards and service commitments. If the verification passes, the text is designated as the final business response text. If problems are found during verification (such as missing core information or inappropriate statements), a template re-adaptation process is triggered. Based on related business characteristics, the template is adjusted or supplementary information is added until a compliant business response text is generated, ensuring that the response text accurately addresses user needs while meeting business standards and interactive experience requirements.
[0045] It is worth noting that the preset standard response library supports dynamic updates and personalized configuration. Response templates can be added or modified based on business process optimization and service policy adjustments. Differentiated templates can also be configured for different user groups (such as members and new users). At the same time, parameter placeholders, general expressions, and extended service prompts in the templates can be flexibly adjusted to ensure the adaptability and timeliness of the response text. In addition, the rules for parameter filling and semantic adaptation are stored in the rule library and can be continuously optimized based on user feedback and interaction data to improve the naturalness and accuracy of the response text.
[0046] In step S16, if the service scope matching conclusion is an out-of-service intent, then the corresponding initial guidance template is extracted from the preset guidance template library, and the semantic consistency between the initial guidance template and the consultation text is checked. Based on the check result, the initial guidance template is dynamically semantically adapted to generate customized guidance response text, including: If the service scope matching conclusion is an out-of-service intent, then the corresponding initial guidance template is extracted from the preset guidance template library according to the current intent characteristics; The initial guidance template is parsed to obtain the technical verification mark, the actual semantic feature vector of the user's consultation text is extracted, and the semantic difference value between the technical verification mark and the actual semantic feature vector is calculated. If the semantic difference value is less than the preset semantic matching threshold, then the technical verification mark is confirmed to conform to the actual semantics and a semantic verification matrix is constructed; If the semantic difference value is greater than or equal to the preset semantic matching threshold, it is determined that the initial guidance template does not match the consultation text, and a new candidate guidance template is selected from the preset guidance template library and a semantic verification matrix is constructed. Based on the semantic verification matrix, the final guidance template is dynamically reorganized and its content optimized to generate customized guidance response text.
[0047] In one implementation, the preset guidance template library in this embodiment is a structured template collection categorized by type of out-of-service intent. It covers typical out-of-service scenarios such as "non-core business inquiries," "requests exceeding service capabilities," "invalid inquiries," and "cross-domain requests." Each scenario is configured with multiple guidance templates adapted to different semantic tendencies, and each template is associated with clear intent feature tags, scenario adaptation rules, and technical verification markers. When the service scope matching conclusion is determined to be an out-of-service intent, the intent features of the current user's inquiry are first extracted (including core keywords, sentence structure tendencies, and request types). Using these features as search conditions, the preset guidance template library is traversed. Through a dual search logic of "feature tag matching + scenario rule adaptation," the template with the highest degree of fit with the current intent features is selected as the initial guidance template, ensuring the scenario adaptability and semantic relevance of the initial template.
[0048] It should be noted that, regarding the parsing of the initial guidance template and the calculation of the semantic difference value, this embodiment first performs structured parsing of the initial guidance template, extracting the built-in technical verification markers. These markers are a set of key features representing the core semantic guidance of the template (such as feature vectors corresponding to semantic tags like "guide to human intervention," "service scope prompt," and "recommend relevant channels"), and their feature dimensions are consistent with the actual semantic feature vectors extracted subsequently. Then, the actual semantic feature vectors of the user's consultation text are extracted. Based on the word sequence annotation version obtained in step S11, keywords and semantic tendency words reflecting the core of the user's needs are selected and converted into fixed-dimensional actual semantic feature vectors using vector mapping. The vector mapping is consistent with the feature encoding specifications of the product intent pattern library. The semantic difference value is calculated using the Euclidean distance method, obtained by calculating the multi-dimensional spatial distance between the technical verification markers and the actual semantic feature vectors.
[0049] In one implementation, the semantic difference threshold comparison and semantic verification matrix construction are based on quantitative values obtained from historical guidance template adaptation data. These values have been verified across multiple scenarios and can be dynamically adjusted according to the guidance effect. Their function is to determine the semantic matching validity between the initial guidance template and the user's consultation text. If the semantic difference value is less than the preset semantic matching threshold, it indicates that the core semantics of the initial guidance template highly match the user's consultation intent, confirming that the technical verification mark conforms to the actual semantics. At this point, a semantic verification matrix is constructed: the matrix's row dimension represents the core feature items of the technical verification mark, the column dimension represents the corresponding feature items of the actual semantic feature vector, and the matrix elements represent the matching degree of the two feature values (values between 0 and 1), used to quantify the semantic adaptation details between the template and the consultation text. The matching degree is obtained by converting each core feature item of the technical verification mark into a feature vector, and also converting the corresponding feature items of the actual semantic feature vector into vectors of the same dimension, calculating the cosine of the angle between the two. If the feature item is a discrete label, the matching degree is one when the labels match and zero when they do not. If the semantic difference value is greater than or equal to the preset semantic matching threshold, it is determined that the initial guidance template and the consultation text do not match, triggering a template reselection process. Expand the search scope based on the current intent features, select 3-5 candidate guidance templates from the preset guidance template library, calculate the semantic difference between the technical verification mark and the actual semantic feature vector of each candidate template, select the candidate template with the smallest difference value as the new initial guidance template, and then construct a semantic verification matrix based on the template to ensure the semantic accuracy of subsequent adaptation processing.
[0050] Specifically, the preset semantic matching threshold is determined based on experimental statistics combined with practical experience in the field. 50,000 service-related inquiries and template adaptation data from enterprises over the past 6 months were selected as samples. Semantic fit, user acceptance, and guidance effectiveness were used as indicators. After experiments in the range of 0.5-0.9, it was found that when the threshold was 0.6, the three indicators reached 92.5%, 89.3%, and 85.7% respectively, and the semantic deviation rate of 7.2% met the field's requirement of an adaptation error tolerance rate of no more than 8%. Therefore, the initial value was preset to 0.6.
[0051] It should be noted that the implementation first analyzes the semantic verification matrix to clarify the parts of the template to be retained and those to be adjusted. During the dynamic reorganization process, the semantic expressions corresponding to the core feature items in the template are retained, while the expressions corresponding to the feature items to be optimized are replaced or modified. The replaced parts are adapted to the expression, and the modified parts are adjusted in sentence structure or supplemented with details according to the core requirements of the actual semantic feature vector. Subsequently, three layers of content optimization are performed: first, semantic accuracy optimization, ensuring that the semantics of the reorganized template do not deviate from the user's consultation intent, while clearly conveying the service boundaries; second, tone adaptation optimization, adjusting the guiding wording according to the user's consultation tone (such as question, request, complaint), avoiding harsh expressions, and improving user acceptance; and third, guidance effectiveness optimization, supplementing alternative solutions or channel prompts related to the user's needs (such as "The content of your consultation is beyond the scope of this customer service service. We suggest you contact the XX special channel for consultation. Contact number: XXX"), enhancing the practicality of the guidance.
[0052] In one implementation, after generating and validating customized guidance response text, and dynamically reorganizing and optimizing it to obtain a preliminary guidance response text, the system performs dual verification. First, semantic consistency verification checks whether the text's semantics match the results of the semantic verification matrix, ensuring no semantic deviations or contradictions. Second, compliance and completeness verification ensures the text does not contain any illegal expressions and fully includes core information such as service boundary descriptions, guidance directions, and necessary prompts. If the verification passes, the text is determined as the final customized guidance response text. If the verification fails, the system returns to the semantic verification matrix parsing stage for re-optimization until a compliant guidance response text is generated, ensuring that the response text clearly defines service boundaries and provides effective guidance to users, thus improving the interactive experience.
[0053] In step S17, semantic association analysis is performed based on the business response text or the guidance response text to determine the focus direction of the next round of dialogue, and the update of this interaction record is completed, including: The business response text or the guidance response text is obtained, the lexical unit is parsed, and then mapped to a pre-built dynamic thesaurus to complete the entry supplementation and update; Based on the supplemented dynamic lexicon, the historical dialogue records are reconstructed to generate an enhanced historical dialogue sequence; Semantic association analysis is performed on the enhanced historical dialogue sequence to construct a semantic association matrix and quantify the association degree between features; The semantic association matrix is analyzed to identify the user's unfinished intent nodes, and these unfinished intent nodes are determined as the focus direction of the next round of dialogue. The intelligent customer service's conversation status table is corrected according to the focus direction, and the consultation text, service scope matching conclusion, reply text, and focus direction are synchronously written into the interaction record database to complete the update of this interaction record.
[0054] In one implementation, this embodiment first performs structured parsing on the business response text or guidance response text, extracting the core lexical units in the text, including business terms, key action words, entity nouns, newly added descriptive words, etc., while labeling the part-of-speech and semantic attributes of each lexical unit. Then, the parsed lexical units are mapped to the dynamic lexicon of intelligent customer service, and the lexicon is updated twice. First, entries are added: if a lexical unit is a newly added word not included in the lexicon, such as emerging business terms or frequently used personalized words, the word, its part-of-speech, semantic attributes, and applicable scenarios are added to the lexicon, and a unique identifier is assigned to the word. Second, entries are optimized: if a lexical unit already exists in the lexicon, the semantic association rules and frequency statistics of the word are updated according to the usage scenario in the current text, ensuring that the lexicon can adapt to changes in user expression habits and business terms in real time, providing an accurate vocabulary foundation for subsequent dialogue analysis. The dynamic lexicon is initially based on a general Chinese lexicon, and includes product terms, business action words, and common consultation keywords from the intelligent customer service business field, with a total of no less than 10,000 entries.
[0055] It should be noted that, in this embodiment, the historical dialogue records used to reconstruct enhanced historical dialogue sequences based on a dynamic lexicon include all interactive texts, intent recognition results, and response content prior to the current consultation. The reconstruction process uses the updated dynamic lexicon as the semantic parsing benchmark. First, each text in the historical dialogue records is re-segmented and semantically annotated, replacing outdated vocabulary and supplementing missing semantic tags to ensure the semantic parsing results of the historical text are consistent with the current lexicon standard. Then, the reconstructed historical dialogue text is concatenated and integrated with the consultation text and response text of the current consultation, according to the dialogue time sequence, while simultaneously annotating the timestamp, intent tag, and interaction type (user input / system response) of each text. Finally, redundant information is removed from the integrated dialogue sequence, retaining key text fragments related to the user's core needs, generating an enhanced historical dialogue sequence. This sequence is semantically coherent and information-focused, providing complete contextual support for subsequent semantic association analysis.
[0056] In one implementation, this embodiment employs an analysis method based on keyword overlap and semantic logical association to perform sentence-by-sentence semantic parsing of the enhanced historical dialogue sequence, extracting core semantic features (including intent keywords, business entities, and appeal tendencies) from each text. Subsequently, a semantic association matrix is constructed. The row and column dimensions of the matrix are the text segment numbers in the enhanced historical dialogue sequence, and the matrix elements are the association scores between corresponding text segments. The association score calculation rule is as follows: a base score is based on keyword overlap rate, and a correction coefficient is assigned based on semantic logical relationships such as causality, progression, and contrast. The final association score ranges from 0 to 1, with higher values indicating stronger semantic association between the two text segments. The correction coefficient is determined according to the semantic logical relationship; for example, causal relationships are assigned 1.2, progression relationships 1.1, contrast relationships 0.9, and no special relationship 1.0. This matrix quantifies the semantic association strength of each text segment throughout the entire dialogue process.
[0057] It should be noted that this embodiment first traverses the semantic association matrix and, in conjunction with the text content of the enhanced historical dialogue sequence, identifies the evolution path of user requests. It focuses on analyzing combinations of text segments with high relevance values to track the continuation and changes of core intents. Simultaneously, it filters out text segments with low relevance values but containing unclear responses to locate intent nodes where the user has not received sufficient answers or still has extended requests (i.e., unresolved intent nodes). The criteria for determining unresolved intent nodes are: requests explicitly mentioned by the user but not covered by the system response; content in the system response that guides the user to provide further information but the user has not responded to; and potential extended user requests derived from semantic association. The identified unresolved intent nodes are sorted according to semantic association strength and business priority. The unresolved intent node with the highest priority is selected as the focus direction for the next round of dialogue. If no unresolved intent nodes exist, the focus direction is marked as "no clear extended request," ensuring that the next round of dialogue accurately addresses the user's needs.
[0058] In one implementation, regarding the correction of the session state table and the completion of interaction record updates, the intelligent customer service session state table in this embodiment is used to record the core state information of the current dialogue, including the current intent node, focus direction, user identity identifier, and interaction progress. First, the session state table is corrected based on the determined focus direction: the "current focus direction" field is updated to the identified unfinished intent node, and the "interaction progress" field is adjusted synchronously to ensure that the session state is consistent with the user's needs. Then, an interaction record update operation is performed: the complete information of this consultation is organized according to a preset data format, including the user's consultation text, service scope matching conclusion, generated reply text, next round of dialogue focus direction, dialogue timestamp, user identity identifier, etc., and synchronously written to the intelligent customer service interaction record library. The interaction record library adopts a structured storage method, supports retrieval by user identity, time range, intent type, and other dimensions, and the recorded data is periodically synchronized to the data analysis module to provide data support for intelligent customer service response strategy optimization and intent recognition rule iteration, ensuring the integrity and usability of the interaction records.
[0059] In summary, this invention discloses an intelligent customer service dialogue automatic response method based on a large model. The method includes: first, acquiring the user-inputted consultation text; obtaining a lexical set through preprocessing; constructing a multi-dimensional feature matrix after part-of-speech tagging and disambiguation; outputting a structured vocabulary sequence; subsequently, evaluating the annotation accuracy of the structured vocabulary sequence; performing rule-based correction on annotation results below a preset threshold to obtain a high-precision word sequence annotation version; extracting keyword vectors and sentence pattern sequences based on this annotation version to construct an intent feature set and generate intent category hierarchical results; optimizing feature weights by calculating feature discrimination index and performing secondary optimization with a standard intent template library. The process involves matching candidate intents to determine whether the matching conclusion is within or outside the service, based on service boundary judgment thresholds. For intents within the service, a standard response library is matched, and business response text tailored to specific needs is generated through parameter filling and semantic adaptation. For intents outside the service, templates are extracted from the guidance template library, semantically checked, and dynamically reorganized to generate customized guidance response text. Finally, the lexical units in the response text are parsed to update the dynamic lexicon, the historical dialogue sequence is reconstructed, and semantic association analysis is performed. Unfinished intent nodes of the user are identified as the focus of the next round of dialogue, the session state table is corrected, and the interaction record library is updated synchronously, completing the entire process of automatic response and interaction optimization.
[0060] Reference Figure 2 The second embodiment of the present invention provides an intelligent customer service dialogue automatic response system based on a large model, comprising: The consultation text parsing module is used to obtain the consultation text input by the user, preprocess the consultation text, and obtain a structured vocabulary sequence. The annotation accuracy verification module is used to evaluate the annotation accuracy of the structured vocabulary sequence to obtain an accuracy detection value. If the accuracy detection value is lower than a preset accuracy threshold, the erroneous annotations in the structured vocabulary sequence are corrected to obtain a word sequence annotation version. The intent feature matching module is used to extract keywords, sentence structure and part of speech from the word sequence annotation version to obtain intent features, encode the intent features to obtain an intent feature set, and perform similarity matching between the intent feature set and a preset product intent pattern library to obtain intent category hierarchical results; The service scope determination module is used to perform secondary intent matching on the intent category hierarchical results to obtain a candidate intent list sorted by matching priority. Based on the comparison result between the matching similarity value corresponding to the first intent in the candidate intent list and the preset service boundary determination threshold, the service scope matching conclusion is determined. The service scope matching conclusion includes in-service intents and out-of-service intents. The business response generation module is used to generate corresponding business response text based on the service scope matching conclusion of the service scope matching conclusion and the preset standard response library, and to match the result of the intent category hierarchical matching with the result of the matching. The guided response generation module is used to extract the corresponding initial guided template from the preset guided template library if the service scope matching conclusion is an intention outside the service, perform semantic consistency verification between the initial guided template and the consultation text, and dynamically adapt the initial guided template semantically according to the verification result to generate customized guided response text. The dialogue interaction update module is used to perform semantic association analysis based on the business response text or the guidance response text, determine the focus direction of the next round of dialogue, and complete the update of the current interaction record.
[0061] It should be noted that the intelligent customer service dialogue automatic response system based on a large model provided in this embodiment of the invention is used to execute all the process steps of the intelligent customer service dialogue automatic response method based on a large model in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0062] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0063] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for automatic response in intelligent customer service dialogues based on a large model, characterized in that, include: Obtain the consultation text input by the user, preprocess the consultation text to obtain a structured vocabulary sequence; The structured vocabulary sequence is labeled with an accuracy evaluation value to obtain an accuracy detection value. If the accuracy detection value is lower than a preset accuracy threshold, the erroneous labels in the structured vocabulary sequence are corrected to obtain a word sequence labeled version. Intent features are obtained by extracting keywords, sentence structure and part of speech from the word sequence annotation version, encoding the intent features to obtain an intent feature set, and performing similarity matching between the intent feature set and a preset product intent pattern library to obtain intent category hierarchical results; A secondary intent matching is performed on the intent category hierarchical results to obtain a candidate intent list sorted by matching priority. Based on the comparison result between the matching similarity value corresponding to the first intent in the candidate intent list and the preset service boundary judgment threshold, a service scope matching conclusion is determined. The service scope matching conclusion includes in-service intents and out-of-service intents. If the service scope matching conclusion is an in-service intent, then the corresponding business response text is generated based on the matching result of the intent category hierarchical result and the preset standard response library. If the service scope matching conclusion is an intention outside the service, then the corresponding initial guidance template is extracted from the preset guidance template library, the semantic consistency between the initial guidance template and the consultation text is checked, and the initial guidance template is dynamically semantically adapted according to the check result to generate customized guidance response text; Based on the business response text or the guidance response text, semantic association analysis is performed to determine the focus of the next round of dialogue and complete the update of this interaction record.
2. The intelligent customer service dialogue automatic response method based on a large model according to claim 1, characterized in that, The process of obtaining user-inputted consultation text and preprocessing the consultation text to obtain a structured vocabulary sequence includes: Obtain the user-inputted consultation text, remove irrelevant symbols and noise characters from the consultation text to obtain clean text; The clean text is segmented based on a preset word segmentation rule library to obtain a set of segmented word elements; Part-of-speech tagging is performed on the segmented word set to obtain an initial tagging sequence. Then, the initial tagging sequence is disambiguated by combining contextual semantic analysis to obtain an accurate tagging sequence. A multidimensional feature matrix is constructed based on the precisely labeled sequence. The multidimensional feature matrix is first standardized and then vectorized and concatenated to obtain a structured vocabulary sequence.
3. The intelligent customer service dialogue automatic response method based on a large model according to claim 1, characterized in that, The step of evaluating the annotation accuracy of the structured vocabulary sequence to obtain an accuracy detection value, and if the accuracy detection value is lower than a preset accuracy threshold, then correcting the erroneous annotations in the structured vocabulary sequence to obtain a word sequence annotation version, includes: The structured vocabulary sequence is labeled with an accuracy evaluation to obtain a set of confidence scores. An accuracy detection result matrix is constructed based on the set of confidence scores, and the values in the accuracy detection result matrix are accuracy detection values. If the accuracy detection value is lower than the preset accuracy threshold, the part-of-speech sequence to be corrected is obtained, the erroneous labeled nodes in the part-of-speech sequence to be corrected are located, and the preset domain dictionary is called to perform rule correction on the erroneous labeled nodes to obtain the corrected part-of-speech sequence. The corresponding nodes in the structured vocabulary sequence are replaced with the corrected part-of-speech sequence to obtain the word sequence annotation version.
4. The intelligent customer service dialogue automatic response method based on a large model according to claim 1, characterized in that, The process involves extracting keywords, sentence structure, and parts of speech from the labeled word sequence to obtain intent features, encoding these intent features to obtain an intent feature set, and performing similarity matching between the intent feature set and a preset product intent pattern library to obtain intent category hierarchical results, including: Based on the word sequence annotation version, keywords and sentence patterns are identified using preset intent feature extraction rules. The keywords are mapped into keyword vectors, and the sentence patterns are encoded into sentence pattern sequences. An intent feature set is constructed by combining the keyword vectors and the sentence pattern sequences. Calculate the similarity between the intent feature set and each standard intent pattern in the preset product intent pattern library, and generate a similarity score matrix; If the values in the similarity score matrix meet the preset matching conditions, the subset of patterns with the highest matching degree is extracted to obtain the preliminary intent category label; The initial intent category labels are hierarchically divided to generate an intent category hierarchical structure. The intent category hierarchical structure is then corrected for deviations to obtain the intent category hierarchical result.
5. The intelligent customer service dialogue automatic response method based on a large model according to claim 1, characterized in that, The second intent matching is performed on the intent category hierarchy results to obtain a candidate intent list sorted by matching priority. Based on the comparison between the matching similarity value corresponding to the first intent in the candidate intent list and a preset service boundary determination threshold, a service scope matching conclusion is determined. The service scope matching conclusion includes in-service intents and out-of-service intents, including: Obtain the intent category hierarchical results and the corresponding associated original semantic feature distribution data, and calculate the discriminant index of each feature in different intent subclasses; Weights are assigned to the original semantic feature distribution data based on the discriminant index to obtain a set of weighted feature vectors; The weighted feature vector set is matched with a preset standard intent template library for secondary similarity to generate a candidate intent list containing matching priorities; Extract the similarity value corresponding to the first highest priority intent in the candidate intent list. If the similarity value is greater than the preset service boundary determination threshold, the service scope matching conclusion is determined to be an in-service intent; otherwise, it is determined to be an out-of-service intent.
6. The intelligent customer service dialogue automatic response method based on a large model according to claim 1, characterized in that, If the service scope matching conclusion is an in-service intent, then based on the intent category hierarchical result and the preset standard response library, a corresponding business response text is generated according to the matching result, including: If the service scope matching conclusion is an in-service intent, then extract the core intent node and related business features from the intent category hierarchical results; The core intent node is matched with the response templates in the preset standard response library, and the basic response template with the highest matching degree is selected. Based on the associated business characteristics, the basic reply template is sequentially filled with parameters and semantically adapted to generate business reply text that fits the user's inquiry needs.
7. The intelligent customer service dialogue automatic response method based on a large model according to claim 1, characterized in that, If the service scope matching conclusion is an out-of-service intent, then the corresponding initial guidance template is extracted from the preset guidance template library, and the semantic consistency between the initial guidance template and the consultation text is checked. Based on the check result, the initial guidance template is dynamically semantically adapted to generate customized guidance response text, including: If the service scope matching conclusion is an out-of-service intent, then the corresponding initial guidance template is extracted from the preset guidance template library according to the current intent characteristics; The initial guidance template is parsed to obtain the technical verification mark, the actual semantic feature vector of the user's consultation text is extracted, and the semantic difference value between the technical verification mark and the actual semantic feature vector is calculated. If the semantic difference value is less than the preset semantic matching threshold, then the technical verification mark is confirmed to conform to the actual semantics and a semantic verification matrix is constructed; If the semantic difference value is greater than or equal to the preset semantic matching threshold, it is determined that the initial guidance template does not match the consultation text, and a new candidate guidance template is selected from the preset guidance template library and a semantic verification matrix is constructed. Based on the semantic verification matrix, the final guidance template is dynamically reorganized and its content optimized to generate customized guidance response text.
8. The intelligent customer service dialogue automatic response method based on a large model according to claim 1, characterized in that, The step of performing semantic association analysis based on the business response text or the guidance response text to determine the focus of the next round of dialogue and update the current interaction record includes: The business response text or the guidance response text is obtained, the lexical unit is parsed, and then mapped to a pre-built dynamic thesaurus to complete the entry supplementation and update; Based on the supplemented dynamic lexicon, the historical dialogue records are reconstructed to generate an enhanced historical dialogue sequence; Semantic association analysis is performed on the enhanced historical dialogue sequence to construct a semantic association matrix and quantify the association degree between features; The semantic association matrix is analyzed to identify the user's unfinished intent nodes, and these unfinished intent nodes are determined as the focus direction of the next round of dialogue. The intelligent customer service's conversation status table is corrected according to the focus direction, and the consultation text, service scope matching conclusion, reply text, and focus direction are synchronously written into the interaction record database to complete the update of this interaction record.
9. An intelligent customer service dialogue automatic response system based on a large model, characterized in that, include: The consultation text parsing module is used to obtain the consultation text input by the user, preprocess the consultation text, and obtain a structured vocabulary sequence. The annotation accuracy verification module is used to evaluate the annotation accuracy of the structured vocabulary sequence to obtain an accuracy detection value. If the accuracy detection value is lower than a preset accuracy threshold, the erroneous annotations in the structured vocabulary sequence are corrected to obtain a word sequence annotation version. The intent feature matching module is used to extract keywords, sentence structure and part of speech from the word sequence annotation version to obtain intent features, encode the intent features to obtain an intent feature set, and perform similarity matching between the intent feature set and a preset product intent pattern library to obtain intent category hierarchical results; The service scope determination module is used to perform secondary intent matching on the intent category hierarchical results to obtain a candidate intent list sorted by matching priority. Based on the comparison result between the matching similarity value corresponding to the first intent in the candidate intent list and the preset service boundary determination threshold, the service scope matching conclusion is determined. The service scope matching conclusion includes in-service intents and out-of-service intents. The business response generation module is used to generate corresponding business response text based on the service scope matching conclusion of the service scope matching conclusion and the preset standard response library, and to match the result of the intent category hierarchical matching with the result of the matching. The guided response generation module is used to extract the corresponding initial guided template from the preset guided template library if the service scope matching conclusion is an intention outside the service, perform semantic consistency verification between the initial guided template and the consultation text, and dynamically adapt the initial guided template semantically according to the verification result to generate customized guided response text. The dialogue interaction update module is used to perform semantic association analysis based on the business response text or the guidance response text, determine the focus direction of the next round of dialogue, and complete the update of the current interaction record.