An intelligent language response recognition system and method based on attention mechanism
By introducing an attention mechanism into the intelligent voice response system and dynamically adjusting attention and optimization strategies, the problems of satisfaction evaluation error and unstable operation of traditional systems in multi-user scenarios are solved, achieving a more efficient user experience and system stability. sex.
Patent Information
- Application Number
- CN202411018742.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-29
AI Technical Summary
Traditional intelligent voice response systems are difficult to provide highly relevant and accurate responses in multi-user scenarios, resulting in large errors in user satisfaction assessment, affecting the execution of system optimization strategies, and making the system run unstable.
An intelligent language response recognition system based on the attention mechanism is adopted. Through text input processing, context management, response generation and system feedback optimization modules, it handles single-user and multi-user scenarios respectively, dynamically adjusts attention and optimization strategies, and improves response speed and users. experience.
It achieves more accurate understanding of user intentions and collection of feedback data, improves user experience and system robustness, and avoids system instability or misjudgment caused by extreme situations.
Smart Images

Figure CN118551849B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent language response, and specifically to an intelligent language response recognition system and method based on an attention mechanism. Background Art
[0002] Intelligent language response refers to the use of artificial intelligence technology to enable computers to understand and generate human language, thereby achieving natural language interaction with humans; intelligent language response systems usually include speech recognition, natural language processing, machine learning, deep learning and other technologies, and can interact with users through text, voice, images and other methods, and provide various services and solutions; intelligent language response systems also have some challenges and problems, such as the accuracy of language understanding, the handling of semantic ambiguity, the construction of knowledge graphs, etc.; therefore, in practical applications, it is necessary to continuously optimize and improve the intelligent language response system to improve its performance and effectiveness.
[0003] At present, in the use of traditional intelligent voice response systems:
[0004] The design of automatic replies is often based on fixed templates or simple keyword matching, which makes it difficult to provide highly relevant and accurate replies. At the same time, in the back-and-forth question-and-answer dialogue process, there is more than one user using the same answering system. Although it is possible to limit the system login to a single user each time, multiple users can conduct the dialogue process in turn. Different users have different questioning habits and satisfaction levels, which will increase the complexity of the usage scenarios. When collecting user feedback information later, if the feedback satisfaction evaluation is continued under the traditional fixed mode, the evaluation results will have large errors due to the increased complexity or malicious evaluation by some users. It is impossible to conduct specific and effective evaluations for different situations, which in turn affects the subsequent execution of system optimization strategies and easily causes unstable system operation. Summary of the invention
[0005] 1. Technical issues to be resolved
[0006] In view of the shortcomings of the prior art, the present invention provides an intelligent language response recognition system and method based on an attention mechanism, which adopts different feedback data collection and processing methods in multi-user and single-user scenarios, effectively optimizing the utilization of system resources, improving processing efficiency and response speed, and through precise user judgment and feedback data collection, as well as comprehensive satisfaction evaluation, the system can more accurately understand user needs and provide replies that are more in line with user expectations, thereby significantly improving user experience. When conducting satisfaction evaluations for multiple users, it also takes into account the problem of malicious dissatisfaction of users or abnormalities in the questions themselves, so that the system can run more robustly and solve the problems raised in the background technology.
[0007] (II) Technical solution
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0009] An intelligent language response recognition system based on attention mechanism, comprising:
[0010] A text input processing module receives input text and performs preprocessing to identify key information;
[0011] The context management module manages the context information of the current text conversation, including historical conversation content, user preferences, and current task status, and uses the attention mechanism to dynamically adjust the focus on context information;
[0012] The response generation module converts the parsed user intent and context information into a verbal response.
[0013] The knowledge base query module queries the predefined knowledge base in the detailed response mode and uses the attention mechanism to extract relevant information for supplementary response;
[0014] The system feedback optimization module has a built-in user determination unit, a feedback data acquisition unit and an evaluation and adjustment unit; the user determination unit is used to analyze historical data to determine whether the current user is multiple users or a single user; the feedback data acquisition unit is used to regularly obtain the feedback data set of all conversations under the condition of being determined as a single user, and to regularly obtain the feedback data subset of each conversation under the condition of being determined as multiple users; the evaluation and adjustment unit is used to generate a first-level comprehensive satisfaction evaluation value based on the feedback data set of all conversations under the condition of a single user, and to generate a second-level comprehensive satisfaction evaluation value based on the feedback data subset of each conversation under the condition of multiple users, and compare the first-level / second-level comprehensive satisfaction evaluation value with the corresponding preset evaluation threshold, and choose whether to execute the optimization adjustment strategy according to the comparison result.
[0015] Furthermore, the process of preprocessing the input text is as follows:
[0016] Tokenization: Break the input text into individual words or phrases and remove stop words;
[0017] Word vector representation: Use a pre-trained word vector model to convert each word into a high-dimensional vector;
[0018] Syntactic analysis: Use dependency parsing to determine the relationship between words in the input text;
[0019] Attention weight calculation: Apply the attention mechanism to calculate the attention weight of each word in the input text;
[0020] Context vector generation: Generate a context vector based on the calculated attention weights.
[0021] Furthermore, the process of managing the current text session is as follows:
[0022] Receive the output of the text input processing module: receive the generated context vector;
[0023] Maintenance of historical conversation content: Under the condition of satisfying S rounds of conversation, the current input text and context vector are integrated and stored with the historical conversation content;
[0024] User preference management: dynamically update and maintain user preference information based on user historical behavior;
[0025] Maintenance of current task status: Determine the task status in the current session;
[0026] Application of attention mechanism: When maintaining contextual information, the attention mechanism is applied to dynamically adjust the attention paid to different parts of information, giving priority to historical conversations and user preferences related to the current task status.
[0027] Furthermore, the process of parsing the user's intent is as follows:
[0028] Input integration: Receive and integrate the output from the text input processing module and the context management module;
[0029] Intent recognition: Use the intent classification model to analyze user input and obtain user intent.
[0030] Furthermore, the process of parsing context information is as follows:
[0031] Template matching: Retrieve relevant corresponding templates from the predefined reply template library based on the user's intention;
[0032] Content filling: Fill the selected template with key information from the user input and relevant information from the context to generate preliminary candidate responses.
[0033] Furthermore, the process of converting and generating language responses is as follows:
[0034] Key information weighting: Use the attention mechanism to evaluate the importance of each part of the candidate reply. According to the key information in the user input, increase the weight of the corresponding part of the reply, and the amount of increase in weight is adjusted according to the default value;
[0035] Comprehensive evaluation: Combine the attention mechanism to comprehensively evaluate the candidate responses and output the final response;
[0036] Language polishing: A text generation model is used to polish the final response.
[0037] Furthermore, the historical data includes the IP addresses of the clients used during the historical user questioning process;
[0038] The process of analyzing the historical data is as follows: a continuous period T in the historical data is selected, and the IP address of the client used for each question is obtained within the period T. If the number of types of IP addresses does not exceed 1, it is determined to be a single user; if the number of types of IP addresses exceeds 1, it is determined to be multiple users;
[0039] The feedback dataset for all conversations includes the total amount of positive feedback and the total amount of negative feedback;
[0040] Positive feedback includes the number of times the user agrees with the current reply, the number of times the user agrees by default, and the number of times the user continues to ask questions. The total amount of positive feedback represents the sum of all the times the user agrees with the current reply, the number of times the user agrees by default, and the number of times the user continues to ask questions within that period. Negative feedback includes the number of times the user disagrees with the current reply and the number of times the user repeatedly asks questions. The total amount of negative feedback represents the sum of all the times the user disagrees with the current reply and the number of times the user repeatedly asks questions within that period.
[0041] Furthermore, the process of generating the first-level comprehensive satisfaction evaluation value is as follows:
[0042] Based on the normalized feedback data set of all conversations, a formula is established to calculate the first-level comprehensive satisfaction evaluation value. The formula is as follows:
[0043]
[0044] In the formula, Satisfaction_Level_1 represents the first-level comprehensive satisfaction evaluation value, P represents the total amount of positive feedback, and N represents the total amount of negative feedback;
[0045] The process of generating the secondary comprehensive satisfaction evaluation value is as follows:
[0046] First, calculate the comprehensive satisfaction evaluation index corresponding to each conversation, and filter out the conversations with a satisfaction evaluation index of 0%. Calculate the comprehensive satisfaction evaluation index corresponding to the remaining conversations to obtain the secondary comprehensive satisfaction evaluation value. The calculation process is as follows:
[0047]
[0048]
[0049]
[0050] In formula (1), Represents the secondary comprehensive satisfaction evaluation value, Indicates that the remaining number is the average value of the comprehensive satisfaction evaluation index corresponding to M conversations, Indicates the evaluation stability index and weight coefficient: , ,and ;
[0051] In formula (2), Indicates the number of remaining conversations, It represents the comprehensive satisfaction evaluation index corresponding to the i-th dialogue, and the calculation method of the comprehensive satisfaction evaluation index is the same as the first-level comprehensive satisfaction evaluation value, i=1, 2,…M, M is a positive integer.
[0052] Furthermore, the process of selecting whether to execute the optimization adjustment strategy according to the comparison result is as follows:
[0053] If the first-level comprehensive satisfaction evaluation value is obtained, the first-level comprehensive satisfaction evaluation value is compared with the preset No. 1 evaluation threshold. When the first-level comprehensive satisfaction evaluation value exceeds the No. 1 evaluation threshold, no response action is taken; otherwise, the optimization adjustment strategy is executed; if the second-level comprehensive satisfaction evaluation value is obtained, the second-level comprehensive satisfaction evaluation value is compared with the preset No. 2 evaluation threshold. When the second-level comprehensive satisfaction evaluation value exceeds the No. 2 evaluation threshold, no response action is taken; otherwise, the optimization adjustment strategy is executed;
[0054] Among them, the optimization adjustment strategy is:
[0055] In the process of converting and generating language responses, adjustments are continued according to the established key information weightings, and dynamic adjustments are achieved: the attention weights are dynamically adjusted based on the information provided by the context management module.
[0056] An intelligent language response recognition method based on an attention mechanism comprises the following steps:
[0057] S1, receiving input text and preprocessing it to identify key information;
[0058] S2, manage the context information of the current text conversation, including historical conversation content, user preferences and current task status, and use the attention mechanism to dynamically adjust the focus on context information;
[0059] S3, converting the parsed user intent and context information into a language response;
[0060] S4. In the selected detailed response mode, query the predefined knowledge base and use the attention mechanism to extract relevant information for supplementary response;
[0061] S5. Analyze historical data to determine whether the current user is multiple users or a single user;
[0062] If the user is single-user, the feedback data set of all conversations is obtained regularly. If the user is multi-user, the feedback data subset of each conversation is obtained regularly.
[0063] Under the condition of single user, the first-level comprehensive satisfaction evaluation value is generated based on the feedback data set of all conversations. Under the condition of multiple users, the second-level comprehensive satisfaction evaluation value is generated based on the feedback data subset of each conversation. The first-level / second-level comprehensive satisfaction evaluation values are compared with the corresponding preset evaluation thresholds, and whether to execute the optimization adjustment strategy is determined based on the comparison results.
[0064] (III) Beneficial effects
[0065] The present invention provides an intelligent language response recognition system and method based on attention mechanism, which has the following beneficial effects:
[0066] (1) The system uses a variety of text processing technologies to effectively improve the accuracy of the system's semantic understanding of Chinese text. It can accurately identify user intentions and key information, maintain historical conversation content, user preferences, and current task status, and use the attention mechanism to dynamically adjust attention, ensuring the system's coherent understanding of user intentions. The generated replies not only accurately reflect user intentions, but also make key information more prominent through weighted processing. At the same time, it combines user preferences and historical conversation content to generate natural and smooth replies, improving the user experience.
[0067] (2) The addition of the detailed response mode not only enriches the system's response methods, but also meets users' different needs for information details in different situations, enhancing the system's practicality and user stickiness. At the same time, the introduction of the attention mechanism enables the system to quickly focus on and extract the information most relevant to the user's question, significantly improving the efficiency and accuracy of information retrieval;
[0068] (3) Different feedback data collection and processing methods are adopted in multi-user and single-user scenarios, which effectively optimizes the utilization of system resources and improves processing efficiency and response speed. Through accurate user judgment and feedback data collection, as well as comprehensive satisfaction evaluation, the system can more accurately understand user needs and provide responses that are more in line with user expectations, thereby significantly improving user experience. When conducting satisfaction evaluations for multiple users, it also takes into account the problem of malicious user dissatisfaction or abnormal questions themselves, so that the system can run more robustly and avoid system instability or misjudgment caused by individual extreme situations. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 This is a modular structural diagram of an intelligent language response recognition system based on the attention mechanism;
[0070] Figure 2The figure is an overall flow chart of an intelligent language response recognition method based on the attention mechanism. DETAILED DESCRIPTION
[0071] 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.
[0072] The development concept and process of the system are as follows:
[0073] When building an intelligent language response recognition system, we start with text input, perform context management and generate responses. For some specific fields, we also add knowledge bases to ensure that the responses are comprehensive and accurate. Finally, we receive user feedback regularly and conduct automated evaluations based on the feedback information. The evaluation values or scores obtained can reflect user satisfaction. Based on the satisfaction level or results, we continue to make subsequent adjustments and optimizations. Applying the attention mechanism to the system not only enables the system to more accurately identify and understand user intentions in different scenarios, but also improves the accuracy and personalization of responses.
[0074] When the intelligent language response recognition system is traditionally used, for the user feedback stage, it is usually necessary to collect user ratings on a regular basis and then perform statistical calculations. This is too subjective for the expression of satisfaction and is inconvenient to provide accurate guidance for subsequent adjustments. It also does not take into account whether the system is used by a single user or multiple users. If it is only used by a single user, there will be no impact. If it is used by multiple users, there will be many impacts such as different user questioning habits and different satisfaction levels. Therefore, continuing to use the satisfaction evaluation for a single user will become inappropriate. The intelligent language response recognition system used in this application can solve the above problems well and can cope with different scenarios.
[0075] Embodiment 1:
[0076] See also Figure 1 ,This embodiment provides an intelligent language response recognition system based on the attention mechanism, the system designs multiple key functional modules to achieve the intelligence and pertinence of the dialogue, the functional modules include a text input processing module, a context management module, a response generation module, a knowledge base query module and a system feedback optimization module that run in sequence;
[0077] The following is a description or explanation of each functional module:
[0078] The text input processing module receives the user's input text and performs preprocessing to identify key information;
[0079] Among them, the process of preprocessing the input text is as follows:
[0080] Word segmentation: Decompose the input text into individual words or phrases; this step is particularly important for Chinese because Chinese has no obvious word delimiters;
[0081] Example: "How's the weather tomorrow?" After word segmentation, we get: ["tomorrow", "weather", "how"];
[0082] Stop word removal: Remove common words that are not very helpful for understanding semantics, such as "de" (of), "shi" (is), etc.;
[0083] Example: In this simple sentence, there are no stop words to remove;
[0084] Word vector representation: Use pre-trained word vector models (such as Word2Vec, GloVe, BERT) to convert each word into a high-dimensional vector for use in subsequent processing;
[0085] Example: "tomorrow" is converted into vector 1, "weather" is converted into vector 2, and "how" is converted into vector 3;
[0086] Syntax analysis: Use dependency syntax analysis to determine the relationships between words in the input text; this helps to understand the structure of the sentence in the input text and the role of each word;
[0087] Example: "tomorrow" is used as an adverbial of time, "weather" is the subject, and "how" is an interrogative adverb;
[0088] Attention weight calculation: Apply the attention mechanism to calculate the attention weights of each word in the input text to determine which words are more important for the current task (such as generating a response);
[0089] Example: Higher weights are assigned to "tomorrow" and "weather" because they are the core parts of the user's intention;
[0090] Context vector generation: Generate a context vector that comprehensively considers the importance of each word based on the calculated attention weights for use in generating a response;
[0091] Example: Generate a weighted vector representation of the overall semantics of the input sentence;
[0092] It should be noted that the system receives the user input and identifies "tomorrow" and "weather" as key information through word segmentation and syntax analysis;
[0093] The specific example operates as follows:
[0094] Suppose the user inputs: "What will the weather be like tomorrow?", S101, receiving input text: the system receives the text: "What will the weather be like tomorrow?"; S102, text preprocessing: word segmentation: ["tomorrow", "weather", "how"], stop word removal: no stop words need to be removed; S103, word vector representation: "tomorrow" is converted into vector 1, "weather" is converted into vector 2, and "how" is converted into vector 3; S104, grammatical analysis: determine that "tomorrow" is a time adverbial, "weather" is a subject, and "how" is an interrogative adverb; S105, attention weight calculation: the weights of "tomorrow" and "weather" are calculated to be higher because they are the main information that the user cares about; example weights: {"tomorrow": 0.4, "weather": 0.4, "how": 0.2}; S106, context vector generation: generate a weighted context vector based on the weights to represent the overall semantics of the input sentence, which is used for subsequent modules to generate replies; example context vector: 0.4*vector1+ 0.4*vector2+ 0.2*vector3;
[0095] Through the above steps, the text input processing module can effectively process and understand user input, extract key information, and provide the necessary semantic basis for subsequent context management and response generation. This processing method uses the attention mechanism to enable the system to focus on important parts of the input text, thereby improving the ability to understand user intentions.
[0096] The context management module manages the context information of the current text conversation, including historical conversation content, user preferences, and current task status, and uses the attention mechanism to dynamically adjust the focus on context information;
[0097] It should be noted that the text conversation here is the input text;
[0098] The process of managing the current text session is as follows:
[0099] Receive the output of the text input processing module: After processing the user's input text, extract key information and generate a context vector, for example: context vector = 0.4*vector1+ 0.4*vector2+ 0.2*vector3;
[0100] Maintenance of historical conversation content: When the S-round conversation condition is met, the system integrates and stores the current input text and context vector with the historical conversation content; this helps the system understand the background and context of the current user's intention;
[0101] Example: There may be previous records of weather inquiries in the historical conversation content. The system can infer the content that the user may be concerned about based on these records. The value range of S is greater than or equal to 2 and is a positive integer.
[0102] User preference management: Based on the user's historical behavior, the system will dynamically update and maintain the user's preference information; and the preference information includes but is not limited to language style and frequently asked topics;
[0103] Example: The system can remember the user's preferred way of asking about the weather (e.g. short phrase or detailed description) so that subsequent answers are more in line with the user's expectations;
[0104] Maintenance of the current task state: Determine the task state of the system in the current session, such as whether it is querying the weather or asking about other topics; this helps the system understand the user's current needs and respond accordingly;
[0105] Example: The system recognizes that the user is concerned about tomorrow's weather conditions, so the current task state is to provide a weather forecast;
[0106] Application of attention mechanism: When maintaining contextual information, the system applies the attention mechanism to dynamically adjust the attention paid to different parts of information, which means that the system prioritizes historical conversations and user preferences related to the current task to ensure coherence and accurate understanding;
[0107] Example: Based on the current weather query task, the system will pay more attention to the weather-related conversation content and user preferences in the history records;
[0108] In addition, by effectively managing and updating context information, the system can ensure a coherent understanding of the user's intentions. This coherence is not only reflected in a single conversation, but also in the consistency and fluency of multiple rounds of conversations. For example, when the system generates a reply, it combines the current context information and user preferences to generate language consistent with the previous answer style.
[0109] The specific operation examples are as follows:
[0110] Assume that the previous conversation record contains multiple inquiries about the weather by the user, and the system has recognized the user's attention to weather information; S201, receiving the output of the text input processing module: the received context vector: 0.4*vector1+0.4*vector2+0.2*vector3; S202, maintenance of historical conversation content: the system integrates the current text input and context vector into the historical conversation record; S203, management of user preferences: updating user preferences and confirming the user's frequent inquiries about weather information; S204, maintenance of the current task status: based on the current context vector and historical records, the system confirms that the current task status is to provide weather forecasts; S205, application of the attention mechanism: the attention mechanism adjusts the system's attention to historical weather-related conversations and user preferences so as to more accurately reflect the user's intentions when generating responses;
[0111] Through the above steps, the context management module can effectively maintain and update the context information of the current session, ensuring the system's accurate understanding of user intent and a coherent conversation experience. This management method combines the attention mechanism, allowing the system to dynamically adjust its attention to different information, thereby improving the quality of the conversation and user satisfaction.
[0112] The response generation module converts the parsed user intent and context information into a natural and fluent language response. The process of parsing the user intent is as follows:
[0113] Input integration: Receive and integrate the outputs from the text input processing module and the context management module; these outputs include key information of the user input (such as keywords, phrases), grammatical structure, and the context of the current session (historical dialogues, user preferences, task status);
[0114] Intent recognition: Use natural language processing technology (such as intent classification models) to further analyze user input and clarify the user's specific intention or needs. For example, in the query "What will the weather be like tomorrow?", it is recognized that the user's intention is to query the future weather forecast;
[0115] The process of parsing context information is as follows:
[0116] Template matching: Retrieve relevant corresponding templates from a predefined reply template library based on the user's intent; these templates can be general (such as "XX's weather forecast shows...") or customized for a specific intent;
[0117] Content filling: Fill the selected template with key information (such as "tomorrow") in the user input and relevant information in the context (such as user preferences, location information in historical conversations, etc.) to generate preliminary candidate responses;
[0118] The process of converting and generating natural fluent language responses is as follows:
[0119] Key information weighting: Use the attention mechanism to evaluate the importance of each part of the candidate reply. According to the key information in the user input (such as "weather"), increase the corresponding weight of the corresponding part of the reply (such as weather conditions, temperature, etc.) to ensure that this information is more prominent in the reply; the amount of weight increase is adjusted according to the default value. For example, if the original weight is 0.4 and the default value is increased to 0.05, the increased weight is 0.45;
[0120] Comprehensive evaluation: Combined with the attention mechanism, the candidate responses are comprehensively evaluated and the final response is output; the final response is the one that best matches the user's intent and the current context, and is used as the final answer;
[0121] Language polishing: Through natural language generation technology (such as text generation models), the final response is polished to ensure that it is natural, fluent, and in line with language habits.
[0122] By adopting the above technical solutions and comprehensively applying multiple text processing technologies, the accuracy of the system's semantic understanding of Chinese text has been effectively improved. It can accurately identify user intentions and key information, maintain historical conversation content, user preferences and current task status, and apply the attention mechanism to dynamically adjust attention, ensuring the system's coherent understanding of user intentions. The generated replies not only accurately reflect user intentions, but also make key information more prominent through weighted processing. At the same time, combined with user preferences and historical conversation content, natural and smooth replies are generated, improving the user experience.
[0123] The knowledge base query module, when the user selects a mode that requires a detailed response, will query the predefined knowledge base and use the attention mechanism to extract relevant information for supplementary responses;
[0124] Among them, through the attention mechanism, the system can effectively filter and focus on the information most relevant to the user's question;
[0125] When the user's question requires knowledge or factual support in a specific field, the user can choose the detailed response mode on his own. For example, after using the answer generation module to generate a language response, the content of the language response is: "Tomorrow's weather forecast shows cloudy with light rain." If more detailed information is needed, the system will query the weather forecast knowledge base to obtain tomorrow's specific weather data and provide an additional response: "The temperature is between 20 and 25 degrees. It is recommended to bring an umbrella."
[0126] By adopting the above technical solutions and adding a detailed response mode, not only the system's response methods are enriched, but also users' different needs for information details in different situations are met, which enhances the system's practicality and user stickiness. At the same time, the introduction of the attention mechanism enables the system to quickly focus on and extract the information most relevant to the user's questions, significantly improving the efficiency and accuracy of information retrieval.
[0127] A system feedback optimization module, which has a built-in user determination unit, a feedback data acquisition unit, and an evaluation and adjustment unit;
[0128] A user determination unit, which determines whether it is a multi-user or a single user based on analysis of historical data;
[0129] A feedback data acquisition unit, which periodically acquires feedback data sets of all conversations when it is determined to be a single user, and periodically acquires a subset of feedback data of each conversation when it is determined to be a multi-user.
[0130] The evaluation and adjustment unit generates a first-level comprehensive satisfaction evaluation value based on the feedback data set of all conversations under the condition of a single user, and generates a second-level comprehensive satisfaction evaluation value based on the feedback data subset of each conversation under the condition of multiple users, and compares the first-level / second-level comprehensive satisfaction evaluation value with the corresponding preset evaluation threshold, and selects whether to execute the optimization adjustment strategy according to the comparison result. The optimization adjustment strategy is:
[0131] In the process of converting and generating natural and fluent language replies, the system continues to make adjustments according to the established key information weights and implements dynamic adjustments: based on the information provided by the context management module, the attention weights are dynamically adjusted; for example, if the user has previously asked about the weather at a specific location, the system will pay more attention to the relevant information of that location when generating a reply; this optimization strategy simultaneously responds to multiple users and single users, thereby ensuring the effectiveness of the optimization strategy;
[0132] The above process of dynamically adjusting the attention weight is as follows: dynamically adjusting the relevant information in the reply in the same way as the weighting adjustment of the established key information, that is, the amount of increasing the weight is adjusted according to the default value;
[0133] Among them, historical data includes the IP address of the client used by historical users in the process of asking questions;
[0134] The process of analyzing the historical data is as follows: a continuous period T in the historical data is selected, and the IP address of the client used for each question is obtained within the period T. If the number of types of IP addresses does not exceed 1, it is determined to be a single user; if the number of types of IP addresses exceeds 1, it is determined to be multiple users;
[0135] Under the condition of determining that the user is a single user, periodically obtain feedback data sets of all conversations, where the feedback data sets of all conversations include the total amount of positive feedback and the total amount of negative feedback;
[0136] Positive feedback includes the number of times the user agrees with the current reply, the number of times the user agrees by default, and the number of times the user continues to ask questions. The total amount of positive feedback represents the sum of all the times the user agrees with the current reply, the number of times the user agrees by default, and the number of times the user continues to ask questions in that period. Negative feedback includes the number of times the user disagrees with the current reply and the number of times the user repeatedly asks questions. The total amount of negative feedback represents the sum of all the times the user disagrees with the current reply and the number of times the user repeatedly asks questions in that period.
[0137] It should be noted that each reply will have an agree or disagree button in the lower right corner of the dialog box for the user to choose. The above-mentioned period refers to the interval between each regular day, which is a fixed period. The judgment standard for each conversation is: closing the current conversation is used as the basis for judging the next conversation;
[0138] Under the condition that it is determined to be a multi-user conversation, a feedback data subset of each conversation is periodically obtained, where the feedback data subset of each conversation includes positive feedback and negative feedback;
[0139] The process of generating the first-level comprehensive satisfaction evaluation value is as follows:
[0140] Based on the normalized feedback data set of all conversations, a formula is established to calculate the first-level comprehensive satisfaction evaluation value. The formula is as follows:
[0141]
[0142] Where Satisfaction_Level_1 represents the first-level comprehensive satisfaction evaluation value, P represents the total amount of positive feedback, and N represents the total amount of negative feedback. This formula will return a value between 0% and 100%, reflecting the overall satisfaction of a single user during the period;
[0143] For example: Assume that in a fixed period of one month, a single user has 80 positive feedbacks and 20 negative feedbacks; then: Satisfaction_Level_1=80%;
[0144] The process of generating the secondary comprehensive satisfaction evaluation value is as follows:
[0145] Considering the situation where users are maliciously dissatisfied or the questions themselves contain abnormal problems, it is necessary to first calculate the comprehensive satisfaction evaluation index corresponding to each conversation, and filter out the conversations with a satisfaction evaluation index of 0%, and calculate the comprehensive satisfaction evaluation index corresponding to the remaining conversations to obtain the secondary comprehensive satisfaction evaluation value. The calculation process is as follows:
[0146]
[0147]
[0148]
[0149] In formula (1), Represents the secondary comprehensive satisfaction evaluation value, Indicates that the remaining number is the average value of the comprehensive satisfaction evaluation index corresponding to M conversations, Represents the evaluation stability index, which is used to measure the degree of dispersion of the remaining dialogue evaluation values. The weight coefficient is: , ,and ;
[0150] In formula (2), Indicates the number of remaining conversations, It represents the comprehensive satisfaction evaluation index corresponding to the ith dialogue, i=1, 2,…M, M is a positive integer, and the calculation method of the comprehensive satisfaction evaluation index is the same as that of the first-level comprehensive satisfaction evaluation value, so it will not be elaborated here.
[0151] If the first-level comprehensive satisfaction evaluation value is obtained, the first-level comprehensive satisfaction evaluation value is compared with the preset first-level evaluation threshold. When the first-level comprehensive satisfaction evaluation value exceeds the first-level evaluation threshold, it means that the user satisfaction meets the standard and no response action is taken. When the first-level comprehensive satisfaction evaluation value does not exceed the first-level evaluation threshold, it means that the user satisfaction does not meet the standard and the optimization adjustment strategy is executed.
[0152] If the obtained value is a secondary comprehensive satisfaction evaluation value, the secondary comprehensive satisfaction evaluation value is compared with the preset secondary evaluation threshold. When the secondary comprehensive satisfaction evaluation value exceeds the secondary evaluation threshold, it means that the user satisfaction meets the standard and no response action is taken. When the secondary comprehensive satisfaction evaluation value does not exceed the secondary evaluation threshold, it means that the user satisfaction does not meet the standard and an optimization adjustment strategy is executed.
[0153] It should be noted that the specific values of the above-mentioned evaluation threshold No. 1 and evaluation threshold No. 2 can be adjusted and set by the user to determine whether the optimization adjustment strategy needs to be triggered. The specific setting process will not be elaborated here.
[0154] By adopting the above technical solution, different feedback data collection and processing methods are adopted in multi-user and single-user scenarios, which effectively optimizes the utilization of system resources, improves processing efficiency and response speed, and through precise user judgment and feedback data collection, as well as comprehensive satisfaction evaluation, the system can more accurately understand user needs and provide responses that are more in line with user expectations, thereby significantly improving user experience. When conducting satisfaction evaluations for multiple users, it also takes into account problems such as malicious dissatisfaction of users or abnormalities in the questions themselves, so that the system can run more robustly and avoid system instability or misjudgment due to individual extreme situations.
[0155] Embodiment 2:
[0156] See also Figure 2 Based on Example 1, this embodiment also provides an intelligent language response recognition method based on an attention mechanism, comprising the following specific steps:
[0157] S1, receiving input text and preprocessing it to identify key information;
[0158] S2, manage the context information of the current text conversation, including historical conversation content, user preferences and current task status, and use the attention mechanism to dynamically adjust the focus on context information;
[0159] S3, converting the parsed user intent and context information into a language response;
[0160] S4. In the selected detailed response mode, query the predefined knowledge base and use the attention mechanism to extract relevant information for supplementary response;
[0161] S5. Analyze historical data to determine whether the current user is multiple users or a single user;
[0162] If the user is single-user, the feedback data set of all conversations is obtained regularly. If the user is multi-user, the feedback data subset of each conversation is obtained regularly.
[0163] Under the condition of single user, the first-level comprehensive satisfaction evaluation value is generated based on the feedback data set of all conversations. Under the condition of multiple users, the second-level comprehensive satisfaction evaluation value is generated based on the feedback data subset of each conversation. The first-level / second-level comprehensive satisfaction evaluation values are compared with the corresponding preset evaluation thresholds, and whether to execute the optimization adjustment strategy is determined based on the comparison results.
[0164] In the application, the several formulas involved are all calculated by removing the dimensions and taking their numerical values. The formula is a formula obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The formula is set by technical personnel in this field according to actual conditions.
[0165] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. A person of ordinary skill in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented in electronic hardware, or in 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.
[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the 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.
Claims
1. An intelligent language response recognition system based on attention mechanism, characterized in that: include: A text input processing module receives input text and performs preprocessing to identify key information; The context management module manages the context information of the current text conversation, including historical conversation content, user preferences, and current task status, and uses the attention mechanism to dynamically adjust the focus on context information; The response generation module converts the parsed user intent and context information into a verbal response. The knowledge base query module queries the predefined knowledge base in the detailed response mode and uses the attention mechanism to extract relevant information for supplementary response; A system feedback optimization module, which has a built-in user determination unit, a feedback data acquisition unit, and an evaluation and adjustment unit; A user determination unit, used for analyzing historical data to determine whether the current session is a multi-user or a single user; a feedback data acquisition unit, used for periodically acquiring feedback data sets of all conversations if the session is determined to be a single user, and periodically acquiring feedback data subsets of each conversation if the session is determined to be a multi-user; The evaluation and adjustment unit is used to generate a first-level comprehensive satisfaction evaluation value based on the feedback data set of all conversations under the condition of a single user, and to generate a second-level comprehensive satisfaction evaluation value based on the feedback data subset of each conversation under the condition of multiple users, and to compare the first-level / second-level comprehensive satisfaction evaluation value with the corresponding preset evaluation threshold, and to choose whether to execute the optimization adjustment strategy according to the comparison result.
2. The intelligent language response recognition system based on the attention mechanism according to claim 1, characterized in that: The process of preprocessing the input text is as follows: Word segmentation: break the input text into individual words or phrases and remove stop words; Word vector representation: Use a pre-trained word vector model to convert each word into a high-dimensional vector; Syntax analysis: Use dependency parsing to determine the relationship between words in the input text; Attention weight calculation: Apply the attention mechanism to calculate the attention weight of each word in the input text; Context vector generation: Generate a context vector based on the calculated attention weights.
3. The intelligent language response recognition system based on the attention mechanism according to claim 2, characterized in that: The process of managing the current text session is as follows: Receive the output of the text input processing module: receive the generated context vector; Maintenance of historical conversation content: Under the condition of satisfying S rounds of conversation, the current input text and context vector are integrated and stored with the historical conversation content; User preference management: dynamically update and maintain user preference information based on user historical behavior; Maintenance of current task status: Determine the task status in the current session; Application of attention mechanism: When maintaining contextual information, the attention mechanism is applied to dynamically adjust the attention paid to different parts of information, giving priority to historical conversations and user preferences related to the current task status.
4. The intelligent language response recognition system based on the attention mechanism according to claim 3 is characterized in that: The process of parsing the user's intent is as follows: Input integration: Receive and integrate the output from the text input processing module and the context management module; Intent recognition: Use the intent classification model to analyze user input and obtain user intent.
5. The intelligent language response recognition system based on the attention mechanism according to claim 4 is characterized in that: The process of parsing context information is as follows: Template matching: Retrieve relevant corresponding templates from the predefined reply template library based on the user's intention; Content filling: Fill the selected template with key information from the user input and relevant information from the context to generate preliminary candidate responses.
6. The intelligent language response recognition system based on the attention mechanism according to claim 5, characterized in that: The process of converting and generating language responses is as follows: Key information weighting: Use the attention mechanism to evaluate the importance of each part of the candidate reply. According to the key information in the user input, increase the weight of the corresponding part of the reply, and the amount of increase in weight is adjusted according to the default value; Comprehensive evaluation: Combine the attention mechanism to comprehensively evaluate the candidate responses and output the final response; Language polishing: A text generation model is used to polish the final response.
7. The intelligent language response recognition system based on the attention mechanism according to claim 6, characterized in that: Historical data includes the IP address of the client used by historical users in the process of asking questions; The process of analyzing the historical data is as follows: a continuous period T in the historical data is selected, and the IP address of the client used for each question is obtained within the period T. If the number of types of IP addresses does not exceed 1, it is determined to be a single user; if the number of types of IP addresses exceeds 1, it is determined to be multiple users; The feedback dataset for all conversations includes the total amount of positive feedback and the total amount of negative feedback; Positive feedback includes the number of times the user agrees with the current reply, the number of times the user agrees by default, and the number of times the user continues to ask questions. The total amount of positive feedback represents the sum of all the times the user agrees with the current reply, the number of times the user agrees by default, and the number of times the user continues to ask questions within that period. Negative feedback includes the number of times the user disagrees with the current reply and the number of times the user repeatedly asks questions. The total amount of negative feedback represents the sum of all the times the user disagrees with the current reply and the number of times the user repeatedly asks questions within that period.
8. The intelligent language response recognition system based on the attention mechanism according to claim 7 is characterized in that: The process of generating the first-level comprehensive satisfaction evaluation value is as follows: Based on the normalized feedback data set of all conversations, a formula is established to calculate the first-level comprehensive satisfaction evaluation value. The formula is as follows: In the formula, Satisfaction_Level_1 represents the first-level comprehensive satisfaction evaluation value, P represents the total amount of positive feedback, and N represents the total amount of negative feedback; The process of generating the secondary comprehensive satisfaction evaluation value is as follows: First, calculate the comprehensive satisfaction evaluation index corresponding to each conversation, and filter out the conversations with a satisfaction evaluation index of 0%. Calculate the comprehensive satisfaction evaluation index corresponding to the remaining conversations to obtain the secondary comprehensive satisfaction evaluation value. The calculation process is as follows: In formula (1), represents the secondary comprehensive satisfaction evaluation value, Indicates that the remaining number is the average value of the comprehensive satisfaction evaluation index corresponding to M conversations, Indicates the evaluation stability index, weight coefficient: , ,and ; In formula (2), Indicates the number of remaining conversations, It represents the comprehensive satisfaction evaluation index corresponding to the i-th dialogue, and the calculation method of the comprehensive satisfaction evaluation index is the same as the first-level comprehensive satisfaction evaluation value, i=1, 2,…M, M is a positive integer.
9. The intelligent language response recognition system based on the attention mechanism according to claim 8, characterized in that: The process of choosing whether to execute the optimization adjustment strategy based on the comparison results is as follows: If the first-level comprehensive satisfaction evaluation value is obtained, the first-level comprehensive satisfaction evaluation value is compared with the preset No. 1 evaluation threshold. When the first-level comprehensive satisfaction evaluation value exceeds the No. 1 evaluation threshold, no response action is taken; otherwise, the optimization adjustment strategy is executed; if the second-level comprehensive satisfaction evaluation value is obtained, the second-level comprehensive satisfaction evaluation value is compared with the preset No. 2 evaluation threshold. When the second-level comprehensive satisfaction evaluation value exceeds the No. 2 evaluation threshold, no response action is taken; otherwise, the optimization adjustment strategy is executed; Among them, the optimization adjustment strategy is: In the process of converting and generating language responses, adjustments are continued according to the established key information weightings, and dynamic adjustments are achieved: the attention weights are dynamically adjusted based on the information provided by the context management module.
10. An intelligent language response recognition method based on an attention mechanism, using any system described in claims 1 to 9, characterized in that: The steps include: S1, receiving input text and preprocessing it to identify key information; S2, manage the context information of the current text conversation, including historical conversation content, user preferences and current task status, and use the attention mechanism to dynamically adjust the focus on context information; S3, converting the parsed user intent and context information into a language response; S4. In the selected detailed response mode, query the predefined knowledge base and use the attention mechanism to extract relevant information for supplementary response; S5. Analyze historical data to determine whether the current user is multiple users or a single user; If the user is single-user, the feedback data set of all conversations is obtained regularly. If the user is multi-user, the feedback data subset of each conversation is obtained regularly. Under the condition of single user, the first-level comprehensive satisfaction evaluation value is generated based on the feedback data set of all conversations. Under the condition of multiple users, the second-level comprehensive satisfaction evaluation value is generated based on the feedback data subset of each conversation. The first-level / second-level comprehensive satisfaction evaluation values are compared with the corresponding preset evaluation thresholds, and whether to execute the optimization adjustment strategy is determined based on the comparison results.
