Open dialogue method, apparatus, electronic device, and medium

By extracting dialogue entities from the intelligent customer service system and processing them according to the question type, open-ended dialogues are generated, solving the problem that open-ended dialogues cannot be conducted in existing technologies and achieving more accurate and richer dialogue responses.

CN116501846BActive Publication Date: 2026-06-19PING AN TECH (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2023-04-25
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing dialogue systems are unable to conduct effective open dialogues and communicate normally with users, especially in the medical field where they cannot respond to patients' dialogues outside of templates.

Method used

By acquiring user dialogue data stored in the intelligent customer service system, dialogue entities are extracted, question text is constructed, and different types of questions are processed: for the first type of question, the database is queried to generate a response text; for the second type of question, user information is pushed; for the third type of question, referential resolution is performed, and finally, a dialogue reply is generated.

Benefits of technology

It enables effective open dialogue, improves the accuracy of intelligent dialogue, can handle various types of questions, avoids simple questions consuming a lot of computing resources, and improves the richness and accuracy of dialogue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116501846B_ABST
    Figure CN116501846B_ABST
Patent Text Reader

Abstract

This invention relates to the field of natural language processing and discloses an open-ended dialogue method, comprising: extracting dialogue entities from dialogue data and constructing a question text based on the dialogue entities; determining whether the question text is a first-type question; if the question text is a first-type question, generating a response text based on a database; if the question text is not a first-type question, determining whether the question text is a second-type question; if the question text is a second-type question, obtaining the user information corresponding to the question text from an intelligent customer service system and pushing the user information to staff; if the question text is not a second-type question, obtaining the referential relationship of the question text and performing referential resolution to obtain a resolved question text; generating a dialogue response to the resolved question text based on a preset natural language generation method, and sending the dialogue response to the user after screening. This invention can improve the accuracy of intelligent dialogue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language technology, and in particular to an open-ended dialogue method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] Dialogue systems are frequently used in online social networking and personal assistant applications. However, existing dialogue systems generally only offer task-oriented conversations, such as setting alarms or checking the weather, and are unable to handle more demanding open-ended dialogues. For example, in the medical field, dialogues often rely on templated symptom self-diagnosis tools. The system prompts patients to select their main symptoms and retrieves corresponding consultation templates based on those symptoms. However, these consultations are often closed-ended multiple-choice questions, lacking the ability to engage in normal communication with the patient or respond to questions outside the templates. In other words, current dialogue systems cannot conduct effective open-ended dialogues. Summary of the Invention

[0003] This invention provides an open dialogue method, apparatus, electronic device, and computer-readable storage medium, the main purpose of which is to achieve effective open dialogue and improve the accuracy of intelligent dialogue.

[0004] To achieve the above objectives, the present invention provides an open-ended dialogue method, comprising:

[0005] Obtain user dialogue data stored in the intelligent customer service system, extract dialogue entities from the dialogue data, and construct question text based on the dialogue entities;

[0006] Determine whether the question text is a type I question;

[0007] If the question text is a first type of question, then the database of the intelligent customer service system is queried, and a reply text for the question text is generated based on the database;

[0008] If the question text is not a first type of question, then determine whether the question text is a second type of question;

[0009] If the question text is a second type of question, then the user information corresponding to the question text is obtained from the intelligent customer service system, and the user information is pushed to the staff.

[0010] If the question text is not a second type of question, then the referential relationship of the question text is obtained, and the referential resolution is performed to obtain the resolved question text;

[0011] The dialogue response to the resolved question text is generated based on a preset natural language generation method, and the dialogue response is screened and then sent to the user.

[0012] Optionally, the step of extracting dialogue entities from the dialogue data and constructing question text based on the dialogue entities includes:

[0013] Construct an entity list based on the dialogue data, and construct the question text based on the dialogue entities;

[0014] Obtain the user's identity identifier, and query the intelligent customer service system to see if the user's historical data exists based on the identity identifier;

[0015] If the intelligent customer service system contains the user's historical data, then it queries whether the historical data contains question and answer data corresponding to the dialogue entity. If it does, then it constructs a question text based on the question and answer data.

[0016] If the user's historical data is not available in the intelligent customer service system, then the dialogue entity Q&A corresponding to the dialogue entity is obtained from the intelligent customer service system, and a question text is constructed based on the dialogue entity Q&A.

[0017] Optionally, the step of constructing an entity list based on the dialogue data and constructing question text based on the dialogue entities includes:

[0018] Construct a first entity list based on the entities in the dialogue data;

[0019] Obtain the preceding dialogue data and the corresponding historical topic path of the preceding dialogue data;

[0020] Construct a second entity list based on the above dialogue corpus and the historical topic paths corresponding to the above dialogue corpus;

[0021] Add topic entities that exist in the first entity list but not in the second entity list as new topic entities;

[0022] The newly added topic entity is used as the dialogue entity extracted from the dialogue data.

[0023] Optionally, before extracting dialogue entities from the dialogue data, the method further includes:

[0024] Retrieve conversation records from the intelligent customer service system;

[0025] The dialogue record is transcribed into text to obtain dialogue text, and the dialogue text is then segmented to obtain dialogue segmentation units;

[0026] The dialogue segmentation units are transformed into a dialogue unit matrix using a preset text representation model;

[0027] Based on the dialogue unit matrix, the dialogue intent of the dialogue record is calculated using sequence labeling methods;

[0028] Determine whether the stated dialogue intent is the same as the preset target dialogue intent;

[0029] If the stated dialogue intent is the same as the target dialogue intent, then the dialogue record is digitized to obtain dialogue data;

[0030] If the stated dialogue intent differs from the target dialogue intent, the dialogue record is discarded, and a new dialogue record is retrieved.

[0031] Optionally, generating the response text based on the database includes:

[0032] Retrieve the previous round system response language and the previous round dialogue state representation of the question text from the database;

[0033] The question text is segmented into multiple question segments.

[0034] Based on the question segmentation and the previous round of dialogue state representation, a current dialogue state representation indicating a dialogue domain is obtained;

[0035] Based on the current dialogue state, entities that meet the requirements are queried from the historical information of the database to obtain the response information corresponding to the question text;

[0036] Based on the question text, the current dialogue state, and the response information, a response text covering all domains related to the language of the question text is obtained.

[0037] Optionally, obtaining the referential relationship of the question text and performing referential resolution to obtain the resolved question text includes:

[0038] The historical dialogue text set is obtained from the database, and samples are constructed and multi-labeled based on the data in the historical dialogue text set to obtain the first training sample set;

[0039] The training samples in the first training sample set are replaced with synonyms and pronouns to obtain the second training sample set.

[0040] The pre-built deep learning model is trained using the second training sample set to obtain a classification and labeling model;

[0041] When the question text is received, the question text is analyzed using the classification and recognition model to obtain the analysis results.

[0042] Based on the analysis results, the question text is classified and resolved to obtain the resolved question text.

[0043] Optionally, the step of generating the dialogue response to the resolved question text based on a preset natural language generation method includes:

[0044] The text of the resolved question is encoded by the encoder in the natural language generation method;

[0045] The text encoding is decoded using the decoder in the natural language generation method to obtain a predicted text sequence of the text encoding, and the dialogue response of the resolved question text is obtained through the predicted text sequence.

[0046] To address the above problems, the present invention also provides an open dialogue device, the device comprising:

[0047] The question text construction module is used to obtain the user's dialogue data stored in the intelligent customer service system, extract dialogue entities from the dialogue data, and construct question text based on the dialogue entities.

[0048] The first type of question filtering module is used to determine whether the question text is a first type of question. If the question text is a first type of question, the database of the intelligent customer service system is queried, and a reply text for the question text is generated based on the database. If the question text is not a first type of question, the second type of question is determined.

[0049] The second type of question filtering module is used to obtain the user information corresponding to the question text from the intelligent customer service system if the question text is a second type of question, and push the user information to the staff; if the question text is not a second type of question, it obtains the referential relationship of the question text and performs referential resolution to obtain the resolved question text.

[0050] The dialogue response generation module is used to generate a dialogue response to the resolved question text based on a preset natural language generation method, and to send the dialogue response to the user after screening.

[0051] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:

[0052] At least one processor; and,

[0053] A memory communicatively connected to the at least one processor; wherein,

[0054] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the open dialogue method as described above.

[0055] To address the aforementioned problems, the present invention also provides a computer-readable storage medium, including a data storage area and a program storage area, wherein the data storage area stores created data and the program storage area stores a computer program; wherein the computer program, when executed by a processor, implements the open dialogue method described above.

[0056] In this embodiment of the invention, user dialogue data stored in the intelligent customer service system is first acquired, and dialogue entities are extracted from the dialogue data to construct question text. Then, the question text is classified and judged. When the question text belongs to the first category of questions, a response text is generated based on the data from the intelligent customer service system. When the question text belongs to the second category of questions, the user information corresponding to the question text is obtained from the intelligent customer service system and pushed to staff. When the question text belongs to neither the first nor the second category of questions, the referential relationship of the question text is obtained and the referential resolution is performed to obtain the resolved question text. Finally, a dialogue response to the resolved question text is generated according to a preset natural language generation method, and the dialogue response is screened and sent to the user. Therefore, this embodiment of the invention processes different dialogue contents in the user's dialogue data in the intelligent customer service system differently, rather than using a uniform template to generate dialogue response text, in order to achieve effective open dialogue and improve the accuracy of intelligent dialogue. Attached Figure Description

[0057] Figure 1 This is a flowchart illustrating an open-ended dialogue method according to an embodiment of the present invention.

[0058] Figure 2 This is a detailed flowchart illustrating one step in an open-ended dialogue method according to an embodiment of the present invention.

[0059] Figure 3 This is a detailed flowchart illustrating one step in an open-ended dialogue method according to an embodiment of the present invention.

[0060] Figure 4 This is a schematic diagram of an open dialogue device provided in an embodiment of the present invention;

[0061] Figure 5 A schematic diagram of the internal structure of an electronic device implementing an open dialogue method according to an embodiment of the present invention;

[0062] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0063] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0064] This application provides an open dialogue method. The executing entity of the open dialogue method includes, but is not limited to, at least one of the following: a server, a terminal, or an electronic device configured to execute the method provided in this application. The server can be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and natural language platforms. In other words, the open dialogue method can be executed by software or hardware installed on a terminal device or a server device; the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.

[0065] Reference Figure 1 The diagram shown is a flowchart illustrating an open-ended dialogue method according to an embodiment of the present invention. In this embodiment, the open-ended dialogue method includes:

[0066] S1. Obtain user dialogue data stored in the intelligent customer service system, extract dialogue entities from the dialogue data, and construct question text based on the dialogue entities.

[0067] In this embodiment of the invention, the intelligent customer service system is an industry-oriented system developed on the basis of large-scale knowledge processing. It is applicable to industries with technologies such as large-scale knowledge processing, natural language understanding, knowledge management, and automatic question answering systems. It can establish a fast and effective technical means for communication between users and staff based on natural language.

[0068] Furthermore, the dialogue entity refers to relevant information fragments extracted from language in dialogue language understanding, which can generally be understood as nouns present in a sentence of dialogue. Specifically, the dialogue entity is an entity that is helpful in constructing the question text, and can be obtained by comparing the dialogue step by step.

[0069] In this embodiment of the invention, the step of extracting dialogue entities from the dialogue data and constructing question text based on the dialogue entities includes:

[0070] Construct an entity list based on the dialogue data, and construct the question text based on the dialogue entities;

[0071] Obtain the user's identity identifier, and query the intelligent customer service system to see if the user's historical data exists based on the identity identifier;

[0072] If the intelligent customer service system contains the user's historical data, then it queries whether the historical data contains question and answer data corresponding to the dialogue entity. If it does, then it constructs a question text based on the question and answer data.

[0073] If the user's historical data is not available in the intelligent customer service system, then the dialogue entity Q&A corresponding to the dialogue entity is obtained from the intelligent customer service system, and a question text is constructed based on the dialogue entity Q&A.

[0074] In this embodiment of the invention, the entity list is a list of dialogue entities, and the identity identifier is an identifier that determines the user's identity, which may be a user ID, number, serial number, etc.

[0075] refer to Figure 2 As shown, further, the step of constructing an entity list based on the dialogue data and obtaining the dialogue entity based on the entity list includes:

[0076] S10. Construct a first entity list based on the entities in the dialogue data;

[0077] S11. Obtain the preceding dialogue data of the dialogue data and the historical topic path corresponding to the preceding dialogue data;

[0078] S12. Construct a second entity list based on the above dialogue data and the historical topic paths corresponding to the above dialogue data;

[0079] S13. Add topic entities that exist in the first entity list but not in the second entity list as new topic entities;

[0080] S14. The newly added topic entity is used as the dialogue entity extracted from the dialogue data.

[0081] In this embodiment of the invention, if there is no topic entity in the first entity list and not in the second entity list, then the topic entity in the second entity list is directly used as the newly added topic entity.

[0082] Furthermore, all topic entities along the historical topic path are stored in a second entity list. If only one topic entity in the first entity list fails to match a topic entity in the second entity list, that unmatched topic entity is treated as a new topic entity and directly identified as the dialogue entity corresponding to the dialogue data. For example, if the dialogue data is "The weather is bad today, I need to bring an umbrella," and the corresponding historical topic path obtained from the above dialogue corpus is from "weather" to "rain," then the new topic entity is "bring an umbrella."

[0083] In this embodiment of the invention, before extracting dialogue entities from the dialogue data, the method further includes:

[0084] Retrieve conversation records from the intelligent customer service system;

[0085] The dialogue record is transcribed into text to obtain dialogue text, and the dialogue text is then segmented to obtain dialogue segmentation units;

[0086] The dialogue segmentation units are transformed into a dialogue unit matrix using a preset text representation model;

[0087] Based on the dialogue unit matrix, the dialogue intent of the dialogue record is calculated using sequence labeling methods;

[0088] Determine whether the stated dialogue intent is the same as the preset target dialogue intent;

[0089] If the stated dialogue intent is the same as the target dialogue intent, then the dialogue record is digitized to obtain dialogue data;

[0090] If the stated dialogue intent differs from the target dialogue intent, the dialogue record is discarded, and a new dialogue record is retrieved.

[0091] In this embodiment of the invention, by identifying the dialogue intent of the dialogue data and removing dialogues that do not belong to the target intent, the workload is reduced and chatty dialogue data is avoided from being included in the data processing.

[0092] S2. Determine whether the question text is a type 1 question.

[0093] In this embodiment of the invention, the first type of question is a general question. For example, in the medical field, the dialogue entities for general questions are "cold", "runny nose", "abrasion", etc.

[0094] In this embodiment of the invention, determining whether the question text is a first type of question includes:

[0095] Obtain the dialogue entities from the question text and query the text entities in the preset data repository;

[0096] Determine whether the text entity and the dialogue entity are the same.

[0097] If the dialogue entity and the text entity are the same, then the question text is a first type of question;

[0098] If the dialogue entity and the text entity are different, then the question text is not a first type of question.

[0099] In this embodiment of the invention, by filtering out general questions, the content of the questions can be distinguished, avoiding the consumption of a large amount of computing resources by simple questions that can be answered by existing databases.

[0100] S3. If the question text is a first type of question, then query the database of the intelligent customer service system and generate a reply text based on the database.

[0101] In this embodiment of the invention, the database of the intelligent customer service system stores answers to frequently occurring, simple questions. For example, in the medical field, such as "I have a cold, what should I do?" or "I have a runny nose, what should I do?"

[0102] refer to Figure 3 As shown in this embodiment of the invention, generating the response text based on the database for the question text includes:

[0103] S30. Obtain the previous round system response language and the previous round dialogue state representation of the question text from the database;

[0104] S31. Perform word segmentation on the question text to obtain multiple question segments;

[0105] S32. Based on the question segmentation and the previous round dialogue state representation, obtain the current dialogue state representation indicating a dialogue domain;

[0106] S33. Based on the current dialogue state representation, query the historical information of the database to obtain the corresponding response information representation of the question text;

[0107] S34. Based on the question text, the current dialogue state, and the response information, obtain a response text that covers all fields related to the language of the question text.

[0108] In this embodiment of the invention, the dialogue state represents information used to determine the state of the dialogue, and the reply information represents text information used to determine the reply text.

[0109] S4. If the question text is not a first type of question, then determine whether the question text is a second type of question.

[0110] In this embodiment of the invention, the question text can be further filtered by determining whether it is a second type of question.

[0111] S5. If the question text is a second type of question, then obtain the user information corresponding to the question text from the intelligent customer service system and push the user information to the staff.

[0112] In this embodiment of the invention, the second type of question is an emergency question or a special question. For example, in the medical field, when the question text contains entities such as "coma" or "shock", the question text can be regarded as the second type of question.

[0113] In this embodiment of the invention, the staff member changes the field in which the question text is located. For example, when the question text is in the medical field, the staff member can be a medical worker; when the question text is in the computer field, the staff member can be an equipment maintenance worker or a software maintenance worker.

[0114] S6. If the question text is not a second type of question, then obtain the referential relationship of the question text and perform referential resolution to obtain the resolved question text.

[0115] In this embodiment of the invention, the reference resolution is the process of dividing different references representing the same entity into an equivalent set. In linguistics and everyday language, abbreviations or pronouns are generally used in context to replace a word that has already appeared in the preceding text. In linguistics, this is called reference. Reference can avoid the problem of bloated and redundant sentences caused by the repetition of the same word, but it can also easily cause the problem of unclear reference due to this omission. Therefore, reference resolution is needed to facilitate the computer system's understanding of dialogue data.

[0116] In this embodiment of the invention, obtaining the referential relationship of the question text and performing referential resolution to obtain the resolved question text includes:

[0117] The historical dialogue text set is obtained from the database, and samples are constructed and multi-labeled based on the data in the historical dialogue text set to obtain the first training sample set;

[0118] The training samples in the first training sample set are replaced with synonyms and pronouns to obtain the second training sample set.

[0119] The pre-built deep learning model is trained using the second training sample set to obtain a classification and labeling model;

[0120] When the question text is received, the question text is analyzed using the classification and recognition model to obtain the analysis results.

[0121] Based on the analysis results, the question text is classified and resolved to obtain the resolved question text.

[0122] In this embodiment of the invention, the historical dialogue text set contains a collection of multiple historical dialogue data, and training samples are constructed for each historical dialogue data in the historical dialogue text set.

[0123] S7. Generate a dialogue response to the resolved question text based on a preset natural language generation method, and send the dialogue response to the user after screening.

[0124] In this embodiment of the invention, the Natural-language generation (NLG) method is a branch of natural language and computational linguistics. The corresponding language generation system is a computer model based on language information processing. Its working process is the opposite of that of natural language analysis. It starts from the level of abstract concepts and generates text by selecting and executing certain semantic and grammatical rules through encoding and decoding.

[0125] In this embodiment of the invention, generating the dialogue response to the resolved question text based on a preset natural language generation method includes:

[0126] The text of the resolved question is encoded by the encoder in the natural language generation method;

[0127] The text encoding is decoded using the decoder in the natural language generation method to obtain a predicted text sequence of the text encoding, and the dialogue response of the resolved question text is obtained through the predicted text sequence.

[0128] In this embodiment of the invention, the encoder and decoder are respectively devices for encoding and decoding the resolved question text in a natural language generation method. The predicted text sequence is the word-sorted text obtained after decoding by the decoder.

[0129] In detail, generating dialogue responses to the resolved question text using natural language generation methods in natural language processing can produce richer dialogue responses compared to responses using fixed database templates, thus avoiding a mismatch between the generated dialogue responses and the resolved question text.

[0130] In this embodiment of the invention, user dialogue data stored in the intelligent customer service system is first acquired, and dialogue entities are extracted from the dialogue data to construct question text. Then, the question text is classified and judged. When the question text belongs to the first category of questions, a response text is generated based on the data from the intelligent customer service system. When the question text belongs to the second category of questions, the user information corresponding to the question text is obtained from the intelligent customer service system and pushed to staff. When the question text belongs to neither the first nor the second category of questions, the referential relationship of the question text is obtained and the referential resolution is performed to obtain the resolved question text. Finally, a dialogue response to the resolved question text is generated according to a preset natural language generation method, and the dialogue response is screened and sent to the user. Therefore, this embodiment of the invention processes different dialogue contents in the user's dialogue data in the intelligent customer service system differently, rather than using a uniform template to generate dialogue response text, in order to achieve effective open dialogue and improve the accuracy of intelligent dialogue.

[0131] like Figure 4 The diagram shown is a schematic diagram of the open dialogue device of the present invention.

[0132] The open dialogue device 100 of this invention can be installed in an electronic device. Depending on the functions implemented, the open dialogue device may include a question text construction module 101, a first type of question filtering module 102, a second type of question filtering module 103, and a dialogue response generation module 104. The module described in this invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and which are stored in the memory of the electronic device.

[0133] In this embodiment, the functions of each module / unit are as follows:

[0134] The question text construction module 101 is used to obtain the user's dialogue data stored in the intelligent customer service system, extract dialogue entities from the dialogue data, and construct question text based on the dialogue entities.

[0135] The first type of question filtering module 102 is used to determine whether the question text is a first type of question. If the question text is a first type of question, the database of the intelligent customer service system is queried, and a reply text for the question text is generated based on the database. If the question text is not a first type of question, the question text is determined to be a second type of question.

[0136] The second type of question filtering module 103 is used to obtain the user information corresponding to the question text from the intelligent customer service system if the question text is a second type of question, and push the user information to the staff; if the question text is not a second type of question, obtain the referential relationship of the question text, and perform referential resolution to obtain the resolved question text.

[0137] The dialogue response generation module 104 is used to generate a dialogue response to the resolved question text based on a preset natural language generation method, and to send the dialogue response to the user after screening.

[0138] In detail, the modules in the open dialogue device 100 described in this embodiment of the invention employ the same methods as described above during use. Figures 1 to 3 The techniques used are the same as those described in the open dialogue method, and can produce the same technical effects, so they will not be elaborated here.

[0139] like Figure 5 The diagram shown is a structural schematic of an electronic device that implements the open dialogue method of the present invention.

[0140] The electronic device may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program, such as an open dialog program, stored in the memory 11 and capable of running on the processor 10.

[0141] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing open-ended dialog programs) and calls data stored in the memory 11 to perform various functions of the electronic device and process data.

[0142] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as the code of open dialog programs, but also to temporarily store data that has been output or will be output.

[0143] The communication bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.

[0144] The communication interface 13 is used for communication between the aforementioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.

[0145] Figure 5 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 5The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0146] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0147] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0148] The open-ended dialog program stored in the memory 11 of the electronic device is a combination of multiple computer programs, which, when run in the processor 10, can achieve the following:

[0149] Obtain user dialogue data stored in the intelligent customer service system, extract dialogue entities from the dialogue data, and construct question text based on the dialogue entities;

[0150] Determine whether the question text is a type I question;

[0151] If the question text is a first type of question, then the database of the intelligent customer service system is queried, and a reply text for the question text is generated based on the database;

[0152] If the question text is not a first type of question, then determine whether the question text is a second type of question;

[0153] If the question text is a second type of question, then the user information corresponding to the question text is obtained from the intelligent customer service system, and the user information is pushed to the staff.

[0154] If the question text is not a second type of question, then the referential relationship of the question text is obtained, and the referential resolution is performed to obtain the resolved question text;

[0155] The dialogue response to the resolved question text is generated based on a preset natural language generation method, and the dialogue response is screened and then sent to the user.

[0156] Specifically, the processor 10's implementation method of the above-mentioned computer program can be found in [reference needed]. Figure 1The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0157] Furthermore, if the modules / units integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0158] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0159] Obtain user dialogue data stored in the intelligent customer service system, extract dialogue entities from the dialogue data, and construct question text based on the dialogue entities;

[0160] Determine whether the question text is a type I question;

[0161] If the question text is a first type of question, then the database of the intelligent customer service system is queried, and a reply text for the question text is generated based on the database;

[0162] If the question text is not a first type of question, then determine whether the question text is a second type of question;

[0163] If the question text is a second type of question, then the user information corresponding to the question text is obtained from the intelligent customer service system, and the user information is pushed to the staff.

[0164] If the question text is not a second type of question, then the referential relationship of the question text is obtained, and the referential resolution is performed to obtain the resolved question text;

[0165] The dialogue response to the resolved question text is generated based on a preset natural language generation method, and the dialogue response is screened and then sent to the user.

[0166] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

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

[0168] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0169] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0170] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0171] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0172] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The term "second class" is used to indicate names and does not indicate any specific order.

[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. An open-ended dialogue method, characterized in that, The method includes: Obtain user dialogue data stored in the intelligent customer service system, extract dialogue entities from the dialogue data, and construct question text based on the dialogue entities; Determine whether the question text is a type I question; If the question text is a first type of question, then the database of the intelligent customer service system is queried, and a reply text for the question text is generated based on the database; If the question text is not a first type of question, then determine whether the question text is a second type of question; If the question text is a second type of question, then the user information corresponding to the question text is obtained from the intelligent customer service system, and the user information is pushed to the staff. If the question text is not a second type of question, then the referential relationship of the question text is obtained and the referential resolution is performed to obtain the resolved question text. Then, the context association analysis of the question text is performed through a preset classification and recognition model to obtain the analysis result. Based on the analysis result, the question text is classified and the referential resolution is performed to obtain the resolved question text. A dialogue response to the resolved question text is generated based on a preset natural language generation method. The resolved question text is then encoded and decoded using the preset natural language generation method to obtain a predicted text sequence of the encoded text. The dialogue response to the resolved question text is obtained based on the predicted text sequence, and the dialogue response is screened and then sent to the user.

2. The open-ended dialogue method as described in claim 1, characterized in that, The step of extracting dialogue entities from the dialogue data and constructing question text based on the dialogue entities includes: Construct an entity list based on the dialogue data, and construct the question text based on the dialogue entities; Obtain the user's identity identifier, and query the intelligent customer service system to see if the user's historical data exists based on the identity identifier; If the intelligent customer service system contains the user's historical data, then it queries whether the historical data contains question and answer data corresponding to the dialogue entity. If it does, then it constructs a question text based on the question and answer data. If the user's historical data is not available in the intelligent customer service system, then the dialogue entity Q&A corresponding to the dialogue entity is obtained from the intelligent customer service system, and a question text is constructed based on the dialogue entity Q&A.

3. The open-ended dialogue method as described in claim 2, characterized in that, The step of constructing an entity list based on the dialogue data and constructing a question text based on the dialogue entities includes: Construct a first entity list based on the entities in the dialogue data; Obtain the preceding dialogue data and the corresponding historical topic path of the preceding dialogue data; Construct a second entity list based on the above dialogue corpus and the historical topic paths corresponding to the above dialogue corpus; Add topic entities that exist in the first entity list but not in the second entity list as new topic entities; The newly added topic entity is used as the dialogue entity extracted from the dialogue data.

4. The open-ended dialogue method as described in claim 1, characterized in that, Before extracting dialogue entities from the dialogue data, the method further includes: Retrieve conversation records from the intelligent customer service system; The dialogue record is transcribed into text to obtain dialogue text, and the dialogue text is then segmented to obtain dialogue segmentation units; The dialogue segmentation units are transformed into a dialogue unit matrix using a preset text representation model; Based on the dialogue unit matrix, the dialogue intent of the dialogue record is calculated using sequence labeling methods; Determine whether the stated dialogue intent is the same as the preset target dialogue intent; If the stated dialogue intent is the same as the target dialogue intent, then the dialogue record is digitized to obtain dialogue data; If the stated dialogue intent differs from the target dialogue intent, the dialogue record is discarded, and a new dialogue record is retrieved.

5. The open-ended dialogue method as described in claim 1, characterized in that, The process of generating the response text based on the database includes: Retrieve the previous round system response language and the previous round dialogue state representation of the question text from the database; The question text is segmented into multiple question segments. Based on the question segmentation and the previous round of dialogue state representation, a current dialogue state representation indicating a dialogue domain is obtained; Based on the current dialogue state, entities that meet the requirements are queried from the historical information of the database to obtain the response information corresponding to the question text; Based on the question text, the current dialogue state, and the response information, a response text covering all domains related to the language of the question text is obtained.

6. The open-ended dialogue method as described in claim 1, characterized in that, The step of obtaining the referential relationships of the question text and performing referential resolution to obtain the resolved question text includes: training a preset classification and recognition model according to the following methods: The historical dialogue text set is obtained from the database, and samples are constructed and multi-labeled based on the data in the historical dialogue text set to obtain the first training sample set; The training samples in the first training sample set are replaced with synonyms and pronouns to obtain the second training sample set. The pre-built deep learning model is trained using the second training sample set to obtain a classification and labeling model; When the question text is received, the question text is analyzed using the classification and recognition model to obtain the analysis results. Based on the analysis results, the question text is classified and resolved to obtain the resolved question text.

7. The open-ended dialogue method as described in claim 1, characterized in that, The dialogue response generated based on the preset natural language generation method utilizes the preset natural language generation method to encode and decode the resolved question text to obtain the predicted text sequence of the text encoding, including: The text of the resolved question is encoded by the encoder in the natural language generation method; The text encoding is decoded using the decoder in the natural language generation method to obtain a predicted text sequence of the text encoding, and the dialogue response of the resolved question text is obtained through the predicted text sequence.

8. An open-ended dialogue device, characterized in that, The device includes: The question text construction module is used to obtain the user's dialogue data stored in the intelligent customer service system, extract dialogue entities from the dialogue data, and construct question text based on the dialogue entities. The first type of question filtering module is used to determine whether the question text is a first type of question. If the question text is a first type of question, the database of the intelligent customer service system is queried, and a reply text for the question text is generated based on the database. If the question text is not a first type of question, the second type of question is determined. The second type of question filtering module is used to obtain the user information corresponding to the question text from the intelligent customer service system if the question text is a second type of question, and push the user information to the staff. The second type of question filtering module is further used to: if the question text is not a second type of question, obtain the referential relationship of the question text and perform referential resolution to obtain the resolved question text; then, perform context association analysis on the question text through a preset classification and recognition model to obtain the analysis result; and perform referential resolution on the question text according to the analysis result to obtain the resolved question text. The dialogue response generation module is used to generate a dialogue response to the resolved question text based on a preset natural language generation method, to encode and decode the resolved question text using the preset natural language generation method to obtain a predicted text sequence of the text encoding, to obtain a dialogue response to the resolved question text based on the predicted text sequence, and to send the dialogue response to the user after screening.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the open dialogue method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, comprising a data storage area and a program storage area, wherein the data storage area stores created data and the program storage area stores a computer program; wherein, When the computer program is executed by a processor, it implements the open dialogue method as described in any one of claims 1 to 7.