Intelligent dialogue method, system and device based on large model and local knowledge base

The intelligent dialogue method using a large model and local knowledge base addresses ambiguity by dynamically adjusting responses, enhancing accuracy and user satisfaction through flexible interaction strategies.

CN118916469BActive Publication Date: 2024-12-20BEIJING YUENENG TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411396790.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2024-12-20
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

Existing dialogue systems struggle with ambiguous inputs, failing to accurately understand user intentions and adjust response types, leading to poor performance and user experience.

Method used

An intelligent dialogue method using a large model and local knowledge base that includes preprocessing, matching degree analysis, feature extraction, and fuzzy logic to dynamically adjust response types based on user input clarity and relevance.

Benefits of technology

Enhances accuracy and flexibility in responding to user queries, reducing errors and biases, improving user satisfaction through personalized and goal-oriented interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916469B_ABST
    Figure CN118916469B_ABST
Patent Text Reader

Abstract

The present invention discloses an intelligent dialogue method, system and device based on a large model and a local knowledge base, and specifically relates to the field of intelligent dialogue technology, including the following steps: obtaining user input content and performing a preprocessing operation on the user input content, and then performing a matching analysis operation based on the result of the preprocessing operation; judging whether the local knowledge base has a potential problem of insufficient matching based on the result of the matching analysis operation; performing feature extraction and feature analysis on the user input content corresponding to the potential problem of insufficient matching in the local knowledge base, and then inferring and using the knowledge response dialogue type adopted by the current user input content based on the result of the feature analysis operation; the present invention can comprehensively analyze the user input, reduce the errors and biases that may be introduced by relying on manual operations, and can dynamically adjust the dialogue strategy according to the specific circumstances of the user input, so as to better meet the needs of different users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent dialogue technology, and more specifically, to an intelligent dialogue method, system and device based on a large model and a local knowledge base. Background Art

[0002] With the rapid development of artificial intelligence technology, especially in the field of natural language processing (NLP), intelligent dialogue systems have become a hot topic in research and application. These systems are designed to automatically communicate with users effectively, solve users' questions or perform specific tasks. However, dialogue systems in the existing technology often perform poorly when processing users' ambiguous inputs and have difficulty accurately understanding users' true intentions, especially when the input data is complex or the semantics are unclear.

[0003] Traditional dialogue systems rely on fixed rules or simple keyword matching techniques, which limits the system's performance when faced with ambiguous or ambiguous questions. Although some advanced systems use machine learning methods to improve understanding capabilities, these systems often require a large amount of labeled data and still perform poorly on new types of questions that have not been seen. In addition, existing dialogue systems lack flexibility in choosing response types and usually fail to adjust their answer strategies according to specific situations, which affects the user experience. Therefore, there is an urgent need for a new intelligent dialogue system solution that can effectively handle ambiguous inputs and intelligently adjust response types. Summary of the invention

[0004] To achieve the above object, the present invention provides the following technical solutions:

[0005] The intelligent dialogue method based on the large model and local knowledge base includes the following steps:

[0006] Obtaining user input content and performing a preprocessing operation on the user input content, and then performing a matching degree analysis operation based on the result of the preprocessing operation;

[0007] Based on the result of the matching degree analysis operation, it is determined whether the local knowledge base has a hidden danger of insufficient matching degree;

[0008] For the user input content corresponding to the potential problem of insufficient matching degree in the local knowledge base, feature extraction and feature analysis operations are performed, and then the knowledge response dialogue type adopted by the current user input content is inferred and used based on the result of the feature analysis operation.

[0009] In a preferred embodiment, the preprocessing operation on the user input content refers to performing word segmentation processing on the user input content according to a preset strategy to obtain a keyword set consisting of multiple keywords in the user input.

[0010] In a preferred embodiment, the matching degree analysis operation refers to:

[0011] Each keyword in the keyword set is obtained separately and matched with the term set in the local knowledge base to obtain the maximum similarity between the keyword and the term in the term set in the local knowledge base, and then the maximum similarity corresponding to each keyword is summarized to obtain a matching set, and then the average value and standard deviation of the matching set are calculated, and then the average value and standard deviation of the matching set are compared with the preset standard density range and standard deviation threshold respectively. If the average value of the matching set falls within the preset standard density range and the standard deviation of the matching set is less than or equal to the preset standard deviation threshold, a normal signal is generated. If the average value of the matching set does not fall within the preset standard density range and the standard deviation of the matching set is less than or equal to the preset standard deviation threshold, an abnormal signal is generated.

[0012] In a preferred embodiment, judging whether the local knowledge base has a potential problem of insufficient matching based on the result of the matching analysis operation means that when the abnormal signal is generated, the local knowledge base has a potential problem of insufficient matching.

[0013] Feature extraction and feature analysis operations refer to: extracting fuzziness feature information and domain relevance information of user input content, generating a fuzziness index based on the fuzziness feature information, and generating a domain relevance index based on the domain relevance information.

[0014] In a preferred embodiment, the logic for obtaining the fuzziness index is:

[0015] Get the text input by the user and perform word segmentation, then calculate the frequency of each word in the segmented text, identify long-tail words whose frequency is lower than the preset benchmark threshold, and then calculate the proportion of long-tail words in the text to obtain the vocabulary complexity coefficient CH;

[0016] Using the pre-trained semantic similarity model, calculate the similarity values ​​between the user question and multiple semantic interpretations, then determine the value corresponding to the interpretation with the highest similarity and record it as the highest similarity S1, and calculate the sum of the similarities of all interpretations and record it as the total similarity S2. Calculate the semantic fuzziness coefficient YY using the following formula: ;

[0017] The sentence input by the user is parsed to generate a syntactic tree, and then the nodes with multiple interpretations in the syntactic structure are identified and counted as C1. The total number of all syntactic structure nodes is counted as C2, and then the syntactic fuzziness coefficient JF is calculated using the formula: ;

[0018] Substitute the lexical complexity coefficient CH, semantic fuzziness coefficient YY, and syntactic fuzziness coefficient JF into the following calculation formula: ; represents the fuzziness index, , , are all preset weight coefficients. A constant set to prevent division by zero errors.

[0019] In a preferred embodiment, the logic for obtaining the domain relevance index is:

[0020] For each keyword in the keyword set input by the user, calculate its similarity with the term set in the local knowledge base, select the maximum similarity as the final similarity score of the keyword and record it as , and then perform the following calculation:

[0021] ; is the preset influence coefficient of the keyword numbered i, k is the preset exponential amplification coefficient, ranging from one to three, n is the total number of keywords in the keyword set, is the domain relevance index.

[0022] In a preferred embodiment, inferring the knowledge response dialogue type used by the current user input content refers to:

[0023] Domain Relevance Index and fuzziness index All of them are used as input variables, and the knowledge response dialogue type adopted by the current user input content is used as the output variable. The input variables are fuzzified and the values ​​of the input variables are converted into fuzzy sets. The output variables are fuzzified and the output variables are converted into fuzzy sets. Fuzzy rules are formulated to describe the dialogue response requirements under different data type combinations. The fuzzified input variables are inferred through fuzzy rules to obtain the knowledge response dialogue type adopted by the current user input content.

[0024] In a preferred embodiment, the intelligent dialogue system based on the big model and the local knowledge base is used to implement the intelligent dialogue method based on the big model and the local knowledge base, including:

[0025] A preprocessing module, used to obtain user input content and perform preprocessing operations on the user input content;

[0026] A matching degree analysis module is used to perform matching degree analysis based on the result of the preprocessing operation and determine whether there is a potential problem of insufficient matching degree in the local knowledge base;

[0027] A feature analysis module is used to extract features from user input content corresponding to potential problems with insufficient matching in the local knowledge base and perform feature analysis operations;

[0028] The dialogue type inference module is used to infer and use the knowledge response dialogue type adopted by the current user input content based on the results of the feature analysis operation.

[0029] In a preferred embodiment, an intelligent dialogue device based on a large model and a local knowledge base includes a memory and a processor, the memory is used to store information including program instructions, the processor is used to control the execution of the program instructions, and the program instructions are loaded and executed by the processor to implement an intelligent dialogue method based on a large model and a local knowledge base.

[0030] Technical effects and advantages of the present invention:

[0031] By using the big model and local knowledge base, the present invention can comprehensively analyze user input and quickly and accurately match relevant knowledge base entries or deep responses generated by the big model. This automated data analysis and processing capability greatly improves the speed and accuracy of problem solving and avoids misunderstandings or delays that may occur in traditional manual dialogue.

[0032] Through the automated intelligent dialogue system, the present invention reduces the errors and biases that may be introduced by relying on manual operations, ensuring the consistency and reliability of the information and solutions provided to users. At the same time, the fast and accurate response significantly improves user satisfaction and enhances user trust in the service.

[0033] Combined with fuzzy logic, the present invention can dynamically adjust the dialogue strategy according to the specific situation of the user input, such as from basic answers to in-depth explanations to guided questions, ensuring that the interaction with the user is more personalized and goal-oriented. The flexibility of this strategy enables the system to better meet the needs of different users.

[0034] Through intelligent decision support, the present invention optimizes the use of human and computing resources. The system can automatically determine when to use data in the local knowledge base and when to call a large, computationally intensive model, thereby reducing operating costs while ensuring service quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to facilitate understanding by those skilled in the art, the present invention is further described below in conjunction with the accompanying drawings;

[0036] Figure 1 This is a schematic diagram of the intelligent dialogue method based on a large model and a local knowledge base in the present invention.

[0037] Figure 2 This is a schematic diagram of the intelligent dialogue system based on a large model and a local knowledge base in the present invention. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] Reference Figure 1 - Figure 2 The following embodiments are obtained:

[0040] Embodiment 1: An intelligent dialogue method based on a large model and a local knowledge base comprises the following steps:

[0041] The user input content is obtained and preprocessed, and then a matching degree analysis operation is performed based on the result of the preprocessing operation; the preprocessing operation is performed according to a preset strategy, mainly through word segmentation processing, which is a prior art well known to those skilled in the art and will not be described in detail here, to break down the sentences input by the user into a set of keywords with semantic meaning. The goal of this step is to simplify the input into structured data for subsequent analysis. By constructing a keyword set, the accuracy of the system in identifying and analyzing content can be improved. Through word segmentation processing, the user's natural language input is converted into a keyword set consisting of multiple keywords, helping the system to more accurately understand the user's core needs.

[0042] Based on the results of the matching analysis operation, it is determined whether the local knowledge base has a hidden danger of insufficient matching; feature extraction includes two parts: first, the system extracts the fuzziness feature information of the user input content, and based on this, generates a fuzziness index to measure the clarity or complexity of the input content. Secondly, the domain relevance information is extracted, and the domain relevance index is generated to determine the relevance between the user input and the local knowledge base. Through these two indexes, the system can better understand the nature of the input content and the matching degree with the knowledge base. Fuzzy feature information and domain relevance information are extracted from the user input content so that the system can make a more accurate response based on the complexity and domain relevance of the input content.

[0043] For the user input content corresponding to the potential problem of insufficient matching degree in the local knowledge base, feature extraction and feature analysis operations are performed, and then the knowledge response dialogue type adopted by the current user input content is inferred and used based on the results of the feature analysis operation. The system infers which type of knowledge response should be used for the user input content by analyzing the fuzziness index and the domain relevance index. If the fuzziness index is high and the domain relevance is low, the system may give priority to the large model for generalization processing; if the fuzziness is low and the domain relevance is high, the local knowledge base is directly used to respond; when the fuzziness and domain relevance indexes are both medium, the system may use a large model and a local knowledge base to jointly respond in dialogue. Through this classification selection, the system can effectively respond to different types of input and ensure the quality of the output results. According to the fuzziness index and the domain relevance index, the most suitable response type is selected to ensure that users can get effective and relevant answers.

[0044] Preprocessing the user input content refers to segmenting the user input content according to the preset strategy to obtain a keyword set consisting of multiple keywords in the user input. According to the preset strategy, the system uses natural language processing technology to segment the sentences or paragraphs input by the user and extract separate words. This process is usually based on dictionary matching and context understanding to ensure that each word has clear semantics. Common word segmentation methods include: Rule-based word segmentation: Identify word boundaries through existing dictionaries or language rules. Statistical-based word segmentation: By analyzing the frequency of word occurrence in a large corpus, probabilistic inference is performed, and high-frequency words are used as segmentation units. Word segmentation based on pre-trained machine learning: The system automatically identifies word boundaries and handles complex language phenomena by learning a large number of samples.

[0045] When segmenting words, the system parses the input word by word from left to right or right to left, and determines how to segment based on the vocabulary in the dictionary and the context. When encountering a coherent phrase or proper noun, the system can recognize it as a single word without further segmentation. The system also analyzes the context and handles ambiguity to ensure accurate word extraction.

[0046] For example: suppose the sentence entered by the user is: "I want to know the operating status of the power grid equipment today." The word segmentation results are: "I", "today", "want", "know", "power grid equipment", "of", "operating status". In this example, the system recognizes individual words such as "I" and "today", and extracts "today", "power grid equipment" and "operating status" as keywords. Word segmentation is to decompose sentences into words or phrases with independent semantics to facilitate subsequent keyword extraction and semantic analysis. Through context understanding and dictionary matching, the system can accurately and flexibly complete word segmentation operations, which helps to improve the accuracy and effectiveness of the analysis results.

[0047] The matching analysis operation refers to: obtaining each keyword in the keyword set and matching it with the term set in the local knowledge base. The purpose of this step is to convert the user input into keywords that can be compared with the existing information in the knowledge base, and to judge the relevance between user needs and existing knowledge by matching with the knowledge base terms. This is the basis of the entire analysis process, ensuring that the system can effectively understand and interpret the user's input.

[0048] The specific description of the term set is as follows: Before building a knowledge base, it is usually necessary to rely on domain experts to define key terms in a specific field. These experts extract common core terms, technical vocabulary and related phrases in the field by analyzing the literature, research reports, technical documents, etc. in the field. The generated term set can ensure that the knowledge base is consistent with the information in the specific field and improve the professionalism of the dialogue system. It can also be automatically extracted from existing documents or databases: Using natural language processing (NLP) technology, common terms can be automatically extracted from a large number of field documents, technical manuals, research reports, FAQ documents or databases. Through methods such as word frequency statistics and context analysis, key terms that appear frequently are identified. The automatically extracted terms are processed and filtered and added to the term set. Word frequency statistics: By calculating the frequency of occurrence of words in the document, high-frequency words are selected as candidate terms. Named entity recognition: Using natural language processing technology, proper nouns, terms and term phrases in related fields are automatically identified.

[0049] Get the maximum similarity between the keyword and the terms in the term set in the local knowledge base. For each keyword, calculate the similarity with all terms in the local knowledge base and select the maximum similarity to indicate the degree of match between the keyword and the closest term in the knowledge base. Obtaining the maximum similarity helps to find the most suitable term, ensuring that the system can accurately match the most relevant information during analysis and avoid the results being affected by low-relevant terms.

[0050] The maximum similarity values ​​corresponding to each keyword are summarized to obtain a matching set, which reflects the overall matching between the user input content and the knowledge base. The construction of the matching set helps to comprehensively evaluate the matching degree of all keywords and provide a global matching analysis.

[0051] Calculate the mean and standard deviation of the matching set. The mean of the matching set reflects the overall matching degree between the user input content and the knowledge base, while the standard deviation measures the dispersion of the matching values. These two statistics can be used to determine the overall trend of the matching and the fluctuation range of the matching degree, which helps to identify potential abnormal matching situations.

[0052] The mean value and standard deviation of the matching set are compared with the preset standard density range and standard deviation threshold, respectively. If the mean value of the matching set falls within the preset standard density range and the standard deviation of the matching set is less than or equal to the preset standard deviation threshold, a normal signal is generated. If the mean value of the matching set does not fall within the preset standard density range and the standard deviation of the matching set is less than or equal to the preset standard deviation threshold, an abnormal signal is generated. By comparing the mean value and standard deviation of the matching set with the preset standard density range and standard deviation threshold, it is determined whether the user input content matches the knowledge base well. This comparison step is the key to the matching degree analysis, which clearly determines whether the system can effectively process user needs through the local knowledge base.

[0053] Judging whether the local knowledge base has a hidden danger of insufficient matching based on the results of the matching analysis operation means that when an abnormal signal is generated, the local knowledge base has a hidden danger of insufficient matching. Based on the comparison results, a normal signal or an abnormal signal is generated. If the mean and standard deviation of the matching set meet the preset standards, a normal signal is generated, indicating that the system can provide an effective response based on the local knowledge base; if not, an abnormal signal is generated, indicating that the local knowledge base has insufficient matching and the system needs to adjust its strategy, such as turning to a large model to respond to user needs. This step ensures that the system can dynamically adjust the response method to avoid incorrect answers or insufficient information.

[0054] Feature extraction and feature analysis operations refer to: extracting fuzziness feature information and domain relevance information of user input content, generating a fuzziness index based on the fuzziness feature information, and generating a domain relevance index based on the domain relevance information. The logic for obtaining the fuzziness index is:

[0055] The text input by the user is obtained and segmented. The frequency of each word in the segmented text is then calculated, and the long-tail words whose frequency is lower than the preset benchmark threshold are identified. The proportion of long-tail words in the text is then calculated to obtain the lexical complexity coefficient CH, which is used to reflect the lexical complexity.

[0056] Use a pre-trained semantic similarity model such as cosine similarity to calculate the similarity between the user question and multiple semantic interpretations, then determine the value corresponding to the highest similarity interpretation and record it as the highest similarity S1, and calculate the sum of the similarities of all possible interpretations and record it as the total similarity S2. Calculate the semantic fuzziness coefficient YY using the following formula: , which reflects the degree of ambiguity in the semantics of the question.

[0057] Perform syntactic parsing on the sentence input by the user to generate a syntactic tree, then identify the nodes with multiple possible interpretations in the syntactic structure and count them as C1, count the total number of all syntactic structure nodes as C2, and then use the formula to calculate the syntactic fuzziness coefficient JF: , reflecting the degree of syntactic ambiguity.

[0058] Substitute the lexical complexity coefficient CH, semantic fuzziness coefficient YY, and syntactic fuzziness coefficient JF into the following calculation formula: ; represents the fuzziness index, , , are all preset weight coefficients. A constant set to prevent division by zero errors. A large fuzziness index usually indicates that there is a certain degree of uncertainty or ambiguity in the user input, which means that the input may contain polysemous words, complex sentences, or incomplete information, making it difficult to directly find accurate and specific matches in the local knowledge base. From the perspective of the local knowledge base and the large model, the impact of a large fuzziness index on the system and the coping strategies are as follows:

[0059] From the perspective of local knowledge base:

[0060] Understanding and response limitations: Local knowledge bases usually contain fixed and limited information. If the user input is highly ambiguous, it may be difficult to find a direct matching answer or related information. This may result in inaccurate responses or complete failure to respond to the user's query.

[0061] Increased risk of misunderstanding: High ambiguity may cause errors in simple keyword-based matching processes, as keywords may have different meanings in different contexts.

[0062] Need for external support: Faced with ambiguous queries, the local knowledge base may need additional explanation or clarification mechanisms, such as by prompting the user to provide more information or asking specific questions to reduce ambiguity.

[0063] From the perspective of the big model:

[0064] Flexibility and adaptability: Large models (such as those based on machine learning) usually have better contextual understanding capabilities and can handle inputs with higher ambiguity. These models can more effectively solve problems caused by ambiguity by analyzing the semantic and contextual relationships learned from large amounts of data.

[0065] Enhanced semantic parsing: For complex or ambiguous queries, the big model can use its advanced natural language processing capabilities to identify hidden intent or needs and provide more precise and relevant answers.

[0066] Combination improves accuracy: When processing highly ambiguous inputs, the large model can be used in conjunction with the local knowledge base, leveraging the powerful parsing capabilities of the large model and the professional and precise information of the local knowledge base to jointly provide more complete answers.

[0067] , , It is the weight coefficient set according to the specific application scenario, which indicates the influence of each index in the fuzziness index. is a very small value to prevent division by zero errors such as ten to the negative sixth power, is the interaction term introduced, which indicates the mutual influence between the vocabulary complexity coefficient CH and the semantic ambiguity coefficient YY. This term emphasizes that if the vocabulary is complex and the semantics is ambiguous, the overall ambiguity is higher. It is a nonlinear term, and the syntactic fuzziness coefficient JF takes a logarithmic form to increase processing flexibility and avoid simple accumulation caused by linear weighting. It is to strengthen the high lexical complexity coefficient CH while considering the influence of the semantic fuzziness coefficient YY. This item has a significant improvement effect when the semantic fuzziness coefficient YY is low. The joint effect between the lexical complexity coefficient CH and the semantic fuzziness coefficient YY is considered through the square root interaction term. If both dimensions are high, the fuzziness will increase significantly. The nonlinear term processes the syntactic fuzziness coefficient JF in logarithmic form, so that it has a smoother growth at high values, avoiding the distortion of the results caused by simple accumulation. The ratio processing term introduces the ratio term of the lexical complexity coefficient CH and the semantic fuzziness coefficient YY, further emphasizing that when the lexical complexity coefficient CH is high and the semantic fuzziness coefficient YY is low, the system will increase the improvement of the fuzziness index.

[0068] The logic for obtaining the domain relevance index is:

[0069] For each keyword in the keyword set input by the user, calculate its similarity with the term set in the local knowledge base, select the maximum similarity as the final similarity score of the keyword and record it as , and then perform the following calculation:

[0070] ; is the preset influence coefficient for the keyword numbered i, and k is the preset exponential amplification coefficient, ranging from one to three, which is used to amplify the influence of high-similarity keywords to ensure that highly relevant terms have a stronger impact on the overall results. It is used to smooth the impact of extreme values ​​and avoid the extreme impact of similarity scores that are too large or too small on the final result. The maximum similarity value of each keyword By means of exponential amplification and weight combination, the contribution of keywords with high relevance to the overall domain relevance index is enhanced. Meanwhile, the extreme value effect is suppressed through the logarithmic function to ensure the robustness of the results. The value range or specific value of the exponential amplification coefficient k can be adjusted according to the needs of the application scenario. Generally, the value range of k is between 1 ≤ k ≤ 3. Value range 1 ≤ k ≤ 2: When a relatively gentle amplification effect of similarity is desired, k close to 1 can be selected. In this case, the keyword similarity will not be overly amplified, which is suitable for scenarios where the similarity distribution is relatively balanced. For example, when k = 1.2, it is suitable for scenarios where the importance differences of keywords are not significant, and the amplification effect is relatively slight. Value range 2 < k ≤ 3: When the influence of keyword similarity on the overall relevance index needs to be significantly amplified, a larger k close to 3 is selected. In this case, the influence of high-similarity keywords will be significantly enhanced. For example, when k = 2.5, it is suitable for scenarios with strong domain relevance and where high-relevance keywords need to make prominent contributions. Generally, k = 2 is selected: This is a relatively balanced choice, which can give a moderate amplification effect when the keyword similarity is high, and at the same time will not overly amplify low-similarity keywords. n is the total number of keywords in the keyword set, is the domain relevance index.

[0071] A higher domain relevance index means:

[0072] From the perspective of the local knowledge base: The user's input highly matches the information in the knowledge base, indicating that the existing content in the knowledge base can well meet the user's query needs. High-quality responses can be provided because there is information highly relevant to the user's query in the knowledge base.

[0073] From the perspective of the large model: If the local knowledge base can already provide highly relevant information, it may not be necessary to enable the more computationally expensive large model to process the query. The high domain relevance index can help decision-makers optimize resource allocation, that is, when to use the local knowledge base and when an auxiliary large model is needed to enhance the depth or breadth of the answer.

[0074] Inferring the type of knowledge response dialogue adopted for the current user input content refers to:

[0075] Taking the domain relevance index and the fuzziness index both as input variables, taking the type of knowledge response dialogue adopted for the current user input content as the output variable, performing fuzzy processing on the input variables, converting the values of the input variables into fuzzy sets, performing fuzzy processing on the output variable, converting the output variable into a fuzzy set, formulating fuzzy rules to describe the dialogue response requirements under different combinations of data types, and inferring the type of knowledge response dialogue adopted for the current user input content through the fuzzy rules for the fuzzified input variables.

[0076] The operation of converting domain relevance index and fuzziness index into fuzzy sets enables the system to handle uncertainty and ambiguity that are common in real-world applications. This fuzzification allows the system to consider different degrees of match and ambiguity, thereby providing a more flexible and adaptable solution. By formulating fuzzy rules, the system can describe specific dialogue response requirements based on different combinations of input variables. These rules guide the system on how to choose the most appropriate response type in a specific situation based on professional knowledge and previous experience. The fuzzy reasoning process converts the fuzzified input variables into specific output decisions by applying fuzzy rules. This step is the core of the intelligent decision-making process, which allows the system to consider all relevant factors and choose the most appropriate one when there are multiple potential response types. In this way, the system is able to provide customized and highly relevant services in complex real-world application environments.

[0077] Convert the input variables (domain relevance index and fuzziness index) into fuzzy sets. This step mainly converts specific numerical values ​​into fuzzy concepts, such as "high", "medium", and "low". For example: Assuming that the domain relevance index ranges from 0 to 1, it can be defined as: "low" is 0 to 0.3; "medium" is 0.2 to 0.7; "high" is 0.6 to 1; the fuzziness index also ranges from 0 to 1, and can be defined as: "low" is 0 to 0.4; "medium" is 0.3 to 0.8; "high" is 0.7 to 1. Fuzzify the output variable (knowledge response dialogue type), for example, define the possible dialogue types as fuzzy sets. For example: the dialogue types can be "basic answer", "in-depth explanation", and "guided questioning". Fuzzify these types as well: "basic answer" is suitable for high domain relevance and low fuzziness; "in-depth explanation" is suitable for medium domain relevance and medium fuzziness; "guided questioning" is suitable for low domain relevance and high fuzziness.

[0078] Fuzzy rules that describe the need for dialogue response are created based on different combinations of input variables. For example: If the domain relevance is "high" and the fuzziness is "low", the output is "basic answer". If the domain relevance is "medium" and the fuzziness is "medium", the output is "in-depth explanation". If the domain relevance is "low" and the fuzziness is "high", the output is "guided question". Using fuzzy logic, reasoning is performed based on the set rules and the fuzzified input and output variables to obtain the final dialogue type. For example: When the domain relevance index of the question raised by the user is 0.85 (high) and the fuzziness index is 0.2 (low), according to the rules, the inferred dialogue type is "basic answer". Based on the reasoning results, the system selects the corresponding dialogue type to respond to the user, thereby achieving an interaction that better matches the user's needs.

[0079] Basic answer definition: Basic answers are usually direct and specific, providing clear answers or facts to the user's specific query. Application scenario: When the user's question is very clear and there is already precise matching information in the local knowledge base, the system will provide a basic answer. Relationship with local knowledge base: Basic answers usually come directly from the local knowledge base, because these answers need to be accurate and factually correct, and the local knowledge base already contains the necessary data or information. Relationship with large models: There is usually no need to rely on large models unless the answer needs to be generated or slightly adjusted to suit the user's specific question.

[0080] Definition of in-depth explanation: In-depth explanation aims to provide more detailed information than the basic answer, which includes background information, complex details, or expansion of related concepts. Application scenario: When the user's question is more complex or the answer requires more contextual information, the system will provide in-depth explanation. Relationship with local knowledge base: If there is enough relevant information in the local knowledge base, the in-depth explanation can be directly extracted and used; if the information is insufficient, some integration or explanation expansion may be required. Relationship with big models: Big models can provide support when the information provided by the local knowledge base is not enough to fully answer the user's question, such as by generating relevant content or extracting and inferring missing information from large amounts of data.

[0081] Guiding question definition: Guiding question is a strategy used to guide users to provide more information or rephrase questions when the system cannot directly answer the user's question. Application scenario: Applicable to when the user's question is vague or the system cannot determine the user's specific needs. Relationship with local knowledge base: Guiding questions are needed to clarify the user's intentions or obtain more relevant information, and then determine whether there is enough information in the local knowledge base to directly answer the question. Relationship with large models: Large models can play a role in this process, especially in processing natural language understanding, helping to parse user input and generate appropriate guiding questions.

[0082] The choice of the three types of dialogue depends on the nature of the user's questions and the system's understanding of these questions, as well as the ability of the local knowledge base and large models to handle these questions. By intelligently selecting the appropriate response type, the system can more effectively meet the user's information needs, improve the quality of the dialogue and user satisfaction.

[0083] Embodiment 2: An intelligent dialogue system based on a large model and a local knowledge base, used to implement an intelligent dialogue method based on a large model and a local knowledge base, comprising:

[0084] A preprocessing module, used to obtain user input content and perform preprocessing operations on the user input content;

[0085] A matching degree analysis module is used to perform matching degree analysis based on the result of the preprocessing operation and determine whether there is a potential problem of insufficient matching degree in the local knowledge base;

[0086] A feature analysis module is used to extract features from user input content corresponding to potential problems with insufficient matching in the local knowledge base and perform feature analysis operations;

[0087] The dialogue type inference module is used to infer and use the knowledge response dialogue type adopted by the current user input content based on the results of the feature analysis operation.

[0088] An intelligent dialogue device based on a large model and a local knowledge base includes a memory and a processor. The memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions. When the program instructions are loaded and executed by the processor, an intelligent dialogue method based on the large model and the local knowledge base is implemented.

[0089] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0090] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0091] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0092] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0093] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An intelligent dialogue method based on a large model and a local knowledge base, characterized in that: The following steps are involved: Obtaining user input content and performing a preprocessing operation on the user input content, and then performing a matching degree analysis operation based on the result of the preprocessing operation; Based on the result of the matching degree analysis operation, it is determined whether the local knowledge base has a potential problem of insufficient matching degree; For the user input content corresponding to the potential problem of insufficient matching degree in the local knowledge base, feature extraction and feature analysis operations are performed, and then the knowledge response dialogue type adopted by the current user input content is inferred and used according to the result of the feature analysis operation; The feature extraction and feature analysis operation refers to: extracting fuzziness feature information and domain relevance information of the user input content, generating a fuzziness index based on the fuzziness feature information, and generating a domain relevance index based on the domain relevance information; The logic for obtaining the fuzziness index is: Get the text input by the user and perform word segmentation, then calculate the frequency of each word in the segmented text, identify long-tail words whose frequency is lower than the preset benchmark threshold, and then calculate the proportion of long-tail words in the text to obtain the vocabulary complexity coefficient CH; Using the pre-trained semantic similarity model, calculate the similarity values ​​between the user question and multiple semantic interpretations, then determine the value corresponding to the highest similarity interpretation and record it as the highest similarity S1, and calculate the sum of the similarities of all interpretations and record it as the total similarity S2. Calculate the semantic fuzziness coefficient YY using the following formula: ; The sentence input by the user is parsed to generate a syntactic tree, and then the nodes with multiple interpretations in the syntactic structure are identified and counted as C1. The total number of all syntactic structure nodes is counted as C2, and then the syntactic fuzziness coefficient JF is calculated using the formula: ; Substitute the lexical complexity coefficient CH, semantic fuzziness coefficient YY, and syntactic fuzziness coefficient JF into the following calculation formula: ; represents the fuzziness index, , , are all preset weight coefficients. A constant set to prevent division by zero errors; The logic for obtaining the domain relevance index is: For each keyword in the keyword set input by the user, calculate its similarity with the term set in the local knowledge base, select the maximum similarity as the final similarity score of the keyword and record it as , and then perform the following calculation: ; is the preset influence coefficient of the keyword numbered i, k is the preset exponential amplification coefficient, ranging from one to three, n is the total number of keywords in the keyword set, is the domain relevance index.

2. The intelligent dialogue method based on a large model and a local knowledge base according to claim 1, characterized in that: The preprocessing operation on the user input content refers to performing word segmentation processing on the user input content according to a preset strategy to obtain a keyword set consisting of multiple keywords in the user input.

3. The intelligent dialogue method based on a large model and a local knowledge base according to claim 2 is characterized in that: The matching analysis operation refers to: Each keyword in the keyword set is obtained separately and matched with the term set in the local knowledge base to obtain the maximum similarity between the keyword and the term in the term set in the local knowledge base, and then the maximum similarity corresponding to each keyword is summarized to obtain a matching set, and then the average value and standard deviation of the matching set are calculated, and then the average value and standard deviation of the matching set are compared with the preset standard density range and standard deviation threshold respectively. If the average value of the matching set falls within the preset standard density range and the standard deviation of the matching set is less than or equal to the preset standard deviation threshold, a normal signal is generated. If the average value of the matching set does not fall within the preset standard density range and the standard deviation of the matching set is less than or equal to the preset standard deviation threshold, an abnormal signal is generated.

4. The intelligent dialogue method based on a large model and a local knowledge base according to claim 3 is characterized in that: Judging whether the local knowledge base has a potential problem of insufficient matching based on the result of the matching analysis operation means that when an abnormal signal is generated, the local knowledge base has a potential problem of insufficient matching.

5. The intelligent dialogue method based on a large model and a local knowledge base according to claim 4 is characterized in that: Inferring the knowledge response dialogue type used for the current user input content means: Domain Relevance Index and fuzziness index All of them are used as input variables, and the knowledge response dialogue type adopted by the current user input content is used as the output variable. The input variables are fuzzified and the values ​​of the input variables are converted into fuzzy sets. The output variables are fuzzified and the output variables are converted into fuzzy sets. Fuzzy rules are formulated to describe the dialogue response requirements under different data type combinations. The fuzzified input variables are inferred through fuzzy rules to obtain the knowledge response dialogue type adopted by the current user input content.

6. An intelligent dialogue system based on a large model and a local knowledge base, used to implement the intelligent dialogue method based on a large model and a local knowledge base as described in any one of claims 1 to 5, characterized in that: include: A preprocessing module, used to obtain user input content and perform preprocessing operations on the user input content; A matching degree analysis module is used to perform matching degree analysis based on the result of the preprocessing operation and determine whether there is a potential problem of insufficient matching degree in the local knowledge base; A feature analysis module is used to extract features from user input content corresponding to potential problems with insufficient matching in the local knowledge base and perform feature analysis operations; The dialogue type inference module is used to infer and use the knowledge response dialogue type adopted by the current user input content based on the results of the feature analysis operation.

7. Intelligent dialogue device based on large model and local knowledge base, characterized by: The method comprises a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, and when the program instructions are loaded and executed by the processor, the method according to any one of claims 1 to 5 is implemented.