Conversational processing method, apparatus, and system
By constructing document graphs and dialogue graphs, and learning structural information from semi-structured document content, candidate response texts are dynamically generated. This solves the problem that existing dialogue systems cannot effectively utilize document structural information, and achieves more accurate and efficient dialogue responses.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2026-04-07
AI Technical Summary
Existing dialogue systems cannot effectively utilize the structural information in documents, resulting in inaccurate and time-consuming responses.
By constructing document graphs and dialogue graphs, structural information is learned from the content of semi-structured documents, and candidate response texts are dynamically generated. Data processing is then performed using graph neural networks and feedforward neural networks to generate the target response text.
It improves the accuracy and efficiency of dialogue responses, enables better understanding of document content, and meets users' real-time needs.
Smart Images

Figure CN116069910B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and in particular to a dialogue processing method, device and system. Background Technology
[0002] A dialogue system is a computer system that uses natural language to mimic human-to-human conversations, enabling users to communicate with machines in a more natural way. Dialogue systems have wide applications in real life, such as customer service systems for online stores and chatbots.
[0003] Currently, most dialogue systems are built upon plain text documents, using them as their knowledge source. However, in real-world environments, documents typically contain structural information, such as the relationships between paragraphs and between paragraphs and headings. Existing dialogue systems are currently unable to learn this type of information. Summary of the Invention
[0004] This application provides a dialogue processing method, device, and system that can more accurately output reply text to users by learning the structured information of knowledge documents.
[0005] A first aspect of this application provides a dialogue processing method, which can be applied to cloud-side devices or terminal devices, the terminal device being, for example, an intelligent robot. The method includes:
[0006] Receive a dialogue processing request, which includes the dialogue content input by the user in the current round;
[0007] In response to the dialogue processing request, candidate texts with a similarity greater than a preset threshold to the dialogue content are retrieved from a document library; the document library includes semi-structured document content.
[0008] Based on the structural information of the candidate text and the dialogue content, a dialogue graph containing the candidate text and the dialogue content is constructed;
[0009] By processing the dialogue graph, candidate response texts corresponding to the dialogue content are obtained;
[0010] The target response text is determined based on the candidate response texts;
[0011] Output a dialogue processing response, which includes the target reply text.
[0012] In an optional embodiment of the first aspect of this application, obtaining candidate texts from the document library whose similarity to the dialogue content is greater than a preset threshold includes:
[0013] Obtain the dialogue representation corresponding to the dialogue content and the text representation corresponding to the first text in the document library; the first text is any text in the document library;
[0014] Determine the similarity between the dialogue representation and the text representation corresponding to the first text in the document library;
[0015] Determine the target text representation whose similarity to the dialogue representation is greater than the preset threshold;
[0016] Obtain the candidate text corresponding to the target text representation.
[0017] In an optional embodiment of the first aspect of this application, obtaining the dialogue representation corresponding to the dialogue content and the text representation corresponding to the first text in the document library includes:
[0018] The dialogue content is input into a pre-trained model to obtain the dialogue representation corresponding to the dialogue content;
[0019] The text representation corresponding to the first text in the pre-stored document library is obtained from the database. The text representation corresponding to the first text is generated by the pre-trained model based on the first text.
[0020] In an optional embodiment of the first aspect of this application, the structural information of the candidate text includes adjacent text information, and at least one of the following: title information, paragraph information, serial number information, and table information.
[0021] In an optional embodiment of the first aspect of this application, constructing a dialogue graph containing the candidate text and the dialogue content based on the structural information of the candidate text and the dialogue content includes:
[0022] Obtain a pre-stored document graph, which is constructed based on the semi-structured document content in the document library, and is used to indicate the structural information of the documents in the document library;
[0023] Obtain the structural information of the candidate text from the document graph;
[0024] The dialogue graph is constructed based on the candidate text, the structural information of the candidate text, and the dialogue content.
[0025] In an optional embodiment of the first aspect of this application, constructing the dialogue graph based on the candidate text, the structural information of the candidate text, and the dialogue content includes:
[0026] The dialogue content is concatenated to the candidate text and the adjacent text of the candidate text to obtain the dialogue graph.
[0027] In an optional embodiment of the first aspect of this application, candidate response texts corresponding to the dialogue content are obtained by data processing of the dialogue graph, including:
[0028] The initial feature representation of the dialogue graph is obtained through a pre-trained model, and the initial feature representation of the dialogue graph includes the text representations of multiple texts in the dialogue graph;
[0029] The initial feature representation of the dialogue graph is input into the graph neural network model to obtain the context feature representation of the dialogue graph;
[0030] The contextual features of the dialogue graph are input into a feedforward neural network model to obtain candidate response texts corresponding to the dialogue content.
[0031] In an optional embodiment of the first aspect of this application, the contextual feature representation of the dialogue graph includes contextual feature representations of multiple texts in the dialogue graph; inputting the contextual feature representation of the dialogue graph into a feedforward neural network model to obtain candidate response texts corresponding to the dialogue content includes:
[0032] Traverse the text of the dialogue graph, and input the context feature representation of the second text in the dialogue graph into the feedforward neural network model to obtain the score information of the second text; the second text is any one of the multiple texts in the dialogue graph;
[0033] From multiple texts in the dialogue graph, obtain candidate response texts with scores greater than a preset score; the candidate response texts include at least one text in the dialogue graph.
[0034] In an optional embodiment of the first aspect of this application, determining the target response text based on the candidate response text includes:
[0035] The candidate response text is input into the encoder of the generation model to obtain a text sequence of the candidate response text;
[0036] The text sequence of the candidate response text is input into the decoder of the generation model to obtain the target response text.
[0037] A second aspect of this application provides a dialogue processing method, including:
[0038] Get the dialogue content entered by the user in the current round;
[0039] Candidate texts with a similarity greater than a preset threshold to the dialogue content are obtained from a document library; the document library includes semi-structured document content.
[0040] Based on the structural information of the candidate text and the dialogue content, a dialogue graph containing the candidate text and the dialogue content is constructed;
[0041] By processing the dialogue graph, candidate response texts corresponding to the dialogue content are determined.
[0042] A third aspect of this application provides a dialogue processing device, including a receiving unit and a processing unit.
[0043] A receiving unit is used to receive a dialogue processing request, the dialogue processing request including the dialogue content input by the user in the current round;
[0044] A processing unit is configured to, in response to the dialogue processing request, retrieve candidate texts from a document library whose similarity to the dialogue content is greater than a preset threshold; construct a dialogue graph containing the candidate texts and the dialogue content based on the structural information of the candidate texts and the dialogue content; obtain candidate response texts corresponding to the dialogue content by performing data processing on the dialogue graph; and determine a target response text based on the candidate response texts; wherein the document library includes semi-structured document content.
[0045] A sending unit is used to output a dialogue processing response, the dialogue processing response including the target reply text.
[0046] A fourth aspect of this application provides a dialogue processing device, including: an acquisition unit and a processing unit.
[0047] The acquisition unit is used to acquire the dialogue content input by the user in the current round;
[0048] A processing unit is configured to obtain candidate texts from a document library whose similarity to the dialogue content is greater than a preset threshold; the document library includes semi-structured document content; construct a dialogue graph containing the candidate texts and the dialogue content based on the structural information of the candidate texts and the dialogue content; and determine the candidate response text corresponding to the dialogue content by performing data processing on the dialogue graph.
[0049] A fifth aspect of this application provides a dialogue processing system, including: an end-side device and a cloud-side device;
[0050] The endpoint device is used to send a dialogue processing request to the cloud device, the dialogue processing request including the dialogue content input by the user in the current round;
[0051] The cloud-side device is configured to, in response to the dialogue processing request, retrieve candidate texts from a document library whose similarity to the dialogue content is greater than a preset threshold; construct a dialogue graph containing the candidate texts and the dialogue content based on the structural information of the candidate texts and the dialogue content; obtain candidate response texts corresponding to the dialogue content by performing data processing on the dialogue graph; determine a target response text based on the candidate response texts; and send a dialogue processing response to the end-side device, wherein the dialogue processing response includes the target response text.
[0052] The document library includes semi-structured document content.
[0053] A sixth aspect of this application provides an electronic device, including: a memory, a processor, and a computer program; the computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any of the first aspects of this application, or the method as described in the second aspect of this application.
[0054] A fifth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method as described in any of the first aspects of this application, or the method as described in the second aspect of this application.
[0055] A sixth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the first aspects of this application, or the method described in the second aspect of this application.
[0056] A seventh aspect of this application provides a chip, the chip including a processor, the processor being configured to invoke a computer program in memory to perform the method described in any of the first aspects of this application, or the method described in the second aspect of this application.
[0057] This application provides a dialogue processing method, device, and system, relating to the field of artificial intelligence. In this method, in response to a dialogue processing request, candidate text related to the current dialogue content is obtained from a document library containing semi-structured document content. A dynamic dialogue graph is constructed based on the candidate text, its structural information, and the dialogue content. The dialogue graph includes the candidate text, neighboring text related to the candidate text, and the dialogue content. By processing the dialogue graph, candidate response text corresponding to the dialogue content is obtained. Based on the candidate response text, a target response text is determined, and finally, the target response text is output. This solution utilizes semi-structured document content in a document library to obtain candidate text related to the dialogue content and its structured information, enabling more accurate location of the candidate response text required for the current round. By dynamically constructing the dialogue graph, the information from the candidate text and the dialogue content is fully utilized, improving the efficiency of dialogue processing and meeting the user's real-time requirements. Attached Figure Description
[0058] Figure 1 This is a schematic diagram illustrating an application scenario of the dialogue processing method provided in the embodiments of this application;
[0059] Figure 2 A flowchart illustrating a dialogue processing method provided in an embodiment of this application;
[0060] Figure 3 A schematic diagram of the construction document diagram and dialogue diagram provided for embodiments of this application;
[0061] Figure 4 A flowchart illustrating a dialogue processing method provided in an embodiment of this application;
[0062] Figure 5 A flowchart illustrating the process of obtaining candidate response text provided in this application embodiment;
[0063] Figure 6 A flowchart illustrating the process of obtaining candidate response text provided in this application embodiment;
[0064] Figure 7 This is a schematic diagram of the structure of a dialogue processing device provided in an embodiment of this application;
[0065] Figure 8 This is a schematic diagram of the structure of a dialogue processing device provided in an embodiment of this application;
[0066] Figure 9 This is a hardware structure diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0067] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, other embodiments obtained by those skilled in the art without creative effort are all within the scope of protection of this application.
[0068] In this application embodiment, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects are in an "or" relationship. "At least one of the following (kind / items)" or similar expressions refer to any combination of these items, including any combination of single (kind / items) or multiple (kind / items). For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0069] It should be noted that, in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0070] The following is a brief introduction to the technical terms used in the embodiments of this application.
[0071] First, DGDS: The full name of DGDS is document-grounded dialog system.
[0072] Second, CG: full name is conversational graph, a graph structure data format used to store information related to the current conversation turn.
[0073] Third, GNN: full name graph neural network, a general term for a class of neural networks that take graph structures as input.
[0074] Fourth, FNN: The full name of FNN is feed forward neural network. It is the simplest type of neural network, which adopts a unidirectional multi-layer structure, and each layer contains a number of neurons.
[0075] Fifth, a question-answering system (QA) is an advanced form of information retrieval system that can answer user questions posed in natural language using accurate and concise natural language. QA systems are primarily used in web-based question-and-answer websites.
[0076] Sixth, task-oriented dialogue systems, targeting vertical industries, aim to help users complete target tasks or actions with as few dialogue turns as possible, such as booking flights, accommodations, restaurants, etc.
[0077] Seventh, semi-structured data is data that lies between structured and unstructured data. Common semi-structured data includes: log files, Extensible Markup Language (XML) documents, JSON (JavaScript Object Notation) documents, emails, Hypertext Markup Language (HTML) documents, etc.
[0078] Eighth, BERT is a pre-trained language model (PLM), short for Bidirectional Encoder Representations from Transformers. The BERT model is based on Transformers, which can be understood as a neural network module with a complex internal network structure. The module achieves rapid parallelism through self-attention mechanisms, improving training speed and allowing for increased model depth and accuracy.
[0079] Ninth, RoBERTa, an improved version of BERT (A Robustly Optimized BERT Pretraining Approach), made the following adjustments based on BERT: longer training time, larger batch size, more training data, removal of next-sentence prediction (NSP), longer training sequences, and dynamic masking.
[0080] Integrating external knowledge helps dialogue systems understand user goals more accurately and generate more informative responses. This capability is particularly important in knowledge-based question-answering systems and task-oriented dialogue systems. Existing such dialogue systems often use knowledge graphs, tabular content, and document content as knowledge sources. Among these, building knowledge graphs is costly, tabular formats can only represent data with standardized formats, while document content is a widely available, easily accessible data source containing rich knowledge.
[0081] Most existing document dialogue systems process external documents in plain text format, meaning their creation is based on plain text content and doesn't fully utilize the information within those documents. In one possible scenario, businesses and individuals generate a large amount of semi-structured document data in their daily work, such as company documents, product manuals, and personal notes. This data often contains a wealth of valuable information. However, finding the desired information within these documents is very difficult and time-consuming. Using traditional search engines for knowledge retrieval has three main problems: First, it requires users to provide relatively accurate search text, creating a certain barrier to entry. Second, it doesn't allow for interactive content discovery. Third, it doesn't provide feedback to users in a smooth, conversational manner.
[0082] Based on the above scenarios, it is clear that in real-world environments, documents typically contain structural information, such as the relationships between paragraphs and between paragraphs and headings. If this information can be fully learned, it can help dialogue systems better understand the document content.
[0083] Based on this, this application proposes a dialogue processing method, the main design idea of which is: to construct a document graph using semi-structured document content, the document graph containing structural information existing in the knowledge document; to dynamically construct a dialogue graph for the current dialogue round using the structural information of the documents in the document graph, the dialogue graph containing some documents in the document graph related to the dialogue content of the current dialogue round; and to generate candidate response text for the current dialogue round based on the dialogue graph, providing data support for the generation of subsequent target response text.
[0084] The above solution, while ensuring efficient dialogue processing, can more accurately locate the knowledge text of the current dialogue turn, improving the quality of dialogue responses. This solution can be extended to fields including enterprise services, public healthcare, technology product usage, and daily life, enabling users to conduct precise knowledge searches through dialogue, providing them with great convenience.
[0085] To facilitate understanding, the application scenarios of the technical solutions provided in the embodiments of this application will be briefly introduced below. Figure 1 This is a schematic diagram illustrating an application scenario of the dialogue processing method provided in an embodiment of this application. For example... Figure 1As shown, the scenario includes a client 110 and a server 120, with the client 110 connected to the server 120 via a communication network.
[0086] Server 120 can be any suitable server for storing information, data, programs, and / or any other suitable type of content. In some embodiments, server 120 can perform any suitable function. For example, in some embodiments, server 120 deploys executable code for implementing the technical solutions of this application, for locating suitable candidate response texts from a document library based on user-input dialogue content, generating target response texts based on the candidate response texts, and returning the target response texts to client 110.
[0087] The communication network can be any suitable combination of one or more wired and / or wireless networks. For example, the communication network can include any one or more of the following: the Internet, intranet, wide area network (WAN), local area network (LAN), wireless network, digital subscriber line (DSL) network, frame relay network, asynchronous transfer mode (ATM) network, virtual private network (VPN), and / or any other suitable communication network. Client 110 can connect to the communication network via one or more communication links, which can be linked to server 120 via one or more communication links. The communication link can be any communication link suitable for transmitting data between client 110 and server 120, such as a network link, dial-up link, wireless link, hardwired link, any other suitable communication link, or any suitable combination of such links.
[0088] Client 110 may include any one or more user devices suitable for receiving user input dialogue content, including text or voice input, which is not specifically limited in this application. In some embodiments, client 110 may include any suitable type of device. For example, in some embodiments, client 110 may include mobile devices, tablet computers, laptop computers, desktop computers, wearable computers, or any other suitable type of user device, which is not limited in this application embodiment.
[0089] Although server 120 is illustrated as a single device, in some embodiments, any suitable number of devices may be used to perform the functions performed by server 120. For example, in some embodiments, multiple devices may be used to implement the functions performed by server 120. Alternatively, cloud services may be used to implement the functions of server 120.
[0090] based on Figure 1The scenario shown is an example. Server 120 receives dialogue content from client 110. Using a pre-trained model built into server 120, it obtains a dialogue representation of the dialogue content. Then, using a similarity analysis module built into server 120, it filters candidate texts from a document library whose similarity to the dialogue content exceeds a preset threshold. Subsequently, server 120 constructs a dynamic dialogue graph based on the structural information of the candidate texts and the dialogue content. The dialogue graph corresponding to the dialogue content in different dialogue rounds changes dynamically. The pre-trained model then obtains the text representations of the documents in the dynamic dialogue graph, thus obtaining the feature representation of the dialogue graph. Finally, the feature representation of the dialogue graph is input into a generative model built into server 120 to generate the target response text.
[0091] It should be noted that in some scenarios, users can directly interact with the terminal device, which can be a smartphone, wearable device, intelligent robot, in-vehicle terminal, etc., and the terminal device can perform... Figure 1 The actions of server 120 shown are as follows: after generating the target response text, output the target response text in text or voice format.
[0092] The dialogue processing solution provided in this application will be described in detail below through specific embodiments. It should be noted that the technical solutions provided in the embodiments of this application may include some or all of the following contents. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0093] Figure 2 This is a flowchart illustrating a dialogue processing method provided in an embodiment of this application. This dialogue processing method can be applied to... Figure 1 The server, or other execution device shown, such as Figure 2 As shown, the method includes the following steps:
[0094] Step 201: Receive a dialogue processing request. The dialogue processing request includes the dialogue content entered by the user in the current round.
[0095] In this embodiment, the user can input dialogue content via voice input or text input.
[0096] In one possible implementation, the server receives a dialogue processing request from a client. For example, a user accesses a server's dialogue processing device through a client. This device can be an information retrieval device, such as a document retrieval device, and the dialogue content entered by the user can be the retrieval content of a document query, such as the user entering one or more keywords, or a sentence.
[0097] In one possible implementation, the execution device receives a dialogue processing request; this execution device can be an intelligent robot. For example, a user converses with the intelligent robot via voice. The intelligent robot receives the user's voice input, converts the voice information into text information, and obtains the dialogue content input by the user in the current round. The dialogue content is typically one or more sentences.
[0098] Step 202: In response to the dialogue processing request, retrieve candidate texts from the document library that have a similarity to the dialogue content greater than a preset threshold.
[0099] In this embodiment, the document library includes semi-structured document content. The document content in the document library is knowledge document. The knowledge document contains plain text information and structural information in the document, including, for example, the title, paragraphs, and serial numbers in the document.
[0100] As an example, in response to a dialogue processing request, the server obtains the dialogue representation corresponding to the dialogue content and the text representation corresponding to the first text in the document library; determines the similarity between the dialogue representation and the text representation corresponding to the first text in the document library; identifies the target text representation whose similarity to the dialogue representation is greater than a preset threshold; and obtains candidate texts corresponding to the target text representation. Here, the first text can be any text in the document library; for example, the first text could be the title of a document, the title of a paragraph, or the content of a paragraph. Candidate texts can be one or more texts in the document library.
[0101] It should be noted that in this embodiment, dialogue representation can be understood as feature representation or vector representation of dialogue content, and text representation can be understood as feature representation or vector representation of text.
[0102] As an example, the server can obtain the dialogue representation corresponding to the dialogue content and the text representation corresponding to the first text in the document library through a pre-trained model. The pre-trained model is a pre-built model within the server, and can be a BERT model based on the Transformer architecture, or RoBERTa, etc. For example, the pre-trained model includes the encoder in the Transformer architecture.
[0103] In one possible implementation, the server inputs the dialogue content into a pre-trained model to obtain a dialogue representation corresponding to the dialogue content; the server inputs the first text from the document library into the pre-trained model to obtain a text representation corresponding to the first text.
[0104] In one possible implementation, the server inputs the dialogue content into a pre-trained model to obtain a dialogue representation corresponding to the dialogue content; the server then retrieves the text representation corresponding to the first text from a pre-stored document library. The text representation corresponding to the first text is generated by the pre-trained model based on the first text. In this implementation, the server pre-stores the text representations of multiple texts in the document library, which improves the server's processing speed.
[0105] Step 203: Based on the structural information of the candidate texts and the dialogue content, construct a dialogue graph containing the candidate texts and the dialogue content.
[0106] In this embodiment, the structural information of the candidate text includes neighboring text information, and at least one of the following: title information, paragraph information, serial number information, and table information.
[0107] As an example, the server retrieves a pre-stored document graph and extracts the structural information of candidate texts from it. Based on the candidate texts, their structural information, and the dialogue content, a dialogue graph is constructed. The document graph is built upon the semi-structured document content in a document library and serves to indicate the structural information of documents within the library.
[0108] In one possible implementation, the server can construct a dialogue graph by concatenating the dialogue content to candidate text and its neighboring texts. By concatenating the dialogue content and some text elements from the document library, each node in the dialogue graph can simultaneously possess information from the dialogue content and the knowledge information contained in the text elements. In subsequent data processing, the nodes in the dialogue graph are embedded based on a pre-trained model to obtain vector representations of the nodes, providing data support for the final selection of target knowledge text.
[0109] It should be noted that both document graphs and dialogue graphs are graph-structured data, including multiple nodes and edges connecting the nodes, with edges typically having directionality. For ease of understanding, the following detailed explanation of document graphs and dialogue graphs is provided in conjunction with accompanying diagrams.
[0110] For example, Figure 3 These are schematic diagrams of the construction document diagram and dialogue diagram provided for embodiments of this application. Figure 3 The document graph shown is constructed based on semi-structured documents in a document library. This document graph includes multiple nodes, each node corresponding to a specific text within the document library, for example... Figure 3 In the diagram, node 1 corresponds to text 1, node 2 corresponds to text 2, and node 1 pointing to node 2 indicates that text 1 and text 2 have a relationship. Such relationships can be, for example, the subordinate relationship between title text and paragraph text, the parallel relationship between paragraph text, the subordinate relationship between a sequence of steps (such as step 1..., step 2..., step 3...) and a single step, etc.
[0111] Figure 3 The dialogue graph shown is dynamically generated based on the dialogue text and the constructed document graph. The dialogue graph changes as the dialogue text changes, thus it is dynamically evolving. Assuming the candidate text with a similarity greater than a preset threshold to the current dialogue text corresponds to nodes 3 and 4 in the document graph, the neighboring nodes of nodes 3 and 4 in the document graph can be obtained. For example, the neighboring nodes of node 3 include nodes 31 to 34, and the neighboring nodes of node 4 include nodes 41 and 42. Subsequently, the current dialogue text is concatenated onto nodes 3 and 4 and their neighboring nodes. For example, the concatenated node 3 includes the original text from node 3 and the current dialogue text; similarly, the concatenated node 31 includes the original text from node 31 (which is a neighboring text of the candidate text) and the current dialogue text. Similarly, other nodes in the dialogue graph have the current dialogue text added to their original text.
[0112] based on Figure 3 As shown in the example, the dialogue graph only contains candidate texts related to the current dialogue text, as well as neighboring texts of the candidate texts. Compared to the document graph, the dialogue graph contains less data, which improves the efficiency of dialogue processing while meeting the real-time requirements. Furthermore, since the candidate texts for different dialogue rounds vary depending on the dialogue text, the dialogue graph is dynamically constructed during the dialogue, enhancing the flexibility of target knowledge text selection.
[0113] Step 204: By processing the dialogue graph, obtain the candidate response text corresponding to the dialogue content.
[0114] As an example, the server can obtain the initial feature representation of the dialogue graph through a pre-trained model, and then input the initial feature representation of the dialogue graph into a graph neural network model (GNN) to obtain the contextual feature representation of the dialogue graph; then input the contextual feature representation of the dialogue graph into a feedforward neural network model (FNN) to obtain the candidate response text corresponding to the dialogue content.
[0115] In one possible implementation, the contextual feature representation of the dialogue graph is input into a feedforward neural network model (FNN) to obtain candidate response texts corresponding to the dialogue content. This may include: traversing the text of the dialogue graph, inputting the contextual feature representation of a second text in the dialogue graph into the feedforward neural network model (FNN) to obtain the score information of the second text; and obtaining candidate response texts with scores greater than a preset score from multiple texts in the dialogue graph. The candidate response texts include at least one text in the dialogue graph. In this implementation, the second text is any one of the multiple texts in the dialogue graph.
[0116] In this embodiment, the candidate response text can be one or more texts. The initial feature representation of the dialogue graph includes text representations of multiple texts in the dialogue graph, and the contextual feature representation of the dialogue graph includes contextual feature representations of multiple texts in the dialogue graph. It is worth noting that the text in the dialogue graph is concatenated text.
[0117] For example, suppose the dialogue graph includes 7 nodes, one node corresponds to one concatenated text, the initial feature representation of the dialogue graph includes the text representation of the 7 concatenated texts in the dialogue graph, and the context feature representation of the dialogue graph includes the context feature representation of the 7 concatenated texts in the dialogue graph.
[0118] It should be understood that for a given concatenated text, the text representation of the concatenated text indicates the information of the concatenated text, and the contextual features of the concatenated text indicate the contextual information of the concatenated text and its neighboring other concatenated texts.
[0119] Based on the above scheme, it can be seen that by encoding the initial feature representation of the dialogue graph using a GNN, the nodes in the dialogue graph can fuse information with their neighboring nodes (such as title text, adjacent paragraphs, and subordinate text), so that the node representation can simultaneously possess its own features and the local features of its own region (i.e., the features of neighboring nodes). Then, an FNN scores the node, and selects the knowledge text corresponding to several nodes with scores greater than or equal to a preset score as candidate response texts for the current dialogue round.
[0120] Step 205: Determine the target response text based on the candidate response text.
[0121] As an example, multiple candidate response texts are included. The server sequentially inputs these candidate response texts into the generation model. The generation model combines the score information of the candidate response texts and outputs a feature representation of the target response text. The target response text is then determined based on this feature representation.
[0122] The generated model is a pre-built model within the server. For example, the generated model includes an encoder and decoder in a Transformer structure.
[0123] In one possible implementation, the server inputs candidate response text into the encoder of the generative model to obtain a text sequence of candidate response texts, and then inputs the text sequence of candidate response texts into the decoder of the generative model. The decoder determines the weight value of each candidate response text based on its score information, and determines the text sequence of the target response text based on the weight values and text sequences of multiple candidate response texts. Finally, the target response text is determined based on the text sequence of the target response text. Optionally, the target response text can be obtained by querying a preset dictionary, wherein the preset dictionary includes a correspondence between text and sequence.
[0124] Step 206: Output the dialogue processing response, which includes the target reply text.
[0125] The dialogue processing method illustrated in this embodiment, in response to a user-triggered dialogue processing request, retrieves candidate text related to the current dialogue content from a document library containing semi-structured document content. Based on the candidate text, its structural information, and the dialogue content, a dynamic dialogue graph is constructed, whereby the dialogue graph includes the candidate text, neighboring text related to the candidate text, and the dialogue content. By processing the constructed dialogue graph, candidate response text corresponding to the dialogue content is obtained. Based on the candidate response text, the target response text is determined and finally output. This approach utilizes semi-structured document content from the document library to retrieve candidate text related to the dialogue content, along with its structured information. Compared to retrieving relevant text information in plain text format, this method can more accurately locate the candidate response text required for the current round. Furthermore, by dynamically constructing the dialogue graph, the information from the candidate text and the dialogue content can be fully utilized, improving the efficiency of dialogue processing and meeting the user's real-time requirements.
[0126] Based on the above embodiments, this application also provides a dialogue processing method, which is mainly used to generate candidate response text based on the dialogue content input by the user. The candidate response text can be regarded as candidate knowledge fragments, providing data support for generating the target response text. Figure 4 This is a flowchart illustrating a dialogue processing method provided in an embodiment of this application, as shown below. Figure 4 As shown, the dialogue processing method in this embodiment includes the following steps:
[0127] Step 401: Obtain the dialogue content input by the user in the current round.
[0128] Step 402: Obtain candidate texts from the document library that have a similarity greater than a preset threshold to the dialogue content. The document library includes semi-structured document content.
[0129] Step 403: Based on the structural information of the candidate texts and the dialogue content, construct a dialogue graph containing the candidate texts and the dialogue content.
[0130] Step 404: By processing the dialogue graph, determine the candidate response texts corresponding to the dialogue content.
[0131] Steps 402, 403, and 404 in this embodiment can be referred to steps 202, 203, and 204 in the above embodiment, respectively, and will not be repeated here.
[0132] The dialogue processing method illustrated in this embodiment mainly involves, after obtaining candidate texts related to the dialogue content of the current round, constructing a dialogue graph containing the candidate texts and the dialogue content. The method then analyzes the feature data of the text in each node of the dialogue graph. This feature data includes the feature data of each node itself, as well as the feature data relationships between nodes. Furthermore, the text of each node in the dialogue graph is a concatenated version of the dialogue content (not the original text of that node). Through the analysis and processing of the aforementioned feature data of the dialogue graph, the candidate response text corresponding to the dialogue content is finally determined.
[0133] Compared with related solutions, the above process involves the creation and analysis of dialogue graphs, which enables the device to learn more fully the relationship between dialogue content and candidate texts. This allows it to more accurately locate the candidate response text needed for the current round, providing data support for responding to dialogue processing requests.
[0134] To more clearly illustrate the difference between the technical solution provided in this application and other related solutions, the following two illustrated embodiments demonstrate the differences between the two.
[0135] For example, Figure 5 This is a schematic diagram illustrating a process for obtaining candidate response text, provided as an embodiment of this application. Figure 5 As shown, when the server retrieves document S0 from the document library, document S0 is a document related to the dialogue content Q0 of the current round (i.e., a candidate document). The server concatenates document S0 with the dialogue content Q0 to obtain the concatenated document S1. The server obtains the feature representation of the concatenated document S0′ through a pre-trained model, and then inputs the concatenated document S0′ into the FNN, which scores the concatenated document S0′. Through the above process, scores of multiple relevant documents can be obtained, and finally, the concatenated document with a score greater than the preset score is selected as the candidate response text.
[0136] This example does not involve a dialogue diagram and does not utilize the structured information of the document.
[0137] For example, Figure 6 This is a schematic diagram illustrating a process for obtaining candidate response text, provided as an embodiment of this application. Figure 6As shown, when the server retrieves document S0 from a document library containing semi-structured document content, document S0 is a document related to the dialogue content Q0 of the current round. The server obtains the neighboring node information of document S0 based on the document graph, such as... Figure 6 Nodes D, T0, S1, S 01 S 02 S 11 and S 12 It should be noted that the neighboring node information may contain structured information such as the title text and sequence number of document S0. The server then concatenates the current round's dialogue content Q0 with document S0 and the documents in its neighboring nodes to construct the current round's dialogue graph. The feature representation of the concatenated documents in the dialogue graph is then obtained through a pre-trained model (pre-trained model embedding nodes), resulting in the dialogue graph's feature representation. This feature representation is then input into a GNN to obtain the contextual feature representation of the dialogue graph. The contextual feature representation of the concatenated documents in the dialogue graph is then input into an FNN, which scores them. Finally, the concatenated documents with scores greater than a preset score are selected as candidate response texts y. There may be multiple candidate response texts.
[0138] Compared to the previous example, the documents in this example are semi-structured documents. When a document related to the dialogue content is retrieved, the document's structural information is fully learned, including adjacent documents, paragraph information, and heading information. After reconstructing the original structure of the relevant documents, the dialogue graph of the current round is constructed to determine more accurate candidate response texts, thereby providing data support for the generation of candidate target response texts.
[0139] It should be noted that some processes described in the above embodiments and accompanying drawings include multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The sequence numbers are merely used to distinguish different operations, and the sequence numbers themselves do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.
[0140] The dialogue processing method provided by the embodiments of this application has been described above. The dialogue processing device provided by the embodiments of this application will be described below.
[0141] This application embodiment can divide the dialogue processing device into functional modules according to the above method embodiment. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or software functional modules. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. The following description uses the division of functional modules according to each function as an example.
[0142] Figure 7 This is a schematic diagram of the structure of a dialogue processing device provided in an embodiment of this application. Figure 7 As shown, the dialogue processing device 700 of this embodiment includes: a receiving unit 701, a processing unit 702, and a sending unit 703.
[0143] The receiving unit 701 is used to receive a dialogue processing request, the dialogue processing request including the dialogue content input by the user in the current round;
[0144] Processing unit 702 is configured to, in response to the dialogue processing request, obtain candidate texts from a document library whose similarity to the dialogue content is greater than a preset threshold; construct a dialogue graph containing the candidate texts and the dialogue content based on the structural information of the candidate texts and the dialogue content; obtain candidate response texts corresponding to the dialogue content by performing data processing on the dialogue graph; and determine the target response text based on the candidate response texts; wherein, the document library includes semi-structured document content;
[0145] The sending unit 703 is used to output a dialogue processing response, the dialogue processing response including the target reply text;
[0146] In one optional embodiment, the processing unit 702 is configured to:
[0147] Obtain the dialogue representation corresponding to the dialogue content and the text representation corresponding to the first text in the document library; the first text is any text in the document library;
[0148] Determine the similarity between the dialogue representation and the text representation corresponding to the first text in the document library;
[0149] Determine the target text representation whose similarity to the dialogue representation is greater than the preset threshold;
[0150] Obtain the candidate text corresponding to the target text representation.
[0151] In one optional embodiment, the processing unit 702 is configured to:
[0152] The dialogue content is input into a pre-trained model to obtain the dialogue representation corresponding to the dialogue content;
[0153] The text representation corresponding to the first text in the pre-stored document library is obtained from the database. The text representation corresponding to the first text is generated by the pre-trained model based on the first text.
[0154] In one optional embodiment, the structural information of the candidate text includes adjacent text information, and at least one of the following: title information, paragraph information, serial number information, and table information.
[0155] In one optional embodiment, the processing unit 702 is configured to:
[0156] Obtain a pre-stored document graph, which is constructed based on the semi-structured document content in the document library, and is used to indicate the structural information of the documents in the document library;
[0157] Obtain the structural information of the candidate text from the document graph;
[0158] The dialogue graph is constructed based on the candidate text, the structural information of the candidate text, and the dialogue content.
[0159] In one optional embodiment, the processing unit 702 is configured to:
[0160] The dialogue content is concatenated to the candidate text and the adjacent text of the candidate text to obtain the dialogue graph.
[0161] In one optional embodiment, the processing unit 702 is configured to:
[0162] The initial feature representation of the dialogue graph is obtained through a pre-trained model, and the initial feature representation of the dialogue graph includes the text representations of multiple texts in the dialogue graph;
[0163] The initial feature representation of the dialogue graph is input into the graph neural network model to obtain the context feature representation of the dialogue graph;
[0164] The contextual features of the dialogue graph are input into a feedforward neural network model to obtain candidate response texts corresponding to the dialogue content.
[0165] In one optional embodiment, the context feature representation of the dialogue graph includes context feature representations of multiple texts in the dialogue graph; the processing unit 702 is configured to:
[0166] Traverse the text of the dialogue graph, and input the context feature representation of the second text in the dialogue graph into the feedforward neural network model to obtain the score information of the second text; the second text is any one of the multiple texts in the dialogue graph;
[0167] From multiple texts in the dialogue graph, obtain candidate response texts with scores greater than a preset score; the candidate response texts include at least one text in the dialogue graph.
[0168] In one optional embodiment, the processing unit 702 is configured to:
[0169] The candidate response text is input into the encoder of the generation model to obtain a text sequence of the candidate response text;
[0170] The text sequence of the candidate response text is input into the decoder of the generation model to obtain the target response text.
[0171] The dialogue processing device provided in this embodiment can be used to perform... Figure 2 The method steps of the server in the illustrated embodiment are similar in principle and technical effect, and will not be repeated here.
[0172] Figure 8 This is a schematic diagram of the structure of a dialogue processing device provided in an embodiment of this application. Figure 8 As shown, the dialogue processing device 800 of this embodiment includes: an acquisition unit 801 and a processing unit 802.
[0173] The acquisition unit 801 is used to acquire the dialogue content input by the user in the current round;
[0174] Processing unit 802 is configured to obtain candidate texts from a document library whose similarity to the dialogue content is greater than a preset threshold; the document library includes semi-structured document content; construct a dialogue graph containing the candidate texts and the dialogue content based on the structural information of the candidate texts and the dialogue content; and determine the candidate response text corresponding to the dialogue content by performing data processing on the dialogue graph.
[0175] The dialogue processing device provided in this embodiment can be used to perform... Figure 4 The method steps of the illustrated embodiment are similar in principle and technical effect, and will not be repeated here.
[0176] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 9As shown, the electronic device includes a memory 901 and a processor 902. The memory 901 stores computer programs and can be configured to store various other data to support operation on the dialog processing device. The processor 902, coupled to the memory 901, executes the computer programs in the memory 901 to implement the technical solutions of the aforementioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.
[0177] In some embodiments, such as Figure 9 As shown, the electronic device also includes: firewall 903, load balancer 904, communication component 905, power supply component 906, and other components. Figure 9 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 9 The components shown.
[0178] This application also provides a dialogue processing system, as shown in the attached document. Figure 1 The dialogue processing system in this embodiment may include end-side devices (e.g., Figure 1 Client 110 in the middle) and cloud-side devices (e.g. Figure 1 The cloud-side equipment includes: pre-trained models, a similarity analysis module, GNN, FNN, and generative models.
[0179] The endpoint device is used to send a dialogue processing request to the cloud device, the dialogue processing request including the dialogue content input by the user in the current round;
[0180] The cloud-side device is configured to, in response to the dialogue processing request, retrieve candidate texts from a document library whose similarity to the dialogue content is greater than a preset threshold; construct a dialogue graph containing the candidate texts and the dialogue content based on the structural information of the candidate texts and the dialogue content; obtain candidate response texts corresponding to the dialogue content by performing data processing on the dialogue graph; determine a target response text based on the candidate response texts; and send a dialogue processing response to the end-side device, wherein the dialogue processing response includes the target response text.
[0181] The document library includes semi-structured document content.
[0182] In this embodiment, the cloud-side device can be used to perform... Figure 2 The method steps of the server in the illustrated embodiment, or Figure 4 The illustrated embodiment demonstrates the method steps performed by the device. The cloud-side device can correspond to... Figure 7 The dialogue processing device 700 of the illustrated embodiment, or Figure 8 The dialogue processing device 800 shown in the embodiment can be referred to in the above embodiment for details, which will not be repeated here.
[0183] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the technical solution described in the foregoing method embodiments.
[0184] This application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, causes the processor to implement the technical solutions described in the foregoing method embodiments.
[0185] This application also provides a chip, including a processing module and a communication interface, wherein the processing module is capable of executing the technical solutions in the foregoing method embodiments. In some embodiments, the chip further includes a storage module (e.g., a memory), the storage module being used to store instructions, the processing module being used to execute the instructions stored in the storage module, and the execution of the instructions stored in the storage module causing the processing module to execute the technical solutions in the foregoing method embodiments.
[0186] The aforementioned storage can be object storage (OSS).
[0187] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0188] The aforementioned communication components are configured to facilitate wired or wireless communication between the device containing the communication components and other devices. The device containing the communication components can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, and other mobile communication networks, or combinations thereof. In one exemplary embodiment, the communication components receive broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication components also include a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0189] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0190] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0191] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0192] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0193] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0194] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0195] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0196] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0197] It should be noted that the user information (including but not limited to user device information, user personal information, user conversation information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0198] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0199] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A dialogue processing method, characterized in that, include: Receive a dialogue processing request, which includes the dialogue content input by the user in the current round; In response to the dialogue processing request, candidate texts with a similarity greater than a preset threshold to the dialogue content are retrieved from a document library; the document library includes semi-structured document content. Obtain a pre-stored document graph, which is constructed based on the semi-structured document content in the document library, and is used to indicate the structural information of the documents in the document library; The structural information of the candidate text is obtained from the document graph; the structural information of the candidate text includes adjacent text information, and at least one of the following: title information, paragraph information, serial number information, and table information; The dialogue content is concatenated to the candidate text and the adjacent text of the candidate text to obtain a dialogue graph containing the candidate text and the dialogue content; the dialogue graph changes as the dialogue content changes. By processing the dialogue graph, candidate response texts corresponding to the dialogue content are obtained; The target response text is determined based on the candidate response texts; Output a dialogue processing response, which includes the target reply text.
2. The method according to claim 1, characterized in that, The step of retrieving candidate texts from the document library that have a similarity greater than a preset threshold to the dialogue content includes: Obtain the dialogue representation corresponding to the dialogue content and the text representation corresponding to the first text in the document library; the first text is any text in the document library; Determine the similarity between the dialogue representation and the text representation corresponding to the first text in the document library; Determine the target text representation whose similarity to the dialogue representation is greater than the preset threshold; Obtain the candidate text corresponding to the target text representation.
3. The method according to claim 2, characterized in that, The step of obtaining the dialogue representation corresponding to the dialogue content and the text representation corresponding to the first text in the document library includes: The dialogue content is input into a pre-trained model to obtain the dialogue representation corresponding to the dialogue content; The text representation corresponding to the first text in the pre-stored document library is obtained from the database. The text representation corresponding to the first text is generated by the pre-trained model based on the first text.
4. The method according to any one of claims 1 to 3, characterized in that, By processing the dialogue graph, candidate response texts corresponding to the dialogue content are obtained, including: The initial feature representation of the dialogue graph is obtained through a pre-trained model, and the initial feature representation of the dialogue graph includes the text representations of multiple texts in the dialogue graph; The initial feature representation of the dialogue graph is input into the graph neural network model to obtain the context feature representation of the dialogue graph; The contextual features of the dialogue graph are input into a feedforward neural network model to obtain candidate response texts corresponding to the dialogue content.
5. The method according to claim 4, characterized in that, The contextual feature representation of the dialogue graph includes the contextual feature representation of multiple texts in the dialogue graph; The contextual feature representation of the dialogue graph is input into a feedforward neural network model to obtain candidate response texts corresponding to the dialogue content, including: Traverse the text of the dialogue graph, and input the context feature representation of the second text in the dialogue graph into the feedforward neural network model to obtain the score information of the second text; the second text is any one of the multiple texts in the dialogue graph; From multiple texts in the dialogue graph, obtain the candidate response texts that score higher than a preset score; the candidate response texts include at least one text in the dialogue graph.
6. The method according to any one of claims 1 to 3 and 5, characterized in that, Determining the target response text based on the candidate response texts includes: The candidate response text is input into the encoder of the generation model to obtain a text sequence of the candidate response text; The text sequence of the candidate response text is input into the decoder of the generation model to obtain the target response text.
7. A dialogue processing method, characterized in that, include: Get the dialogue content entered by the user in the current round; Retrieve candidate texts from the document library that have a similarity greater than a preset threshold to the dialogue content; The document library includes semi-structured document content; Obtain a pre-stored document graph, which is constructed based on the semi-structured document content in the document library, and is used to indicate the structural information of the documents in the document library; The structural information of the candidate text is obtained from the document graph; the structural information of the candidate text includes adjacent text information, and at least one of the following: title information, paragraph information, serial number information, and table information; The dialogue content is concatenated to the candidate text and the adjacent text of the candidate text to obtain a dialogue graph containing the candidate text and the dialogue content; the dialogue graph changes as the dialogue content changes. By processing the dialogue graph, candidate response texts corresponding to the dialogue content are determined.
8. A dialogue processing device, characterized in that, include: A receiving unit is used to receive a dialogue processing request, wherein the dialogue processing request includes the dialogue content input by the user in the current round; The processing unit is configured to, in response to the dialogue processing request, retrieve candidate texts from the document library whose similarity to the dialogue content is greater than a preset threshold. Obtain a pre-stored document graph, which is constructed based on the semi-structured document content in the document library, and is used to indicate the structural information of the documents in the document library; The structural information of the candidate text is obtained from the document graph; the structural information of the candidate text includes adjacent text information, and at least one of the following: title information, paragraph information, serial number information, and table information; The dialogue content is concatenated to the candidate text and the adjacent text of the candidate text to obtain a dialogue graph containing the candidate text and the dialogue content; the dialogue graph changes as the dialogue content changes. By processing the dialogue graph, candidate response texts corresponding to the dialogue content are obtained; The target response text is determined based on the candidate response texts; wherein, the document library includes semi-structured document content; A sending unit is used to output a dialogue processing response, the dialogue processing response including the target reply text.
9. A dialogue processing device, characterized in that, include: The acquisition unit is used to acquire the dialogue content input by the user in the current round; A processing unit is configured to obtain candidate texts from a document library that have a similarity greater than a preset threshold to the dialogue content; the document library includes semi-structured document content. Obtain a pre-stored document graph, which is constructed based on the semi-structured document content in the document library, and is used to indicate the structural information of the documents in the document library; The structural information of the candidate text is obtained from the document graph; the structural information of the candidate text includes adjacent text information, and at least one of the following: title information, paragraph information, serial number information, and table information; The dialogue content is concatenated to the candidate text and the adjacent text of the candidate text to obtain a dialogue graph containing the candidate text and the dialogue content; the dialogue graph changes as the dialogue content changes. By processing the dialogue graph, candidate response texts corresponding to the dialogue content are determined.
10. A dialogue processing system, characterized in that, include: End-side equipment and cloud-side equipment; The endpoint device is used to send a dialogue processing request to the cloud device, the dialogue processing request including the dialogue content input by the user in the current round; The cloud-side device is used to respond to the dialogue processing request by obtaining candidate texts from the document library whose similarity to the dialogue content is greater than a preset threshold. Obtain a pre-stored document graph, which is constructed based on the semi-structured document content in the document library, and is used to indicate the structural information of the documents in the document library; The structural information of the candidate text is obtained from the document graph; the structural information of the candidate text includes adjacent text information, and at least one of the following: title information, paragraph information, serial number information, and table information; The dialogue content is concatenated to the candidate text and the adjacent text of the candidate text to obtain a dialogue graph containing the candidate text and the dialogue content; the dialogue graph changes as the dialogue content changes. By processing the dialogue graph, candidate response texts corresponding to the dialogue content are obtained; and the target response text is determined based on the candidate response texts. Send a dialogue processing response to the endpoint device, the dialogue processing response including the target reply text; The document library includes semi-structured document content.
11. An electronic device, characterized in that, include: A memory, a processor, and a computer program; the computer program is stored in the memory and configured to be executed by the processor to implement the method as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Problem generation method and device and storage medium
CN109726274A
Method and device for obtaining response verbal skill, computer equipment and storage medium
CN110765244A