Search

CN-116383355-B - Multi-round dialogue self-learning algorithm based on sl-lstm and electronic equipment

CN116383355BCN 116383355 BCN116383355 BCN 116383355BCN-116383355-B

Abstract

The application discloses a sl-lstm-based multi-round dialogue self-learning algorithm and electronic equipment, belonging to the technical field of natural language processing, and comprising the steps of acquiring a natural language text input by a user in a current dialogue, extracting coding information, and obtaining a word vector and a word slot vector of the current dialogue through a neural network; the method comprises the steps of obtaining dialogue states of historical dialogues, combining word vectors and word slot vectors, obtaining short-term states of current dialogues through the neural network, then tracking the dialogue states according to the dialogue states of the historical dialogues and the short-term states of the current dialogues to obtain the dialogue states of the current dialogues, learning through the neural network and obtaining dialogue strategies, and finally synthesizing output sentences according to the dialogue strategies to achieve replying to the current dialogues. While maintaining controllability, consistency and high coverage of conversations, and having a high degree of interpretability. The intelligent dialogue robot is suitable for the scene of multi-round dialogue of the intelligent dialogue robot.

Inventors

  • LI YANG
  • WANG FUDONG

Assignees

  • 哈尔滨工业大学人工智能研究院有限公司

Dates

Publication Date
20260505
Application Date
20230403

Claims (9)

  1. 1. A sl-lstm-based multi-round dialogue self-learning algorithm, comprising: the following steps are circularly executed until the multi-round dialogue is ended: Acquiring a natural language text input by a user in a current dialogue, extracting coding information, and acquiring a word vector and a word slot vector of the current dialogue through a neural network, wherein the neural network is an sl-lstm network; acquiring dialogue states of historical dialogue, combining the word vectors and the word slot vectors, and obtaining short-term states of the current dialogue through the neural network; According to the dialogue state of the history dialogue and the short-term state of the current dialogue, carrying out dialogue state tracking, obtaining the dialogue state of the current dialogue, and simultaneously learning through the neural network and obtaining a dialogue strategy; synthesizing output sentences according to the dialogue strategy to realize the reply to the current dialogue; The neural network includes feed forward network and SWITCH GATES; The obtaining the short-term status of the current session through the neural network includes: Combining the dialogue state, the word vector and the word slot vector of the history dialogue, and obtaining a control state vector and a sentence state vector of the current dialogue through feed forward network and SWITCH GATES; And splicing the control state vector and the statement state vector to obtain the short-term state.
  2. 2. The multi-round dialogue self-learning algorithm of claim 1, wherein the output sentence synthesis according to the dialogue policy further comprises: And updating the parameters of the neural network according to the accumulated gradient obtained in the current dialogue.
  3. 3. The multi-turn dialog self-learning algorithm of claim 1 wherein the capturing and encoding information extraction of the user-entered natural language text in the current dialog comprises: Acquiring a natural language text input by a user in a current dialogue; and extracting according to the natural language text to obtain corresponding word segmentation and word slots.
  4. 4. The multi-round, conversational, self-learning algorithm of claim 3, wherein the neural network comprises embedding layer; The obtaining the word vector and the word slot vector of the current dialogue through the neural network comprises obtaining the word vector and the word slot vector through embedding layer according to the word segmentation and the word slot.
  5. 5. The multi-round, conversational, self-learning algorithm of claim 1, wherein the neural network comprises a combined STATES WITH slot value update layer; the step of tracking the dialogue state according to the dialogue state of the history dialogue and the short-term state of the current dialogue, and obtaining the dialogue state of the current dialogue comprises the following steps: And updating the dialogue state of the history dialogue through the combined STATES WITH slot value update layer according to the dialogue state of the history dialogue and the short-term state of the current dialogue, and obtaining the dialogue state of the current dialogue.
  6. 6. The multi-round conversational self-learning algorithm of claim 5, wherein the learning through the neural network and deriving a conversational strategy comprises: Learning is performed through the combined STATES WITH slot value update layer, and a dialogue strategy is obtained.
  7. 7. The multi-round dialogue self-learning algorithm of claim 6, wherein the learning through the neural network and deriving a dialogue strategy further comprises: Docking the output vector of the combined STATES WITH slot value update layer with a downstream dialogue task to obtain a prediction result, wherein the downstream dialogue task comprises intention classification, sentence vector prediction, word slot prediction, word vector prediction and word position prediction; the synthesizing the output sentence according to the dialogue strategy comprises: and synthesizing output sentences according to the dialogue strategy and the prediction result.
  8. 8. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the algorithm according to any one of claims 1 to 7 when the computer program is executed.
  9. 9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the algorithm according to any one of claims 1 to 7.

Description

Multi-round dialogue self-learning algorithm based on sl-lstm and electronic equipment Technical Field The application relates to a sl-lstm-based multi-round dialogue self-learning algorithm and electronic equipment, and belongs to the technical field of natural language processing. Background With the rapid development of the artificial intelligence industry, more and more artificial intelligence is applied to aspects of life. Natural language processing technology is mainly applied to the scenes of intelligent dialogue robots as one of important branches of artificial intelligence. The intelligent dialogue robot analyzes the intention of the user by receiving the information transmitted by the user, and finally gives the reply of the user based on the decision system of the intelligent dialogue robot. The technology can be traced to the beginning of the 90 th century at the earliest, is introduced for saving the cost of manual service, and has high technical content at the back, but can obtain answers only by simple questions and answers for users, thereby greatly saving manpower and material resources. Since the difficulty of the conversation robot is the algorithmic implementation of multiple conversations, conversation controllability, consistency, interpretability, etc. are maintained as much as possible. Most of the existing schemes are based on the thought of a finite state machine to configure dialogue paths, and have strong controllability, poor diversity and weak coverage capability of user reply. In order to improve the coverage capability of user replies, the art proposes a scheme for learning a dialogue path based on a deep learning model, avoiding configuration, and solving the multi-round dialogue problem in an end-to-end manner, as a result, the coverage capability of users is improved but the consistency and controllability are poor. The prior proposal has the following defects that (1) the controllability, the consistency and the high coverage can not be simultaneously maintained, and (2) a high-efficiency interpretable dialogue learning algorithm can not be provided. Disclosure of Invention The application aims to provide a multi-round dialogue self-learning algorithm based on sl-lstm and electronic equipment, and provides a new sl-lstm flow architecture based on an sl-lstm network, and meanwhile, controllability, consistency and high coverage of a dialogue are maintained, and the multi-round dialogue self-learning algorithm has high interpretability. To achieve the above object, a first aspect of the present application provides a sl-lstm-based multi-round dialogue self-learning algorithm, including: the following steps are circularly executed until the multi-round dialogue is ended: Acquiring a natural language text input by a user in a current dialogue, extracting coding information, and acquiring a word vector and a word slot vector of the current dialogue through a neural network, wherein the neural network is an sl-lstm network; acquiring dialogue states of historical dialogue, combining the word vectors and the word slot vectors, and obtaining short-term states of the current dialogue through the neural network; According to the dialogue state of the history dialogue and the short-term state of the current dialogue, carrying out dialogue state tracking, obtaining the dialogue state of the current dialogue, and simultaneously learning through the neural network and obtaining a dialogue strategy; And synthesizing output sentences according to the dialogue strategy to realize the reply to the current dialogue. In one embodiment, the step of synthesizing the output sentence according to the decision result further comprises updating parameters of the neural network according to the accumulated gradient obtained in the current dialogue. In one embodiment, the obtaining the natural language text input by the user in the current dialogue and extracting the coding information include: Acquiring a natural language text input by a user in a current dialogue; and extracting according to the natural language text to obtain corresponding word segmentation and word slots. In one embodiment, the neural network comprises embedding layer; The obtaining the word vector and the word slot vector of the current dialogue through the neural network comprises obtaining the word vector and the word slot vector through embedding layer according to the word segmentation and the word slot. In one embodiment, the neural network comprises feed forward network and SWITCH GATES; The obtaining the short-term status of the current session through the neural network includes: Combining the dialogue state, the word vector and the word slot vector of the history dialogue, and obtaining a control state vector and a sentence state vector of the current dialogue through feed forward network and SWITCH GATES; And splicing the control state vector and the statement state vector to obtain the short-term state. In one embod