A multi-turn dialogue generation method, terminal, and computer-readable storage medium
The target object session is preprocessed and semantic enhanced matching through configuration files to generate a reply language, which solves the problem that existing deep learning models cannot quickly adapt to the needs of new application scenarios, and achieves the effect of quickly generating information to reply to the target object session.
Patent Information
- Application Number
- CN202111260420.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-27
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-10-27
AI Technical Summary
Existing deep learning models cannot quickly adapt to the needs of new application scenarios, resulting in high costs for large-scale corpus data collection, cleaning and labeling in vertical fields, long model training and tuning cycles, and cannot fully meet the strong needs of industrial applications.
The target object session is preprocessed and semantic enhanced matching through configuration files, generating replies languages, and multiple rounds of dialogue generation methods are implemented, avoiding the direct intervention of deep learning models.
Without deep learning models intervention, most semantic classification, context classification and dialogue text generation requirements can be quickly covered, solving the problem that deep learning models need to be trained and adapted.
Smart Images

Figure CN113962213B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and particularly to a multi-turn dialogue generation method, a terminal, and a computer-readable storage medium. Background Art
[0002] Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies the theories and methods of effective communication between humans and computers using natural language. It is a science that integrates linguistics, computer science, mathematics, etc., aiming to extract information from text data. The purpose is to enable computers to process or "understand" natural language to perform tasks such as automatic translation, text classification, and sentiment analysis.
[0003] Currently, natural language processing technology can train models for semantic classification, context classification, and dialogue text generation based on large-scale corpus data, and there are also open-source Chinese pre-trained models that can perform incremental training to complete the above tasks. However, in the implementation scenarios of the combination of natural language processing technology and new and old industries, there are problems in collecting, cleaning, and annotating large-scale corpus data in vertical fields, resulting in high costs. Moreover, the model training and optimization cycle is long, and the performance problems of large models have a greater impact on industrial production. The inherent black-box effect causes the model to not fully meet the strong requirements in industrial applications. Therefore, in actual production, engineering means with higher confidence are needed for supplementation.
[0004] Therefore, the existing technology still needs to be improved. Summary of the Invention
[0005] The technical problem to be solved by the present invention is that, aiming at the defects of the existing technology, the present invention provides a multi-turn dialogue generation method, a terminal, and a computer-readable storage medium to solve the technical problem that the existing deep learning model cannot quickly adapt to the requirements of new application scenarios.
[0006] The technical solutions adopted by the present invention to solve the technical problems are as follows:
[0007] In a first aspect, the present invention provides a multi-turn dialogue generation method, and the multi-turn dialogue generation method includes the following steps:
[0008] Obtain a target object conversation, and preprocess the target object conversation according to a configuration file to obtain preprocessed conversation information;
[0009] Perform semantic enhanced matching on the preprocessed conversation information according to the configuration file to obtain enhanced conversation information;
[0010] Generate a response language based on the configuration file and the enhanced session information, and feedback the conversation result to the client.
[0011] In one implementation, the configuration file includes: a general configuration file and project configuration files;
[0012] Before obtaining the target object session, it includes:
[0013] Read the general configuration file and project configuration files, and perform initialization processing according to the general configuration file and project configuration files.
[0014] In one implementation, before obtaining the target object session, it also includes:
[0015] Monitor the status of the general configuration file and project configuration files, and reload the configuration files with changed status according to the monitored status.
[0016] In one implementation, obtaining the target object session and preprocessing the target object session according to the configuration file to obtain preprocessed session information includes:
[0017] Obtain the target object session;
[0018] Select a stop word list, a dirty word list, a normalization table, and a preprocessing table as preprocessing files, and preprocess the target object session to obtain the preprocessed session information.
[0019] In one implementation, semantically enhancing and matching the preprocessed session information according to the configuration file to obtain enhanced session information includes:
[0020] Select a whitelist semantic configuration file as the matching file;
[0021] Semantically enhance and match the preprocessed session information according to the whitelist semantic configuration file and regular matching rules;
[0022] If the match is successful, obtain the semantic and slot information of the preprocessed session information;
[0023] Generate the enhanced session information according to the semantic and the slot information.
[0024] In one implementation, after semantically enhancing and matching the preprocessed session information according to the whitelist semantic configuration file and regular matching rules, it also includes:
[0025] If the match fails, obtain a deep learning model;
[0026] The pre - processed session information is parsed and semantically enhanced by the deep learning model to obtain the enhanced session information.
[0027] In one implementation, the generating a reply language according to the configuration file and the enhanced session information and feeding back the conversation result to the client includes:
[0028] Starting a post - processing module according to the semantics and the slot information;
[0029] Accessing the IOT cloud control interface through the post - processing module, and sending a control instruction to the IOT device corresponding to the semantics through the IOT cloud control interface;
[0030] Generating a corresponding reply language according to the control result fed back by the IOT device, and feeding back the conversation result to the client.
[0031] In one implementation, the generating a corresponding reply language according to the control result fed back by the IOT device includes:
[0032] If the IOT device feeds back a control failure result, generating a corresponding reply language according to the error information;
[0033] If the IOT device feeds back a control success result, selecting a pre - set reply language, or generating a corresponding reply language according to the retrieved configuration and the slot information.
[0034] In a second aspect, the present invention provides a terminal, including: a processor and a memory, where the memory stores a multi - turn conversation generation program, and when the multi - turn conversation generation program is executed by the processor, it is used to implement the multi - turn conversation generation method as described in the first aspect.
[0035] In a third aspect, the present invention provides a computer - readable storage medium, where the computer - readable storage medium stores a multi - turn conversation generation program, and when the multi - turn conversation generation program is executed by a processor, it is used to implement the multi - turn conversation generation method as described in the first aspect.
[0036] The present invention has the following effects when adopting the above - mentioned technical solutions:
[0037] The present invention pre - processes and semantically enhances the target object session through an existing configuration file, so that the required reply information can be automatically generated according to the target object session. Without the intervention of a deep learning model, most semantic classification, context classification, and dialogue text generation requirements can be quickly covered, so that in a new usage scenario, the target object session can be replied with quickly generated information, solving the problems of training and adaptation required by the deep learning model. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.
[0039] Figure 1 It is a flowchart of a multi-round dialogue generation method in an implementation manner of the present invention.
[0040] Figure 2 It is a functional schematic diagram of a terminal in an implementation manner of the present invention.
[0041] The realization of the purpose of the present invention, functional features and advantages will be further described in conjunction with the embodiments with reference to the accompanying drawings. Specific Embodiments
[0042] To make the purpose, technical solutions and advantages of the present invention clearer and more definite, the following further details the present invention by way of examples with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0043] Exemplary Method
[0044] As Figure 1 shown, the embodiments of the present invention provide a multi-round dialogue generation method, and the multi-round dialogue generation method includes the following steps:
[0045] Step S100, obtain a target object session, and preprocess the target object session according to a configuration file to obtain preprocessed session information.
[0046] In this embodiment, the multi-round dialogue generation method is applied to a terminal, and the terminal includes but is not limited to: mobile terminals such as smart TVs, mobile phones, and tablet computers; in this embodiment, the smart TV is taken as an example to detail the multi-round dialogue generation method.
[0047] In this embodiment, the multi-round dialogue generation method is a method for the smart TV to automatically generate a reply language according to a scenario session. This method is based on regular matching and caching technology, combines the user's speech of the current round with the historical dialogue results, and can quickly cover most semantic classification, context classification, and dialogue text generation requirements without the intervention of a deep learning model; moreover, all configurations and post-processing methods are introduced in the form of a project configuration file, which is convenient for the portable cold start and hot update of multiple projects.
[0048] In this embodiment, during the process of generating the response language, multiple configuration files are required, including: a general configuration file and various project configuration files; the general configuration file is a file containing the general configuration information and configuration parameters of the project, and the project configuration files are files such as the stop word list, dirty word list, normalization table, pre-processing table, white list semantic configuration table, semantic rule configuration table, post-processing table, and response language configuration table under this project; it is worth mentioning that the general configuration file and various project configuration files in this embodiment can both be the configuration files in the existing project files of the smart TV.
[0049] When starting the service in this embodiment, it is necessary to initialize the configuration of the smart TV so that when obtaining the target object session, a response can be quickly made according to the current usage scenario; among them, the target object session is the session input by the user; specifically, during initialization, the general configuration file and various project configuration files can be read, and initialization processing can be performed according to the general configuration file and various project configuration files; during the initialization process, some configurations in the project (such as: response language configuration, semantic rules, etc.) are mainly restored to the default configuration, for example: the configuration files in the "Hephaestus" project.
[0050] After the initialization process, the smart TV will monitor the status of the general configuration file and various project configuration files, and reload the changed configuration files according to the monitored status; taking the project with the project name "Hephaestus" as an example, the configuration files that need to be monitored and updated include: the QA table, stop word list, white list semantic configuration table, entity configuration table, normalization table, semantic rule configuration table, response language configuration table, pre-processing table, and post-processing table, etc.
[0051] Among the above-mentioned monitored configuration files, the QA table is the basic question-and-answer configuration table. For example, when the user asks "Are you there?", the smart TV replies "Hello, what can I do for you?"; the stop word list is the word list that needs to be streamlined and deleted in the user's session. For example, words such as "of", "my home", "a bit / some", Chinese and English punctuation marks, etc.; the white list semantic configuration table is the default configuration table for the user's session. For example, when the user's session is "I'm back", the default configuration is "iot-back_home, the home mode of the IOT device"; the entity configuration table is the configuration method table of the IOT device. For example, "Brand" (the brand name of the IOT device), "location" (the configuration area of the IOT device, such as living room, bedroom, bathroom, balcony, etc.), "device" (the type of IOT device, such as lamp, air conditioner, fan, chandelier, light strip, etc.).
[0052] In the above-mentioned monitored configuration file, the normalization table is a classification table of words in the user session. For example, "washroom" is classified as "toilet"; the semantic rule configuration table is a semantic acquisition rule table in the user session, which includes: semantics, necessary slots, and multi-round rules. For example, the semantics of "turn on the certain device at the certain location" is iot, start_device, the necessary slots in the user session are "location, device", and the multi-round rules in the user session are "turn on the certain device, turn on the device at the certain location".
[0053] In the above-mentioned monitored configuration file, the reply language configuration table is the default reply language configuration table. For example, the reply language for (iot, start_device) is "Okay, I have turned on the <device> at <certain location> for you", and the follow-up questions for word slots (reply language) are: device - May I ask which device you want to control? location - May I ask which area's device you are referring to? The pre-processing table is an operation table configured according to the user binding information. For example, for a session with a user ID, access the IOT cloud query interface to query the information of all IOT devices bound by this user; the post-processing table is an operation table configured after parsing the user session. For example, for a session with parsed IOT semantics, according to the semantic result, send corresponding control instructions through the IOT cloud control interface, and set the reply language according to the control situation.
[0054] That is, in an implementation manner of this embodiment, before step S100, the following steps are included:
[0055] Step S001, read the general configuration file and each project configuration file, and perform initialization processing according to the general configuration file and each project configuration file;
[0056] Step S002, monitor the status of the general configuration file and each project configuration file, and reload the configuration file after the status change according to the monitored status.
[0057] In this embodiment, after monitoring and updating all configuration files, the session information input by the user can be obtained through the far-field voice module or the remote control voice module, and then the obtained user session is pre-processed according to the configuration file in the project; wherein, the pre-processing refers to performing a simplification process on the obtained user session to obtain simplified session information containing the user's semantics, so as to facilitate semantic matching for the processed session information.
[0058] Specifically, after obtaining the user session, the obtained session information is in voice form. At this time, by performing recognition and voice conversion processing on the user session, the session information in voice form is converted into session information in text form, so as to facilitate the simplification process according to the session information in text form.
[0059] Further, after obtaining the session information in text form, a stop word list, a dirty word list, a normalization list, and a preprocessing list in the project file can be selected as preprocessing files to preprocess the user session to obtain the preprocessed session information.
[0060] Further, in the process of preprocessing, first remove the stop words in the user session through the stop word list, then remove the sensitive words in the user session through the dirty word list, and finally classify the words in the user session through the normalization list, so as to obtain the preprocessed session information.
[0061] That is, in an implementation manner of this embodiment, step S100 specifically includes the following steps:
[0062] Step S110, obtain the target object session;
[0063] Step S120, select a stop word list, a dirty word list, a normalization list, and a preprocessing list as preprocessing files to preprocess the target object session to obtain the preprocessed session information.
[0064] In this embodiment, by preprocessing the user session, the refined session information can be obtained, and the simplified session information contains the user semantics and normalized words. The refined session information can perform semantic matching on the session information in the subsequent processing process, so as to accurately obtain the semantic information in the user session.
[0065] Such as Figure 1 shown, in an implementation manner of the embodiment of the present invention, the multi-round dialogue generation method further includes the following steps:
[0066] Step S200, perform semantic enhanced matching on the preprocessed session information according to the configuration file to obtain the enhanced session information.
[0067] In this embodiment, after preprocessing the user session, a white list semantic configuration file can be selected as the matching file, and then according to the white list semantic configuration file and the regular matching rule, perform semantic enhanced matching on the preprocessed session information, so as to enhance the semantics in the user session according to the matching result.
[0068] In a usage scenario, the user session is "Help me turn on the light in the bathroom on the first floor of my house", the project name is "Hephaestus", and the user ID is 663506; after preprocessing, "my house", "of", and "for a moment" in the user session are removed, "bathroom" is normalized to "toilet", and the Chinese numeral in "first floor" is normalized to the number "1"; thus, the user session is streamlined to "Help me turn on the light in the toilet on the 1st floor".
[0069] Furthermore, a preprocessing module is set in the project configuration. After being processed by the preprocessing module, the device list and device information bound to the user retrieved from the IOT cloud are saved in the session record.
[0070] Furthermore, the simplified session "Help me turn on the light in the toilet on the 1st floor" is matched with "I'm home" in the whitelist semantic configuration file. It is determined that the strings of the two are not similar, and it is determined that the session "Help me turn on the light in the toilet on the 1st floor" is not in the whitelist semantic configuration file.
[0071] Furthermore, regular matching rules are used for matching. The regular matching rules refer to semantic matching based on the semantic rule configuration file and the cached historical conversations (including historical slot information and context rules associated with historical semantics), and inherit the historical conversation information to simulate the memory of the user's historical conversations; it can be understood that in the matching process of the above whitelist semantic configuration file, if the matching fails, it means that the user session is not in the whitelist. At this time, historical conversation information needs to be obtained, and then semantic enhanced matching is performed according to the historical conversation information.
[0072] Furthermore, when using the regular matching rules for matching, it is found that the configuration "Turn on a certain device at a certain location" in the regular matching rules matches the session "Help me turn on the light in the toilet on the 1st floor". At this time, it is determined that the user intention is the (iot, open_device) intention; and the slot information "floor-1", "location-toilet", "device-light" is parsed. Moreover, since all the required slots in the configuration are available, this round of conversation is marked as completed.
[0073] Further, if the user inputs the speech into two parts, namely, "Turn on the light" and "in the first-floor washroom", when parsing "Turn on the light", only the slot device - light is parsed, without including the required slot location. Therefore, this conversation is marked as "incomplete". When parsing the second user speech "in the first-floor washroom", the slots floor - 1 and location - washroom are parsed, but the required slot device is not included. Then, by retrieving from the user's conversation history, the slot information device - light of the previous incomplete conversation can be retrieved, and the intention is iot - start_device for both. Therefore, it is determined as a multi-round conversation, and the slots of the previous conversation are used as a supplement to the slots of the current conversation, thus completing the control of the device.
[0074] That is, in an implementation manner of this embodiment, step S200 specifically includes the following steps:
[0075] Step S210, select the white list semantic configuration file as the matching file;
[0076] Step S220, perform semantic enhanced matching on the preprocessed session information according to the white list semantic configuration file and the regular matching rule;
[0077] Step S230, if the matching is successful, obtain the semantics and slot information of the preprocessed session information;
[0078] Step S240, generate the enhanced session information according to the semantics and the slot information.
[0079] In this embodiment, during the semantic enhanced matching process, if the matching fails, obtain the deep learning model, and perform parsing and semantic enhancement processing on the preprocessed session information through the deep learning model to obtain the same effect as the above semantic enhanced matching, that is, obtain the enhanced session information.
[0080] It is worth mentioning that during the matching process through the deep learning model, the efficiency is relatively low, and moreover, the matching result may be uncontrollable due to the black box effect of the deep learning model.
[0081] In an implementation manner of the embodiment of the present invention, after step S220, the following steps are further included:
[0082] Step S250, if the matching fails, obtain the deep learning model;
[0083] Step S260, perform parsing and semantic enhancement processing on the preprocessed session information through the deep learning model to obtain the enhanced session information.
[0084] In this embodiment, by performing semantic enhanced matching on the preprocessed session information, semantic information in the user session can be obtained according to the whitelist semantic configuration file and the regular matching rule, so as to generate enhanced session information based on the semantic and slot information.
[0085] As Figure 1 shown, in an implementation manner of the embodiment of the present invention, the multi-round dialogue generation method further includes the following steps:
[0086] Step S300, generate a reply language according to the configuration file and the enhanced session information, and feedback the dialogue result to the client.
[0087] In this embodiment, after obtaining the above enhanced session information, corresponding operations can be executed in the post-processing module of the smart TV through the post-processing table, so as to access the IOT cloud control interface through the post-processing module, and send a control instruction to the IOT device corresponding to the semantics through the IOT cloud control interface.
[0088] In a usage scenario, it is known that the parsed semantics are: iot-start_device, and the parsed slots are: floor, location, device; in the post-processing module, access the IOT cloud control interface and send a control instruction to the IOT cloud control interface; during the IOT cloud control process, a corresponding reply language can be generated according to the control result feedback by the IOT device, and the dialogue result is feedback to the client.
[0089] That is, in an implementation manner of this embodiment, step S300 specifically includes the following steps:
[0090] Step S310, start the post-processing module according to the semantics and the slot information;
[0091] Step S320, access the IOT cloud control interface through the post-processing module, and send a control instruction to the IOT device corresponding to the semantics through the IOT cloud control interface;
[0092] Step S330, generate a corresponding reply language according to the control result feedback by the IOT device, and feedback the dialogue result to the client.
[0093] In this embodiment, during the IOT cloud control process, if the control fails, set the corresponding reply language to the session according to the error information; if the control is successful, you can choose to directly set the reply language or not.
[0094] Specifically, if the post-processor does not set the response, it is set by the response module. In the response setting module, when the configuration (iot, start_device, "Okay, I have turned on the <device> in <location> for you") is retrieved, the slot information location and device can be substituted to form the response "Okay, I have turned on the light in the bathroom for you"; if only "Turn on the light" is input during the first conversation, the slot location is missing, indicating an incomplete conversation; in this case, according to the configuration "Slot follow-up: location - Which area of the device are you referring to?", the response is set to "Which area of the device are you referring to?".
[0095] In an implementation manner of the embodiment of the present invention, step S330 includes the following steps:
[0096] Step S331, if the IOT device feedbacks a control failure result, generate a corresponding response language according to the error information;
[0097] Step S332, if the IOT device feedbacks a control success result, select a pre-set response language, or generate a corresponding response language according to the retrieved configuration and the slot information.
[0098] In this embodiment, after generating the response language, the result of this round of conversation can be cached (for example: caching the user session intention and slot information), and a corresponding timeout period can be set (for example: the timeout period is 5 minutes). After the timeout period is reached or the conversation ends, the conversation result is fed back to the corresponding terminal device.
[0099] This embodiment preprocesses and semantically enhances the user session through an existing configuration file, so that the required response information can be automatically generated according to the user session. Without the intervention of a deep learning model, most semantic classification, context classification, and dialogue text generation requirements can be quickly covered, so that in a new usage scenario, the user session can be replied with quickly generated information, solving the problem that the deep learning model needs to be trained and adapted.
[0100] Exemplary device
[0101] Based on the above embodiments, the present invention further provides a terminal, and its principle block diagram can be as Figure 2 shown.
[0102] The terminal includes: a processor, a memory, an interface, a display screen, and a communication module connected via a system bus; wherein, the processor of the terminal is used to provide computing and control capabilities; the memory of the terminal includes a computer-readable storage medium and an internal memory; the computer-readable storage medium stores an operating system and a computer program; the internal memory provides an environment for the operation of the operating system and the computer program in the computer-readable storage medium; the interface is used to connect to external terminal devices, such as mobile terminals and computers, etc.; the display screen is used to display corresponding multi-turn dialogue generation information; the communication module is used to communicate with a cloud server or a mobile terminal.
[0103] When the computer program is executed by the processor, it is used to implement a multi-turn dialogue generation method.
[0104] Those skilled in the art can understand that Figure 2 the principle block diagram shown in is only a block diagram of some structures related to the solution of the present invention, and does not constitute a limitation on the terminal to which the solution of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0105] In one embodiment, a terminal is provided, which includes: a processor and a memory. The memory stores a multi-turn dialogue generation program. When the multi-turn dialogue generation program is executed by the processor, it is used to implement the above multi-turn dialogue generation method.
[0106] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a multi-turn dialogue generation program. When the multi-turn dialogue generation program is executed by the processor, it is used to implement the above multi-turn dialogue generation method.
[0107] Those of ordinary skill in the art can understand that all or part of the processes in the above embodiment methods can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided by the present invention can include non-volatile and / or volatile memories.
[0108] In summary, the present invention provides a multi-turn dialogue generation method, a terminal, and a computer-readable storage medium. The method includes: obtaining a target object conversation, preprocessing the target object conversation according to a configuration file to obtain preprocessed conversation information; performing semantic enhancement matching on the preprocessed conversation information according to the configuration file to obtain enhanced conversation information; generating a reply language according to the configuration file and the enhanced conversation information, and feeding back the dialogue result to the client. By preprocessing and semantically enhancing the target object conversation through the existing configuration file, the present invention can automatically generate the required reply information according to the target object conversation. Without the intervention of a deep learning model, it can quickly cover most of the semantic classification, context classification, and dialogue text generation requirements, so as to quickly generate information to reply to the target object conversation in a new usage scenario, solving the problems of training and adaptation required by the deep learning model.
[0109] It should be understood that the application of the present invention is not limited to the above examples. For those of ordinary skill in the art, improvements or transformations can be made according to the above description, and all such improvements and transformations should fall within the protection scope of the appended claims of the present invention.
Claims
1. A multi-turn dialogue generation method, characterized in that, the multi-turn dialogue generation method includes: Obtain a target object session, and preprocess the target object session according to a configuration file to obtain preprocessed session information; Perform semantic enhanced matching on the preprocessed session information according to the configuration file to obtain enhanced session information; Generate a response language according to the configuration file and the enhanced session information, and feedback the dialogue result to the client; The obtaining of the target object session and the preprocessing of the target object session according to the configuration file to obtain preprocessed session information includes: Obtain the target object session; Select a stop word list, a dirty word list, a normalization table, and a preprocessing table as preprocessing files, and preprocess the target object session to obtain the preprocessed session information; The performing of semantic enhanced matching on the preprocessed session information according to the configuration file to obtain enhanced session information includes: Select a whitelist semantic configuration file as a matching file; Perform semantic enhanced matching on the preprocessed session information according to the whitelist semantic configuration file and a regular matching rule; If the matching is successful, obtain the semantics and slot information of the preprocessed session information; Generate the enhanced session information according to the semantics and the slot information; The regular matching rule performs semantic matching based on a semantic rule configuration file and cached historical dialogues, and inherits historical dialogue information to simulate the memory of the user's historical dialogues; wherein, the historical dialogues include: historical slot information and context rules associated with historical semantics.
2. The multi-turn dialogue generation method according to claim 1, characterized in that, the configuration file includes: a general configuration file and various project configuration files; Before the obtaining of the target object session, it includes: Read the general configuration file and various project configuration files, and perform initialization processing according to the general configuration file and various project configuration files.
3. The multi-turn dialogue generation method according to claim 2, characterized in that, Before the obtaining of the target object session, it further includes: Monitor the status of the general configuration file and various project configuration files, and reload the configuration file with changed status according to the monitored status.
4. The multi-turn dialogue generation method according to claim 1, characterized in that, After the performing of semantic enhanced matching on the preprocessed session information according to the whitelist semantic configuration file and the regular matching rule, it further includes: If the matching fails, obtain a deep learning model; Parse and perform semantic enhancement processing on the preprocessed session information through the deep learning model to obtain the enhanced session information.
5. The multi-turn dialogue generation method according to claim 1, characterized in that, The generating of a response language according to the configuration file and the enhanced session information, and the feedback of the dialogue result to the client includes: Start a post-processing module according to the semantics and the slot information; Access the IOT cloud control interface through the post-processing module, and send a control instruction to the IOT device corresponding to the semantics through the IOT cloud control interface; Generate a corresponding reply language according to the control result feedback by the IOT device, and feed back the conversation result to the client.
6. The multi-turn conversation generation method according to claim 5, characterized in that the generating a corresponding reply language according to the control result feedback by the IOT device includes: if the IOT device feedbacks a control failure result, generating a corresponding reply language according to the error information; if the IOT device feedbacks a control success result, selecting a pre-set reply language, or generating a corresponding reply language according to the retrieved configuration and the slot information.
7. A terminal, characterized in that it includes: a processor and a memory, the memory stores a multi-turn conversation generation program, and when the multi-turn conversation generation program is executed by the processor, it is used to implement the multi-turn conversation generation method according to any one of claims 1-6.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a multi-turn conversation generation program, and when the multi-turn conversation generation program is executed by a processor, it is used to implement the multi-turn conversation generation method according to any one of claims 1-6.
Citation Information
Patent Citations
Multi-round emotional dialogue method based on deep learning
CN108874972A
Dialogue processing method and device, apparatus and medium
CN109002510A