Conversation interaction method and device, storage medium, electronic equipment and program product

By obtaining the sequence of dialogue feature word vectors in the intelligent dialogue system and calculating the correlation coefficient, the intelligent dialogue system can more accurately understand and continue the dialogue context, solving the problem of insufficient context understanding and reasoning capabilities in multiple rounds of dialogue, and improving the accuracy and coherence of dialogue interactions.

CN119903127APending Publication Date: 2025-04-29INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411974297.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The intelligent dialogue system lacks context understanding and reasoning capabilities in multiple rounds of dialogue, resulting in low accuracy of dialogue interaction.

Method used

By obtaining the sequence of feature word vectors of the conversation and calculating the correlation coefficients between them, the intelligent dialogue system can quantitatively judge the degree of correlation between the current problem and the above. When the correlation coefficient is higher than the preset threshold, the sequence of feature word vectors of the current conversation is constructed in the same retelling manner as above and input it into the knowledge network to generate the answer.

Benefits of technology

It improves the accuracy and coherence of dialogue interactions, reduces understanding bias, enhances the accuracy of problem analysis, and enables the intelligent dialogue system to respond to user inquiries more naturally and accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903127A_ABST
    Figure CN119903127A_ABST
Patent Text Reader

Abstract

The invention discloses a dialogue interaction method and device, a storage medium, electronic equipment and a program product. The method comprises the steps of obtaining a first dialogue and a second dialogue; a first feature word vector sequence corresponding to the first dialogue and a second feature word vector sequence corresponding to the second dialogue are obtained, the first feature word vector sequence is constructed for the first dialogue according to a first replication mode, and the second feature word vector sequence is constructed for the second dialogue according to a second replication mode; obtaining a correlation coefficient between the first feature word vector sequence and the second feature word vector sequence; under the condition that the correlation coefficient is greater than an expected threshold value, constructing a third feature word vector sequence corresponding to the first dialogue according to a second replication mode; and inputting the third feature word vector sequence into the knowledge network to obtain an answer statement of the first dialogue output by the knowledge network. Through the method and the device, the problem of relatively low accuracy of dialogue interaction in related technologies is solved.
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 more specifically, to a conversational interaction method, device, storage medium, electronic device, and program product. Background Art

[0002] In intelligent dialogue systems, the lack of contextual understanding and reasoning capabilities in multiple rounds of dialogue is a key issue. When users interact with intelligent customer service, they often ask follow-up questions that require understanding based on the content of the previous round of dialogue. However, traditional intelligent dialogue systems either rely too much on preset question-and-answer templates and ignore the continuity of the dialogue and the relevance of the context, or when trying to understand the context, due to the lack of effective quantification and analysis methods, the system cannot accurately judge the relevance of the current question to the historical dialogue, which affects the accuracy and coherence of the answer and leads to low accuracy of the dialogue interaction.

[0003] Currently, no effective solution has been proposed to address the problem of low accuracy of conversational interactions in related technologies. Summary of the invention

[0004] The main purpose of the present application is to provide a conversation interaction method, device, storage medium, electronic device and program product to solve the problem of low accuracy of conversation interaction in related technologies.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for dialogue interaction is provided. The method includes: obtaining a first dialogue and a second dialogue, wherein the first dialogue is a dialogue to be answered, and the second dialogue is a previous dialogue of the first dialogue; obtaining a first feature word vector sequence corresponding to the first dialogue and a second feature word vector sequence corresponding to the second dialogue, wherein the first feature word vector sequence is constructed according to a first restatement method for the first dialogue, and the second feature word vector sequence is constructed according to a second restatement method for the second dialogue; obtaining a correlation coefficient between the first feature word vector sequence and the second feature word vector sequence, wherein the correlation coefficient is used to indicate the degree of correlation between the first dialogue and the second dialogue; when the correlation coefficient is greater than an expected threshold, constructing a third feature word vector sequence corresponding to the first dialogue according to the second restatement method; inputting the third feature word vector sequence into a knowledge network, and obtaining an answer sentence of the first dialogue output by the knowledge network.

[0006] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a dialogue interaction device is provided. The device includes: a first acquisition unit, used to acquire a first dialogue and a second dialogue, wherein the first dialogue is a dialogue to be answered, and the second dialogue is the previous dialogue of the first dialogue; a second acquisition unit, used to acquire a first feature word vector sequence corresponding to the first dialogue and a second feature word vector sequence corresponding to the second dialogue, wherein the first feature word vector sequence is constructed according to a first restatement method for the first dialogue, and the second feature word vector sequence is constructed according to a second restatement method for the second dialogue; a third acquisition unit, used to acquire a correlation coefficient between the first feature word vector sequence and the second feature word vector sequence, wherein the correlation coefficient is used to indicate the degree of correlation between the first dialogue and the second dialogue; a construction unit, used to construct a third feature word vector sequence corresponding to the first dialogue according to the second restatement method when the correlation coefficient is greater than an expected threshold; and an answer unit, used to input the third feature word vector sequence into a knowledge network to obtain an answer sentence of the first dialogue output by the knowledge network.

[0007] In an embodiment of the present application, by obtaining the feature word vector sequence of the first dialogue (i.e., the current dialogue to be answered) and the second dialogue (i.e., the previous round of dialogue), and calculating the correlation coefficient between them, the intelligent dialogue system can quantitatively determine the degree of correlation between the current question and the above. When the correlation coefficient is higher than a preset threshold, the feature word vector sequence of the current dialogue is constructed in the same restatement method as the above, which ensures that the system can accurately capture and continue the context of the dialogue, reduce understanding deviations, and improve the accuracy of question parsing. In the case where the first dialogue and the second dialogue are highly correlated, the first dialogue is processed in the same restatement method to generate a third feature word vector sequence. Taking into account the dialogue history, the background information of the dialogue can be fully utilized when answering questions, avoiding understanding the problem in isolation, thereby improving the coherence and logic of the answer, achieving the technical effect of improving the accuracy of dialogue interaction, and solving the technical problem of low accuracy of dialogue interaction in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0009] Figure 1 A hardware structure block diagram of a computer terminal for implementing a conversation interaction method is shown;

[0010] Figure 2 is a flowchart of a conversation interaction method provided according to an embodiment of the present application;

[0011] Figure 3is a schematic diagram of a conversation interaction method provided according to an embodiment of the present application;

[0012] Figure 4 is a schematic diagram of a conversation interaction method provided according to an embodiment of the present application;

[0013] Figure 5 is a schematic diagram of a conversation interaction method provided according to an embodiment of the present application;

[0014] Figure 6 is a schematic diagram of a conversation interaction device provided according to an embodiment of the present application;

[0015] Figure 7 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0016] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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 ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0017] It should be noted that the terms "first", "second", etc. 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. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0018] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0019] It should be noted that the information and data collected in this application are authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.

[0020] Example 1

[0021] According to an embodiment of the present application, a method embodiment of a conversational interaction is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0022] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing a conversation interaction method. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0023] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0024] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the conversational interaction method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned conversational interaction method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0025] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0026] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0027] Under the above operating environment, this application provides Figure 2 The dialog interaction method shown specifically includes:

[0028] S201, obtaining a first conversation and a second conversation, wherein the first conversation is a conversation to be answered, and the second conversation is a previous conversation of the first conversation;

[0029] S202, obtaining a first feature word vector sequence corresponding to the first dialogue and a second feature word vector sequence corresponding to the second dialogue, wherein the first feature word vector sequence is constructed according to a first restatement method for the first dialogue, and the second feature word vector sequence is constructed according to a second restatement method for the second dialogue;

[0030] S203, obtaining a correlation coefficient between the first feature word vector sequence and the second feature word vector sequence, wherein the correlation coefficient is used to indicate a correlation degree between the first conversation and the second conversation;

[0031] S204, when the correlation coefficient is greater than the expected threshold, constructing a third feature word vector sequence corresponding to the first dialogue according to the second restatement method;

[0032] S205: Input the third feature word vector sequence into the knowledge network to obtain the answer sentence of the first dialogue output by the knowledge network.

[0033] Optionally, in this embodiment, the first dialogue refers to the current question or statement raised by the user (to the intelligent dialogue system), which is the object that needs to be understood and answered. The second dialogue refers to the question or statement raised by the user before and immediately adjacent to the first dialogue, which constitutes the background and context for understanding the first dialogue.

[0034] Optionally, in this embodiment, in natural language processing, a sentence or a conversation can be converted into a series of vectors, which represent the characteristics of each word in the sentence. The feature word vector sequence is a vector sequence after the conversation text is decomposed and converted, which is used to mathematically represent the semantic content of the conversation.

[0035] Optionally, in this embodiment, the first feature word vector sequence and the second feature word vector sequence respectively correspond to vector sequences converted from the first conversation and the second conversation, which are constructed by LSTM algorithm or other methods to capture the essence and relationship of the conversation.

[0036] Optionally, in this embodiment, the correlation coefficient is used to quantify the degree of semantic association between the first dialogue and the second dialogue, and the higher the value, the more relevant the two dialogues are. The expected threshold is a set value used to determine whether the correlation between the first dialogue and the second dialogue is strong enough, so as to determine whether the context of the first dialogue and the second dialogue needs to be associated for understanding and restating.

[0037] Optionally, in this embodiment, the first dialogue and the second dialogue are obtained to capture the user's current inquiry (first dialogue) and its direct dialogue history (second dialogue), providing basic data for subsequent context understanding and question resolution.

[0038] Optionally, in this embodiment, a first feature word vector sequence corresponding to the first conversation and a second feature word vector sequence corresponding to the second conversation are obtained. When converting the conversation text into a computer-processable mathematical representation, a word vector sequence form is used. The first feature word vector sequence and the second feature word vector sequence are converted by a specific restatement method (i.e., a first restatement method and a second restatement method), respectively, which may include an LSTM algorithm or other natural language processing technology, aiming to capture the semantic features and context information of the conversation.

[0039] Optionally, in this embodiment, the correlation coefficient between the first feature word vector sequence and the second feature word vector sequence is obtained. By calculating the similarity between the feature word vector sequences of the first conversation and the second conversation, a correlation coefficient represented by a numerical value is obtained. This step is the key to quantitatively evaluate the relevance of the two conversations at the semantic level, and provides a basis for subsequent decision-making.

[0040] Optionally, in this embodiment, when the correlation coefficient is greater than the expected threshold, a third feature word vector sequence corresponding to the first dialogue is constructed according to the second restatement method. If the correlation between the first dialogue and the second dialogue exceeds the preset expected threshold, the first dialogue will be regarded as closely related to the second dialogue, and the first dialogue will be processed using the restatement method of the second dialogue (i.e., the second restatement method) to generate a third feature word vector sequence. This ensures the coherence of the context and the full use of the dialogue history, and improves the accuracy and depth of question understanding.

[0041] Optionally, in this embodiment, the third feature word vector sequence is input into the knowledge network to obtain the answer statement of the first dialogue output by the knowledge network. After the question understanding and context association are completed, the third feature word vector sequence is input into the knowledge network for retrieval. The knowledge network is a pre-built database containing a large amount of professional knowledge and entity relationships in the financial field. Through matching and retrieval, it can output the most relevant and accurate answer statement according to the user's question, thereby providing professional and humanized services.

[0042] It is understandable that the combination of deep learning and natural language processing technology has significantly enhanced the contextual understanding ability of the intelligent dialogue system in the scene, improved the professionalism and accuracy of answering questions, and provided users with a better service experience. By quantifying the relevance of dialogues, optimizing context restatement and knowledge network retrieval, the problem of the intelligent dialogue system understanding complex contexts and professional terms in dialogue scenarios has been effectively solved, and the coherence and logic of multiple rounds of dialogues have been improved, so that the intelligent dialogue system can respond to user inquiries more naturally and accurately, especially when dealing with questions involving professional knowledge.

[0043] Through the embodiments provided by the present application, by obtaining the feature word vector sequence of the first dialogue (i.e., the current dialogue to be answered) and the second dialogue (i.e., the previous round of dialogue), and calculating the correlation coefficient between them, the intelligent dialogue system can quantitatively determine the degree of correlation between the current question and the above text. When the correlation coefficient is higher than a preset threshold, the feature word vector sequence of the current dialogue is constructed in the same restatement method as the above text, which ensures that the system can accurately capture and continue the context of the dialogue, reduce understanding deviations, and improve the accuracy of question parsing. In the case where the correlation between the first dialogue and the second dialogue is high, the first dialogue is processed in the same restatement method to generate a third feature word vector sequence. Taking into account the dialogue history, the background information of the dialogue can be fully utilized when answering questions, avoiding understanding the problem in isolation, thereby improving the coherence and logic of the answer, and achieving the technical effect of improving the accuracy of dialogue interaction.

[0044] As an optional solution, after obtaining the correlation coefficient between the first feature word vector sequence and the second feature word vector sequence, the method further includes:

[0045] When the correlation coefficient is less than or equal to the expected threshold, the first feature word vector sequence is input into the knowledge network to obtain the answer sentence output by the knowledge network.

[0046] Optionally, in this embodiment, when the correlation coefficient between the first conversation and the second conversation is less than or equal to a preset expected threshold, this indicates that the current question may not have a direct or obvious contextual association with the historical conversation, and therefore, there is no need for complex contextual association restatement and analysis. Instead, it directly uses the first feature word vector sequence, that is, the semantic representation of the current question, and inputs it into the pre-built knowledge network, and through the retrieval and matching mechanism within the knowledge network, it independently understands and parses the user's question, and finally outputs an accurate answer to the current question. This approach ensures that the system can provide professional, accurate and timely responses even when processing independent conversations, while avoiding unnecessary contextual association processing, thereby improving system efficiency, reducing the processing of irrelevant information, and ensuring the high responsiveness and professionalism of intelligent dialogues in the scene.

[0047] Through the embodiments provided by this application, when facing independent conversations or conversations with weak correlation, it is possible to effectively perform question analysis and answer retrieval, and achieve a fast and professional response to user questions. This processing method not only improves the efficiency of intelligent customer service in the scene, but also ensures the consistency and reliability of the system in different conversation scenarios.

[0048] As an optional solution, obtaining a correlation coefficient between the first feature word vector sequence and the second feature word vector sequence includes:

[0049] Obtain N first feature words included in the first feature word vector sequence, and obtain N second feature words included in the second feature word vector sequence, where N is a positive integer;

[0050] Establishing N pairs of feature word combinations, wherein the i-th pair of feature word combinations in the N pairs of feature word combinations is composed of the i-th first feature word in the N first feature words and the i-th second feature word in the N second feature words, and i is a positive integer not greater than N;

[0051] The similarity coefficient of each pair of feature word combinations in the N pairs of feature word combinations is obtained, and the correlation coefficient is obtained by cumulative summation, wherein the similarity coefficient is used to indicate the similarity between the first feature word and the second feature word in each pair of feature word combinations.

[0052] Optionally, in this embodiment, N feature words are extracted from the first feature word vector sequence and the second feature word vector sequence, respectively, where N is a positive integer representing the number of feature words extracted from the conversation. Here, the N first feature words and the N second feature words correspond to the semantic features of the current conversation and the previous conversation, respectively.

[0053] Furthermore, N pairs of feature word combinations are constructed, each pair of feature word combinations consists of feature words in the same position in the current dialogue and the previous dialogue, that is, the i-th first feature word is matched with the i-th second feature word as a pair, and i is a positive integer from 1 to N, ensuring that the lexical features of each position are taken into account in the evaluation process.

[0054] Next, the similarity coefficients of each of the N pairs of feature word combinations are calculated, and these similarity coefficients represent the semantic proximity of the words in the corresponding positions. Then, all similarity coefficients are accumulated and summed to obtain a comprehensive value, namely the correlation coefficient, which represents the level of semantic relevance between the entire first dialogue and the second dialogue.

[0055] It can be understood that N feature words are extracted from the feature word vector sequences of the two rounds of dialogue, where N represents the number of words selected as features in the dialogue. Next, N pairs of word combinations are constructed, each pair consisting of feature words in the same position in the two rounds of dialogue. This matching method ensures direct comparison of contextual information. Then, the similarity of each pair of feature word combinations is calculated to obtain their similarity coefficients. The higher the similarity coefficient, the closer the two words are semantically. Finally, all similarity coefficients are accumulated and summed to generate a correlation coefficient, which provides a quantitative indicator of the overall correlation of the two rounds of dialogue at the semantic level.

[0056] Through the embodiments provided in the present application, it is possible to accurately evaluate the degree of contextual correlation between two rounds of dialogue, thereby deciding whether and how to incorporate the content of the previous round of dialogue into the understanding of the current question, avoiding the error of blindly associating or ignoring important background information, and providing a solid foundation for subsequent dialogue understanding and answer generation. It improves the ability of the intelligent dialogue system to handle multiple rounds of dialogue in the scenario, ensures the comprehensiveness and accuracy in understanding user questions, and thereby improves the quality of answers and user experience.

[0057] As an optional solution, obtaining the similarity coefficient of each pair of feature word combinations in N pairs of feature word combinations includes:

[0058] Obtaining a first entity corresponding to the i-th first feature word in the i-th pair of feature word combinations in the knowledge network, and obtaining a second entity corresponding to the i-th second feature word in the i-th pair of feature word combinations in the knowledge network;

[0059] In the case where there is a direct connection relationship between the first entity and the second entity, determining the similarity coefficient of the i-th pair of feature word combinations as a first value, wherein the first value is greater than 0;

[0060] In the case where there is an indirect connection relationship between the first entity and the second entity, determining the similarity coefficient of the i-th pair of feature word combinations as a second value, wherein the second value is greater than 0 and less than the first value;

[0061] When there is no connection relationship between the first entity and the second entity, the similarity coefficient of the i-th pair of feature word combinations is determined to be 0.

[0062] Optionally, in this embodiment, in the knowledge network, a directly connected relationship means that two entities are directly connected through a relationship without the need for other entities as intermediaries; an indirect connection relationship means that two entities are connected through one or more intermediary entities, and the relationship between entities may involve multi-step reasoning.

[0063] Optionally, in this embodiment, for any pair (i-th pair) of the established N pairs of feature word combinations, the first entity and the second entity corresponding to the first feature word and the second feature word in the knowledge network will be searched respectively. This step utilizes the mapping relationship between entities and words in the knowledge network, converts word vectors into entity nodes, and provides a specific knowledge graph basis for subsequent semantic similarity calculations.

[0064] Optionally, in this embodiment, if the first entity and the second entity are found to be directly connected in the knowledge network, the system will give this pair of feature word combination a higher similarity coefficient, i.e., a first value. The direct connection relationship here reflects the direct semantic connection of the words, and therefore, the setting of the first value reflects the strength of this direct connection, which is usually greater than 0.

[0065] Optionally, in this embodiment, if the association between the first entity and the second entity is indirect, that is, connected through the intermediary relationship of other entities, then this pair of feature word combinations will be assigned a lower similarity coefficient, that is, a second value. The second value is also greater than 0, but lower than the first value corresponding to the direct connection relationship, reflecting the semantic strength of the indirect association.

[0066] Optionally, in this embodiment, if no direct or indirect association between the first entity and the second entity is found in the knowledge network, the similarity coefficient of this pair of feature word combinations will be determined to be 0, which means that within the framework of the current knowledge network, no semantic association is found between the two words.

[0067] Through the embodiments provided by this application, the strength of the semantic association between words is quantified through entity relationship analysis, providing a more refined and accurate measure for the similarity evaluation of the first dialogue and the second dialogue at the semantic level, thereby enhancing the understanding and utilization of the context by the intelligent dialogue system in the scene. By distinguishing between direct, indirect and unrelated relationships between words, it is possible to more intelligently judge whether the words in the dialogue are related and to what extent, which provides more reliable information support for subsequent dialogue understanding, answer generation and other links, and helps to improve the accuracy and coherence of the system in processing multiple rounds of dialogue.

[0068] As an optional solution, before inputting the third feature word vector sequence into the knowledge network, the method further includes:

[0069] Acquire a data set for constructing a knowledge network, wherein the data set includes structured data and unstructured data;

[0070] Acquire triple information corresponding to structured data, and acquire triple information corresponding to unstructured data;

[0071] The triple information corresponding to the structured data and the triple information corresponding to the unstructured data are integrated to obtain a knowledge network, wherein the knowledge network includes multiple entities, and any two entities among the multiple entities are directly connected, indirectly connected, or not connected.

[0072] Optionally, in this embodiment, the data set is a variety of information sources required to build a knowledge network, covering two categories: structured data and unstructured data. Structured data usually refers to data in a table format stored in a database, with clear fields and structures; while unstructured data includes documents, texts, web page content, etc., and its information organization method is relatively free.

[0073] Optionally, in this embodiment, triple information is a basic unit for representing the relationship between entities, and is generally in the form of (entity 1, relationship, entity 2), or (entity, attribute, value). It represents the connection between entities, relationships or attribute values ​​in a structured form, which is convenient for computers to understand and process.

[0074] Optionally, in this embodiment, before building the knowledge network, it is necessary to collect comprehensive data sets, which include not only structured data, such as the bank's business data, product information, etc., but also unstructured data, such as financial background knowledge documents, website content for external services, etc. The extensiveness of the data set ensures that the knowledge network can cover all aspects of the financial field and provide comprehensive background knowledge support.

[0075] Optionally, in this embodiment, the structured data and unstructured data in the data set are converted into triple information. For structured data, triples can be directly generated based on their field relationships; while for unstructured data, natural language processing techniques such as entity recognition and relationship extraction are required to convert entities, relationships or attribute values ​​in the text into triples.

[0076] Optionally, in this embodiment, the triple information generated by the conversion of structured data and unstructured data is integrated to form a complete knowledge network. This process organizes all entities, relationships and attribute values ​​in the form of nodes and edges, creating a graph structure database containing professional terms in the financial field, business data, product information and other aspects of knowledge.

[0077] Optionally, in this embodiment, the knowledge network is constructed as a graph structure, each node in the graph represents an entity, and the entities are connected through direct or indirect relationships, or in some cases are not connected. A direct connection relationship indicates a direct association between two entities; an indirect connection relationship is mediated by other entity nodes; and the absence of a relationship between entities is manifested as being not connected in the knowledge network.

[0078] Through the embodiments provided in this application, by integrating triple information of structured and unstructured data, the knowledge network can provide a more comprehensive and accurate representation of entity relationships, which not only increases the coverage of the knowledge network, but also enables full use of professional knowledge and background information when understanding and answering user questions, thereby improving the accuracy and professionalism of the answers.

[0079] As an optional solution, triple information corresponding to the structured data is obtained, including:

[0080] According to the entity relationship structure of the structured data, triple information corresponding to the structured data is obtained;

[0081] Get the triple information corresponding to the unstructured data, including:

[0082] Identify the entity information and relationship information of unstructured data, and obtain the triple information corresponding to the unstructured data.

[0083] Optionally, in this embodiment, entity, relationship and attribute information are extracted from structured data and converted into triples. Since the format of structured data is clear, corresponding triples can be directly generated according to its fields and relationships, such as (customer, purchase, product) and the like.

[0084] Optionally, in this embodiment, for unstructured data, such as financial background knowledge documents, the system needs to first use natural language processing techniques, such as entity recognition and relationship extraction, to identify the entities in the document, the relationships between entities, and the attributes of the entities, and then convert this information into triples, such as (interest rate, impact, loan amount), etc., so that it can be integrated and utilized by the knowledge network.

[0085] Through the embodiments provided by this application, by converting different types of information into unified triple information, it is ensured that all data sources can be effectively integrated into the knowledge network, thereby improving the intelligent dialogue system's ability to understand and apply domain knowledge. This method of data conversion and information integration not only broadens the data coverage of the knowledge network, but also standardizes the data representation method, providing the system with a richer and unified knowledge background, which is conducive to improving the accuracy and professionalism of question understanding and answer generation in intelligent dialogue.

[0086] As an optional solution, the above-mentioned dialogue interaction method is applied to an intelligent dialogue system based on natural language reasoning. The intelligent dialogue system builds a knowledge network in the financial field through machine learning, uses the LSTM algorithm to parse the user's current dialogue context, and further identifies the correlation level between the user's question and the context content, strengthens the system's reasoning ability for the context, reduces the blindness of context association, parses the user's complete intention, and matches the parsed question to the knowledge network to return the best result, thereby achieving accurate and effective real-time dialogue effects.

[0087] Alternatively, if Figure 3 As shown, the above intelligent dialogue system consists of four units, namely, knowledge extraction unit, context reasoning unit, question analysis unit, and answer generation unit.

[0088] Specifically, the knowledge extraction unit is mainly used to generate the professional knowledge base of the intelligent dialogue system as the data source for the intelligent dialogue system to retrieve matching answers. Due to the complex business background in the financial field, the bank's intelligent dialogue scenario has high requirements for the professionalism and accuracy of the answers to questions. Whether the machine fully understands the knowledge in the relevant field will directly affect the actual application effect of the intelligent dialogue system. Therefore, this unit needs to build a comprehensive and high-quality knowledge network by collecting relevant professional knowledge in the financial field and in-house business services, including structured data such as product data and business data, and unstructured data described in natural language such as financial background knowledge documents. Since knowledge in the form of natural language cannot be directly understood by machines, it is necessary to extract knowledge from natural language to form a logical representation that can be understood and processed by machines. The knowledge network is generated by extracting triples of entities, relationships, and attributes as the data source for question retrieval of the intelligent dialogue system.

[0089] The context reasoning unit is to reason and restate the context of the current conversation. Generally speaking, when users are talking to an intelligent dialogue system, they often ask some related questions. The system needs to understand the context of the current conversation in real time to truly understand the user's intentions and to respond to the user more accurately. Therefore, this unit will use different topics to reason and restate the context, use the word segmentation method to construct the word vector sequence of different topics of the current conversation, perform reference resolution, subject completion, long and difficult sentence compression on the context word vector, use the LSTM algorithm to analyze and restate the current conversation context in real time, and construct a feature word vector sequence for each topic as a reference indicator for further context association of user questions, thereby enhancing the system's ability to understand the context.

[0090] The question analysis unit performs correlation analysis on the question currently input by the user and the context content obtained in the text. At present, there are generally two situations in the dialogue context. One is that the user continues to ask questions related to the previous text. In this case, it is necessary to perform correlation analysis on the context to infer the dialogue background and the user's complete question; the other is that the user asks a question that is unrelated to the previous text. At this time, blindly associating the context may increase interference. Therefore, this unit will further analyze the user's questions. When the user asks a question, it is first necessary to analyze whether the user's current input question is related to each topic in the previous text. The question is analyzed based on word segmentation statistics, and the correlation test is performed on the word vector of the question currently raised by the user and the feature word vector sequence of each topic, and a threshold is set as the correlation division indicator. Re-understand the user's question based on the correlation result. When the question is related to the previous text, the system will restate the question in combination with the context. When the question is unrelated to the previous text, the system will regard the question as a new question, introduce the weight parameters of the question vocabulary according to the word frequency, and extract the knowledge information such as the entity, relationship, and attribute of the final question for subsequent matching of the knowledge network.

[0091] The answer generation unit will match the questions obtained from the above analysis with the knowledge network to generate the best answer and return it to the user. Based on the professionalism and rigor of the financial field, the answers of the intelligent dialogue system will come from the knowledge network in the system, and will not answer questions beyond the scope of the knowledge base, thereby avoiding the randomness and openness of the answers. This unit will use the retrieval mode to obtain answers from the knowledge network, match the triple information extracted from the question with the knowledge network, and obtain the answer with the highest matching degree based on the known information and return it to the user.

[0092] By breaking down the steps of each of the above units, a schematic diagram of an optional intelligent dialogue method is shown below: Figure 4 As shown, specifically including:

[0093] S401, data collection: retrieve the bank's external service database, website and related knowledge documents to obtain the data sources required by the intelligent dialogue system, including structured data and unstructured data. Among them, structured data can be directly obtained from the bank's distributed database to provide external services, while unstructured data refers to more detailed and comprehensive business knowledge, product knowledge, etc. This type of data source is generally text data described in natural language, which can be obtained by crawling the bank's external service business website and knowledge documents.

[0094] S402, constructing a knowledge network: extracting knowledge from the above-mentioned data of different forms and structures, forming a unified knowledge form to construct a knowledge network. It should be noted that the two-dimensional data table in the database and the natural language text in the document have different storage modes. They are independent of each other and have data islands. They need to be processed into a unified storage unit that can be understood by the system to connect them and store them in the form of "entity-relationship-entity" and "entity-attribute-value" triple information. Entity refers to something that can exist independently, which can be a specific person or thing, or an abstract category, such as products, outlets, etc.; relationship is the relationship between different entities, such as causal relationship, inclusion relationship, etc.; attribute refers to the common nature and characteristics of entity existence, or a specific label of entity, such as product revenue, customer information, etc.; value is the specific value of entity attribute. According to the triple structure, the entities, relationships between entities, entity attributes, attribute values ​​and other information in the data are extracted to form an entity relationship network.

[0095] To further illustrate, the schematic diagram of knowledge network construction is as follows: Figure 5 As shown in the figure, a corpus is constructed according to the characteristics of the industry. Due to the rich and diverse forms of Chinese expression and the strong professional characteristics of financial institutions, it is necessary to introduce an in-line data dictionary and incorporate professional terms into the corpus of the knowledge network. In addition, when extracting entity relationships, the system needs to automatically identify entities and relationships in sentences and paragraphs for extraction. Therefore, common entity vocabulary is introduced in combination with the current huge language standards, and relationship vocabulary is classified according to the relationship type. For example, the vocabulary involved in causal relationships generally includes "because", "reason", "so", etc., which are included in the corpus of the intelligent dialogue system as the system's rules for distinguishing entities and relationships. Knowledge extraction is performed on the original data. For structured data stored in the database, it is generally a two-dimensional relationship table. The "entity-attribute-value" can be directly mapped to the knowledge network according to its entity relationship diagram. For unstructured text data, it is generally a natural language description composed of complex and rich professional vocabulary. A large amount of text is segmented into sentences and words, and each word is given a label of "entity, relationship, attribute, value" in combination with the corpus, and mapped to the knowledge network according to "entity-relationship-entity" or "entity-attribute-value". With entities as the center, the triple information generated above is integrated to form a complete knowledge network. Generally, there may be multiple relationships between entities, and the relationship between entities and attributes is one-to-many, with one entity attribute corresponding to one value. Based on this feature, the triple information is associated and merged to form a network diagram in which entity nodes are connected by relationships. The knowledge network finally constructed will serve as the knowledge base of the intelligent dialogue system.

[0096] S403, dialogue scene preprocessing: Generally, there will be multiple rounds of dialogue when the user communicates with the intelligent dialogue system, and not every round of dialogue will be relevant to the context. Therefore, a new dialogue level identifier is added to each question input unit in the intelligent dialogue system, and the initial value is 0. After the first round of dialogue is completed, if questions related to the previous context are continued to be input, the new question identifier will remain consistent with the previous round. When questions unrelated to the previous context are input after the first round of dialogue is completed, the new question identifier will be increased by 1, and so on. While strengthening the context relevance, the blind association of unrelated questions is avoided.

[0097] S404, dialogue segmentation: decompose the question-answering dialogue between the user and the intelligent dialogue system into the smallest unit, segment each dialogue text in the context, perform vocabulary preprocessing, tag each word with part of speech, and combine [S202] knowledge network corpus to perform word form conversion and word meaning conversion to reduce system noise. Part of speech tagging divides the parts of speech into nouns, pronouns, adjectives, verbs, adverbs, interjections, etc., converts pronouns into entity nouns, removes irrelevant adverbs and interjections such as "hello", "um", and "may", removes interfering words, and constructs the word vector of each sentence in the context. The sentence sequence for the dialogue scene is defined as S = (s1, s2, ..., s t ), after preprocessing, the tth sentence dialogue is divided into i words, then the word vector of the sentence can be expressed as s t =(w1,w2,…,w i ), and the bag-of-words model is used to convert it into binary form. Then each word w i The distributed representation vector is e wi =f(w i ,s t ).

[0098] S405, LSTM contextual reasoning restatement. Contextual reasoning restatement converts the question-answer pairs of the scene dialogue into declarative language, and adopts the recurrent neural network LSTM algorithm for context learning. The contextual reasoning algorithm based on LSTM includes vocabulary reasoning and sentence reasoning. Lexical reasoning converts the scene dialogue s t Each word position in the word vector sequence is trained using the output h of the previous state w(i-1) Update the state output h of each word at the current position in the sentence wi , complete the sentence encoding of lexical reasoning.

[0099] h wi =R(h w(i-1) ,e wi ),h wi ∈R |K|

[0100] Among them, R is the LSTM-based encoding network, K is the number of LSTM hidden layer nodes, and the state output at the last word position will contain the semantic information of the entire sentence, that is, the reasoning restatement result of this sentence.

[0101] The lexical reasoning restatement of each of the above sentences is recorded as s t ', then the sentence sequence of the scene dialogue can be expressed as S'=(s1',s2',…,s t '), the distributed representation vector of each sentence is e st' =f(s t ',S'), perform reasoning training on each sentence in the scene dialogue according to the LSTM algorithm, and use the output h of the previous state s(t-1) Update the state output h of each word at the current position in the sentence st , and obtain the context encoding for sentence reasoning.

[0102] h st =R(h s(t-1) ,e st ),h st ∈R |K|

[0103] The state output until the last sentence position will contain the semantic information of the entire scene dialogue, that is, the reasoning restatement result of the scene dialogue context.

[0104] S406, feature screening: extract the feature words of each group of context topics based on the context reasoning results, construct the feature word vector, introduce the feature word weight parameter based on the word frequency statistics method, extract the keywords from the context reasoning results generated in [S205] to construct the feature word vector Q t =(q1,q2,…,q ||Qt|| ), determine the feature vocabulary weight according to the dialogue word frequency where n i is the number of times the i-th feature word appears in the dialogue text, and N is the total number of words in the context reasoning result.

[0105] S407, question analysis: First, analyze the correlation between the question and the previous text, encode the question according to the analysis results, and convert it into a triple storage unit in the knowledge network. Refer to the method in [S204] to segment the question currently raised by the user and construct the question word vector P = (p1, p2, ..., p ||P|| ), perform a similarity test between the question word vector and the feature word vector in the above text, construct a similarity matrix, record the direct connection between knowledge network entities as 2, the indirect connection as 1, and the non-connection as 0, and calculate the relevance between the question and the tth topic scenario in the above text as follows.

[0106] where q i ·p j =0,1,2

[0107] Taking indirect correlation as the correlation test standard, that is, assuming that the correlation between the question word and the previous word is 1, then an average correlation degree is defined as when , it indicates that there is a correlation, and the LSTM algorithm is used to add the question to the content with the same dialogue level identifier above for related restatement. , it means that there is no relevant relationship, and the current question is regarded as a new question without the previous context, and the dialogue level flag is increased by 1. After the question is parsed, in order to match the knowledge network data structure, the question is triple extracted to obtain the knowledge information such as entity, relationship, attribute, etc. of the user question after the system understands it, and the unknown information of the question is left blank and converted into "entity-relationship-entity" or "entity-attribute-value" triple information.

[0108] S408, Generate answer: The intelligent dialogue system will match the user's question information to the knowledge network and retrieve the corresponding answer from the knowledge network. The knowledge network constructed by the present embodiment is composed of multiple point-to-point triple graphs. In the triple information of the user's question, there are generally two knowns and one unknown. Put the known information into the knowledge network to search for the missing information in the matching triple, which is the answer to the question. First, locate the corresponding node of the knowledge network based on the known entity information, obtain all information related to the node with the node as the center, and return the matched result to the user based on the user's question information.

[0109] Through the embodiments provided in this application, in response to the current financial industry's demand for professional and accurate output of answers from intelligent dialogue systems, the existing technologies are integrated to make comprehensive improvements in the professional knowledge base and dialogue context understanding, and to strengthen the intelligent dialogue system's understanding of financial knowledge and comprehensive analysis capabilities of scene dialogues. Financial knowledge, professional terms, external service data, etc. are analyzed and integrated to form a complete knowledge network, which improves the coverage and professionalism of the intelligent dialogue system's knowledge base, and lays a good foundation for the quality of answers given by the intelligent dialogue system; in terms of dialogue understanding, multiple rounds of dialogues are divided into different scene topics according to the relationship between the question and the previous text, and the LSTM algorithm is used to train the user's current dialogue context content to obtain the reasoning restatement of each topic scene, and the user's current input question is tested for similarity with the previous topic scene, and the high-relevance correlation is analyzed to avoid redundant correlations with low relevance, and the knowledge network is matched to obtain the corresponding answer. Based on the context dialogue, the system's ability to understand user questions is improved, and accurate and effective real-time dialogue effects are achieved.

[0110] Example 2

[0111] The embodiment of the present application also provides a conversation interaction device. It should be noted that the conversation interaction device of the embodiment of the present application can be used to execute the conversation interaction method provided by the embodiment of the present application. The conversation interaction device provided by the embodiment of the present application is introduced below.

[0112] According to an embodiment of the present application, a device for implementing the above-mentioned dialogue interaction method is also provided, such as Figure 6 As shown, the device comprises:

[0113] A first acquisition unit 602 is used to acquire a first conversation and a second conversation, wherein the first conversation is a conversation to be answered, and the second conversation is a previous conversation of the first conversation;

[0114] A second acquisition unit 604 is used to acquire a first feature word vector sequence corresponding to the first dialogue and a second feature word vector sequence corresponding to the second dialogue, wherein the first feature word vector sequence is constructed according to the first restatement method for the first dialogue, and the second feature word vector sequence is constructed according to the second restatement method for the second dialogue;

[0115] A third acquisition unit 606 is used to acquire a correlation coefficient between the first feature word vector sequence and the second feature word vector sequence, wherein the correlation coefficient is used to indicate the degree of correlation between the first conversation and the second conversation;

[0116] A construction unit 608, configured to construct a third feature word vector sequence corresponding to the first dialogue according to a second restatement method when the correlation coefficient is greater than an expected threshold;

[0117] The answering unit 610 is used to input the third characteristic word vector sequence into the knowledge network to obtain the answer sentence of the first dialogue output by the knowledge network.

[0118] As an optional solution, the device also includes:

[0119] The answer module is used to input the first feature word vector sequence into the knowledge network after obtaining the correlation coefficient between the first feature word vector sequence and the second feature word vector sequence, when the correlation coefficient is less than or equal to an expected threshold, to obtain an answer sentence output by the knowledge network.

[0120] As an optional solution, the third obtaining unit 606 includes:

[0121] A first acquisition module, used to acquire N first feature words included in the first feature word vector sequence, and to acquire N second feature words included in the second feature word vector sequence, where N is a positive integer;

[0122] An establishing module, used for establishing N pairs of feature word combinations, wherein the i-th pair of feature word combinations in the N pairs of feature word combinations is composed of the i-th first feature word in the N first feature words and the i-th second feature word in the N second feature words, and i is a positive integer not greater than N;

[0123] The second acquisition module is used to obtain the similarity coefficient of each pair of feature word combinations in the N pairs of feature word combinations, and accumulate and sum to obtain the correlation coefficient, wherein the similarity coefficient is used to indicate the similarity between the first feature word and the second feature word in each pair of feature word combinations.

[0124] As an optional solution, the second acquisition module includes:

[0125] A first acquisition submodule is used to acquire a first entity corresponding to an i-th first feature word in an i-th pair of feature word combinations in the knowledge network, and to acquire a second entity corresponding to an i-th second feature word in an i-th pair of feature word combinations in the knowledge network;

[0126] A first determination submodule is used to determine, when there is a direct connection relationship between the first entity and the second entity, that the similarity coefficient of the i-th pair of feature word combinations is a first value, wherein the first value is greater than 0;

[0127] A second determination submodule is used to determine, when there is an indirect connection relationship between the first entity and the second entity, that the similarity coefficient of the i-th pair of feature word combinations is a second value, wherein the second value is greater than 0 and less than the first value;

[0128] The third determination submodule is used to determine that the similarity coefficient of the i-th pair of feature word combinations is 0 when there is no connection relationship between the first entity and the second entity.

[0129] As an optional solution, the device also includes:

[0130] A third acquisition module is used to acquire a data set for constructing a knowledge network before inputting the third feature word vector sequence into the knowledge network, wherein the data set includes structured data and unstructured data;

[0131] A fourth acquisition module, used for acquiring triple information corresponding to structured data and triple information corresponding to unstructured data before inputting the third feature word vector sequence into the knowledge network;

[0132] The integration module is used to integrate the triple information corresponding to the structured data and the triple information corresponding to the unstructured data before inputting the third feature word vector sequence into the knowledge network to obtain a knowledge network, wherein the knowledge network includes multiple entities, and any two entities among the multiple entities are directly connected, indirectly connected, or not connected.

[0133] As an optional solution, the third acquisition module includes:

[0134] The second acquisition submodule is used to acquire triple information corresponding to the structured data according to the entity relationship structure of the structured data;

[0135] The fourth acquisition module is used to obtain triple information corresponding to the unstructured data, including:

[0136] The third acquisition submodule is used to identify entity information and relationship information of unstructured data and obtain triple information corresponding to the unstructured data.

[0137] It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules can also be run as part of the device in the computer terminal 10 provided in Example 1.

[0138] Example 3

[0139] An embodiment of the present application may provide an electronic device, Figure 7 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 7 As shown, the electronic device may include: one or more ( Figure 7 (only one is shown) processor 702, memory 704, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0140] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0141] The processor may call the information and application program stored in the memory through the transmission device to perform the following steps:

[0142] Obtain a first conversation and a second conversation, wherein the first conversation is a conversation to be answered, and the second conversation is a previous conversation of the first conversation;

[0143] Obtaining a first feature word vector sequence corresponding to the first dialogue and a second feature word vector sequence corresponding to the second dialogue, wherein the first feature word vector sequence is constructed according to the first restatement method for the first dialogue, and the second feature word vector sequence is constructed according to the second restatement method for the second dialogue;

[0144] Obtaining a correlation coefficient between the first feature word vector sequence and the second feature word vector sequence, wherein the correlation coefficient is used to indicate a correlation degree between the first conversation and the second conversation;

[0145] When the correlation coefficient is greater than the expected threshold, construct a third feature word vector sequence corresponding to the first dialogue according to the second restatement method;

[0146] The third feature word vector sequence is input into the knowledge network to obtain the answer sentence of the first dialogue output by the knowledge network.

[0147] It can be understood by those skilled in the art that Figure 7 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 7 The structure of the electronic device is not limited. Figure 7 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 7 Different configurations are shown.

[0148] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0149] Example 4

[0150] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the dialog interaction method provided in the first embodiment.

[0151] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0152] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the program steps of the dialog interaction method.

[0153] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0154] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

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

[0156] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

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

[0158] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.

[0159] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A conversation interaction method, characterized in that: include: Obtain a first conversation and a second conversation, wherein the first conversation is a conversation to be answered, and the second conversation is a previous conversation of the first conversation; Obtaining a first feature word vector sequence corresponding to the first dialogue and a second feature word vector sequence corresponding to the second dialogue, wherein the first feature word vector sequence is constructed according to a first restatement of the first dialogue, and the second feature word vector sequence is constructed according to a second restatement of the second dialogue; Obtaining a correlation coefficient between the first feature word vector sequence and the second feature word vector sequence, wherein the correlation coefficient is used to indicate a correlation degree between the first conversation and the second conversation; When the correlation coefficient is greater than an expected threshold, constructing a third feature word vector sequence corresponding to the first dialogue according to the second restatement method; The third feature word vector sequence is input into a knowledge network to obtain an answer sentence of the first dialogue output by the knowledge network.

2. The method according to claim 1, characterized in that After obtaining the correlation coefficient between the first feature word vector sequence and the second feature word vector sequence, the method further includes: When the correlation coefficient is less than or equal to the expected threshold, the first feature word vector sequence is input into the knowledge network to obtain the answer sentence output by the knowledge network.

3. The method according to claim 1, characterized in that: The obtaining of the correlation coefficient between the first feature word vector sequence and the second feature word vector sequence comprises: Obtaining N first feature words included in the first feature word vector sequence, and obtaining N second feature words included in the second feature word vector sequence, where N is a positive integer; Establishing N pairs of feature word combinations, wherein the i-th pair of feature word combinations in the N pairs of feature word combinations is composed of the i-th first feature word in the N first feature words and the i-th second feature word in the N second feature words, and i is a positive integer not greater than N; The similarity coefficient of each pair of feature word combinations in the N pairs of feature word combinations is obtained, and the correlation coefficient is obtained by cumulative summation, wherein the similarity coefficient is used to indicate the similarity between the first feature word and the second feature word in each pair of feature word combinations.

4. The method according to claim 3, characterized in that The obtaining of the similarity coefficient of each pair of feature word combinations in the N pairs of feature word combinations includes: Obtaining a first entity corresponding to the i-th first feature word in the i-th pair of feature word combinations in the knowledge network, and obtaining a second entity corresponding to the i-th second feature word in the i-th pair of feature word combinations in the knowledge network; In the case where there is a direct connection relationship between the first entity and the second entity, determining the similarity coefficient of the i-th pair of feature word combinations to be a first value, wherein the first value is greater than 0; In the case where there is an indirect connection relationship between the first entity and the second entity, determining the similarity coefficient of the i-th pair of feature word combinations to be a second value, wherein the second value is greater than 0 and less than the first value; In the case that there is no connection relationship between the first entity and the second entity, the similarity coefficient of the i-th pair of feature word combinations is determined to be 0.

5. The method according to claim 1, characterized in that: Before inputting the third feature word vector sequence into the knowledge network, the method further includes: Acquire a data set for constructing the knowledge network, wherein the data set includes structured data and unstructured data; Acquire triple information corresponding to the structured data, and acquire triple information corresponding to the unstructured data; The triple information corresponding to the structured data and the triple information corresponding to the unstructured data are integrated to obtain the knowledge network, wherein the knowledge network includes multiple entities, and any two entities among the multiple entities are directly connected, indirectly connected, or not connected.

6. The method according to claim 5, characterized in that The obtaining of triple information corresponding to the structured data includes: According to the entity relationship structure of the structured data, obtaining triple information corresponding to the structured data; The obtaining of triple information corresponding to the unstructured data includes: Identify the entity information and relationship information of the unstructured data, and obtain triple information corresponding to the unstructured data.

7. A conversational interaction device, characterized in that: include: A first acquisition unit is used to acquire a first conversation and a second conversation, wherein the first conversation is a conversation to be answered, and the second conversation is a previous conversation of the first conversation; A second acquisition unit is used to acquire a first feature word vector sequence corresponding to the first dialogue and a second feature word vector sequence corresponding to the second dialogue, wherein the first feature word vector sequence is constructed according to the first restatement method for the first dialogue, and the second feature word vector sequence is constructed according to the second restatement method for the second dialogue; A third acquisition unit is used to acquire a correlation coefficient between the first feature word vector sequence and the second feature word vector sequence, wherein the correlation coefficient is used to indicate the degree of correlation between the first dialogue and the second dialogue; A construction unit, configured to construct a third feature word vector sequence corresponding to the first dialogue according to the second restatement method when the correlation coefficient is greater than an expected threshold; The answering unit is used to input the third characteristic word vector sequence into the knowledge network to obtain the answer sentence of the first dialogue output by the knowledge network.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.

9. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 6 when running.

10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.