A conversation processing method and related device
By combining the Seq2Seq model and the target reinforcement learning model, evaluating and selecting dialogue to promote the largest reply text, the problem of the Seq2Seq model generating universal replies and a vicious cycle in multiple rounds of dialogue is solved, and the continuity and diversity of dialogue is improved.
Patent Information
- Application Number
- CN202111542344.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2041-12-13
AI Technical Summary
The existing Seq2Seq model is prone to generate universal reply and fall into a dead cycle in multi-wheel dialogue between human and machine, and cannot effectively promote the continuous progress of the dialogue.
The training Seq2Seq model and target reinforcement learning model are used to process the reply text. The initial text information is generated through the Seq2Seq model and input it into the target reinforcement learning model. The dialogue driving benefits of candidate reply text are evaluated, and the dialogue driving maximum reply text is selected to Promote the ongoing dialogue.
It effectively avoids universal reply and vicious cycles, improves the diversity and quality of multiple rounds of dialogue, and allows dialogue to continue.
Smart Images

Figure CN114201974B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer science and technology, and in particular to a dialogue processing method and related equipment. Background Art
[0002] With the development of computer science and technology, machine learning technology continues to improve.
[0003] The Seq2Seq model is a machine learning model generated based on a recurrent neural network, which can be used for natural language processing and human-computer dialogue. It should be noted that the Seq2Seq model can mainly include two parts: an encoder and a decoder. The existing technology can apply the Seq2Seq model to the task of generating human-computer dialogue, generating response text and replying to the questions asked by the user or the information input.
[0004] However, the prior art is prone to problems such as universal replies and falling into an infinite loop when conducting multiple rounds of dialogue with users, and is unable to effectively conduct multiple rounds of dialogue with users. Summary of the invention
[0005] In view of the above problems, the present invention provides a dialog processing method and related devices that overcome the above problems or at least partially solve the above problems. The technical solution is as follows:
[0006] A conversation processing method, comprising:
[0007] Get a text to be replied;
[0008] The text to be replied is processed using a trained Seq2Seq model and a trained target reinforcement learning model to obtain a target reply text output by the target reinforcement learning model that matches the text to be replied, and the target reply text is conducive to promoting the continuation of the conversation.
[0009] Optionally, the processing of the to-be-reply text using a trained Seq2Seq model and a trained target reinforcement learning model includes:
[0010] Inputting the text to be replied into the Seq2Seq model;
[0011] Obtaining first text information output by the Seq2Seq model;
[0012] The first text information is input into the target reinforcement learning model for processing.
[0013] Optionally, the target reinforcement learning model determines at least one candidate reply text based on the first text information, evaluates the conversation promotion benefit of each candidate reply text, and determines the candidate reply text with the largest conversation promotion benefit as the target reply text.
[0014] A dialogue processing device comprises: a first obtaining unit, a first processing unit and a second obtaining unit; wherein:
[0015] The first obtaining unit is used to obtain a sentence of text to be replied;
[0016] The first processing unit is used to process the text to be replied by using the trained Seq2Seq model and the trained target reinforcement learning model;
[0017] The second obtaining unit is used for the target reply text to facilitate the continuation of the conversation.
[0018] Optionally, the first processing unit includes: a first input unit, a third obtaining unit and a second input unit;
[0019] The first input unit is used to input the text to be replied to into the Seq2Seq model;
[0020] The third obtaining unit is used to obtain the first text information output by the Seq2Seq model;
[0021] The second input unit is used to input the first text information into the target reinforcement learning model for processing.
[0022] Optionally, the target reinforcement learning model determines at least one candidate reply text based on the first text information, evaluates the conversation promotion benefit of each candidate reply text, and determines the candidate reply text with the largest conversation promotion benefit as the target reply text.
[0023] A computer-readable medium stores a computer program, wherein the program implements any of the above-mentioned dialogue processing methods when executed by a processor.
[0024] A processor is used to run a program, wherein the program implements any of the above-mentioned dialogue processing methods when running.
[0025] An electronic device, comprising:
[0026] one or more processors;
[0027] a storage device having one or more programs stored thereon;
[0028] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned dialog processing methods.
[0029] The dialogue processing method and related equipment proposed in the present invention can obtain a sentence of text to be replied, use the trained Seq2Seq model and the trained target reinforcement learning model to process the text to be replied, and obtain the target reply text output by the target reinforcement learning model that matches the text to be replied. The target reply text is conducive to promoting the continuation of the dialogue. The present invention can effectively avoid the problems of universal replies and falling into an infinite loop when conducting human-computer dialogue, effectively promote multiple rounds of dialogue with users, and enable the dialogue to continue effectively.
[0030] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0032] Figure 1 A flow chart of a first method for processing a conversation provided by an embodiment of the present invention is shown;
[0033] Figure 2 A flow chart of a second method for processing a conversation provided by an embodiment of the present invention is shown;
[0034] Figure 3 A schematic diagram showing a Seq2Seq model and a network structure of target reinforcement learning provided by an embodiment of the present invention is shown;
[0035] Figure 4 A schematic diagram showing the structure of a first dialog processing device provided by an embodiment of the present invention is shown;
[0036] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0037] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0038] like Figure 1 As shown, this embodiment proposes a first dialogue processing method, which may include the following steps:
[0039] S101, obtaining a text to be replied;
[0040] It should be noted that the present invention can be applied to target electronic devices, such as mobile phones, tablet computers and desktop computers.
[0041] The text to be replied may be text inputted by a user or a machine into the target computer and requires a reply from the target computer, for example, "What will the weather be like tomorrow"; or "I want to book a seat for tomorrow".
[0042] S102, using the trained Seq2Seq model and the trained target reinforcement learning model to process the reply text;
[0043] The target reinforcement learning model is a reinforcement learning model that can conduct multiple rounds of dialogue. It should be noted that the present invention does not limit the type of the target reinforcement learning model, such as the Q-Learning model and the Deep Q-Network (DQN) model.
[0044] Specifically, after obtaining the text to be replied, the present invention can use the trained Seq2Seq model and the target reinforcement learning model to perform natural language processing on the text to be replied.
[0045] Optional, such as Figure 2 As shown, in the second dialog processing method proposed in this embodiment, step S102 may include steps 201, S202 and S203. Among them:
[0046] S201, input the text to be replied to into the Seq2Seq model;
[0047] Specifically, after obtaining the text to be replied, the present invention can first input the text to be replied into the Seq2Seq model for processing.
[0048] S202, obtaining first text information output by a Seq2Seq model;
[0049] Specifically, after the text to be replied is input into the Seq2Seq model, the present invention can obtain text information output by the Seq2Seq model after performing natural language processing on the text to be replied, that is, the first text information.
[0050] S203: Input the first text information into the target reinforcement learning model for processing.
[0051] Specifically, after obtaining the first text information, the present invention can input the first text information into the target reinforcement learning model for processing.
[0052] S103, obtaining a target reply text output by the target reinforcement learning model that matches the text to be replied to, where the target reply text is conducive to promoting the continuation of the conversation.
[0053] Specifically, the present invention can obtain a target reply text output by the target reinforcement learning model for replying to the text to be replied after the first text information is input into the target reinforcement learning model. It should be noted that the target reply text output by the target reinforcement learning model can be conducive to promoting the continuation of the dialogue with the user, and can effectively conduct multiple rounds of dialogue with the user, avoiding problems such as universal replies and dead loops.
[0054] Optionally, the target reinforcement learning model determines at least one candidate reply text based on the first text information, evaluates the dialogue promotion benefit of each candidate reply text, and determines the candidate reply text with the largest dialogue promotion benefit as the target reply text.
[0055] Specifically, the target reinforcement learning model can determine at least one corresponding candidate reply text based on the first text information, and evaluate the benefit of each candidate reply text on promoting future dialogue with the user, determine the candidate reply text with the greatest benefit, and determine the candidate reply text with the greatest benefit as the target reply text, thereby effectively promoting the continuation of the dialogue with the user.
[0056] It should be noted that the Seq2Seq model is applied in the user's conversation process. Based on the encoder-decoder structure, the encoder can first encode the text information input by the user into a feature vector, and then the decoder can decode the feature vector to obtain the reply text. The Seq2Seq model can maximize the probability of generating a reply corresponding to the input based on the Maximum Likelihood Estimate (MLE). However, it is easy to generate universal replies, quickly fall into an endless loop, and use a single-argument reply generation model for multiple rounds of conversation without considering the future direction of the conversation. For example, the multiple rounds of conversations simulated based on the Seq2Seq model in Examples 1 and 2 below:
[0057] Example 1: Seq2Seq model simulates multi-round dialogue 1
[0058] A: If you are not confident enough, why should I give you a chance?
[0059] B: That makes sense!
[0060] A: That makes sense!
[0061] B: That makes sense!
[0062] A: That makes sense!
[0063] B: That makes sense!
[0064] …
[0065] Example 2: seq2seq simulates multi-round dialogue 2
[0066] A: Garfield became popular
[0067] B: That’s great!
[0068] A: It’s quite interesting.
[0069] B: Hahahahahahahahaha
[0070] A: Hahahahahahahahaha
[0071] B: Hahahahahahahahaha
[0072] It should be noted that, in order to address the above-mentioned problems, the present invention can introduce a deep reinforcement learning model to perform open-domain multi-round dialogue strategy learning. This strategy can make each round of responses to users more conducive to the conduct of multi-round dialogues, and can effectively reduce the generation of universal responses and the occurrence of dead loops.
[0073] Optionally, the present invention can use the DQN model as the target reinforcement learning model to conduct multiple rounds of dialogue with the user. Specifically, DQN is a deep learning approximation version of the reinforcement learning algorithm Q-Learning. Its core idea is to use a deep neural network as a medium for estimating value, and its parameter update is completed by performing stochastic gradient descent on the following formula (1), where s j Indicates the state, a j Indicates action, r j represents the reward, and Q represents the valuation of the state-action pair through the deep value network.
[0074] Loss=(y j -Q(s j ,a j ;θ)) 2 ------------------Formula (1);
[0075] Among them, y i is the sample value, so the value estimation of the algorithm is completed by the following formula:
[0076]
[0077] Specifically, Figure 3 The Seq2Seq model and the network structure of target reinforcement learning shown in the figure, the present invention can input a text to be replied into the Seq2Seq model, the Seq2Seq model can obtain relevant characters from multiple characters of the text to be replied, such as obtaining WXYZ from ABCWXYZ, and then obtain the relevant information of all sentences such as Sentence1, Sentence2... Sentence N through directional search, and input the relevant information of all sentences as actions into the DQN model, and embed the encoded dialogue representation into the reward Reward process in the DQN model through the related mechanism of the automatic encoder Encoder and decoder Decoder; then, the DQN model can use an independent deep neural network combined with the above formula (1) to evaluate the future benefits of each candidate reply, so as to obtain a dialogue strategy that is conducive to the continuous multi-round dialogue. Specifically, the environment Environment in DQN can evaluate the next sentence NextSentence and convert it into a quantifiable Reward to be fed back to the Agent. It should be noted that the encoder Encoder and the decoder Decoder in FIG. 3 can exchange information such as X1, X2 . . . Xn.
[0078] Specifically, as shown in Table 1, a multi-round dialogue experiment is conducted to reply to the text input by the user using the Seq2Seq model and the dialogue strategy of the present invention. It can be understood that the present invention can effectively improve the diversity, average number of rounds and dialogue quality of multi-round dialogues.
[0079] Table 1 Multi-round dialogue test table
[0080]
[0081] It should be noted that in the field of energy e-commerce, the application of intelligent customer service robots is becoming more and more widespread. Smooth human-computer dialogue is very important for solving user problems and maintaining user emotions, which requires the robot to be able to recognize when to keep listening and when to respond. In this regard, the dialogue processing technology adopted by the present invention can apply large-scale corpus data, such as large-scale corpus data in the field of energy e-commerce, to machine learning of Seq2Seq models and target reinforcement learning models, generate trained Seq2Seq models and target reinforcement learning models, effectively realize human-computer dialogue, promote multiple rounds of dialogue with users, effectively solve user problems and maintain user emotions.
[0082] Optionally, the present invention can be applied to multi-round dialogues in the field of energy e-commerce. Optionally, the present invention can be closer to the multi-round dialogue communication method of mermaids.
[0083] The dialogue processing method proposed in this embodiment can obtain a sentence of text to be replied, use the trained Seq2Seq model and the trained target reinforcement learning model to process the text to be replied, and obtain the target reply text output by the target reinforcement learning model that matches the text to be replied. The target reply text is conducive to promoting the continuation of the dialogue. The present invention can effectively avoid problems such as universal replies and falling into an infinite loop when conducting human-computer dialogue, effectively promote multiple rounds of dialogue with users, and enable the dialogue to continue effectively.
[0084] and Figure 1 The steps shown correspond to Figure 4 As shown, this embodiment proposes a first dialog processing device. The device may include: a first obtaining unit 101, a first processing unit 102, and a second obtaining unit 103; wherein:
[0085] A first obtaining unit 101 is used to obtain a text to be replied;
[0086] A first processing unit 102 is used to process the reply text using the trained Seq2Seq model and the trained target reinforcement learning model;
[0087] The second obtaining unit 103 is used for the target reply text to facilitate the continuation of the conversation.
[0088] It should be noted that the specific processing processes of the first obtaining unit 101, the first processing unit 102 and the second obtaining unit 103 and the technical effects thereof can be referred to respectively. Figure 1 The relevant descriptions of steps S101, S102 and S103 in the above are not repeated here.
[0089] Optionally, the first processing unit 102 includes: a first input unit, a third obtaining unit and a second input unit;
[0090] A first input unit, used to input the text to be replied to into the Seq2Seq model;
[0091] A third obtaining unit, used to obtain first text information output by the Seq2Seq model;
[0092] The second input unit is used to input the first text information into the target reinforcement learning model for processing.
[0093] Optionally, the target reinforcement learning model determines at least one candidate reply text based on the first text information, evaluates the dialogue promotion benefit of each candidate reply text, and determines the candidate reply text with the largest dialogue promotion benefit as the target reply text.
[0094] The dialogue processing device proposed in this embodiment can obtain a sentence of text to be replied, and use the trained Seq2Seq model and the trained target reinforcement learning model to process the text to be replied, and obtain the target reply text output by the target reinforcement learning model that matches the text to be replied, and the target reply text is conducive to promoting the continuation of the dialogue. The present invention can effectively avoid problems such as universal replies and falling into an infinite loop when conducting human-computer dialogue, and effectively promote multiple rounds of dialogue with users, so that the dialogue can be effectively continued.
[0095] like Figure 5 As shown, this embodiment proposes a method for implementing Figure 1 Specifically, the electronic device 500 may include a processor 501, a memory 502, a communication interface 503, an input unit 504, an output unit 505, and a communication bus 506. The processor 501 and the memory 502 are connected to each other via the communication bus 506. The communication interface 503, the input unit 504, and the output unit 505 are also connected to the communication bus 506.
[0096] The communication interface 503 may be an interface of a communication module, such as an interface of a GSM module. The communication interface 503 may be used to obtain data or instructions sent by other devices. The communication interface 503 may also be used to send data or instructions to other devices.
[0097] In the embodiment of the present invention, the processor 501 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices.
[0098] Optionally, the memory 502 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, and application programs required for at least one function (such as a text display function, etc.); the data storage area may store data created during the use of the computer, such as user data, user access data, and text data, etc.
[0099] In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0100] The processor 501 may call a program stored in the memory 502. Specifically, the processor 501 may execute any of the above-mentioned dialogue processing methods.
[0101] The memory 502 is used to store one or more programs. The program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 502 at least stores a program for implementing the following functions:
[0102] Get a text to be replied;
[0103] The trained Seq2Seq model and the trained target reinforcement learning model are used to process the reply text, and the target reply text output by the target reinforcement learning model that matches the reply text is obtained. The target reply text is conducive to promoting the continuation of the conversation.
[0104] In a possible implementation, the electronic device 500 may include: one or more processors 501;
[0105] a storage device having one or more programs stored thereon;
[0106] When one or more programs are executed by one or more processors 501 , the one or more processors 501 implement any of the above dialogue processing methods.
[0107] The present invention may further include an input unit 504, which may include at least one of a touch sensing unit for sensing a touch event on the touch display panel, a keyboard, a mouse, a camera, a microphone, and the like.
[0108] The output unit 505 may include: at least one of a display, a speaker, a vibration mechanism, a lamp and other devices. The display may include a display panel, such as a touch display panel, etc. In one possible case, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. The vibration mechanism may cause the electronic device 500 to displace when working. In one possible implementation, the vibration mechanism includes a motor and an eccentric vibrator, and the motor drives the eccentric vibrator to rotate to generate vibration. The brightness and / or color of the lamp is adjustable. In one possible implementation, different information may be reflected by at least one of the on and off, brightness, and color of the lamp, such as reflecting alarm information by emitting red light from the lamp.
[0109] certainly, Figure 5 The structure of the electronic device 500 shown does not constitute a limitation on the electronic device in the embodiment of the present invention. In actual applications, the electronic device may include Figure 5 More or fewer components than shown, or combinations of certain components.
[0110] An embodiment of the present invention provides a computer-readable medium on which a computer program is stored, wherein the program implements any of the above-mentioned dialogue processing methods when executed by a processor.
[0111] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program implements any of the above dialogue processing methods when running.
[0112] The present invention also provides a computer program product, which, when executed on a data processing device, enables the data processing device to implement any of the above dialogue processing methods.
[0113] Among them, the electronic device, processor, computer-readable medium or computer program product provided by the above-mentioned embodiments of the present invention can all be used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0114] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0117] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0118] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0119] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0120] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0121] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used, and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. The scope of the invention involved in the present invention is not limited to the technical solution formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) to form a technical solution.
[0122] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0123] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for processing a conversation, characterized in that: include: Get a text to be replied; Processing the text to be replied using the trained Seq2Seq model and the trained target reinforcement learning model to obtain a target reply text output by the target reinforcement learning model that matches the text to be replied, wherein the target reply text is conducive to promoting the continuation of the conversation; The method of processing the text to be replied by using the trained Seq2Seq model and the trained target reinforcement learning model includes: inputting the text to be replied into the Seq2Seq model; obtaining first text information output by the Seq2Seq model; and inputting the first text information into the target reinforcement learning model for processing; The target reinforcement learning model determines at least one candidate reply text based on the first text information, evaluates the dialogue promotion benefit of each candidate reply text, and determines the candidate reply text with the largest dialogue promotion benefit as the target reply text; the target reinforcement learning model includes: a Q-Learning model and a deep Q neural network model.
2. A dialogue processing device, characterized in that: include: a first obtaining unit, a first processing unit, and a second obtaining unit; wherein: The first obtaining unit is used to obtain a sentence of text to be replied; The first processing unit is used to process the text to be replied by using the trained Seq2Seq model and the trained target reinforcement learning model; The second obtaining unit is used for the target reply text to facilitate the continuation of the conversation; The first processing unit includes: a first input unit, a third obtaining unit, and a second input unit; The first input unit is used to input the text to be replied to into the Seq2Seq model; The third obtaining unit is used to obtain the first text information output by the Seq2Seq model; The second input unit is used to input the first text information into the target reinforcement learning model for processing; The target reinforcement learning model determines at least one candidate reply text based on the first text information, evaluates the dialogue promotion benefit of each candidate reply text, and determines the candidate reply text with the largest dialogue promotion benefit as the target reply text; the target reinforcement learning model includes: a Q-Learning model and a deep Q neural network model.
3. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the dialog processing method according to claim 1 is implemented.
4. A processor for running a program, wherein: When the program is run, the dialog processing method as claimed in claim 1 is implemented.
5. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the dialog processing method according to claim 1.
