Dialogue interaction method and apparatus, and device and storage medium

By obtaining disassembly guidelines in combination with interactive scenarios, and using the dialogue assistant model to generate disassembly identification, the disassembly text is displayed one by one, solving the problem of recovery text complexity caused by complex input content, and improving the user's interactive experience and understanding efficiency.

WO2025020229A1PCT designated stage expired Publication Date: 2025-01-30XIAMEN MEET YOU INFORMATION TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/112224
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-25
Filing Date
2023-08-10
Publication Date
2025-01-30

AI Technical Summary

Technical Problem

When the content entered by the user is more complicated, the reply text generated by the dialogue assistant may also become complicated, resulting in large segments of text being presented on the display interface, affecting the user's interactive experience, making it difficult for users to read and reduce comprehension efficiency.

Method used

Put forward a method of dialogue interaction. By obtaining the interactive scenario of the input text, the disassembly guidelines will be obtained, and the disassembly guidelines and input text input pre -training dialogue assistant models will be entered. The text is displayed in the display box one by one.

Benefits of technology

Avoid reading difficulties caused by large -scale text display. By gradually displaying the disassembly display text in order, guide users to gradually respond to the content, improve the readability of interactive texts, improve user understanding efficiency, and ensure the interactive text of the interactive text Coherence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023112224_30012025_PF_FP_ABST
    Figure CN2023112224_30012025_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure relate to the technical field of artificial intelligence. Provided are a dialogue interaction method and apparatus, and a device and a storage medium. The method comprises: acquiring input text of a target object; and on the basis of a pre-selected display interaction mode, displaying at least one piece of display text of interaction text one by one according to a text display order. Specifically, a disassembly guidance of the input text is acquired, the disassembly guidance and the input text are inputted into a dialogue assistant model, so as to obtain interaction text and a disassembly identifier of the interaction text, and the interaction text is disassembled on the basis of the disassembly identifier, so as to generate display text. A disassembly guidance is obtained in view of an interaction scenario, interaction text is disassembled, and pieces of display text, which are obtained by means of disassembly, are displayed one by one in a first display box. The problem of there being reading difficulty caused by the display of a chunk of text is avoided, thereby improving the understanding efficiency of a user. Interaction text is disassembled by using a disassembly identifier, which is applicable to an interaction scenario, such that pieces of display text, which are obtained by means of disassembly, are more rational and smoother, thereby further improving the interaction experience.
Need to check novelty before this filing date? Find Prior Art

Description

Dialogue interaction method, device, equipment and storage medium Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a dialogue interaction method, apparatus, device, and storage medium. Background Art

[0002] With the continuous development of technology, conversational assistants are increasingly appearing in people's daily lives and work. These AI-powered software enable natural language communication with users, using natural language processing and deep learning techniques to understand user input and generate appropriate responses. Customer service Q&A bots are a common example of a conversational assistant.

[0003] In related technologies, when the user input is complex, the reply text generated by the conversation assistant may also become complex. In this case, presenting large paragraphs of text on the display interface will affect the user's interactive experience, making it difficult for users to read and reduce their comprehension efficiency.

[0004] Summary of the Invention

[0005] The main purpose of the embodiments of the present application is to propose a dialogue interaction method, apparatus, device and storage medium, which can improve the intuitiveness of displayed content and enhance the user's interactive experience.

[0006] To achieve the above objectives, a first aspect of an embodiment of the present application provides a conversational interaction method, comprising:

[0007] Get the input text of the target object;

[0008] Based on a preselected display interaction mode, displaying at least one display text obtained after responding to the input text one by one in a text display order, each display text being displayed in a first display frame;

[0009] The at least one display text is generated by the following steps:

[0010] Obtaining an interaction scenario of the input text, and obtaining a disassembly guide based on the interaction scenario;

[0011] Inputting the disassembly guide and the input text into a pre-trained conversational assistant model to obtain an interactive text and at least one disassembly identifier of the interactive text;

[0012] The interactive text is disassembled based on the disassembly identifier to generate at least one display text.

[0013] In one embodiment, inputting the disassembly guide and the input text into a pre-trained conversational assistant model to obtain the interaction text and at least one disassembly identifier of the interaction text includes:

[0014] Inputting the disassembly guide and the input text into a pre-trained conversation assistant model to obtain the interaction text and the disassembly position;

[0015] The disassembly identifier is generated according to the disassembly position.

[0016] In one embodiment, the display interaction mode includes: word-based interaction; the displaying of at least one display text obtained after responding to the input text in a text display order based on the pre-selected display interaction mode includes:

[0017] Acquire at least one first display data according to the text display order; the first display data is obtained by adding the disassembly mark associated with the display text to a preset position of the display text;

[0018] using the first display data as first target data;

[0019] If the preset position is the last position, the display text in the first target data is displayed in the first display frame according to the first preset number of characters until the disassembly mark is detected, a new first display frame is generated, and the next first data group is selected as the first target data for display;

[0020] If the preset position is the first position, the first display frame is generated according to the detected disassembly mark, and the display text in the first target data is displayed in the first display frame according to the first preset number of characters until the last character of the display text is reached, and the next first data group is selected as the first target data for display.

[0021] In one embodiment, the display interaction mode includes: segment interaction; the displaying of at least one display text obtained after responding to the input text in a text display order based on the pre-selected display interaction mode includes:

[0022] Acquire at least one second display data according to the text display order; the second display data is obtained by adding the disassembly mark associated with the display text to a preset position of the display text;

[0023] using the second display data as second target data;

[0024] If the preset position is the last position, the preset content is displayed in the first display frame, and the characters in the display text in the second target data are obtained according to the second preset number of characters to form a to-be-displayed text segment until the disassembly mark is detected. The preset content is replaced with the to-be-displayed text segment and displayed in the first display frame, and a new first display frame is generated. The next second data group is selected as the second target data group for display;

[0025] If the preset position is the first position, the first display frame is generated according to the detected disassembly identifier, the preset content is displayed in the first display frame, and the characters in the display text in the second target data are obtained according to the second preset number of characters to form a text segment to be displayed until the last character of the display text is reached. The preset content is replaced by the text segment to be displayed in the first display frame, and a new first display frame is generated, and the next second data group is selected as the second target data group for display.

[0026] In one embodiment, after displaying the at least one display text obtained after responding to the input text one by one in a text display order, the method further includes:

[0027] In response to the aggregation instruction of the target object, generating a second display frame; the aggregation instruction includes an aggregation method;

[0028] Grouping the display text according to the aggregation method to obtain one or more display groups; the number of the display groups is consistent with the number of the second display frames;

[0029] The content of the display group is displayed in the second display frame.

[0030] In one embodiment, the conversation assistant model is trained by the following steps:

[0031] Constructing a training sample set; the training sample set includes: multiple input data samples, the input data samples include input data and disassembly guidance data; the input data samples are associated with sample labels, the sample labels include interaction data and disassembly labels, and the disassembly labels are disassembly position vectors corresponding to the interaction scenes of the input data samples;

[0032] Inputting the input data sample into the conversation assistant model for prediction to obtain a predicted interaction result and a predicted decomposition vector;

[0033] Obtaining a first loss value according to the predicted interaction result and the interaction data, and obtaining a second loss value according to the predicted disassembly vector and the disassembly label;

[0034] A total loss value is calculated based on the first loss value and the second loss value, and the model weight of the conversation assistant model is adjusted based on the total loss value until the iteration is completed to obtain the trained conversation assistant model.

[0035] In one embodiment, the disassembly guide data is obtained through the following steps:

[0036] Obtaining portrait data of the input data sample; the portrait data is obtained based on user usage data, the user usage data including historical usage data and / or current usage data;

[0037] The portrait data is input into a scene classification model to obtain an interaction scene, and disassembly guidance data is obtained according to the interaction scene.

[0038] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a conversation interaction device, comprising:

[0039] Input acquisition module: used to obtain the input text of the target object;

[0040] Interactive display module: used for displaying at least one display text obtained after responding to the input text one by one in a text display order based on a pre-selected display interaction mode, each of the display texts being displayed in a first display frame;

[0041] The at least one display text is generated by the following steps:

[0042] Obtaining an interaction scenario of the input text, and obtaining a disassembly guide based on the interaction scenario;

[0043] Inputting the disassembly guide and the input text into a pre-trained conversational assistant model to obtain an interactive text and at least one disassembly identifier of the interactive text;

[0044] The interactive text is disassembled based on the disassembly identifier to generate at least one display text.

[0045] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.

[0046] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the method described in the first aspect is implemented.

[0047] The dialogue interaction method, apparatus, device and storage medium proposed in the embodiment of the present application obtains the input text of the target object, and based on the pre-selected display interaction mode, displays at least one display text obtained after responding to the input text one by one in the text display order, and each display text is displayed in a first display frame. Among them, the display text is generated by the following steps: obtaining the disassembly guide of the input text, inputting the disassembly guide and the input text into a pre-trained dialogue assistant model, obtaining the interactive text and at least one disassembly identifier of the interactive text, and disassembling the interactive text based on the disassembly identifier to generate at least one display text. The embodiment of the present application obtains the disassembly guide in combination with the interaction scenario, uses the disassembly guide to disassemble the interactive text, and displays the disassembled display texts one by one in the first display frame. In this way, on the one hand, it avoids the reading difficulty caused by the display of large paragraphs of text, and gradually displays the disassembled display text in sequence, which can guide the user to gradually understand the response content, improve the readability of the interactive text, and improve the user's comprehension efficiency. On the other hand, the interactive text is disassembled using the disassembly guide adapted to the interaction scenario to avoid the interactive text from being interrupted in inappropriate places, resulting in incoherent display text. The disassembled display text is more reasonable and smoother, further improving the interactive experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] FIG1 is a flowchart of a conversation interaction method provided by an embodiment of the present disclosure.

[0049] FIG2 is a schematic diagram of a program software or applet for performing a conversation interaction installed on a terminal of a conversation interaction method provided by yet another embodiment of the present disclosure.

[0050] FIG3 is a schematic diagram of corresponding processes of different interaction scenarios of a conversation interaction method provided by another embodiment of the present disclosure.

[0051] FIG4 is a flowchart of a training process of a conversation assistant model for different interaction scenarios of a conversation interaction method provided in another embodiment of the present disclosure.

[0052] FIG5 is a schematic diagram of the disassembled positions of a conversation interaction method provided in yet another embodiment of the present disclosure.

[0053] FIG6 is a schematic diagram of a disassembly tag generation process of a conversation interaction method provided by another embodiment of the present disclosure.

[0054] FIG. 7 is a flowchart of step S120 in FIG. 1 .

[0055] FIG8 is a schematic diagram of display text of a conversation interaction method provided in yet another embodiment of the present disclosure.

[0056] FIG9 is a schematic diagram of displaying text word by word in a dialog interaction method provided by yet another embodiment of the present disclosure.

[0057] FIG. 10 is another flow chart of step S120 in FIG. 1

[0058] FIG11 is a schematic diagram of display text of a conversation interaction method provided in yet another embodiment of the present disclosure.

[0059] FIG12 is a schematic diagram of segmented display of a display text in a dialogue interaction method provided by yet another embodiment of the present disclosure.

[0060] FIG13 is a flowchart of a display text aggregation process of a conversation interaction method provided by yet another embodiment of the present disclosure.

[0061] FIG14a is a schematic diagram of all aggregations during the aggregation process of displayed texts in a conversation interaction method provided by yet another embodiment of the present disclosure.

[0062] FIG14 b is a schematic diagram of partial aggregation during the aggregation process of displayed text in the conversation interaction method provided by yet another embodiment of the present disclosure.

[0063] FIG15 is a schematic diagram of an interface display of a conversation interaction method provided by another embodiment of the present disclosure without performing interactive text decomposition.

[0064] FIG16 is a schematic diagram of word-based interaction and segment-based interaction of a conversational interaction method provided by another embodiment of the present disclosure.

[0065] FIG17 is a schematic diagram of an interface display of a conversation interaction method provided by another embodiment of the present disclosure.

[0066] FIG18 is a schematic diagram of a display frame shape of a conversation interaction method provided in yet another embodiment of the present disclosure.

[0067] FIG19 is a structural block diagram of a conversation interaction device provided in yet another embodiment of the present disclosure.

[0068] FIG20 is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not intended to limit the present disclosure.

[0070] It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flowchart.

[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art in the art of the present disclosure. The terms used herein are only for the purpose of describing the embodiments of the present disclosure and are not intended to limit the present disclosure.

[0072] First, some terms used in this disclosure are analyzed:

[0073] Artificial Intelligence (AI) is a new technical discipline that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. A branch of computer science, AI seeks to understand the essence of intelligence and create new intelligent machines that can respond in a manner similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thinking. It also encompasses theories, methods, technologies, and application systems that use digital computers or digital computer-controlled machines to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.

[0074] Deep learning: Based on artificial neural networks, it uses multi-layered neural networks to process data and recognize patterns. The core idea of ​​deep learning is to learn complex feature representations and abstract concepts through training on large amounts of data, thereby achieving efficient information processing and decision-making. In deep learning, multi-layered neural networks are used to automatically learn feature representations of data. Each layer of the neural network transforms and abstracts the input data, gradually extracting higher-level feature representations. Through optimization methods such as backpropagation and gradient descent, deep learning models can learn and adjust parameters based on given input data, thereby achieving model training and optimization. Deep learning has a wide range of applications, including image recognition, speech recognition, natural language processing, and recommendation systems.

[0075] Natural Language Processing (NLP) is a discipline that studies how to enable computers to understand and process natural human language. It covers multiple tasks and technologies, aiming to enable computers to interact with, analyze, and generate natural languages ​​used by humans. Natural language processing methods include statistical methods, machine learning methods, and deep learning methods. Statistical methods mainly use probability models and language models, machine learning methods use feature engineering and supervised learning algorithms to build models, and deep learning methods are achieved through the training and learning of deep neural networks. Natural language processing has a wide range of applications, including search engines, intelligent assistants, machine translation, automatic summarization, sentiment analysis, speech recognition, etc.

[0076] Question Answering Systems: Question answering systems are designed to answer questions posed by users. These systems need to understand the meaning of questions and find answers from structured and unstructured data.

[0077] With the continuous development of technology, conversational assistants are increasingly appearing in people's daily lives and work. These AI-powered software enable natural language communication with users, using natural language processing and deep learning techniques to understand user input and generate appropriate responses. Customer service Q&A bots are a common example of a conversational assistant.

[0078] In the related art, when the content input by the user is more complicated, the reply text generated by the dialogue assistant may also become complicated, and often a large amount of reply content containing multiple aspects is directly displayed to the user in the form of text on the interface. In this case, presenting large paragraphs of text on the display interface will affect the user's interactive experience, making it difficult for users to read and reduce their understanding efficiency. In the related art, some people have artificially set disassembly rules, such as the number of sentences in each paragraph, the total length of the text, and other rigid rules to achieve the disassembly of long texts. However, due to the variety of interactive scenarios, disassembly based on rigid regulations makes the disassembled text not in line with human reading habits, which can easily cause more serious reading difficulties after the text is disassembled.

[0079] Based on this, the embodiments of the present disclosure provide a dialogue interaction method, apparatus, device and storage medium, which obtains a disassembly guide in combination with the interaction scene, uses the disassembly guide to disassemble the interactive text, and displays the disassembled display texts one by one in the first display frame. In this way, on the one hand, the reading difficulty caused by the display of large paragraphs of text is avoided, and the disassembled display text is gradually displayed in sequence, which can guide the user to gradually understand the response content, improve the readability of the interactive text, and improve the user's understanding efficiency. On the other hand, the interactive text is disassembled using the disassembly guide adapted to the interaction scene, avoiding the interruption of the interactive text in inappropriate places, resulting in incoherent display text. The disassembled display text is more reasonable and smoother, further improving the interactive experience.

[0080] The embodiments of the present disclosure provide a conversation interaction method, apparatus, device, and storage medium, which are specifically described through the following embodiments. First, the conversation interaction method in the embodiments of the present disclosure is described.

[0081] The embodiments of the present disclosure can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0082] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0083] The dialogue interaction method provided by the embodiment of the present disclosure relates to the field of artificial intelligence technology, and in particular to the field of data mining technology. The dialogue interaction method provided by the embodiment of the present disclosure can be applied to a terminal, can be applied to a server side, or can be a computer program running in a terminal or a server side. For example, a computer program can be a native program or software module in an operating system; it can be a local (Native) application (APP, Application), that is, a program that needs to be installed in the operating system to run, such as a client that supports dialogue interaction, or it can be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form. Among them, the terminal communicates with the server through a network. The dialogue interaction method can be executed by the terminal or the server, or by the terminal and the server in collaboration.

[0084] In some embodiments, the terminal may be a smartphone, tablet computer, laptop computer, desktop computer, or smartwatch. Furthermore, the terminal may also be an intelligent vehicle-mounted device. The intelligent vehicle-mounted device applies the conversational interaction method of this embodiment to provide related services and enhance the driving experience. The server may be a standalone server, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. It may also be a service node in a blockchain system, where each service node in the blockchain system forms a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP). The server may be installed with a server for the conversational interaction system, which can interact with the terminal through the server. For example, corresponding software may be installed on the server. The software may be an application that implements the conversational interaction method, but is not limited to the above forms. The terminal and the server may be connected via Bluetooth, USB (Universal Serial Bus), a network or other communication connection methods, which are not limited in this embodiment.

[0085] The present disclosure can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present disclosure can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present disclosure can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0086] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0087] The following describes the conversation interaction method in the embodiment of the present disclosure.

[0088] Figure 1 is an optional flowchart of a conversational interaction method provided in an embodiment of the present disclosure. The method in Figure 1 may include, but is not limited to, steps S110 to S120, and substeps S121 to S123 of step S120. It should be understood that this embodiment does not specifically limit the order of steps S110 to S120 in Figure 1, and the order of the steps may be adjusted or some steps may be reduced or added based on actual needs.

[0089] Step S110: Obtain input text of the target object.

[0090] In one embodiment, referring to FIG2 , a schematic diagram of a program software or mini-program for interactive conversation is installed on a terminal. The target user is either a user of the program software or mini-program or a test program that simulates human conversational behavior. The test program is used to perform testing during the testing phase of the interactive conversation software or mini-program.

[0091] For example, in Figure 2, the software or applet is named "xx Conversation Assistant". After the target object clicks on the software or applet, the interface shown in Figure 2 appears. The interface includes an input dialog box for receiving the target object's input of input text. The target object enters the input text to be asked in the input dialog box, and the terminal reads the content of the input dialog box in the background to obtain the target object's input text. The input text can be stored in the form of a character string. In addition, the program software or applet can be run in the terminal, and the terminal performs a dialogue interaction process based on the obtained input text, and displays the response information on the interface. The program software or applet can also be run on the server, and only the corresponding interface is displayed in the terminal. The terminal sends the obtained input text to the server via the network for a dialogue interaction process, and then receives the response information returned by the server and displays the response information on the interface. This embodiment does not specifically limit this.

[0092] In one embodiment, when the target object does not make any input, prompt guidance information, such as "Enter your question here", may be displayed in the input dialog box in the interface shown in FIG. 2 .

[0093] Step S120: Based on the pre-selected display interaction mode, at least one display text obtained after responding to the input text is displayed one by one in a text display order, and each display text is displayed in a first display frame.

[0094] In one embodiment, in order to avoid the reading difficulty problem caused by the display of large paragraphs of text when displaying interactive text, this embodiment decomposes the interactive text into one or more display texts, and displays the decomposed display texts one by one in the first display frame, and each display text is displayed in a first display frame to achieve segmented display. This method displays the decomposed display texts step by step in sequence, which can guide the user to gradually understand the response content, improve the readability of the interactive text, and enhance the user's understanding efficiency.

[0095] The following describes the process of generating display text in an embodiment of the present application. Referring to FIG1 , at least one display text is generated by the following steps:

[0096] Step S121: Obtain the interaction scenario of the input text, and obtain disassembly guidance based on the interaction scenario.

[0097] In one embodiment, to improve response efficiency, a common interaction scenario can be pre-set, and the same interaction scenario can be used for subsequent operations for each user. Alternatively, an interaction scenario can be obtained for each user's input text, which can enhance personalization and improve user satisfaction. In one embodiment, there are two ways to obtain the interaction scenario for the input text: the first is key character matching, and the second is to parse the input text into a pre-trained scenario classification model to obtain the interaction scenario for the input text. These two methods are described below.

[0098] In one embodiment, the input text contains key characters related to the scene, and the interaction scene corresponding to the input text can be obtained by matching the key characters with the preset scene information. For example, referring to FIG3 , the corresponding process of different interaction scenes is shown.

[0099] 1) Input text: Please recommend a menu suitable for my morning;

[0100] The extracted key characters are: morning, menu;

[0101] The interaction scenario can be: recipe recommendation.

[0102] 2) Input text: Which department should I go to for gastrointestinal discomfort?

[0103] The extracted key characters are: gastrointestinal, department;

[0104] The interaction scenario could be: medical advice.

[0105] 3) Input text: Please briefly describe the neural network model;

[0106] The key characters extracted are: neural network model;

[0107] The interactive scenario can be: knowledge popularization.

[0108] It is understood that the key characters contained in the input text parsed in this embodiment can be obtained by using key character matching or by performing content parsing using a natural language learning model. Key character matching refers to using a preset list of key characters to search the input text one by one to determine whether the input text contains the matching key characters. Furthermore, the correspondence between key characters and interaction scenarios can also be stored in a preset scenario mapping table. This embodiment does not limit the interaction scenarios, key character extraction methods, or scenario mapping tables.

[0109] It is understandable that the decomposition granularity varies in different interaction scenarios. For example, the knowledge density of interactive texts for knowledge popularization is relatively high, so fine-grained decomposition can be performed. This embodiment does not limit the specific decomposition granularity.

[0110] In one embodiment, the input text may be parsed to obtain user profile data, which is then input into a pre-trained scenario classification model for parsing to obtain interaction scenarios. The scenario classification model herein is a neural network model that can derive corresponding interaction scenarios based on the user profile data. The process of parsing the input text to obtain user profile data is as follows: after obtaining user information, user usage data is obtained from the user information. User usage data may be user behavior data, such as the length of articles a user prefers to read, the length of posts they publish, and user conversation records. User profile data is then obtained based on the user usage data and the input text.

[0111] In one embodiment, user profile data is input into a scenario classification model, which then outputs a corresponding interaction scenario based on the profile data. Different interaction scenarios correspond to different deconstruction guidelines. The profile data is constructed based on the user's historical usage data and / or current usage data, and can, to a certain extent, characterize the user's preferences. Considering that user profiles may differ for different target objects and interaction scenarios, different user profile data correspond to different deconstruction guidelines in different interaction scenarios. For example, if a user prefers a more serious tone in a certain interaction scenario, the deconstruction guidelines may include fewer deconstruction symbols and place them after the entire sentence. Alternatively, if a user's conversation is casual in a certain interaction scenario, the deconstruction guidelines may include more deconstruction symbols, such as deconstructing only three or two words. This embodiment combines the profile data with the scenario classification model to improve the deconstruction guidelines for the conversation assistant model, enabling real-time adjustment of the deconstruction strategy during the deconstruction process, providing more personalized and accurate deconstruction suggestions for different users.

[0112] In one embodiment, if a target object asks multiple questions within a certain period of time, such as five minutes, the interaction scene is only recognized for the first time, and subsequent questions and answers are split using the interaction scene obtained by the first recognition, which can improve the efficiency of question and answering.

[0113] Step S122: Input the disassembly guidance and input text into a pre-trained dialogue assistant model to obtain the interactive text and at least one disassembly identifier of the interactive text.

[0114] In one embodiment, the disassembly instructions and input text are simultaneously input into a pre-trained conversation assistant model. The conversation assistant model needs to generate interactive text based on the input text, and generate disassembly identifiers for disassembling the interactive text based on the interactive scenario. The conversation assistant model can be a large language model, or a sequence-to-sequence model, such as a Seq2Seq model, or a pre-trained language model, such as a GPT model or a BERT model. This embodiment does not limit the specific structure of the conversation assistant model.

[0115] The following describes the training process of the conversational assistant model. Referring to Figure 4, the training process includes the following steps:

[0116] Step S410: Construct a training sample set.

[0117] In one embodiment, the training sample set includes multiple input data samples, each input data sample includes input data and disassembly guidance data, and each input data sample is associated with a set of sample labels, and the sample labels include: interaction data and disassembly labels. Among them, the interaction data is the response content required by the input data sample, and the disassembly label is the disassembly position vector of the interaction data. The disassembly position vector here is obtained by vector representation of the disassembly position of the interaction data. It is understandable that the conversation assistant model will predict the interaction data based on the input data, and then disassemble the interaction data according to the disassembly guidance data, output the predicted disassembly position, and then compare it with the disassembly label.

[0118] In one embodiment, referring to FIG5 , the disassembly position is obtained according to the character position of the interaction data. For example, the number of characters in the interaction data is 15, namely {z1,…,z15}. The interaction data needs to be split into 3 segments, namely {z1,…,z4}, {z5,…,z8} and {z9,…,z15}, which correspond to 2 disassembly positions, namely w1=4 and w2=8. Here, w1=4 indicates disassembly from the back of the 4th character, and w2=8 indicates disassembly from the back of the 8th character. The disassembly position vector can be a vector obtained by vector representation of {4,8}.

[0119] In one embodiment, when constructing the interaction data and the corresponding disassembly labels, the rationality and fluency of the disassembly solution need to be considered, so the disassembly labels can be generated by manual annotation. This embodiment does not limit this.

[0120] In one embodiment, referring to FIG. 6 , the disassembly guide data is obtained by the following steps:

[0121] Step S610: Obtain portrait data of the input data sample.

[0122] In one embodiment, the profile data is derived from the user's historical usage data, which includes historical usage data and / or current usage data. Historical usage data may be usage data collected within a preset time period, and current usage data may be usage data collected during the current time period, where the preset time period is earlier than the current time period. In one embodiment, the usage data may be user behavior data, such as the length of articles the user prefers to read, the length of text posted, user conversation records, and the emotions contained in user texts.

[0123] Step S620: Input the portrait data into the scene classification model to obtain the interaction scene, and obtain the disassembly guidance data according to the interaction scene.

[0124] In one embodiment, when the scene classification model is trained, it is trained using pre-designed data samples. The data samples can be different portrait data, and the labels of the data samples are the corresponding interaction scenes. The scene classification model is then trained using the sample data, and the model weights are adjusted according to the corresponding labels, so that the scene classification model can output reasonable interaction scenes corresponding to different user portraits. Among them, the combination of portrait data and interaction scenes corresponds to disassembly guidance data, and different portrait data corresponds to different disassembly guidance data in different interaction scenes. For example: in a certain interaction scene, the user likes to speak in a serious tone, then the disassembly guidance data can be: fewer disassembly symbols and mostly after the whole sentence. Or if the user has a casual conversation in a certain interaction scene, then the disassembly guidance data can be: including more disassembly symbols, such as disassembling three or two words, etc. It can be understood that the disassembly guidance data can be set according to actual needs. The corresponding relationship between the disassembly guidance data can be: User Profile 1 / Interaction Scenario 1 - Disassembly Guidance Data 1, User Profile 2 / Interaction Scenario 1 - Disassembly Guidance Data 2, User Profile 1 / Interaction Scenario 3 - Disassembly Guidance Data 3... Therefore, after obtaining the interaction scenario, the disassembly guidance data can be obtained by combining it with the user profile. It is understood that the corresponding relationship between the interaction scenario, user profile, and disassembly guidance data can be set according to actual needs.

[0125] The disassembly guidance data constructed through the above process contains portrait data, interaction scenarios and disassembly location related information, which can adapt to the specific needs of each user and generate customized disassembly plans.

[0126] It can be seen from the above-mentioned disassembly guidance data generation process that the conversation assistant model of this embodiment does not require manual formulation of complex disassembly rules when performing disassembly, and does not introduce additional disassembly models. The quality of the disassembly labels is strongly related to the conversation assistant model's own training data, training process, text understanding and disassembly capabilities.

[0127] Step S420: Input the input data sample into the conversation assistant model for prediction to obtain the predicted interaction result and the predicted decomposition vector.

[0128] In one embodiment, an input data sample is fed into a conversational assistant model for prediction, resulting in predicted input data and a predicted decomposition vector. The predicted interaction result is the predicted question and answer content generated by the conversational assistant model for the input data sample, and the predicted decomposition vector is information related to the decomposition position corresponding to the predicted question and answer content.

[0129] Step S430: Obtain a first loss value based on the predicted interaction result and the interaction data, and obtain a second loss value based on the predicted disassembly vector and the disassembly label.

[0130] In one embodiment, loss values ​​are calculated for two predicted data respectively. Specifically, a first loss value L1 is obtained according to the predicted interaction result and the interaction data, and a second loss value L2 is obtained according to the predicted disassembly vector and the disassembly label.

[0131] Step S440: Calculate the total loss value based on the first loss value and the second loss value, and adjust the model weight of the conversation assistant model based on the total loss value until the iteration is completed to obtain a trained conversation assistant model.

[0132] In one embodiment, the total loss value is expressed as: L = a*L1 + (1-a)*L2, where a represents the loss weight and can be set according to actual needs. The conversational assistant model's model weights are then adjusted based on the total loss value until the iteration termination condition is met. The iteration ends, resulting in a trained conversational assistant model. Through multiple iterations, the conversational assistant model's predictive capabilities are continuously deepened.

[0133] The iteration termination conditions include: 1) The number of iterations reaches a preset number of iterations: A preset number of iterations is set for the conversational assistant model to run, and training stops when the preset number of iterations is reached. 2) The total loss value reaches a loss threshold: When the total loss value drops to or approaches the preset loss threshold, the conversational assistant model is considered to have converged, and training stops. This embodiment does not limit the iteration termination conditions.

[0134] It is understood that the conversational assistant model can be continuously updated. For example, once the conversational assistant model is online, it can also obtain real-time feedback from users, using online learning and collaborative filtering techniques to continuously improve the conversational assistant model's decomposition effect. It can also appropriately refer to and introduce the decomposition solutions of similar users to increase the flexibility of decomposing interactive text and adapt to various scenarios in real time. This embodiment does not limit the method of continuously updating the conversational assistant model.

[0135] Step S123: disassembling the interactive text based on the disassembly identifier to generate at least one display text.

[0136] In one embodiment, the conversational assistant model obtained through the above training process can generate interactive text based on the input text, and can also generate a disassembly vector for disassembling the interactive text based on the interactive scenario. Since the disassembly vector represents the disassembly position, the content of the disassembly vector can be parsed to obtain the disassembly identifier, and each disassembly identifier corresponds to the disassembly position. For example, in Figure 5, the disassembly identifier is generated after the 4th character and after the 8th character. The disassembly identifier here can be a pre-set identification symbol, such as "|", "&", etc. This embodiment does not limit the specific symbols of the disassembly identifier.

[0137] In one embodiment, in order to improve the efficiency of the question-and-answer experience, the embodiment of the present application will add welcome and closing remarks before and after the question-and-answer text according to the interaction scenario.

[0138] For example, if the interaction scenario is medical advice, the welcome message can be caring for the user, such as "Dear, I'm sorry to hear that you are not feeling well", and the closing message can be "I hope you get better soon!"

[0139] For example, if the interaction scenario is knowledge popularization, the welcome message can be content that encourages users, such as "I am very happy to provide you with xx related knowledge", and the closing message can be "If you have any questions, please feel free to ask again."

[0140] It is understandable that the welcome and closing remarks can be set according to the actual situation, and this embodiment does not limit them. In this embodiment, the welcome and closing remarks are added before and after the question and answer text. When breaking it down, just input the question and answer text into the dialogue assistant model. After the breaking position is determined, the corresponding breaking mark is added after the welcome and before the closing remarks.

[0141] After obtaining multiple display texts and disassembly marks, they need to be displayed. The following describes the display interaction method of the display text.

[0142] In one embodiment, there are two display interaction modes for displaying text: character-based interaction and paragraph-based interaction. The following describes the display processes of these two display interaction modes respectively.

[0143] In one embodiment, referring to FIG. 7 , when the display interaction mode is word-based interaction, displaying at least one displayed text obtained after responding to the input text one by one in a text display order based on the pre-selected display interaction mode includes the following steps:

[0144] Step S710: Acquire at least one first display data according to the text display order.

[0145] In one embodiment, referring to FIG8 , the interactive text P1 is disassembled to obtain four display texts {X1, X2, X3, X4}, and the disassembly positions are {3, 5, 9}, including three disassembly identifiers, C1, C2, and C3, and the text display order is: X1--X2--X3--X4. For example, the text display order of the display text X3 is the third position. The first display data is obtained by adding a disassembly identifier associated with the display text to the preset position of the display text. If the preset position is the last position, it is equivalent to adding a corresponding disassembly identifier to the last position of the display text. At this time, the last display text has no associated disassembly identifier, so an empty disassembly identifier is associated with the last position of the last display text, and the empty disassembly identifier is C0. The first display texts obtained are: X1C1, X2C2, X3C3, and X4C0. If the preset position is the first position, this is equivalent to adding the corresponding disassembly identifier to the first position of the displayed text. In this case, the first displayed text has no associated disassembly identifier, so an empty disassembly identifier is associated with the first position of the first displayed text. The empty disassembly identifier is C0. The resulting first displayed text is: C0X1, C1X2, C2X3, and C3X4. As can be seen from the above, the disassembly identifier is related to the text display order. Each first displayed text contains a corresponding disassembly identifier, which can be used to locate the first displayed text.

[0146] Step S720: using the first display data as the first target data.

[0147] Step S730: If the preset position is the last position, the text in the first target data is displayed in the first display frame according to the first preset number of characters until the disassembly mark is detected, a new first display frame is generated, and the next first data group is selected as the first target data for display.

[0148] In one embodiment, the first display data is selected one by one as the first target data according to the text display order corresponding to the disassembly identifier. The first preset number of characters here can be one or more than one. In this embodiment, one is taken as an example for illustration. If the preset position is the last position, referring to FIG. 8, the first display text is: X1C1, X2C2, X3C3, and X4C0. Referring to FIG. 9, the first display text X1C1 is used as the first first target data and is displayed in the first first display box K1. Assuming that the content of the display text X1 is "one, two, three, four, five", then "one", "two", "three", "four", and "five" are displayed one by one in the first display box K1 according to the character order. After the character "five" is displayed, the disassembly identifier C1 is detected. At this time, the first display text X1C1 is displayed completely in the corresponding first display box K1. A new first display box K2 is generated, and the first display text X2C2 is used as the second first target data and is displayed in the second first display box K2. Assuming that the content of the display text X2 is "six, seven, eight, nine, ten", then "six", "seven", "eight", "nine", and "ten" are displayed one by one in the first display box K2 according to the character order. After the character "ten" is displayed, the disassembly identifier C2 is detected. At this time, the first display text X2C2 is displayed completely in the corresponding first display box K2. Repeat multiple times until all the first display texts are displayed.

[0149] Step S740: If the preset position is the first position, a first display box is generated according to the detected disassembly identifier, and the display text in the first target data is displayed in the first display box according to the first preset number of characters until the last character of the display text is reached, and the next first data group is selected as the first target data for display.

[0150] In one embodiment, the first display data is selected one by one as the first target data according to the text display order corresponding to the disassembly identifier. The first preset number of characters here can be one or more. In this embodiment, one is taken as an example for illustration. If the preset position is the first position, referring to FIG. 8, the first display text is: C0X1, C1X2, C2X3, and C3X4. Referring to FIG. 9, the first display text C0X1 is taken as the first first target data. First, a first display box K1' is generated according to the detected disassembly identifier C0, and then the first display text is displayed in the first display box K1'. Assuming that the content of the display text X1 is "one, two, three, four, five", then "one", "two", "three", "four", and "five" are displayed one by one in the first display box K1 according to the character order. When the character "five" is displayed, at this time, the first display text C0X1 is displayed in the corresponding first display box K1. A new first display box K2' is generated, and the first display text C1X2 is taken as the second first target data and displayed in the second first display box K2'. Assuming that the content of the display text X2 is "six, seven, eight, nine, ten", then "six", "seven", "eight", "nine", and "ten" are displayed one by one in the first display box K2'. When the character "ten" is displayed, at this time, the first display text X2C2 is displayed in the corresponding first display box K2'. Repeat multiple times, and generate corresponding first display boxes for each first display text according to the disassembly identifier for display until all the first display texts are displayed.

[0151] It can be understood that when displaying a certain display text according to the first preset number of characters, if not all the content is displayed, a prompt message can be added in the first display box until the last display text is displayed, so as to avoid the target object waiting too long. The prompt message can be something like "Typing character by character, please wait a moment". This embodiment does not limit this.

[0152] It can be understood that the character-based interaction can also first obtain all the characters in each first display text and transmit them to the client of the terminal at one time for display according to the first preset number of characters on the display interface of the client. This embodiment does not limit this.

[0153] In one embodiment, referring to FIG. 10, when the display interaction mode is segment-based interaction, based on the pre-selected display interaction mode, the steps of displaying at least one display text obtained after responding to the input text according to the text display order are as follows:

[0154] Step S1010: Obtain at least one second display data according to the text display order.

[0155] In one embodiment, referring to FIG11 , the interactive text P2 is disassembled to obtain four display texts {Y1, Y2, Y3, Y4}, and the disassembly positions are {4, 7, 11}, including three disassembly identifiers, C4, C7, and C11, and the text display order is: Y1--Y2--Y3--Y4. For example, the text display order of the display text Y3 is the third position. The second display data is obtained by adding a disassembly identifier associated with the display text to the preset position of the display text. If the preset position is the last position, it is equivalent to adding a corresponding disassembly identifier to the last position of the display text. At this time, the last display text has no associated disassembly identifier, so an empty disassembly identifier is associated with the last position of the last display text, and the empty disassembly identifier is C0'. The second display texts obtained are: Y1C4, Y2C7, Y3C11, and Y4C0'. If the preset position is the first position, this is equivalent to adding the corresponding disassembly identifier to the first position of the displayed text. In this case, the second displayed text has no associated disassembly identifier, so an empty disassembly identifier is associated with the first position of the second displayed text. The empty disassembly identifier is C0'. The resulting second displayed text is: C0'Y1, C4Y2, C7Y3, and C11Y4. As can be seen from the above, the disassembly identifier is related to the text display order. Each second displayed text contains a corresponding disassembly identifier, which can be used to locate the second displayed text.

[0156] Step S1020: using the second display data as the second target data.

[0157] Step S1030: If the preset position is the last position, the preset content is displayed in the first display frame, and the characters in the text displayed in the second target data are obtained according to the second preset number of characters to form the to-be-displayed text segment until the disassembly mark is detected, and the preset content is replaced with the to-be-displayed text segment to be displayed in the first display frame, and a new first display frame is generated, and the next second data group is selected as the second target data group for display.

[0158] In one embodiment, the second display data is sequentially selected as the second target data according to the text display order corresponding to the disassembly identifier. The second preset character quantity here can be one or more than one. In this embodiment, one is taken as an example for illustration. If the preset position is the last position, referring to FIG. 11, the second display text is: Y1C4, Y2C7, Y3C11, and Y4C0'. Referring to FIG. 12, the second display text Y1C4 is used as the first second target data and is displayed in the first second display box K3. Assume that the content of the display text Y1 is "one, two, three, four, five". First, the preset content is displayed in the second display box K3. The preset content can be "in answer...". The characters "one", "two", "three", "four", and "five" are sequentially obtained according to the character order to form the text segment to be displayed. When the character "five" is obtained, the disassembly identifier C4 is detected. At this time, the content of the text segment to be displayed is "one, two, three, four, five". The original preset content in the second display box K3 is replaced with the text segment to be displayed. At this time, "one, two, three, four, five" is displayed in the second display box K3. Then a new second display box K4 is generated. The second display text Y2C7 is used as the second second target data. At this time, the preset content is displayed in the second second display box K4. The preset content can be "in answer...". After obtaining the complete text segment to be displayed by identifying the disassembly identifier C7 in the above manner, the text segment to be displayed is displayed in the second display box K4. Assume that the content of the display text Y2 is "six, seven, eight, nine, ten". Then after detecting the disassembly identifier C7, the text segment to be displayed is "six, seven, eight, nine, ten". Therefore, the preset content "in answer..." in the second display box K4 is replaced with "six, seven, eight, nine, ten". At this time, the second display text Y2C7 is completely displayed in the corresponding second display box K4. Repeat multiple times until all the second display texts are displayed.

[0159] Step S1040: If the preset position is the first position, a first display box is generated according to the detected disassembly identifier. The preset content is displayed in the first display box. The characters in the display text of the second target data are obtained according to the second preset character quantity to form the text segment to be displayed until reaching the last character of the display text. The text segment to be displayed is used to replace the preset content and is displayed in the first display box. A new first display box is generated, and the next second data group is selected as the second target data group for display.

[0160] In one embodiment, the second display data is sequentially selected as the second target data according to the text display order corresponding to the disassembly identifier. If the preset position is the last position, referring to FIG. 11, the second display text is: C0’Y1, C4Y2, C7Y3, and C11Y4. Referring to FIG. 12, the second display text C0’Y1 is used as the first second target data and is displayed in the first second display box K3’. Assuming that the content of the display text Y1 is "one, two, three, four, five", the disassembly identifier C0’ is first detected, and the second display box K3’ is generated and the preset content is displayed. The preset content can be "in the answer...". The characters "one", "two", "three", "four", and "five" are sequentially obtained according to the character order to form the text segment to be displayed. Until the character "five" is obtained, at this time, the content of the text segment to be displayed is "one, two, three, four, five", and the original preset content in the second display box K3 is replaced with the text segment to be displayed. At this time, "one, two, three, four, five" is displayed in the second display box K3. Then the disassembly identifier C4 is detected, a new second display box K4’ is generated, and the second display text C4Y2 is used as the second second target data. At this time, the preset content is displayed in the second second display box K4’. The preset content can be "in the answer...". After obtaining the complete text segment to be displayed in the above manner, the text segment to be displayed is displayed in the second display box K4’. Assuming that the content of the display text Y2 is "six, seven, eight, nine, ten", the text segment to be displayed is "six, seven, eight, nine, ten". Therefore, in the second display box K4’, the preset content "in the answer..." is replaced with "six, seven, eight, nine, ten". At this time, the second display text C4Y2 is displayed in the corresponding second display box K4’ and is completed. Repeat multiple times until all the second display texts are displayed.

[0161] It can be understood that if not all the display texts are displayed, a prompt message is added outside the second display box until the last display text is displayed, so as to prevent the target object from waiting too long. The prompt message can be something like "inputting, please wait". This embodiment does not limit this.

[0162] In addition, although the interactive text is disassembled in the embodiments of the present application, for the sake of understanding, some symbols can also be used to associate the display texts corresponding to the same interactive text. The symbols can be: square brackets, arrows, or dashed boxes, etc. This embodiment does not limit this.

[0163] The above process describes the process of word-by-word display and segment display of the display text in the embodiments of the present application. It can be seen that in any of the display interaction methods, the disassembly identifier will not be displayed on the interface. Referring to FIG. 13, after step S120 in the embodiments of the present application sequentially displays at least one display text obtained by answering the input text according to the text display order, it further includes:

[0164] Step S1310: Generate a second display box in response to the aggregation instruction of the target object.

[0165] In one embodiment, displaying the question and answer text after disassembling it can improve the reading experience of the target object. If the target object performs multiple question and answer processes, too many first display frames will be displayed on its interface. Therefore, in order to further improve the experience, the embodiment of the present application provides an aggregation function, and the target object can selectively aggregate the previous question and answer processes by aggregating the first display frames. Among them, the aggregation instruction includes an aggregation method, and the aggregation method includes: partial aggregation and full aggregation. Full aggregation refers to aggregating the question and answer text disassembled in each question and answer process on the interface into a corresponding display frame. For example, the interface can display "one-click aggregation". After the target object clicks or touches the icon, the generated aggregation instruction will aggregate the question and answer text disassembled in each question and answer process. Partial aggregation refers to aggregating part of the display text in the selected question and answer text, and the unselected display text is still displayed separately. For example, the target object can obtain the display text that needs to be aggregated by directly selecting it on the interface, or by dragging it, for example, selecting a display text and dragging it, and shaking it on other display texts that need to be aggregated, thereby realizing the selection process.

[0166] In the above embodiment, the display texts to be aggregated are selected according to the aggregation mode. If full aggregation is selected, all display texts of each question and answer text are selected. If partial aggregation is selected, more than one display text is selected as needed. Multiple second display frames are generated according to the number of aggregated text frames.

[0167] Step S1320: Group the displayed texts according to the aggregation method to obtain one or more display groups.

[0168] Step S1330: Display the content of the display group in the second display frame.

[0169] In one embodiment, the display text to be aggregated is considered a display group. If partial aggregation is required, the unselected display text is considered a separate display group. The number of display groups matches the number of second display frames, i.e., a second display frame is provided for each display group. The contents of the display group are displayed within each second display frame. It is understood that the display order of the second display frames is not limited and can be consistent with the logical order of the display text.

[0170] In one embodiment, referring to FIG14a, the question and answer text D1 of the input text T1 is decomposed into five display texts, namely D1-1, D1-2, D1-3, D1-4 and D1-5, and the question and answer text D2 of the input text T2 is decomposed into five display texts, namely D2-1, D2-2, D2-3, D2-4 and D2-5. Clicking the aggregation button "One-click aggregation" on the interface to aggregate all, two second display frames are generated, namely the second display frame S1 and the second display frame S2, D1-1, D1-2, D1-3, D1-4 and D1-5 are aggregated in the second display frame S1, and D2-1, D2-2, D2-3, D2-4 and D2-5 are aggregated in the second display frame S2.

[0171] Referring to Figure 14b, the question and answer text D1 of the input text T1 is decomposed into 5 display texts, namely D1-1, D1-2, D1-3, D1-4 and D1-5, and the question and answer text D2 of the input text T2 is decomposed into 5 display texts, namely D2-1, D2-2, D2-3, D2-4 and D2-5. Partially aggregate the question and answer text D1, select D1-2, D1-4 and D1-5 for aggregation, and fully aggregate the question and answer text D2. The question and answer text D1 also includes two unselected display texts D1-1 and D1-3. A total of four second display frames need to be generated, namely the second display frame S3, the second display frame S4, the second display frame S5 and the second display frame S6. D1-1 is displayed in the second display frame S3, D1-2, D1-4 and D1-5 are aggregated and displayed in the second display frame S4, D1-3 is displayed in the second display frame S5, and D2-1, D2-2, D2-3, D2-4 and D2-5 are aggregated in the second display frame S6.

[0172] It is understood that the aggregation button can be suspended at any position on the interface in a highly transparent manner, or can be set to be hidden. In Figures 14a and 14b, the aggregation button is hidden after aggregation. This embodiment does not limit this.

[0173] As can be seen from the above, aggregating multiple displayed texts within a large display frame allows the target user to more efficiently search and locate useful information. When the target user needs to revisit previous chat records, the multiple disassembled displayed texts can easily cause inconvenience. Therefore, the method of aggregating displayed texts in this embodiment allows the target user to better locate the content they are looking for, simplifies the interactive interface, better meets user needs, and enhances the user experience.

[0174] The following describes the conversation interaction method in the embodiment of the present application through a specific embodiment.

[0175] Referring to Figures 15 to 17 , a terminal is installed with the relevant conversational assistant software. The conversational assistant model runs in the background, and the interface includes a target user icon and an assistant icon. The target user enters the text "How to relieve stomach pain" on the software interface. The terminal then determines that the interaction scenario is medical advice and simultaneously inputs the input text and the medical scenario into the conversational assistant model to generate the interaction text and multiple breakdown identifiers for the interaction text. The interaction text is: "1. Hot compress: Applying a hot water bottle to your stomach can help relieve pain. 2. Drinking hot tea: Warming tea, such as brown sugar ginger tea, can promote blood circulation and relieve pain. 3. Gently rub your stomach: Gently rub the painful area with both hands in a counterclockwise direction to relieve the pain." The welcome message is: "Dear, I'm sorry to hear you have such a severe stomachache. It's okay. The assistant is here to tell you some ways to relieve it." The closing message is: "I hope you get better soon and that your stomachache will no longer bother you. I wish you good health."

[0176] If the interactive text is not separated, the welcome message, interactive text and closing message will be displayed together in one text box, as shown in Figure 15. In this case, the large text display may cause difficulty in reading.

[0177] This embodiment of the application uses a disassembly identifier to disassemble the interactive text into five display texts, namely:

[0178] Display text 1 (welcome): "Dear, I'm sorry to hear that you have such a severe stomachache. It's okay, the assistant is here to tell you some ways to relieve stomach pain~";

[0179] Display text 2: "1. Hot compress: Apply a hot water bottle to your stomach to help relieve pain."

[0180] Display text 3: "2. Drink hot tea: Warming tea, such as brown sugar ginger tea, can promote blood circulation and relieve pain."

[0181] Display text 4: "3. Gently rub your abdomen: Use both hands to gently rub the painful area in a counterclockwise direction. This can help relieve the pain."

[0182] Display text 5: "I hope you can get better soon, dear, and the stomachache problem will no longer bother you. I wish you good health."

[0183] Referring to FIG16 , in the word-by-word interaction mode, each displayed text is displayed in the first display frame according to a first preset number of characters. When the displayed text is displayed word by word, a prompt is added in the first display frame before all the contents are displayed. The prompt is "Entering word by word, please wait" and is not displayed until the displayed text 5 is displayed.

[0184] Referring to Figure 16 , in segment-based interaction, each displayed text is displayed as a complete paragraph in the second display frame, with the preset content being "Answering..." If not all displayed text is displayed, a prompt is added outside the second display frame, such as "Input in progress, please wait." The prompt is removed until the displayed text 5 is completely displayed.

[0185] Refer to Figure 17, which shows the disassembled display interface. In the figure, each display text corresponds to a display box, and an assistant icon is associated with each display box of the interactive text.

[0186] If the target user needs to aggregate the displayed text, as shown in Figure 17, the interface includes an aggregation icon called "One-click aggregation." This embodiment uses the example of full aggregation. In Figure 17, Display Text 1, Display Text 2, Display Text 3, Display Text 4, and Display Text 5 are aggregated and displayed in a single text box. This allows the target user to better locate the content they are looking for, simplifying the interactive interface, better meeting user needs, and improving the user experience.

[0187] In one embodiment, the first display frame and the second display frame can be of any shape. Referring to FIG. 16 , they can be rectangular or irregularly shaped, such as a bubble. They can also include a display frame background, etc. This embodiment does not limit the shape of the display frame.

[0188] The technical solution provided by the embodiment of the present disclosure obtains the input text of the target object, and based on the pre-selected display interaction mode, displays at least one display text obtained after responding to the input text one by one in the text display order, and each display text is displayed in a first display frame. Among them, the display text is generated by the following steps: obtaining the disassembly guide of the input text, inputting the disassembly guide and the input text into a pre-trained dialogue assistant model, obtaining the interactive text and at least one disassembly identifier of the interactive text, and disassembling the interactive text based on the disassembly identifier to generate at least one display text. The embodiment of the present application obtains the disassembly guide in combination with the interaction scene, uses the disassembly guide to disassemble the interactive text, and displays the disassembled display texts one by one in the first display frame. In this way, on the one hand, it avoids the reading difficulty caused by the display of large paragraphs of text, and gradually displays the disassembled display text in sequence, which can guide the user to gradually understand the response content, improve the readability of the interactive text, and improve the user's comprehension efficiency. On the other hand, the interactive text is disassembled using the disassembly guide adapted to the interaction scene to avoid the interactive text from being interrupted in inappropriate places, resulting in incoherent display text. The disassembled display text is more reasonable and smoother, further improving the interactive experience.

[0189] The present disclosure also provides a conversation interaction device that can implement the above-mentioned conversation interaction method. Referring to FIG. 19 , the device includes:

[0190] Input acquisition module 1910: used to obtain input text of the target object;

[0191] Interactive display module 1920: configured to display at least one display text obtained after responding to the input text one by one in a text display order based on a pre-selected display interaction mode, with each display text being displayed in a first display frame;

[0192] At least one display text is generated by the following steps:

[0193] Obtain the interaction scenario of the input text and obtain the disassembly guidance based on the interaction scenario;

[0194] Inputting the disassembly guidance and input text into a pre-trained conversational assistant model to obtain interaction text and at least one disassembly identifier of the interaction text;

[0195] The interactive text is disassembled based on the disassembly identifier to generate at least one display text.

[0196] In one embodiment, referring to FIG19 , the conversation interaction device further includes: an aggregation display module 1930: for generating a second display frame in response to an aggregation instruction of a target object; the aggregation instruction includes an aggregation method; the display text is grouped according to the aggregation method to obtain one or more display groups; the number of display groups is consistent with the number of second display frames; and the content of the display group is displayed in the second display frame.

[0197] The specific implementation of the conversation interaction device of this embodiment is basically the same as the specific implementation of the conversation interaction method described above, and will not be repeated here.

[0198] The present disclosure also provides an electronic device, including:

[0199] at least one memory;

[0200] at least one processor;

[0201] at least one program;

[0202] The program is stored in the memory, and the processor executes the at least one program to implement the above-mentioned dialogue interaction method of the present disclosure. The electronic device can be any smart terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), an in-vehicle computer, etc.

[0203] Please refer to FIG20 , which illustrates a hardware structure of an electronic device according to another embodiment. The electronic device includes:

[0204] The processor 2001 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present disclosure.

[0205] The memory 2002 can be implemented in the form of ROM (Read Only Memory), static storage device, dynamic storage device, or RAM (Random Access Memory). The memory 2002 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 2002 and is called by the processor 2001 to execute the dialogue interaction method of the embodiments of this disclosure.

[0206] Input / output interface 2003, used to implement information input and output;

[0207] Communication interface 2004, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); and

[0208] Bus 2005 , which transmits information between various components of the device (e.g., processor 2001 , memory 2002 , input / output interface 2003 , and communication interface 2004 );

[0209] The processor 2001 , the memory 2002 , the input / output interface 2003 and the communication interface 2004 are connected to each other in communication within the device via the bus 2005 .

[0210] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the above-mentioned dialogue interaction method is implemented.

[0211] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0212] The dialogue interaction method, dialogue interaction device, electronic device, and storage medium proposed in the embodiments of the present disclosure obtain the input text of the target object, and based on the pre-selected display interaction mode, display at least one display text obtained after responding to the input text one by one in the text display order, and each display text is displayed in a first display frame. Among them, the display text is generated by the following steps: obtaining the disassembly guide of the input text, inputting the disassembly guide and the input text into a pre-trained dialogue assistant model, obtaining the interactive text and at least one disassembly identifier of the interactive text, and disassembling the interactive text based on the disassembly identifier to generate at least one display text. The embodiment of the present application obtains the disassembly guide in combination with the interaction scene, uses the disassembly guide to disassemble the interactive text, and displays the disassembled display texts one by one in the first display frame. In this way, on the one hand, it avoids the reading difficulty caused by the display of large paragraphs of text, and gradually displays the disassembled display text in sequence, which can guide the user to gradually understand the response content, improve the readability of the interactive text, and improve the user's comprehension efficiency. On the other hand, the interactive text is disassembled using the disassembly guide adapted to the interaction scene to avoid the interactive text from being interrupted in inappropriate places, resulting in incoherent display text. The disassembled display text is more reasonable and smoother, further improving the interactive experience.

[0213] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0214] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0215] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0216] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0217] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0218] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

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

[0220] The units described above as separate components may or may not be physically separate, and the components shown as units 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 these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0221] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0222] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0223] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.

Claims

1. A conversation interaction method, characterized in that: include: Get the input text of the target object; Based on the pre-selected display interaction mode, at least one display text obtained after responding to the input text is displayed one by one in a text display order, and each of the display texts is displayed in a first display frame; The at least one display text is generated by the following steps: Acquire an interaction scenario of the input text, and acquire a disassembly guide based on the interaction scenario; Inputting the disassembly guide and the input text into a pre-trained dialogue assistant model to obtain an interactive text and at least one disassembly identifier of the interactive text; The interactive text is disassembled based on the disassembly identifier to generate at least one display text.

2. The method for dialog interaction according to claim 1, characterized in that: The step of inputting the disassembly guide and the input text into a pre-trained dialog assistant model to obtain an interactive text and at least one disassembly identifier of the interactive text includes: Inputting the disassembly guide and the input text into a pre-trained dialogue assistant model to obtain the interaction text and the disassembly position; The disassembly mark is generated according to the disassembly position.

3. The method for dialog interaction according to claim 1, characterized in that: The display interaction mode includes: word-based interaction; the at least one display text obtained after responding to the input text one by one according to the text display order based on the pre-selected display interaction mode includes: Acquire at least one first display data according to the text display order; the first display data is obtained by adding the disassembly mark associated with the display text to a preset position of the display text; using the first display data as first target data; If the preset position is the last position, the display text in the first target data is displayed in the first display frame according to the first preset number of characters until the disassembly mark is detected, a new first display frame is generated, and the next first data group is selected as the first target data for display; If the preset position is the first position, the first display frame is generated according to the detected disassembly mark, and the display text in the first target data is displayed in the first display frame according to the first preset number of characters until the last character of the display text is reached, and the next first data group is selected as the first target data for display.

4. The method for dialog interaction according to claim 1, characterized in that: The display interaction mode includes: segment interaction; the display interaction mode based on the pre-selected display interaction mode, displaying at least one display text obtained after responding to the input text one by one according to the text display order, includes: Acquire at least one second display data according to the text display order; the second display data is obtained by adding the disassembly mark associated with the display text to a preset position of the display text; using the second display data as second target data; If the preset position is the last position, the preset content is displayed in the first display frame, and the characters in the display text in the second target data are obtained according to the second preset number of characters to form a text segment to be displayed, until the disassembly mark is detected, the preset content is replaced by the text segment to be displayed in the first display frame, and a new first display frame is generated, and the next second data group is selected as the second target data group for display; If the preset position is the first position, the first display frame is generated according to the detected disassembly mark, the preset content is displayed in the first display frame, and the characters in the display text in the second target data are obtained according to the second preset number of characters to form a text segment to be displayed until the last character of the display text is reached, and the preset content is replaced by the text segment to be displayed in the first display frame, and a new first display frame is generated, and the next second data group is selected as the second target data group for display.

5. The method for dialog interaction according to claim 1, characterized in that: After displaying at least one display text obtained after responding to the input text one by one in the text display order, the method further includes: In response to the aggregation instruction of the target object, generating a second display frame; the aggregation instruction includes an aggregation method; The display texts are grouped according to the aggregation method to obtain one or more display groups; the number of the display groups is the same as the The number of the second display frames is consistent; The content of the display group is displayed in the second display frame.

6. The dialog interaction method according to any one of claims 1 to 5, characterized in that: The conversation assistant model is trained through the following steps: Constructing a training sample set; the training sample set includes: a plurality of input data samples, the input data samples include input data and disassembly guidance data; the input data samples are associated with sample labels, the sample labels include interaction data and disassembly labels, and the disassembly labels are disassembly position vectors corresponding to the interaction scenes of the input data samples; Inputting the input data sample into the conversation assistant model for prediction, and obtaining a predicted interaction result and a predicted decomposition vector; Obtaining a first loss value according to the predicted interaction result and the interaction data, and obtaining a second loss value according to the predicted disassembly vector and the disassembly label; A total loss value is calculated based on the first loss value and the second loss value, and the model weight of the dialogue assistant model is adjusted based on the total loss value until the iteration ends, thereby obtaining the trained dialogue assistant model.

7. The method for dialog interaction according to claim 6, characterized in that: The disassembly guidance data is obtained through the following steps: Acquire portrait data of the input data sample; the portrait data is obtained according to user usage data, and the user usage data includes historical usage data and / or current usage data; The portrait data is input into a scene classification model to obtain an interaction scene, and the disassembly guidance data is obtained according to the interaction scene.

8. A conversational interaction device, characterized in that: include: Input acquisition module: used to obtain the input text of the target object; An interactive display module: used for displaying at least one display text obtained after responding to the input text one by one according to a text display order based on a pre-selected display interaction mode, and each of the display texts is displayed in a first display frame; The at least one display text is generated by the following steps: Acquire an interaction scenario of the input text, and acquire a disassembly guide based on the interaction scenario; Inputting the disassembly guide and the input text into a pre-trained dialogue assistant model to obtain an interactive text and at least one disassembly identifier of the interactive text; The interactive text is disassembled based on the disassembly identifier to generate at least one display text.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the conversation interaction method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the conversation interaction method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Graphical rail transit structured emergency plan making system and method

    CN112215430A

  • Text correction method and device, computer equipment and storage medium

    CN113761189A

  • Semantic segmentation model training method, intention understanding method and device

    CN115018516A

  • Question and answer knowledge base construction method and device and electronic equipment

    CN115269805A

  • Retrieval method, device and equipment and readable storage medium

    CN115481214A