Conversation processing method and device

By fusing intent features and dialogue features through a dialogue model, the problem of low output efficiency of response text in existing technologies is solved. Parallel processing of intent recognition and response text generation is achieved, improving the output efficiency of response text and the adaptability of the model.

CN119443256APending Publication Date: 2025-02-14MASHANG CONSUMER FINANCE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411139537.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In existing technologies, processing is done separately using intent recognition models and large language models, resulting in low output efficiency of the response text, high processing complexity, and long timelines.

Method used

A dialogue model is used for intent feature extraction and dialogue feature extraction. The target representation vector is obtained through feature fusion, which directly determines the intent category and response text, realizing parallel processing of intent recognition and response text generation.

Benefits of technology

It significantly improves the output efficiency of response texts, simplifies the adaptation and deployment process of models in different business domains, and improves the speed and accuracy of processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443256A_ABST
    Figure CN119443256A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a dialogue processing method and device, and the method comprises the steps: carrying out the intention feature extraction and dialogue feature extraction of a target dialogue text based on a dialogue model, and obtaining an intention feature and a dialogue feature; performing feature fusion on the intention feature and the dialogue feature to obtain a target representation vector of the target dialogue text, and determining an intention category and a reply text based on the target representation vector; and if the intention category is matched with the preset category, outputting the reply text to the inquiry object. The embodiment of the invention can improve the output efficiency of the reply text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a dialogue processing method and device. Background Art

[0002] With the development of artificial intelligence technology, the reply text can be obtained by inputting the conversation text into the large language model. In the process of applying the large language model to the business field, in order to better adapt to the needs of different scenarios, it is usually chosen to add an intent recognition model upstream of the large language model to identify the intent category of the conversation text through the intent recognition model, and then reply according to the intent category. This method of outputting the reply text is inefficient. Summary of the invention

[0003] The embodiments of the present application provide a conversation processing method, apparatus, computer device, readable storage medium and program product, which can improve the output efficiency of reply text.

[0004] The present application provides a method for processing a conversation, including:

[0005] Based on the dialogue model, intention features and dialogue features are extracted from the target dialogue text to obtain intention features and dialogue features;

[0006] Performing feature fusion on the intention feature and the dialogue feature to obtain a target representation vector of the target dialogue text, and determining the intention category and the reply text based on the target representation vector;

[0007] If the intent category matches the preset category, the reply text is output.

[0008] Accordingly, the present application provides a dialogue processing device, comprising:

[0009] A feature extraction unit, used to extract intention features and dialogue features from the target dialogue text based on the dialogue model, to obtain intention features and dialogue features;

[0010] A feature fusion unit, configured to fuse the intention feature and the dialogue feature to obtain a target representation vector of the target dialogue text, and determine the intention category and the reply text based on the target representation vector;

[0011] An output unit is used to output the reply text if the intention category matches a preset category.

[0012] Accordingly, an embodiment of the present application also provides a computer device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the steps in the dialogue processing method provided in the embodiment of the present application.

[0013] Accordingly, an embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program is executed by a processor to implement the steps in the dialogue processing method provided in the embodiment of the present application.

[0014] Accordingly, an embodiment of the present application also provides a computer program product, including a computer program or instructions, which are executed by a processor to implement the steps in the dialogue processing method provided in the embodiment of the present application.

[0015] In an embodiment of the present application, after receiving the target dialogue text, the dialogue model can be used to extract intent features and dialogue features to obtain intent features and dialogue features. The dialogue model can also be used to fuse the intent features and dialogue features to obtain a target representation vector of the target dialogue text. The target representation vector includes more comprehensive and multi-level features. The dialogue model can directly obtain more accurate intent categories and reply texts based on the target representation vector, and quickly output the reply text when it is determined that the intent category matches the preset category. Since the present application uses a dialogue model that performs multi-task prediction to output intent categories and reply texts at the same time, the two tasks of outputting intent categories and outputting reply texts can be performed in parallel. Compared with the serial method of the prior art that performs intent recognition and reply text generation in stages and steps, the parallel execution of tasks is faster than the serial execution of tasks, thereby significantly improving the output efficiency of the reply text. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 It is a scenario diagram of the dialogue processing method provided in an embodiment of the present application;

[0018] Figure 2 It is a flowchart of the dialogue processing method provided in the embodiment of the present application;

[0019] Figure 3 is another flowchart of the conversation processing method provided in an embodiment of the present application;

[0020] Figure 4 is a schematic diagram of a generative dialogue intention model provided in an embodiment of the present application;

[0021] Figure 5 is a structural diagram of a conversation processing device provided in an embodiment of the present application;

[0022] Figure 6 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0024] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims 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, for example. In addition, the terms "including" and "corresponding to" 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.

[0025] In the related technology, in order to better adapt to different business scenarios in the business field, the intention recognition model can be combined with the large language model for processing. First, the intention of the conversation text of the inquiry object can be recognized to obtain the intent category, and then the intention category can be used to determine whether the conversation text needs a reply in a certain business scenario. If necessary, the reply text of the conversation text can be generated through the large language model.

[0026] Obviously, this process requires the intent recognition model and the large language model to be adapted to the business field respectively. The intent recognition model and the large language model need to be deployed separately before application. The data needs to be processed step by step during the application process. The processing complexity is high and the timeline is long, resulting in low efficiency in the output of the reply text. However, this application uses the dialogue model to simultaneously perform intent recognition and reply text generation. The dialogue model can be more conveniently adapted to different business fields, and the deployment of the dialogue model before application is also simplified. The processing process based on the dialogue model is faster and more efficient, which significantly improves the output efficiency of the reply text.

[0027] The present application provides a dialogue processing method, apparatus, computer device, readable storage medium and program product. The dialogue processing method of the present application can be integrated into a dialogue processing system, and the dialogue processing system can be integrated into at least one computer device. The computer device may include a terminal, a server, etc.

[0028] Among them, the server can be 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 terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart wearable device, smart TV, smart screen, smart home device, smart office equipment, smart factory equipment, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0029] In an embodiment of the present application, a computer device may perform intention feature extraction and dialogue feature extraction on a target dialogue text based on a dialogue model to obtain intention features and dialogue features; perform feature fusion on the intention features and dialogue features to obtain a target representation vector of the target dialogue text, and determine the intention category and reply text based on the target representation vector; if the intention category matches a preset category, the computer device may output the reply text to the inquiring party.

[0030] For example, see Figure 1 The computer device may include a terminal 10 and a server 20. The server 20 may be deployed with a dialogue model. The user may input a target dialogue text in the user interface of the terminal 10. The terminal 10 may transmit the target dialogue text to the server 20. The server 20 may extract the intention feature and dialogue feature of the target dialogue text based on the dialogue model to obtain the intention category and the reply text. The server 20 may perform feature fusion on the intention feature and the dialogue feature through the dialogue model to obtain the target representation vector of the dialogue text, and determine the intention category and the reply text based on the target representation vector. The server 20 may return the reply text to the terminal 10 when it is determined that the intention category matches the preset category. The terminal 10 may display the reply text in the user interface for the user to view.

[0031] Figure 1 This is an example of an application scenario of the conversation processing system of the present application, which is mainly used to introduce but not limit the outbound call system of the present application. In the process of actually applying the technical solution described in the embodiment of the present application, the computer devices included in the outbound call system and the steps performed by each computer device can be flexibly adjusted, and are not limited to Figure 1The content described in .

[0032] The following will further introduce the dialog processing method of the present application in conjunction with the embodiments. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0033] Figure 2 A flow chart of the dialogue processing method of the present application is shown. The dialogue processing method can be integrated into a dialogue processing device, the dialogue processing device can be integrated into a dialogue processing system, and the dialogue processing system can be set on at least one computer device.

[0034] In the embodiment of the present application, the target conversation text may be the text input by the inquiry object, or the text processed by the computer device on the text input by the inquiry object. The inquiry object may include the object that asks the question, and the inquiry object may include the user, the developer / tester, the intelligent agent (such as an intelligent robot, an intelligent voice assistant), etc.

[0035] In the embodiment of the present application, the dialogue text can be used to obtain information, and the inquirer can directly input the dialogue text through the computer device. The dialogue text can be input by the inquirer with the help of input method software, or can be selected from multiple existing preset dialogue texts. The specific processing can be flexibly handled according to the actual situation. The inquirer can also input dialogue voice, and then the computer device performs voice-to-text processing to obtain the dialogue text.

[0036] The dialogue processing method of the present application can be applied to application fields such as intelligent customer service, intelligent voice assistants, chat robots, etc. Specifically, it can be widely used in scenarios such as online shopping, entertainment, online education, and Internet finance.

[0037] Among them, the dialogue model may include a model that can recognize the intent of the target dialogue text and generate reply text. The intent category can characterize the intent of the inquiry text. The semantics of the target dialogue text can be further clarified through the intent category. The reply text may include the reply made by the dialogue model to the target dialogue text. The reply text can provide the information required by the target dialogue text.

[0038] Specifically, the dialogue text can be input into the dialogue model, and the intent category and reply text output by the dialogue model can be received. For example, if question 1 is input into the dialogue model: How to stop automatic deduction, the dialogue model can output the intent category of question 1: automatic deduction, and the reply to question 1: You can do... at...

[0039] In some embodiments of the present application, the target dialogue text may be the current dialogue text input by the inquiry object. The current dialogue text is the dialogue text input by the inquiry object in the current round.

[0040] In some embodiments of the present application, the current dialogue text can be processed in combination with the historical dialogue records of the inquiry object to obtain a target dialogue text for input into the dialogue model. The historical dialogue records can include the historical dialogue text of the inquiry object, the historical intention categories of the historical dialogue text, and the historical reply text. The historical dialogue text may include the dialogue text input into the dialogue model by the inquiry object in the previous round or multiple rounds of interaction with the dialogue model. The historical intention category may include the intention category of the historical dialogue text determined by the dialogue model. The historical reply text may include the reply content output by the dialogue model for the historical dialogue text.

[0041] When the historical dialogue text is associated with the dialogue text of the current round, processing the current dialogue text of the current round in combination with the historical dialogue text, the historical intent category and the historical reply text will help obtain more accurate intent categories and reply texts.

[0042] Specifically, the current dialogue text, historical dialogue text, historical intention category and historical reply text of the inquiry object can be synthesized to obtain the target dialogue text, and then the target dialogue text can be input into the dialogue model to obtain the intention category and reply text output by the dialogue model.

[0043] Specifically, the historical conversation records include the historical conversation texts of the inquiry object, the historical intent categories of the historical conversation texts, and the historical reply texts. For example, you can obtain the historical conversation records of a user: <s> Question 0: How to stop charging?< / s> Intent Category 0: Chargeback Response 1: For chargeback, you can perform the following operations and merge the historical conversation records with the conversation text to obtain the target conversation text: <s> Question 0: How to stop charging?< / s> Intent Category 0: Deductions. Answer 1: Regarding deductions for..., you can perform... Question 1: How to stop automatic deductions? Input the target conversation text into the conversation model and get the output of Question 1: Intent Category: Automatic Deductions, and the answer to Question 1: You can perform... on...

[0044] See Figure 2 , the dialogue processing method may include:

[0045] 110. Based on the dialogue model, intention feature extraction and dialogue feature extraction are performed on the target dialogue text to obtain intention features and dialogue features.

[0046] In a specific embodiment, the current dialogue text input by the inquiry object is determined, and the current dialogue text input by the inquiry object is determined as the target dialogue text. Based on the dialogue model, the target dialogue text is subjected to intention feature extraction and dialogue feature extraction to obtain intention features and dialogue features.

[0047] The intention feature may include feature information that characterizes the intention of the target dialogue text, and the intention feature exists in the computer device in the form of a matrix.

[0048] Intent feature extraction can refer to the process of obtaining the intent features of the target dialogue text. The implementation of intent feature extraction in computer devices is mainly based on convolution calculation. Convolution calculation can be performed multiple times, and the convolution kernel of each convolution calculation can be different. In practice, convolution calculation can be performed through different neural network layers / blocks / models / networks, or a model formed by a combination of multiple neural network layers / blocks / models / networks.

[0049] In an embodiment of the present application, the intention feature extraction can be performed through the intention module. Specifically, the intention module can include at least one feedforward neural network block, and the feedforward neural network block can include at least one linear layer. The present application can learn and extract feature information indicating the intention in the target dialogue text through the feedforward neural network to obtain the intention feature.

[0050] The dialogue feature may include feature information that characterizes the content that the target dialogue text wants to obtain, and the dialogue feature exists in the computer device in the form of a matrix.

[0051] Conversation feature extraction can refer to the process of obtaining the conversation features of the target conversation text. The implementation of conversation feature extraction in computer devices is mainly based on convolution calculation. Convolution calculation can be performed multiple times, and the convolution kernel of each convolution calculation can be different. In practice, convolution calculation can be performed through different neural network layers / blocks / models / networks, etc. Or the model formed by the combination of multiple neural network layers / blocks / models / networks can be used for convolution calculation.

[0052] In another specific embodiment, the current dialogue text input by the inquiry object is determined, and the target dialogue text is synthesized based on the historical dialogue records of the inquiry object and the current dialogue text. Based on the dialogue model, the intention feature and dialogue feature extraction are performed on the target dialogue text to obtain the intention feature and the dialogue feature.

[0053] For example, you can get the user's historical conversation records: <s> Question 0: How to stop charging?< / s> Intent Category 0: Chargeback Response 1: For chargeback, you can perform the following operations and merge the historical conversation records with the conversation text to obtain the target conversation text: <s> Question 0: How to stop charging?< / s> Intent Category 0: Deductions. Answer 1: Regarding deductions for..., you can perform... Question 1: How to stop automatic deductions? Input the target conversation text into the conversation model and get the output of Question 1: Intent Category: Automatic Deductions, and the answer to Question 1: You can perform... on...

[0054] Since there are historical conversation records in the target conversation text, when there is a semantic association between the current conversation text currently input by the inquiry object and the historical conversation records, the target conversation text including the historical conversation records is processed through the conversation model. The historical conversation records can be used as effective prompt information, which significantly improves the effect of intent feature extraction and conversation feature extraction. Compared with the method of relying solely on the current conversation text for intent feature extraction and conversation feature extraction, more comprehensive and accurate intent features and conversation features can be obtained.

[0055] In some embodiments of the present application, the dialogue model includes a generative dialogue module and an intention module; based on the dialogue model, intention feature extraction and dialogue feature extraction are performed on the target dialogue text to obtain intention features and dialogue features, including:

[0056] (1) Preprocess the target dialogue text to obtain the initial representation vector.

[0057] Specifically, the preprocessing process can be carried out flexibly according to actual needs and application scenarios. For example, the target dialogue text can be subjected to text standardization (such as unification of letter case, unification of traditional and simplified Chinese characters, etc.), text cleaning, word segmentation, and word cleaning, thereby improving the data quality of the target dialogue text, having a positive impact on subsequent feature extraction and other processing processes, and helping to obtain more accurate intent categories and reply texts.

[0058] The initial representation vector is a vector representing the target dialogue text obtained after preprocessing the target dialogue text. The initial representation vector may be an n-dimensional vector.

[0059] (2) Based on the intention module of the dialogue model, the intention feature is extracted from the initial representation vector to obtain the intention feature.

[0060] Taking the target dialogue text as an example, the preprocessing process may also include: encoding the target dialogue text to obtain a text vector, performing attention calculation on the text vector to obtain an intermediate vector, and then fusing the text vector and the intermediate vector to obtain an initial representation vector of the target dialogue text.

[0061] The encoding process can vectorize the unstructured text and convert it into structured information to facilitate further processing by subsequent computer equipment. Specifically, it can include at least one of a variety of processing methods including one-hot encoding, integer encoding, embedding processing, and position encoding processing. For example, an embedding operation can be performed on the target conversation text to obtain a text representation vector. In order to more comprehensively encode the information contained in the model target conversation text, it can also be positionally encoded to obtain a position representation vector. The position representation vector and the text representation vector are merged (such as addition, concatenation, etc.) to obtain a text vector.

[0062] Then, attention calculation (such as self-attention calculation) can be performed on the text vector to further capture useful information in the text vector and obtain an intermediate vector. The text vector and the intermediate vector are then fused to obtain an initial representation vector of the model output text. The fusion operation of the text vector and the intermediate vector can be addition, concatenation, etc. For example, the text vector and the intermediate vector can be added, and the added vector can be normalized to obtain an initial representation vector.

[0063] The dialogue model may include an intention module for capturing intention features in an initial representation vector and a generative dialogue module for capturing dialogue features in the initial representation vector. The intention module may be used to extract intention features from the initial representation vector to obtain intention features, and the generative dialogue module may be used to extract dialogue features from the initial representation vector to obtain dialogue features.

[0064] Among them, the structural design of the intent module can be flexibly carried out according to needs. For example, the intent module may include at least one feedforward neural network block, and the feedforward neural network block may include at least one linear layer.

[0065] (3) Based on the generative dialogue module of the dialogue model, dialogue features are extracted from the initial representation vector to obtain dialogue features.

[0066] Among them, the structural design of the generative dialogue module can be flexibly carried out according to the needs, and part or all of the existing generative dialogue model can be used as the generative dialogue module. For example, the generative dialogue module can include a selection submodule and multiple dialogue submodules, each dialogue submodule corresponds to an intent category, and the selection submodule can be used to calculate to obtain the score of the initial representation vector corresponding to the intent category of each dialogue submodule, and at least one target dialogue submodule is determined from the multiple dialogue submodules based on the score, and then the initial representation vector is extracted through the target dialogue submodule to obtain dialogue subfeatures, and then the dialogue subfeatures can be fused according to the score of the target dialogue submodule to obtain dialogue features.

[0067] Here, the submodule selection can analyze and calculate the initial representation vector, determine the scores of the dialogue submodules corresponding to different intent categories according to the possibility that the features contained in it belong to different intent categories, and determine several dialogue submodules with higher scores as target expert submodules.

[0068] In some embodiments of the present application, the initial representation vector may be an n-dimensional vector, and the selection submodule may include a linear layer. The linear layer may perform convolution calculation on the initial representation vector to obtain an m-dimensional first representation vector, where m and n are both positive integers, m is less than n, and m is consistent with the number of dialogue submodules, that is, the linear layer may reduce the dimension of the initial representation vector to be consistent with the number of dialogue submodules, and each dimension corresponds to a dialogue submodule, and each dialogue submodule corresponds to an intent category, that is, the m elements in the first representation vector correspond to m dialogue submodules.

[0069] The selection submodule also includes a softmax layer, and the first representation vector is processed based on the softmax layer to obtain a second representation vector, which includes m probability values. The m probability values ​​in the second representation vector are the scores of the corresponding m dialogue submodules. Specifically, the values ​​of the m elements in the first representation vector are mapped to the interval (0,1) through the softmax layer to obtain m probability values ​​in the interval (0,1). The ratio between the value of an element and the sum of the values ​​of the m elements can be determined as the probability value corresponding to the element. Of course, the values ​​of the m elements can also be mapped to the interval (0,1) in other ways to obtain m probability values ​​in the interval (0,1). After obtaining the m probability values, the values ​​of the m elements in the first representation vector are replaced with the corresponding m probability values ​​to obtain the second representation vector.

[0070] For example, m=5. The first characterization vector is (25, 30, 10, 20, 15). The values ​​of the m elements in the first characterization vector are mapped to the interval (0, 1), and the m probability values ​​are 0.25, 0.3, 0.1, 0.2, and 0.15 respectively. The values ​​of the m elements in the first characterization vector are replaced with the corresponding m probability values, and the second characterization vector is (0.25, 0.3, 0.1, 0.2, 0.15).

[0071] The score of the dialogue submodule is determined by the softmax layer, and then p target dialogue submodules are determined according to the score, where p is less than m. Specifically, the p dialogue submodules ranked top in the m dialogue submodules in descending order of score are determined as the target dialogue submodules. Then, the dialogue feature is extracted from the initial representation vector by the target dialogue submodule to obtain p dialogue subfeatures. Finally, the p dialogue subfeatures are fused to obtain the dialogue feature. Since the selected target dialogue submodules are the p dialogue submodules with the highest scores, the p dialogue submodules with the highest scores can extract more accurate dialogue subfeatures, thereby improving the accuracy of the conversation model prediction.

[0072] In some embodiments of the present application, there may be multiple initial representation vectors, each of which corresponds to a representation vector of a mark (also referred to as a token) of a word in the target conversation text, and the representation vector of the token is n-dimensional. The selection submodule may include a linear layer, and the initial representation vector corresponding to each token may be convolved by the linear layer to obtain multiple first representation vectors, and the dimension of the first representation vector is m-dimensional, where m and n are both positive integers, m is less than n, and m is consistent with the number of conversation submodules, that is, the linear layer may reduce the dimension of the representation vector of each token to the same as the number of conversation submodules, and each dimension corresponds to a conversation submodule, and each conversation submodule corresponds to an intent category, that is, the m elements in the first representation vector correspond to m conversation submodules.

[0073] The selection submodule also includes a softmax layer, which processes the first representation vector to obtain a second representation vector. The second representation vector includes m probability values, and the m probability values ​​in the second representation vector are the scores of the corresponding m dialogue submodules. The scores of each dialogue submodule on each initial representation vector are determined by the softmax layer, and then the target dialogue submodule of each token is determined according to the score. The initial representation vector of the token is then extracted by the target dialogue submodule to obtain dialogue subfeatures. Specifically, the p dialogue submodules with the highest scores in descending order among the m dialogue submodules are determined as target dialogue submodules. Assuming that the number of tokens in the target dialogue text is g (g is a positive integer), the g*p dialogue subfeatures finally obtained can be fused to obtain dialogue features.

[0074] For example, p=3, the top three dialogue submodules are determined as target dialogue submodules, and then dialogue features are extracted from the initial representation vector or a part of the initial representation vector (such as the representation vector of features with a high probability of belonging to a certain intent category) through the target dialogue submodule to obtain dialogue subfeatures. The dialogue features are extracted through the three target dialogue submodules to obtain three dialogue subfeatures, and then the three dialogue subfeatures are fused according to the scores of the three target dialogue submodules to obtain dialogue features. Specifically, the three dialogue subfeatures can be fused by addition operations, concatenation operations, etc. to obtain dialogue features.

[0075] Furthermore, assuming that the number of tokens in the target conversation text is g, g=3, the 9 conversation sub-features finally obtained can be fused to obtain the conversation feature.

[0076] 120. Perform feature fusion on the intention feature and the dialogue feature to obtain a target representation vector of the target dialogue text, and determine the intention category and the reply text based on the target representation vector.

[0077] Feature fusion is the process of combining multiple features into a new feature. This helps improve the accuracy and performance of the model because it can exploit the relationships and interactions between different features. The target representation vector is a vector used to represent the features of the target dialogue text, which is obtained by feature fusion of intent features and dialogue features.

[0078] Feature fusion can be an addition operation or a concatenation operation.

[0079] The concatenation operation is used to connect two or more vectors together to generate a larger vector. This can be used to increase the number of channels or feature dimensions in a deep learning model so that the relationship between different features can be better captured in subsequent layers. For example, the intent feature is (a, b) and the conversation feature is (c, d). The intent feature and the conversation feature are concatenated to obtain the target representation vector (a, b, c, d).

[0080] The addition operation is used to add two vectors element by element to generate a new vector. This can be used to implement skip connections or residual connections to facilitate the flow of gradients, improve training stability, and reduce the gradient vanishing problem in deep networks. For example, the intent feature is (a, b) and the conversation feature is (c, d). Adding the intent feature and the conversation feature will give a target representation vector (a+c, b+d).

[0081] Furthermore, the addition operation can also be a weighted addition operation. For example, the intent feature is (a, b) and the conversation feature is (c, d). The preset intent feature weight k and conversation feature weight h are obtained, and the intent feature and conversation feature are weightedly added based on the preset intent feature weight and conversation feature weight to obtain a target representation vector of (k(a+c), h(b+d)).

[0082] Specifically, there can be multiple implementation methods here. For example, the intent features and dialogue features can be fused to obtain a target representation vector, and the dialogue model can then generate intent categories and reply texts based on the target representation vector. In combination with the generation process of dialogue features, it can be seen that dialogue features include information about features that correspond to some intent categories preliminarily determined by the generative dialogue module, and intent features include more comprehensive information about the intent of the dialogue text. This application uses the target representation vector to perform intent recognition and reply text generation, and can synthesize the information contained in the dialogue features and intent features to obtain more accurate intent categories and reply texts.

[0083] The dialogue model is a model that can perform intent recognition and reply text generation on the target representation vector. The intent category can represent the intent of the target representation vector, and the semantics of the target representation vector can be further clarified through the intent category. The reply text can include the reply made by the dialogue model to the target representation vector, and the reply text can provide the information required by the target representation vector.

[0084] Among them, the intent category output by the dialogue model can be "early settlement", "repayment date", "deduction", etc. The intent category output by the dialogue model is obtained by predicting the target representation vector by the dialogue model.

[0085] The reply text that the dialogue model can output may be "You can perform...operation on...", "Please call XXX for consultation", etc." The reply text output by the dialogue model is obtained by predicting the target representation vector by the dialogue model.

[0086] In some embodiments of the present application, the intent feature, the conversation feature, and the initial representation vector may be feature fused to obtain a target representation vector, and then the intent category and reply text may be generated based on the target representation vector. The target representation vector thus obtained may include more global and richer intent information and conversation information, and then more accurate intent categories and reply texts may be generated.

[0087] The fusion process of the initial representation vector, intention features and dialogue features can include multiple methods. For example, the intention features, dialogue features and initial representation vector can be concatenated to obtain a target representation vector. For another example, the intention features, dialogue features and initial representation vector can be added / weighted to obtain a target representation vector.

[0088] For another example, in some embodiments of the present application, the intention features and the dialogue features may be first fused based on a first fusion strategy to obtain an intermediate representation vector, and then the intermediate representation vector may be fused with the initial representation vector based on a second fusion strategy to obtain a target representation vector.

[0089] The first fusion strategy and the second fusion strategy may include feature fusion strategies such as splicing and addition. The first fusion strategy and the second fusion strategy may be different or the same, and may be flexibly selected during the application process. Here, through the staged and strategy-based fusion method, the characteristics of different features can be combined to perform feature fusion in a more targeted manner, thereby obtaining a target representation vector that includes more effective information (which can reflect the intent category of the dialogue text and the information for generating the reply text).

[0090] In some embodiments of the present application, feature fusion based on the first fusion strategy may include: concatenating the conversation feature and the intention feature to obtain an intermediate representation vector, where both the conversation feature and the intention feature are obtained by processing the initial representation vector, and the data processing degree is equivalent. Both include relatively high-dimensional and deep feature information, and can be directly concatenated to obtain an intermediate representation vector that relatively completely retains the feature information contained in both. For example, the intention feature is (a, b), and the conversation feature is (c, d). The intention feature and the conversation feature are concatenated to obtain a target representation vector (a, b, c, d).

[0091] In some embodiments of the present application, feature fusion based on the second fusion strategy may include: adding the initial characterization vector and the intermediate characterization vector to obtain a preliminary fusion vector, and then normalizing the preliminary fusion vector to finally obtain a target characterization vector. There is a difference in the degree of data processing between the initial characterization vector and the intermediate characterization vector. The embodiments of the present application can significantly eliminate the adverse effects of the difference between the two on subsequent processing through addition and normalization, while retaining the feature information of different dimensions contained in the two as much as possible. For example, the intent feature is (a, b), and the conversation feature is (c, d). The intent feature and the conversation feature are added to obtain a target characterization vector of (a+c, b+d).

[0092] In an embodiment of the present application, the dialogue model may be a pre-built and trained model. Specifically, a training data set including multiple groups of training data may be obtained. The training data includes dialogue samples, reply samples, and sample intent categories of dialogue samples. The sample intent categories may characterize the intent categories of dialogue samples. A dialogue model to be trained is constructed, and the dialogue model to be trained is trained based on the training data to obtain a dialogue model.

[0093] The training data set can be an existing data set or a data set constructed according to current needs. For example, the original corpus data can be obtained, and the intent recognition can be performed on the dialogue samples in the original corpus data (such as manually or through an intent recognition model) to obtain the sample intent category of the dialogue samples. A set of dialogue samples, response samples, and sample intent categories in the original corpus data can be used as a set of training data and saved in the training data set.

[0094] In some embodiments of the present application, the dialogue model to be trained may include a preprocessing module, an intent module, a generative dialogue module and an output module, wherein the preprocessing module can be used to preprocess the model target dialogue text to obtain an initial representation vector, the intent module can be used to extract intent features from the initial representation vector to obtain intent features, the generative dialogue module can be used to extract dialogue features from the initial representation vector to obtain dialogue features, the output module can be used to perform feature fusion on the initial representation vector, the intent features and the dialogue features to obtain a target representation vector, and output the intent category and reply text based on the target representation vector.

[0095] Some modules of the dialogue model to be trained can be trained more specifically in stages to improve the feature extraction and data processing capabilities of each module in the dialogue model to be trained, thereby obtaining a better dialogue model and further obtaining more accurate intent categories and reply texts.

[0096] When training some modules of the dialogue model to be trained, some training data required for training can be determined based on these modules. For example, the preprocessing module, intent module and output module of the dialogue model to be trained can be trained based on dialogue samples and sample intent categories to obtain a first intermediate model. Based on dialogue samples and response samples, the preprocessing module, generative dialogue module and output module in the first intermediate model can be trained to obtain a second intermediate model. Based on dialogue samples, sample intent categories and response samples, the preprocessing module and output module in the second intermediate model can be trained to obtain a dialogue model.

[0097] 130. If the intent category matches the preset category, the reply text is output.

[0098] The preset category is a preset intention category, and a number of preset categories can be predetermined according to specific circumstances. For example, the preset category can be "early settlement" and "repayment date", etc. When the intention category belongs to the preset category, it is determined that the intention category matches the preset category, and the reply text is output.

[0099] Specifically, the inquiry object of the input target conversation text is determined, and the reply text is output to the inquiry object of the input target conversation text.

[0100] In the embodiment of the present application, several preset categories can be pre-determined according to the specific application scenario. If the intention category of the inquiry text matches the preset category, it is determined that the inquiry text is a question that needs to be answered in the current application scenario, and the reply text can be directly output to the inquiry object. There can be many ways to output the reply text here, such as displaying it in the user interface of the computer device, converting it into a reply voice and playing it through a playback device, etc., which can be flexibly handled according to the needs.

[0101] In the embodiment of the present application, the dialogue model can be used to simultaneously perform intent recognition and reply text generation. The dialogue model can be more conveniently adapted to different business areas, and the pre-application model deployment is also simplified. After receiving the dialogue text input by the inquirer, the intent category and reply text corresponding to the dialogue text can be obtained through the dialogue model. When the intent category matches the preset category, the reply text can be output quickly, which significantly improves the output efficiency of the reply text.

[0102] The dialogue processing method of the present application will be further described below in conjunction with embodiments.

[0103] For example, see Figure 3 , Figure 3 As the implementation flowchart of the present application, the dialogue processing method can be integrated in the terminal and the server. Step 210 can determine the user questions of the current round. For example, in an online intelligent customer service scenario, the terminal can receive the user's latest input questions through the client and transmit the questions to the server.

[0104] Step 220 can obtain the context of the current conversation, step 230 can input the user question and the context of the current conversation into the generative conversation intention model, and step 240 can obtain the intention of the question and the answer to the question through the generative conversation intention model. For example, the server can search for the previous communication records between the intelligent customer service and the user, and input the latest question and the previous communication records into the generative conversation intention model to obtain the intention of the question and the answer to the question output by it.

[0105] The generative dialogue intention model here can be pre-built and trained, and the training process can include the following steps: Step 221 can first obtain historical dialogue corpus, which can include historical user questions and historical customer service answers. Step 222 can label the user questions with intent. For example, historical user questions can be labeled with intent through an existing intent recognition model or manually. For example, the sample intent category 1 of historical user question 1 "I want to settle the loan early." is "settlement in advance", and the sample intent category 2 of historical user question 2 "When is the repayment date?" is "repayment date".

[0106] Step 223 may reconstruct the training data of the generative dialogue intention model. Step 240 may train the generative dialogue intention model based on the reconstructed training data.

[0107] See also Figure 4 , Figure 4This is a schematic diagram of the generative dialogue intention model of the present application. The generative dialogue intention model may include multiple modules: a preprocessing module, an intention module, a generative dialogue module and an output module. The preprocessing module may perform embedding and position encoding processing on the model input data, and add the obtained data to obtain a text vector, perform self-attention calculation on the added data to obtain an intermediate vector, and then add the text vector and the intermediate vector, and then normalize them to obtain an initial representation vector.

[0108] The intention module may include at least one feedforward neural network block, which may include at least one linear layer. The intention module extracts the intention feature of the initial representation vector to obtain the intention feature.

[0109] The generative dialogue module may include a routing submodule (router) (also known as a selection submodule) and multiple expert submodules (also known as dialogue submodules). The expert submodule may be a feed-forward neural network block (FFN). The generative dialogue module may be used to extract dialogue features from the initial representation vector to obtain dialogue features.

[0110] The output module can add the intention features and the dialogue features to obtain an intermediate representation vector, then add the intermediate representation vector and the initial representation vector and normalize them to obtain a target representation vector, and finally obtain the output result based on the target representation vector.

[0111] Among them, the input data may include at least one of X1-X3, representing respectively a conversation sample / conversation text, a sample intent category and a reply sample, and the output data may include at least one of X1-X3, representing respectively a conversation sample / conversation text, an intent category and a reply text.

[0112] The training data can be reconstructed based on historical user questions (conversation samples), historical customer service answers (reply samples), and sample intent categories. For example, the reconstructed training data can be organized as follows: <s> Dialogue Sample 1< / s> Sample Intent Category 1 Response Sample 1…

[0113] The embodiment of the present application can train the generative dialogue intention model in modules and stages. When training different modules, specific training data can be reconstructed to conduct more targeted training and improve the overall training effect. Specifically, when freezing the generative dialogue module and training the preprocessing module, the intention module and the output module, the organization of the training data labels can be: [-100]*len(dialogue sample 1+1) sample intention category 1 [-100]*len(reply sample 1+dialogue sample 2+2) sample intention category 2 [-100]*len(reply sample 2+dialogue sample 3+2) …

[0114] When freezing the intent module and training the preprocessing module, the generative dialogue module, and the output module, the training data labels can be organized as follows: [-100]*len(dialogue sample 1+sample intent category 1+2) reply sample 1 [-100]*len(dialogue sample 2+sample intent category 2+2) reply sample 2 [-100]*len(dialogue sample 3+sample intent category 3+2)…

[0115] When freezing the intent module and the generative dialogue module, training the preprocessing module and the output module, the training data labels can be organized as follows: [-100]*len(dialogue sample 1+1) sample intent category 1 reply sample 1 [-100]*len(dialogue sample 2+1) sample intent category 2 reply sample 2…

[0116] Step 250 can determine whether the intention meets the preset scenario. If so, step 260 can output the answer to the question. If not, step 270 can output the ending statement. For example, the server can determine whether the intention matches the preset intention of the preset scenario. If it matches, the answer to the question is transmitted to the terminal, and the terminal can display the answer to the question on the user interface. If it does not match, the server can transmit instruction information for inputting the ending statement to the terminal, and the terminal can display the ending statement on the user interface accordingly.

[0117] This application combines the two tasks of intent generation and generative dialogue, and implements a multi-task model through the design of data organization and reconstruction of network architecture. It can not only effectively improve the effects of the two tasks, but also simplify the entire process and deployment of specific scenario restrictions, and significantly improve the output efficiency of reply text in practical applications. In the process of processing data by the generative dialogue intent model, the intent generation task and the generative dialogue task assist each other. Compared with the model that implements a single function, this application can significantly improve the accuracy of intent categories and reply texts.

[0118] In order to better implement the above method, the embodiment of the present application also provides a dialogue processing device, such as Figure 5 As shown, the dialog processing device 300 may include a feature extraction module 310, a feature fusion module 320, and an output module 330, wherein:

[0119] A feature extraction unit 310 is used to extract intention features and dialogue features from the target dialogue text based on the dialogue model to obtain intention features and dialogue features;

[0120] A feature fusion unit 320 is used to fuse the intention feature and the dialogue feature to obtain a target representation vector of the target dialogue text, and determine the intention category and the reply text based on the target representation vector;

[0121] The output unit 330 is used to output the reply text if the intention category matches the preset category.

[0122] In some embodiments of the present application, the dialogue model includes a generative dialogue module and an intention module;

[0123] The feature extraction unit 310 may include a preprocessing unit, a first extraction unit, and a second extraction unit, wherein:

[0124] A preprocessing unit, used to preprocess the target dialogue text to obtain an initial representation vector;

[0125] A first extraction unit is used to extract intent features from the initial representation vector based on the intent module of the dialogue model to obtain intent features;

[0126] The second extraction unit is used to extract dialogue features from the initial representation vector based on the generative dialogue module of the dialogue model to obtain dialogue features.

[0127] In some embodiments of the present application, the feature fusion unit may include a fusion subunit, wherein:

[0128] The fusion subunit is used to fuse the initial representation vector, the intent feature and the dialogue feature to obtain the target representation vector.

[0129] In some embodiments of the present application, the fusion subunit may include a first fusion unit and a second fusion unit, wherein:

[0130] A first fusion unit, used to fuse the intention feature and the dialogue feature based on a first fusion strategy to obtain an intermediate representation vector;

[0131] The second fusion unit is used to fuse the initial representation vector and the intermediate representation vector based on a second fusion strategy to obtain a target representation vector.

[0132] In some embodiments of the present application, the first fusion unit may be specifically used for:

[0133] Concatenate the intent features and the conversation features to obtain an intermediate representation vector;

[0134] The second fusion unit can be specifically used for:

[0135] The initial representation vector and the intermediate representation vector are added to obtain a preliminary fusion vector; the preliminary fusion vector is normalized to obtain a target representation vector.

[0136] In some embodiments of the present application, the generative dialogue module includes a selection submodule and a dialogue submodule, each dialogue submodule corresponds to an intent category,

[0137] The second extraction unit can be specifically used for:

[0138] Based on the selection submodule, the score of the initial representation vector corresponding to the intent category in each dialogue submodule is calculated, and the target dialogue submodule is determined from the dialogue submodule according to the score;

[0139] The target dialogue sub-module extracts dialogue features from the initial representation vector to obtain dialogue sub-features;

[0140] Based on the score of the target dialogue sub-module, the dialogue sub-features are fused to obtain the dialogue feature.

[0141] In some embodiments of the present application, the preprocessing unit may be specifically used for:

[0142] Encode the target conversation text to obtain a text vector;

[0143] Perform attention calculation on the text vector to obtain the intermediate vector;

[0144] The text vector and the intermediate vector are fused to obtain the initial representation vector.

[0145] In some embodiments of the present application, the dialogue processing device may also be specifically used for:

[0146] Determine the current dialogue text entered by the inquiry object;

[0147] The target dialogue text is synthesized based on the historical dialogue text of the inquiry object, the historical intention category of the historical dialogue text, the historical reply text, and the current dialogue text.

[0148] In some embodiments of the present application, the dialogue processing device may also be specifically used for:

[0149] Obtain a training data set including multiple sets of training data, the training data including conversation samples, response samples, and sample intent categories of the conversation samples;

[0150] A training module is used to build a dialogue model to be trained. The dialogue model to be trained includes a preprocessing module, an intent module, a generative dialogue module, and an output module.

[0151] Based on the dialogue samples and the sample intent categories, the preprocessing module, the intent module, and the output module of the dialogue model to be trained are trained to obtain a first intermediate model;

[0152] Based on the dialogue samples and the response samples, the preprocessing module, the generative dialogue module and the output module in the first intermediate model are trained to obtain a second intermediate model;

[0153] Based on the dialogue samples, sample intent categories and response samples, the preprocessing module and the output module in the second intermediate model are trained to obtain a dialogue model.

[0154] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

[0155] The present application also provides a computer device, such as Figure 6 As shown, it shows a schematic diagram of the structure of a computer device involved in an embodiment of the present application. The computer device may be a terminal or a server, etc. Specifically:

[0156] The computer device 400 may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input unit 404 and other components. Those skilled in the art will appreciate that Figure 6 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0157] The processor 401 is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device. By running or executing computer programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 performs various functions of the computer device and processes data. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and computer programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.

[0158] The memory 402 can be used to store computer programs and modules. The processor 401 executes various functional applications and data processing by running the computer programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0159] The computer device also includes a power supply 403 for supplying power to various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0160] The computer device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0161] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically in this embodiment, the processor 401 in the computer device will load the executable files corresponding to the processes of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 will run the application program stored in the memory 402 to achieve various functions, as follows:

[0162] Based on the dialogue model, the intention feature and dialogue feature extraction are performed on the target dialogue text to obtain the intention feature and the dialogue feature; the intention feature and the dialogue feature are fused to obtain the target representation vector of the target dialogue text, and based on the target representation vector, the intention category and the reply text are determined; if the intention category matches the preset category, the reply text can be output to the inquiry object.

[0163] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0164] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0165] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any of the dialogue processing methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:

[0166] Based on the dialogue model, the intention feature extraction and dialogue feature extraction are performed on the dialogue text input by the inquirer to obtain the intention feature and the dialogue feature; the intention feature and the dialogue feature are fused to obtain the target representation vector of the dialogue text, and based on the target representation vector, the intention category and the reply text are determined; if the intention category matches the preset category, the reply text is output to the inquirer.

[0167] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0168] Since the computer program stored in the computer-readable storage medium can execute the steps in any one of the dialogue processing methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the dialogue processing methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0169] The embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in various optional implementations of the above-mentioned conversation processing method.

[0170] The above is a detailed introduction to a dialogue processing method, device, computer equipment, readable storage medium and program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for processing a conversation, characterized in that: include: Based on the dialogue model, intention features and dialogue features are extracted from the target dialogue text to obtain intention features and dialogue features; Performing feature fusion on the intention feature and the dialogue feature to obtain a target representation vector of the target dialogue text, and determining the intention category and the reply text based on the target representation vector; If the intent category matches the preset category, the reply text is output.

2. The method according to claim 1, characterized in that The dialogue model includes a generative dialogue module and an intention module; based on the dialogue model, the intention feature extraction and dialogue feature extraction are performed on the target dialogue text to obtain the intention feature and the dialogue feature, including: Preprocessing the target dialogue text to obtain an initial representation vector; Based on the intention module of the dialogue model, extracting the intention feature of the initial representation vector to obtain the intention feature; Based on the generative dialogue module of the dialogue model, dialogue features are extracted from the initial representation vector to obtain the dialogue features.

3. The method according to claim 2, characterized in that The step of fusing the intention feature and the dialogue feature to obtain a target representation vector of the target dialogue text includes: The initial representation vector, the intention feature and the dialogue feature are subjected to feature fusion to obtain a target representation vector.

4. The method according to claim 3, characterized in that: The step of fusing the initial representation vector, the intention feature, and the dialogue feature to obtain a target representation vector includes: Based on a first fusion strategy, the intention feature and the conversation feature are fused to obtain an intermediate representation vector; Based on the second fusion strategy, the initial representation vector and the intermediate representation vector are fused to obtain a target representation vector.

5. The method according to claim 4, characterized in that The method of fusing the intention feature and the conversation feature based on the first fusion strategy to obtain an intermediate representation vector includes: Concatenating the intention feature and the conversation feature to obtain an intermediate representation vector; The step of fusing the initial representation vector and the intermediate representation vector based on the second fusion strategy to obtain a target representation vector includes: Adding the initial characterization vector and the intermediate characterization vector to obtain a preliminary fusion vector; The preliminary fusion vector is normalized to obtain a target representation vector.

6. The method according to claim 2, characterized in that The generative dialogue module includes a selection submodule and a dialogue submodule, each of which corresponds to an intention category; the generative dialogue module based on the dialogue model extracts dialogue features from the initial representation vector to obtain dialogue features, including: Based on the selection submodule, calculating the score of the initial representation vector corresponding to the intention category in each of the dialogue submodules, and determining a target dialogue submodule from the dialogue submodules according to the score; The target dialogue submodule extracts dialogue features from the initial representation vector to obtain dialogue subfeatures; Based on the score of the target dialogue sub-module, the dialogue sub-features are fused to obtain a dialogue feature.

7. The method according to claim 1, characterized in that The method further comprises: Determine the current dialogue text entered by the inquiry object; The target dialogue text is synthesized based on the historical dialogue records of the inquiry object and the current dialogue text.

8. The method according to claim 1, characterized in that The dialogue model is trained through the following steps: Acquire a training data set including multiple sets of training data, wherein the training data includes dialogue samples, response samples, and sample intent categories of the dialogue samples; Constructing a dialogue model to be trained, wherein the dialogue model to be trained includes a preprocessing module, an intent module, a generative dialogue module, and an output module; Based on the dialogue sample and the sample intent category, training a preprocessing module, an intent module, and an output module of the dialogue model to be trained to obtain a first intermediate model; Based on the dialogue sample and the response sample, training the preprocessing module, the generative dialogue module and the output module in the first intermediate model to obtain a second intermediate model; Based on the dialogue sample, the sample intent category and the reply sample, the preprocessing module and the output module in the second intermediate model are trained to obtain the dialogue model.

9. A dialogue processing device, characterized in that: include: A feature extraction unit, used to extract intention features and dialogue features from the target dialogue text based on the dialogue model, to obtain intention features and dialogue features; A feature fusion unit, configured to fuse the intention feature and the dialogue feature to obtain a target representation vector of the target dialogue text, and determine the intention category and the reply text based on the target representation vector; An output unit is used to output the reply text if the intention category matches a preset category.

10. A computer device, characterized in that: It comprises a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to execute the steps in the dialogue processing method described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the dialogue processing method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program or instructions, wherein the computer program or instructions are executed by a processor to implement the steps in the dialog processing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Man-machine conversation method and man-machine conversation device based on user intention prediction

    CN107066568A

  • Method and system for carrying out anti-fraud intervention through man-machine conversation

    CN112988991A

  • Dialogue question and answer method and device, equipment and storage medium

    CN113254613A

  • Intelligent voice dialogue method and device based on semantic enhancement, equipment and medium

    CN113270103A

  • Information processing method and device, storage medium and program product

    CN115146047A