Dialogue response method, dialogue response device, electronic equipment and storage medium

By obtaining target questions in the dialogue response system, identifying intentions, and selecting answer generation strategies based on the preset knowledge base or model, the problem that dialogue response systems in the existing technology cannot quickly learn new domain knowledge, and improve the accuracy of dialogue response.

CN119646141APending Publication Date: 2025-03-18CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411677201.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing dialogue response system cannot quickly learn new domain knowledge, resulting in low accuracy of dialogue response.

Method used

By obtaining target questions, identifying intentions, classifying intent categories according to the preset knowledge base, and selecting the corresponding answer generation strategy. If the intention category is known, call the dialogue template of the preset knowledge base to generate the answer; if it is unknown, call the preset dialogue model to generate the answer.

Benefits of technology

Improves the accuracy of dialogue responses, can more effectively deal with new domain knowledge problems, and generate accurate answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646141A_ABST
    Figure CN119646141A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a dialogue response method, a dialogue response device, electronic equipment and a storage medium, and belongs to the technical field of man-machine dialogues. The method comprises the steps of obtaining a target problem, performing intention recognition on the target problem to obtain an object intention category, classifying the object intention category according to a preset knowledge base to obtain an intention classification result which is used for representing that the object intention category is a known category or an unknown category, and if the object intention category is the known category, determining that the object intention category is a known category. If yes, calling a preset dialogue template of a preset knowledge base according to the object intention category, and generating a target answer of the target question according to the preset dialogue template; or, if the object intention category is an unknown category, calling a preset dialogue model according to the object intention category, and generating a target answer of the target question according to the preset dialogue model, so that the dialogue response accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of human-computer dialogue technology, applicable to the field of financial technology, and in particular to a dialogue response method, a dialogue response device, an electronic device and a storage medium. Background Art

[0002] The conversational response system can automatically answer users' questions and provide users with personalized service suggestions. For example, in the banking industry, the conversational response system can provide users with services such as account inquiries, remittances, and loan consultations. However, the conversational response system cannot quickly learn new domain knowledge and is prone to generating wrong answers, resulting in low accuracy in conversational responses. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to provide a conversation answering method, a conversation answering device, an electronic device and a storage medium, aiming to improve the accuracy of conversation answering.

[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application provides a conversation answering method, the method comprising:

[0005] Get the target question;

[0006] Performing intent recognition on the target question to obtain an object intent category;

[0007] Classify the object intention category according to a preset knowledge base to obtain an intention classification result; the intention classification result is used to indicate whether the object intention category is a known category or an unknown category;

[0008] If the object intent category is a known category, the preset dialogue template of the preset knowledge base is called according to the object intent category, and the target answer to the target question is generated according to the preset dialogue template; or, if the object intent category is an unknown category, the preset dialogue model is called according to the object intent category, and the target answer to the target question is generated according to the preset dialogue model.

[0009] In some embodiments, performing intent recognition on the target question to obtain an object intent category includes:

[0010] Extracting the intention feature of the target problem to obtain the object intention feature;

[0011] Extracting slot features of the target problem to obtain slot features of the problem;

[0012] Performing gated feature extraction on the object intention feature and the problem slot feature to obtain a target gated feature;

[0013] Intent recognition is performed based on the object intent feature, the question slot feature and the target gating feature to obtain the object intent category.

[0014] In some embodiments, performing intent recognition according to the object intent feature, the question slot feature, and the target gating feature to obtain the object intent category includes:

[0015] Performing feature weighting on the problem slot feature according to the target gating feature to obtain a weighted slot feature;

[0016] The object intent feature and the weighted slot feature are subjected to intent recognition through a preset target intent recognition model to obtain the object intent category.

[0017] In some embodiments, the target intent recognition model includes a first sub-model and a second sub-model, and performing intent recognition on the object intent feature and the weighted slot feature through the preset target intent recognition model to obtain the object intent category includes:

[0018] Extracting the object intention feature and the weighted slot feature through the first sub-model to obtain a reference question feature;

[0019] The second sub-model is used to perform intent recognition on the reference question feature to obtain the object intent category.

[0020] In some embodiments, the first sub-model includes a self-attention layer, a first target low-rank adaptation layer, a second target low-rank adaptation layer, and a feedforward attention layer, and extracting the object intent feature and the weighted slot feature through the first sub-model to obtain a reference question feature includes:

[0021] Performing feature splicing on the object intention feature and the weighted slot feature to obtain a target splicing feature;

[0022] Performing attention feature extraction on the target splicing feature through the self-attention layer to obtain a query feature vector, a key feature vector and a value feature vector;

[0023] Performing a first low-rank feature extraction on the target splicing feature through the first target low-rank adaptation layer to obtain a first low-rank adaptive feature;

[0024] Performing second low-rank feature extraction on the target splicing feature through the second target low-rank adaptation layer to obtain a second low-rank adaptive feature;

[0025] Performing feature fusion on the query feature vector, the key feature vector, the value feature vector, the first low-rank adaptive feature, and the second low-rank adaptive feature to obtain an initial question feature;

[0026] The initial question features are subjected to feedforward feature extraction through the feedforward attention layer to obtain the reference question features.

[0027] In some embodiments, the step of performing feature fusion on the query feature vector, the key feature vector, the value feature vector, the first low-rank adaptive feature, and the second low-rank adaptive feature to obtain an initial question feature includes:

[0028] Performing feature fusion on the query feature vector and the first low-rank adaptive feature to obtain a first fused feature;

[0029] Performing feature fusion on the key feature vector and the second low-rank adaptive feature to obtain a second fused feature;

[0030] Performing attention transformation on the first fused feature, the second fused feature and the value feature vector to obtain the initial question feature.

[0031] In some embodiments, the target intent recognition model is trained according to the following steps:

[0032] Obtaining sample conversation data and an original intent recognition model; the sample conversation data includes sample conversation questions and intent category labels, and the original intent recognition model includes a self-attention layer, a first initial low-rank adaptation layer, a second initial low-rank adaptation layer, and a feedforward attention layer;

[0033] Performing attention feature extraction on the sample dialogue question through the self-attention layer to obtain sample query features, sample key features, and sample value features;

[0034] Performing a first low-rank feature extraction on the sample dialogue question through the first initial low-rank adaptation layer to obtain a first sample low-rank feature;

[0035] Performing second low-rank feature extraction on the sample dialogue question through the second initial low-rank adaptation layer to obtain a second sample low-rank feature;

[0036] Performing feature fusion on the sample query feature, the sample key feature, the sample value feature, the first sample low-rank feature, and the second sample low-rank feature to obtain a sample initial feature;

[0037] Performing feedforward feature extraction on the sample initial features through the feedforward attention layer to obtain sample target features;

[0038] Performing intent recognition according to the sample target features to obtain a predicted intent category;

[0039] Calculate the loss according to the intent category label and the predicted intent category to obtain target loss data;

[0040] Adjusting the parameters of the first initial low-rank adaptive layer according to the target loss data to obtain a first target low-rank adaptive layer, and adjusting the parameters of the second initial low-rank adaptive layer according to the target loss data to obtain a second target low-rank adaptive layer;

[0041] The target intent recognition model is determined according to the self-attention layer, the first target low-rank adaptation layer, the second target low-rank adaptation layer and the feedforward attention layer.

[0042] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a conversation answering device, the conversation answering device comprising:

[0043] An acquisition module is used to obtain the target problem;

[0044] An intention recognition module is used to recognize the intention of the target question and obtain the object intention category;

[0045] A classification module, used to classify the object intention category according to a preset knowledge base to obtain an intention classification result; the intention classification result is used to indicate whether the object intention category is a known category or an unknown category;

[0046] A dialogue answering module is used to call a preset dialogue template of the preset knowledge base according to the object intention category if the object intention category is a known category, and generate a target answer to the target question according to the preset dialogue template; or, if the object intention category is an unknown category, call a preset dialogue model according to the object intention category, and generate a target answer to the target question according to the preset dialogue model.

[0047] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0048] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0049] The dialogue answering method, dialogue answering device, electronic device and computer-readable storage medium proposed in the embodiment of the present application obtain the target question, identify the intent of the target question, and obtain the object intent category, so as to obtain the user's dialogue intent and provide personalized service suggestions for the user according to the dialogue intent. For new domain knowledge, the dialogue answering system cannot generate accurate answers. In order to improve the accuracy of dialogue answering, a preset knowledge base is introduced. The object intent category is classified according to the preset knowledge base to obtain the intent classification result. The intent classification result is used to indicate that the object intent category is a known category or an unknown category, so as to select different answer generation strategies according to the intent classification result to improve the accuracy of dialogue answering. If the object intent category is a known category, it means that the target question is a question for new domain knowledge, and the answer to the target question cannot be accurately generated. In order to improve the accuracy of dialogue answering, the preset dialogue template of the preset knowledge base is called according to the object intent category, and the target answer to the target question is generated according to the preset dialogue template. If the object intent category is an unknown category, it means that the target question is a question for the knowledge obtained by the dialogue answering system in the model training stage, the preset dialogue model is called according to the object intent category, and the target answer to the target question is generated according to the preset dialogue model, so as to generate an accurate answer with the help of the semantic understanding ability of the preset dialogue model. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a flow chart of a conversation answering method provided in an embodiment of the present application;

[0051] Figure 2 yes Figure 1 Flow chart of step S120 in FIG.

[0052] Figure 3 yes Figure 2 Flow chart of step S240 in FIG.

[0053] Figure 4 yes Figure 3 Flow chart of step S320 in FIG.

[0054] Figure 5 yes Figure 4 Flow chart of step S410 in FIG.

[0055] Figure 6 yes Figure 5 Flowchart of step S550 in FIG.

[0056] Figure 7 It is a flowchart of the training process of the target intent recognition model;

[0057] Figure 8 It is a structural diagram of a conversation answering device provided in an embodiment of the present application;

[0058] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0062] The conversational response system can automatically answer users' questions and provide users with personalized service suggestions. For example, in the banking industry, the conversational response system can provide users with services such as account inquiries, remittances, and loan consultations. However, the conversational response system cannot quickly learn new domain knowledge and is prone to generating wrong answers, resulting in low accuracy in conversational responses.

[0063] Based on this, the embodiments of the present application provide a conversation answering method, a conversation answering device, an electronic device and a computer-readable storage medium, aiming to improve the accuracy of conversation answering.

[0064] The conversation answering method, conversation answering device, electronic device and computer-readable storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the conversation answering method in the embodiments of the present application is described.

[0065] The dialogue response method provided in the embodiment of the present application relates to the field of human-computer dialogue technology and is applicable to the field of financial technology. The dialogue response method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the dialogue response method, etc., but is not limited to the above forms.

[0066] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0067] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0068] Figure 1 It is an optional flowchart of the conversation answering method provided in an embodiment of the present application. The conversation answering method may include but is not limited to steps S110 to S140.

[0069] Step S110, obtaining a target question;

[0070] Step S120, performing intent recognition on the target question to obtain the object intent category;

[0071] Step S130, classifying the object intent category according to a preset knowledge base to obtain an intent classification result; the intent classification result is used to indicate whether the object intent category is a known category or an unknown category;

[0072] Step S140: If the object intent category is a known category, a preset dialogue template of a preset knowledge base is called according to the object intent category, and a target answer to the target question is generated according to the preset dialogue template; or, if the object intent category is an unknown category, a preset dialogue model is called according to the object intent category, and a target answer to the target question is generated according to the preset dialogue model.

[0073] In steps S110 to S140 shown in the embodiment of the present application, when faced with a target question of new domain knowledge, the answer to the target question is generated according to the dialogue template in the preset knowledge base; when faced with a target question of existing domain knowledge, the answer to the target question is generated with the help of the knowledge generation capability of the preset dialogue model. Different answer generation strategies are adopted for different target questions, which greatly improves the accuracy of dialogue responses.

[0074] In step S110 of some embodiments, the target question is a question sent by the user to the dialogue answering system through the terminal. The target question is usually in voice or text form. In specific scenarios such as auto insurance claims and health insurance claims, it may be in image form. The target question can be a question in the form of a question or a statement, such as "What types of insurance products are there?", "Handling insurance claims business", etc.

[0075] See also Figure 2 In some embodiments, step S120 may include but is not limited to steps S210 to S240:

[0076] Step S210, extracting the intention feature of the target question to obtain the object intention feature;

[0077] Step S220, extracting slot features of the target problem to obtain the problem slot features;

[0078] Step S230, performing gated feature extraction on the object intention feature and the problem slot feature to obtain a target gated feature;

[0079] Step S240, performing intent recognition based on the object intent features, question slot features, and target gating features to obtain the object intent category.

[0080] In step S210 of some embodiments, the question data type of the target question is obtained, and the question data type includes voice, text or image. The target question is preprocessed according to the question data type. If the question data type is voice, the voice is converted into text; if the question data type is image, the image features of the target question are extracted. The target question in text form or image features are used as input data, and the input data is subjected to intention feature extraction through a feature extraction model to obtain object intention features. The object intention feature is used to reflect the intention category of the target question, such as consultation intention, query intention, purchase intention, etc.

[0081] The feature extraction model includes a first convolutional layer, a second convolutional layer, a first fully connected layer, a multi-head self-attention layer, a second fully connected layer and a pooling layer. The convolution kernel sizes of the first convolutional layer and the second convolutional layer are different. The convolution kernel size of the first convolutional layer can be 3, and the convolution kernel size of the second convolutional layer can be 5. By using convolutional layers of different sizes, feature details of multiple scales in the input data can be extracted to obtain richer feature representations. Specifically, the first convolutional layer performs a convolution operation on the input data to obtain a first convolutional feature. The second convolutional layer performs a convolution operation on the input data to obtain a second convolutional feature. The first convolutional feature and the second convolutional feature are concatenated to obtain a third convolutional feature. The third convolutional feature is feature mapped by the first fully connected layer to obtain an intermediate convolutional feature. The multi-head self-attention layer performs multi-head attention calculation on the input data to obtain an attention feature to understand the relationship between the question and the context, thereby generating an accurate answer. The intermediate convolutional feature and the attention feature are concatenated to obtain a candidate convolutional feature. The second fully connected layer performs feature mapping on the candidate convolutional features to obtain the target convolutional features. The pooling layer pools the target convolutional features to obtain the object intent features.

[0082] In step S220 of some embodiments, the object intent feature may reflect the operation that the user wishes to perform when interacting with the dialogue response system. For example, the target question is how much balance is in account A, and the object intent feature is balance inquiry. However, the object intent feature only provides a rough intent category and lacks the details required to execute the intent, such as account A. In order to more accurately and comprehensively understand the target question and solve the target question, the slot feature of the target question is extracted to obtain the problem slot feature. The problem slot feature is a piece of information extracted from the input data. The target convolution feature can be used as the problem slot feature.

[0083] In step S230 of some embodiments, in order to more accurately understand the user's needs, it is necessary to consider the relationship between intent and slot, and combine the object intent feature and the question slot feature through a gating function to output a gating signal to obtain a target gating feature. The gating function can be a simple linear transformation or a complex nonlinear transformation. The target gating feature can establish a dependency relationship between intent and slot. When the target question is incomplete, the dependency relationship helps to determine the additional information required for the target question, so as to better infer the user's intent, guide the conversation, and provide a more natural and smooth conversation. When the target question is complete, the dependency relationship helps to better understand the user's intent and improve the accuracy of answer generation.

[0084] Taking nonlinear transformation as an example, the process of gated feature extraction is described in detail. A first bidirectional long short-term memory network, a second bidirectional long short-term memory network, a first long short-term memory network, and a second long short-term memory network are obtained to capture the long-term and short-term dependencies between the intent features and the slot features. Among them, the first bidirectional long short-term memory network includes a first bidirectional long short-term memory unit and a second bidirectional long short-term memory unit. The first long short-term memory network includes a first long short-term memory unit and a second long short-term memory unit. The second bidirectional long short-term memory network includes a third bidirectional long short-term memory unit and a fourth bidirectional long short-term memory unit. The second long short-term memory network includes a third long short-term memory unit and a fourth long short-term memory unit. The first bidirectional long short-term memory network and the second bidirectional long short-term memory network have the same network structure but different model parameters, and the first long short-term memory network and the second long short-term memory network have the same network structure but different model parameters.

[0085] The object intention feature is divided into a first intention feature segment and a second intention feature segment, and the problem slot feature is divided into a first slot feature segment and a second slot feature segment. The first intention feature segment is feature-encoded by a first bidirectional long short-term memory unit to obtain a first intention hidden state. The first slot feature segment is feature-encoded by a third bidirectional long short-term memory unit to obtain a first slot hidden state. The first intention hidden state and the first slot hidden state are feature-decoded by a first long short-term memory unit to obtain a first candidate intention state. The second intention feature segment is feature-encoded by a second bidirectional long short-term memory unit to obtain a second intention hidden state. The second slot feature segment is feature-encoded by a fourth bidirectional long short-term memory unit to obtain a second slot hidden state.

[0086] The first candidate intention state, the second intention hidden state and the second slot hidden state are feature decoded by the second long short-term memory unit to obtain the second candidate intention state. The first intention hidden state and the first slot hidden state are feature decoded by the third long short-term memory unit to obtain the first candidate slot state. The first candidate slot state, the second intention hidden state and the second slot hidden state are feature decoded by the fourth long short-term memory unit to obtain the second candidate slot state. The second candidate intention state and the second candidate slot state are feature spliced ​​to obtain the state splicing feature. The state splicing feature is activated by the sigmoid function to obtain the target gating feature.

[0087] In step S240 of some embodiments, the object intent category is used to indicate the user intent contained in the target question, and is a more detailed intent category than the object intent feature. For example, the object intent feature is balance inquiry, and the object intent category is account A balance inquiry.

[0088] Through the above steps S210 to S240, by combining the object intention features and the question slot features, a more accurate intention category can be obtained to accurately understand the user's needs and generate accurate service recommendations for the user.

[0089] See also Figure 3 In some embodiments, step S240 may include but is not limited to steps S310 to S320:

[0090] Step S310, performing feature weighting on the problem slot feature according to the target gating feature to obtain a weighted slot feature;

[0091] Step S320, performing intent recognition on the object intent features and weighted slot features through a preset target intent recognition model to obtain the object intent category.

[0092] In step S310 of some embodiments, the target gating feature takes into account the relationship between intent and slot, reflects the degree of influence of intent on slot information, and multiplies the target gating feature with the problem slot feature to weight the problem slot feature so that it is possible to focus on slot information related to the current intent category and obtain a weighted slot feature.

[0093] In step S320 of some embodiments, the object intent feature and the weighted slot feature are input into the target intent recognition model for intent recognition to obtain the object intent category. The target intent recognition model is a pre-trained large model, including a first sub-model and a second sub-model, the first sub-model and the second sub-model are connected in series, and the network structures of the first sub-model and the second sub-model are the same, and both use a general language module (General Language Model, GLM).

[0094] Through the above steps S310 to S320, the slot features associated with the intention features can be obtained, and the intention features and the slot features are combined to perform intention recognition, thereby improving the accuracy of intention recognition.

[0095] See also Figure 4 In some embodiments, step S320 may include but is not limited to steps S410 to S420:

[0096] Step S410, extracting the object intention feature and the weighted slot feature through the first sub-model to obtain a reference question feature;

[0097] Step S420: perform intent recognition on the reference question features through the second sub-model to obtain the object intent category.

[0098] In step S410 of some embodiments, the first sub-model includes a self-attention layer, a first target low-rank adaptation layer, a second target low-rank adaptation layer and a feed-forward attention layer. The self-attention layer adopts a multi-head attention mechanism, the first target low-rank adaptation layer and the second target low-rank adaptation layer adopt low-rank adaptation technology (Low-Rank Adaptation), which can reduce the number of model parameters, and the feed-forward attention layer adopts a fully connected layer. The reference question feature is a feature representation learned by the first sub-model from the object intent feature and the weighted slot feature, which can represent the key information related to intent recognition in the target question.

[0099] In step S420 of some embodiments, the network structure of the first sub-model and the second sub-model is the same. Referring to step S410, the reference question features are input into the second sub-model for intent recognition to capture the complex semantics and contextual information in the target question, so that the model can recognize multiple intents and obtain object intent categories, thereby supporting more accurate user interaction and answer generation.

[0100] The above steps S410 to S420 can capture more complex high-level semantic features through the cascaded first sub-model and the second sub-model, enhance the model expression ability of the intent recognition model, and improve the accuracy of intent recognition.

[0101] See also Figure 5 In some embodiments, step S410 may include but is not limited to steps S510 to S560:

[0102] Step S510, performing feature splicing on the object intention feature and the weighted slot feature to obtain a target splicing feature;

[0103] Step S520, performing attention feature extraction on the target splicing feature through the self-attention layer to obtain a query feature vector, a key feature vector and a value feature vector;

[0104] Step S530, performing a first low-rank feature extraction on the target splicing feature through a first target low-rank adaptive layer to obtain a first low-rank adaptive feature;

[0105] Step S540, performing a second low-rank feature extraction on the target splicing feature through a second target low-rank adaptive layer to obtain a second low-rank adaptive feature;

[0106] Step S550, performing feature fusion on the query feature vector, the key feature vector, the value feature vector, the first low-rank adaptive feature, and the second low-rank adaptive feature to obtain an initial question feature;

[0107] Step S560, performing feedforward feature extraction on the initial question features through the feedforward attention layer to obtain reference question features.

[0108] In step S510 of some embodiments, in order to obtain a more comprehensive feature representation and facilitate the subsequent capture of more complex relationships and dependencies in the input, feature splicing is performed on the object intent feature and the weighted slot feature to obtain a target splicing feature.

[0109] In step S520 of some embodiments, the self-attention layer includes multiple heads of attention mechanisms, and the attention mechanism of each head includes a query weight matrix, a key weight matrix, and a value weight matrix. For each head, the query weight matrix is ​​multiplied by the target splicing feature to obtain a query feature vector, the key weight matrix is ​​multiplied by the target splicing feature to obtain a key feature vector, and the value weight matrix is ​​multiplied by the target splicing feature to obtain a value feature vector.

[0110] In step S530 of some embodiments, each head corresponds to a first target low-rank adaptation layer and a second target low-rank adaptation layer. The first target low-rank adaptation layer includes a first low-rank matrix and a second low-rank matrix, the rank of the first low-rank matrix is ​​less than the rank of the second low-rank matrix, the first low-rank matrix is ​​used for feature dimensionality reduction, and the second low-rank matrix is ​​used for feature dimensionality increase. The first low-rank matrix and the second low-rank matrix are multiplied to obtain a first low-rank weight matrix, and the first low-rank weight matrix and the target splicing feature are multiplied to obtain a first low-rank adaptive feature. Feature dimensionality reduction can capture the main features in the target splicing features, and ignore the secondary features or redundant features in the target splicing features. Feature dimensionality increase can ensure feature extraction performance while reducing the dimensionality.

[0111] In step S540 of some embodiments, the second target low-rank adaptation layer includes a third low-rank matrix and a fourth low-rank matrix, the rank of the third low-rank matrix is ​​less than the rank of the fourth low-rank matrix, the third low-rank matrix is ​​used for feature dimensionality reduction, and the fourth low-rank matrix is ​​used for feature dimensionality increase. The third low-rank matrix and the fourth low-rank matrix are multiplied to obtain a second low-rank weight matrix, and the second low-rank weight matrix and the target concatenated feature are multiplied to obtain a second low-rank adaptive feature.

[0112] In step S550 of some embodiments, different intent feature representations of the target question can be learned in parallel through each head, and feature fusion is performed on the query feature vectors, key feature vectors, value feature vectors, first low-rank adaptive features and second low-rank adaptive features of all heads to combine the intent features from different heads to form a more comprehensive and rich feature representation to obtain the initial question features.

[0113] In step S560 of some embodiments, the feedforward attention layer includes two fully connected layers, which are connected in series. The first fully connected layer performs feedforward feature extraction on the initial question feature to obtain a candidate feedforward feature, and the second fully connected layer performs feedforward feature extraction on the candidate feedforward feature to obtain a reference question feature. The method for extracting the reference question feature is as follows:

[0114] FFN(x)=max(0,xW1+B)W2+b2,

[0115] Among them, FFN is the feedforward attention layer; x is the input data; W1, b are the weight and bias of the first fully connected layer; W2, b2 are the weight and bias of the second fully connected layer.

[0116] Through the above steps S510 to S560, while ensuring the accuracy of intent recognition, the model parameters of the intent recognition model can be reduced, the computational cost of intent recognition can be reduced, and the efficiency of intent recognition can be improved, so as to generate answers to target questions in real time and facilitate providing personalized services to users in real time.

[0117] See also Figure 6 In some embodiments, step S550 may include but is not limited to steps S610 to S630:

[0118] Step S610, performing feature fusion on the query feature vector and the first low-rank adaptive feature to obtain a first fused feature;

[0119] Step S620, performing feature fusion on the key feature vector and the second low-rank adaptive feature to obtain a second fused feature;

[0120] Step S630, performing attention transformation on the first fused feature, the second fused feature and the value feature vector to obtain an initial question feature.

[0121] In step S610 of some embodiments, for each head, the query feature vector and the first low-rank adaptive feature are added to introduce additional low-rank feature information on the basis of the query feature vector to obtain a first fused feature.

[0122] In step S620 of some embodiments, feature addition is performed on the key feature vector and the second low-rank adaptive feature to obtain a second fused feature.

[0123] In step S630 of some embodiments, the first fused feature, the second fused feature and the value feature vector are subjected to attention transformation to obtain an attention feature, and the attention feature of each head is subjected to feature concatenation to obtain an initial question feature. The calculation method of the attention feature is as follows:

[0124]

[0125] Among them, head i represents the attention feature of the i-th head; Q i ′ represents the first fusion feature of the i-th head; K i ′ represents the second fusion feature of the i-th head; V i represents the value feature vector of the i-th head; d represents the feature dimension of the first fused feature.

[0126] The above steps S610 to S630, by combining the pre-trained parameters and low-rank parameters of the model, can make the model more adaptable to intent recognition in specific scenarios while retaining the pre-trained knowledge, thereby improving the accuracy of intent recognition.

[0127] See also Figure 7 In some embodiments, the training process of the target intent recognition model may include but is not limited to steps S7010 to S7100:

[0128] Step S7010, obtaining sample dialogue data and an original intent recognition model; the sample dialogue data includes sample dialogue questions and intent category labels, and the original intent recognition model includes a self-attention layer, a first initial low-rank adaptation layer, a second initial low-rank adaptation layer, and a feedforward attention layer;

[0129] Step S7020, extracting attention features from the sample dialogue question through the self-attention layer to obtain sample query features, sample key features, and sample value features;

[0130] Step S7030, performing a first low-rank feature extraction on the sample dialogue question through a first initial low-rank adaptation layer to obtain a first sample low-rank feature;

[0131] Step S7040, performing a second low-rank feature extraction on the sample dialogue question through a second initial low-rank adaptation layer to obtain a second sample low-rank feature;

[0132] Step S7050, performing feature fusion on the sample query feature, the sample key feature, the sample value feature, the first sample low-rank feature, and the second sample low-rank feature to obtain the sample initial feature;

[0133] Step S7060, performing feedforward feature extraction on the sample initial features through the feedforward attention layer to obtain the sample target features;

[0134] Step S7070, performing intent recognition based on sample target features to obtain a predicted intent category;

[0135] Step S7080, performing loss calculation according to the intent category label and the predicted intent category to obtain target loss data;

[0136] Step S7090, adjusting the parameters of the first initial low-rank adaptive layer according to the target loss data to obtain the first target low-rank adaptive layer, and adjusting the parameters of the second initial low-rank adaptive layer according to the target loss data to obtain the second target low-rank adaptive layer;

[0137] Step S7100, determines the target intent recognition model based on the self-attention layer, the first target low-rank adaptation layer, the second target low-rank adaptation layer and the feedforward attention layer.

[0138] In step S7010 of some embodiments, the sample dialogue data is a text corpus for model training, and the sample dialogue data includes sample dialogue questions and intent category labels of the sample dialogue questions. The sample dialogue questions can be preprocessed, such as exception processing, meaningless processing, and stop word processing. The original intent recognition model is the intent recognition model before fine-tuning training. In order to make the model better adapt to specific intent recognition tasks, the original intent recognition model needs to be retrained, but model retraining requires a large number of labeled samples, and large models will consume a lot of computing resources and time. In order to reduce training time and resources, the embodiment of the present application uses Lora technology to fine-tune the original intent recognition model. The original intent recognition model includes a third sub-model and a fourth sub-model. The model structures of the third sub-model and the fourth sub-model are the same. The third sub-model and the fourth sub-model both include a self-attention layer, a first initial low-rank adaptation layer, a second initial low-rank adaptation layer, and a feedforward attention layer.

[0139] In step S7020 of some embodiments, in the third sub-model, the sample dialogue question is vectorized to obtain dialogue embedding features. Referring to step S520, for each attention head, the query weight matrix is ​​multiplied by the dialogue embedding features to obtain sample query features, the key weight matrix is ​​multiplied by the dialogue embedding features to obtain sample key features, and the value weight matrix is ​​multiplied by the dialogue embedding features to obtain sample value features.

[0140] In step S7030 of some embodiments, each attention head corresponds to a first initial low-rank adaptation layer and a second initial low-rank adaptation layer. The first initial low-rank adaptation layer includes a fifth low-rank matrix and a sixth low-rank matrix. The rank of the fifth low-rank matrix is ​​less than the rank of the sixth low-rank matrix, the fifth low-rank matrix is ​​used for feature dimensionality reduction, and the sixth low-rank matrix is ​​used for feature dimensionality increase. The fifth low-rank matrix and the sixth low-rank matrix are multiplied to obtain a third low-rank weight matrix, and the third low-rank weight matrix is ​​multiplied by the dialogue embedding feature to obtain the first sample low-rank feature.

[0141] In step S7040 of some embodiments, the second initial low-rank adaptation layer includes a seventh low-rank matrix and an eighth low-rank matrix. The rank of the seventh low-rank matrix is ​​less than the rank of the eighth low-rank matrix, the seventh low-rank matrix is ​​used for feature dimensionality reduction, and the eighth low-rank matrix is ​​used for feature dimensionality increase. The seventh low-rank matrix and the eighth low-rank matrix are multiplied to obtain a fourth low-rank weight matrix, and the fourth low-rank weight matrix is ​​multiplied with the dialogue embedding feature to obtain a second sample low-rank feature.

[0142] In step S7050 of some embodiments, referring to step S550, feature fusion is performed on the sample query features, sample key features, sample value features, first sample low-rank features and second sample low-rank features of all attention heads to obtain sample initial features.

[0143] In step S7060 of some embodiments, referring to step S560, feed-forward feature extraction is performed on the sample initial features through two fully connected layers connected in series to obtain the sample target features.

[0144] In step S7070 of some embodiments, in the fourth sub-model, referring to steps S720 to S760, feature extraction is performed on the sample target features, and the sample target features are mapped to a new feature space to obtain a predicted intent category.

[0145] In step S7080 of some embodiments, according to the cross entropy loss function, the intent category label and the predicted intent category are subjected to loss calculation to obtain target loss data. The cross entropy loss function is expressed as:

[0146]

[0147] Where C is the number of intent categories; p i is the indicator variable of the intent category label. If the sample conversation data belongs to the i-th intent category, then p i is 1, otherwise p i is 0; q i is the probability that the predicted intent category belongs to the i-th intent category.

[0148] In step S7090 of some embodiments, the target loss data is minimized, the fifth low-rank matrix and the sixth low-rank matrix of the first initial low-rank adaptive layer are adjusted to obtain the first target low-rank adaptive layer, and the seventh low-rank matrix and the eighth low-rank matrix of the second initial low-rank adaptive layer are adjusted to obtain the second target low-rank adaptive layer. The first low-rank matrix of the first target low-rank adaptive layer is obtained by training the fifth low-rank matrix, and the second low-rank matrix of the first target low-rank adaptive layer is obtained by training the sixth low-rank matrix. The third low-rank matrix of the second target low-rank adaptive layer is obtained by training the seventh low-rank matrix, and the fourth low-rank matrix of the second target low-rank adaptive layer is obtained by training the eighth low-rank matrix. By only training the first initial low-rank adaptive layer and the second initial low-rank adaptive layer of the third sub-model and the fourth sub-model, while keeping the model parameters of the self-attention layer and the feedforward attention layer unchanged, the training efficiency of the intent recognition model is greatly improved.

[0149] In step S7100 of some embodiments, the self-attention layer, the first target low-rank adaptation layer, the second target low-rank adaptation layer, and the feedforward attention layer of the third sub-model and the fourth sub-model are used as target intent recognition models.

[0150] Sample conversation data can be collected at preset intervals, and the intent recognition model can be fine-tuned based on the sample conversation data. Through this dynamic learning mechanism, the intent recognition model is continuously optimized, so that the accuracy and efficiency of the intent recognition model will continue to improve over time to adapt to changes in user needs.

[0151] The above steps S7010 to S7100 reduce the training time and required computing resources of the intent recognition model through Lora technology, improve the efficiency of intent recognition, so as to identify the user's intention from the target question in real time and accurately, thereby providing users with more intelligent and humane services and ensuring that user needs can be met in a timely manner.

[0152] In step S130 of some embodiments, the large language model does not contain new domain knowledge and lacks knowledge content in the business vertical category. If the large language model is directly relied upon for answer generation, content that seems reasonable but is actually inaccurate or inconsistent with the facts will be generated, resulting in an incorrect answer. In order to improve the accuracy of answer generation, the embodiment of the present application classifies the object intent category according to a preset knowledge base. If the preset knowledge base stores the object intent category, the intent classification result is determined to be that the object intent category is a known category. If the object intent category is not stored in the preset knowledge base, the intent classification result is determined to be that the object intent category is an unknown category. Different answer generation strategies are selected based on the intent classification results so that the answer is correct and relevant to the target question.

[0153] In step S140 of some embodiments, if the object intent category is a known category, indicating that the answer referred to by the object intent category is new domain knowledge, a preset dialogue template of a preset knowledge base is called according to the object intent category, and a target answer to the target question is generated according to the preset dialogue template, which solves the problem that a large language model cannot output a correct answer for new domain knowledge. The preset dialogue template is a standard answer associated with the object intent category stored in the preset knowledge base.

[0154] Knowledge base construction is a complex project. If a knowledge base is constructed for any target question, the complexity of answer generation will increase. In order to reduce the complexity of answer generation, if the object intent category is an unknown category, it means that the answer referred to by the object intent category is the knowledge that the large language model has acquired through training and learning. Then, prompt information is obtained, and the prompt information and object intent category are input into the preset dialogue model to generate the target answer to the target question with the help of the semantic understanding ability and answer generation ability of the preset dialogue model. The prompt information is a prompt instruction provided to the preset object model to guide the model output. The preset dialogue model is a large language model, such as the GPT model, BERT model, etc.

[0155] See also Figure 8 The embodiment of the present application further provides a conversation answering device, which can implement the above-mentioned conversation answering method, and the conversation answering device includes:

[0156] An acquisition module 810 is used to acquire a target question;

[0157] The intention recognition module 820 is used to recognize the intention of the target question and obtain the object intention category;

[0158] The classification module 830 is used to classify the object intent category according to the preset knowledge base to obtain the intent classification result; the intent classification result is used to indicate whether the object intent category is a known category or an unknown category;

[0159] The dialogue response module 840 is used to call a preset dialogue template of a preset knowledge base according to the object intention category if the object intention category is a known category, and generate a target answer to the target question according to the preset dialogue template; or, if the object intention category is an unknown category, call a preset dialogue model according to the object intention category, and generate a target answer to the target question according to the preset dialogue model.

[0160] The specific implementation of the dialogue answering device is substantially the same as the specific implementation of the dialogue answering method described above, and will not be described in detail herein.

[0161] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned conversation answering method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0162] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0163] The processor 910 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0164] The memory 920 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 920 may store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 920, and the processor 910 calls and executes the dialogue answering method of the embodiment of this application;

[0165] Input / output interface 930, used to implement information input and output;

[0166] Communication interface 940, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0167] bus 950 , which transmits information between the various components of the device (e.g., processor 910 , memory 920 , input / output interface 930 , and communication interface 940 );

[0168] The processor 910 , the memory 920 , the input / output interface 930 , and the communication interface 940 are connected to each other in communication within the device via a bus 950 .

[0169] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned dialogue answering method is implemented.

[0170] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0171] The dialogue response method, dialogue response device, electronic device and computer storage medium provided in the embodiments of the present application, when faced with a target question of new domain knowledge, generate an answer to the target question based on a dialogue template in a preset knowledge base; when faced with a target question of existing domain knowledge, generate an answer to the target question with the help of the knowledge generation capability of a preset dialogue model, and adopt different answer generation strategies for different target questions, thereby greatly improving the accuracy of dialogue responses.

[0172] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0173] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0174] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0175] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0176] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0177] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0178] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0179] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they 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.

[0180] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0181] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0182] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A conversation answering method, characterized in that: The method comprises: Get the target question; Performing intent recognition on the target question to obtain an object intent category; Classify the object intention category according to a preset knowledge base to obtain an intention classification result; the intention classification result is used to indicate whether the object intention category is a known category or an unknown category; If the object intent category is a known category, the preset dialogue template of the preset knowledge base is called according to the object intent category, and the target answer to the target question is generated according to the preset dialogue template; or, if the object intent category is an unknown category, the preset dialogue model is called according to the object intent category, and the target answer to the target question is generated according to the preset dialogue model.

2. The method according to claim 1, characterized in that The performing of intent recognition on the target question to obtain the object intent category includes: Extracting the intention feature of the target problem to obtain the object intention feature; Extracting slot features of the target problem to obtain slot features of the problem; Performing gated feature extraction on the object intention feature and the problem slot feature to obtain a target gated feature; Intent recognition is performed based on the object intent feature, the question slot feature and the target gating feature to obtain the object intent category.

3. The method according to claim 2, characterized in that The performing intent recognition according to the object intent feature, the question slot feature and the target gating feature to obtain the object intent category includes: Performing feature weighting on the problem slot feature according to the target gating feature to obtain a weighted slot feature; The object intent feature and the weighted slot feature are subjected to intent recognition through a preset target intent recognition model to obtain the object intent category.

4. The method according to claim 3, characterized in that The target intention recognition model includes a first sub-model and a second sub-model, and the object intention feature and the weighted slot feature are subjected to intention recognition by the preset target intention recognition model to obtain the object intention category, including: Extracting the object intention feature and the weighted slot feature through the first sub-model to obtain a reference question feature; The second sub-model is used to perform intent recognition on the reference question feature to obtain the object intent category.

5. The method according to claim 4, characterized in that The first sub-model includes a self-attention layer, a first target low-rank adaptation layer, a second target low-rank adaptation layer and a feedforward attention layer, and the first sub-model is used to extract the object intention feature and the weighted slot feature to obtain a reference question feature, including: Performing feature splicing on the object intention feature and the weighted slot feature to obtain a target splicing feature; Performing attention feature extraction on the target splicing feature through the self-attention layer to obtain a query feature vector, a key feature vector and a value feature vector; Performing a first low-rank feature extraction on the target splicing feature through the first target low-rank adaptation layer to obtain a first low-rank adaptive feature; Performing second low-rank feature extraction on the target splicing feature through the second target low-rank adaptation layer to obtain a second low-rank adaptive feature; Performing feature fusion on the query feature vector, the key feature vector, the value feature vector, the first low-rank adaptive feature, and the second low-rank adaptive feature to obtain an initial question feature; The initial question features are subjected to feedforward feature extraction through the feedforward attention layer to obtain the reference question features.

6. The method according to claim 5, characterized in that The step of fusing the query feature vector, the key feature vector, the value feature vector, the first low-rank adaptive feature, and the second low-rank adaptive feature to obtain an initial question feature includes: Performing feature fusion on the query feature vector and the first low-rank adaptive feature to obtain a first fused feature; Performing feature fusion on the key feature vector and the second low-rank adaptive feature to obtain a second fused feature; Performing attention transformation on the first fused feature, the second fused feature and the value feature vector to obtain the initial question feature.

7. The method according to claim 3, characterized in that The target intention recognition model is trained according to the following steps: Obtaining sample conversation data and an original intent recognition model; the sample conversation data includes sample conversation questions and intent category labels, and the original intent recognition model includes a self-attention layer, a first initial low-rank adaptation layer, a second initial low-rank adaptation layer, and a feedforward attention layer; Performing attention feature extraction on the sample dialogue question through the self-attention layer to obtain sample query features, sample key features, and sample value features; Performing a first low-rank feature extraction on the sample dialogue question through the first initial low-rank adaptation layer to obtain a first sample low-rank feature; Performing second low-rank feature extraction on the sample dialogue question through the second initial low-rank adaptation layer to obtain a second sample low-rank feature; Performing feature fusion on the sample query feature, the sample key feature, the sample value feature, the first sample low-rank feature, and the second sample low-rank feature to obtain a sample initial feature; Performing feedforward feature extraction on the sample initial features through the feedforward attention layer to obtain sample target features; Performing intent recognition according to the sample target features to obtain a predicted intent category; Calculate the loss according to the intent category label and the predicted intent category to obtain target loss data; Adjusting the parameters of the first initial low-rank adaptive layer according to the target loss data to obtain a first target low-rank adaptive layer, and adjusting the parameters of the second initial low-rank adaptive layer according to the target loss data to obtain a second target low-rank adaptive layer; The target intent recognition model is determined according to the self-attention layer, the first target low-rank adaptation layer, the second target low-rank adaptation layer and the feedforward attention layer.

8. A conversation answering device, characterized in that: The device comprises: An acquisition module is used to obtain the target problem; An intention recognition module is used to recognize the intention of the target question and obtain the object intention category; A classification module, used to classify the object intention category according to a preset knowledge base to obtain an intention classification result; the intention classification result is used to indicate whether the object intention category is a known category or an unknown category; A dialogue answering module is used to call a preset dialogue template of the preset knowledge base according to the object intention category if the object intention category is a known category, and generate a target answer to the target question according to the preset dialogue template; or, if the object intention category is an unknown category, call a preset dialogue model according to the object intention category, and generate a target answer to the target question according to the preset dialogue model.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.