Conversation interaction method and related apparatus
The new conversation is triggered by sliding input, which solves the problem of historical data interference in electronic devices when switching topics, simplifies the process of launching new topics, and improves the user experience.
Patent Information
- Application Number
- PCT/CN2025/076953
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-20
- Filing Date
- 2025-02-12
- Publication Date
- 2025-08-28
AI Technical Summary
When electronic devices switch topics, relying on historical dialogue data causes replies to not meet user needs and lack a concise new topic startup mechanism.
Try a new conversation by sliding input, cancel display of historical conversation data, and prompt a new conversation when the sliding distance reaches the preset value, simplifying the operation process.
It enables simple start of new conversations without increasing interface complexity, improve user experience, and avoid mistreatment and historical data interference.
Smart Images

Figure CN2025076953_28082025_PF_FP_ABST
Abstract
Description
A conversation interaction method and related device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on February 20, 2024, with application number 202410188528.X and application name “A conversational interaction method and related device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of terminals, and in particular to a conversation interaction method and related devices. Background Art
[0003] Nowadays, more and more electronic devices are offering smart assistant features. When enabled, these devices can communicate with users through artificial intelligence (AI). These devices can accurately and concisely answer questions posed by users in natural language, meeting their needs for quick and accurate information.
[0004] Electronic devices can learn from conversation data during conversations with users, allowing them to provide responses that better meet their needs. As the amount of conversation data between users and electronic devices increases, the electronic devices will respond to subsequent questions based on information in areas related to historical conversation data. When users want responses from the electronic devices in other areas, the electronic devices will still respond based on the historical conversation data areas. This makes it difficult for users to switch to new topics, and how electronic devices can start new conversations has become a pressing issue. Summary of the Invention
[0005] This application provides a conversation interaction method and related apparatus, which enables a simpler and faster way to start a new conversation through sliding input. The electronic device also does not need to provide a control or icon for triggering a new conversation operation, making the content displayed by the electronic device more concise and beautiful.
[0006] In a first aspect, the present application provides a conversation interaction method, applied to an electronic device, the electronic device including a touch screen. The method comprises: displaying a first display area, the first display area displaying a first portion of a first page, the first page including multiple conversation data; receiving first conversation data, displaying second conversation data in the first display area; receiving a first input of sliding in a first direction on the first page; in response to the sliding input, displaying a first prompt message, the first prompt message prompting a user to start a new conversation with the electronic device; after displaying the first prompt message, if third conversation data identical to the first conversation data is received, displaying fourth conversation data in the first display area, the fourth conversation data being different from the second conversation data. In this way, upon receiving the first input of sliding in the first direction, the electronic device can set the conversation model to an initial state and start a new conversation, simplifying user operation. Furthermore, the conversation interface does not need to provide controls or icons for triggering a new conversation, making the conversation interface more concise and aesthetically pleasing.
[0007] In a possible implementation, the sliding distance of the sliding input is greater than or equal to a preset distance. In this way, the electronic device can be set with a preset distance, and when it is detected that the user's sliding distance is greater than the preset distance, a new dialogue operation is performed to avoid accidental touches.
[0008] In some examples, the preset distance is the product of the length of the first display area in the first direction and a preset ratio. For example, the preset ratio is 80%. In this way, the electronic device sets the preset ratio according to the length of the first display area, which can be applicable to dialogue interfaces displayed by the electronic device in different display formats.
[0009] In other examples, the first display area belongs to the dialogue interface, and the preset distance is the product of the length of the dialogue interface in the first direction and the preset ratio.
[0010] In other examples, the preset distance is the product of the length of the electronic device in the first direction and the preset ratio. In this way, the preset distance can be set according to the length of the electronic device, which is applicable to electronic devices of various sizes.
[0011] In one possible implementation, upon receiving a first input of sliding in a first direction on a first page, the method further includes controlling the first page to move in the first direction, with the first page moving a distance less than or equal to the sliding distance of the first input. In this way, the first page can move as the user slides, making it easier for the user to understand the sliding distance and providing a prompt to the user before performing the sliding operation.
[0012] In one possible implementation, displaying the first prompt information in response to the first input specifically includes: displaying the first prompt information and canceling display of the conversation data on the first page in response to the first input. In this way, after receiving the first input, the electronic device can cancel display of the conversation data on the first page, preventing historical conversation data from interfering with a new conversation between the user and the electronic device.
[0013] In one possible implementation, after displaying the first prompt information and canceling the display of the conversation data on the first page in response to the first input, the method further includes: receiving a second input; and redisplaying the conversation data on the first page in response to the second input. Thus, after the electronic device cancels the display of the conversation data on the first page in response to the first input, it can redisplay the historical conversation data on the first page upon receiving the second input, making it easier for the user to view the historical conversation data.
[0014] In one possible implementation, the second input is a sliding input in a second direction, which is opposite to the first direction. In this way, a sliding input in the first direction can trigger the electronic device to cancel displaying the historical conversation data, while a sliding input in the second direction opposite to the first direction can trigger the electronic device to redisplay the historical conversation data, which is more in line with user usage habits.
[0015] In one possible implementation, after displaying the first prompt message and canceling the display of the conversation data on the first page in response to the first input, the method further includes: displaying a second prompt message, the second prompt message being used to prompt the user to trigger the electronic device to redisplay the conversation data on the first page through the second input. In this way, after canceling the display of the conversation data on the first page, the electronic device can prompt the user through the second prompt message how to trigger the electronic device to redisplay the historical conversation data.
[0016] In one possible implementation, upon receiving a first input of sliding in a first direction on a first page, the method further includes: displaying a third prompt message, the third prompt message being used to prompt the user that continuing to slide in the first direction will trigger the electronic device to create a new conversation. Thus, upon receiving the first input, the electronic device can prompt the user to continue sliding to trigger the electronic device to create a new conversation if the sliding distance is less than a preset distance.
[0017] In one possible implementation, upon receiving a first input of sliding in a first direction on a first page, the method further includes: displaying a fourth prompt message, the fourth prompt message being used to prompt the user that leaving the touch screen will trigger the electronic device to create a new conversation. Thus, upon receiving the first input, the electronic device can prompt the user to leave the touch screen to trigger the electronic device to create a new conversation if the sliding distance is greater than or equal to a preset distance.
[0018] In one possible implementation, before receiving a first input of sliding in a first direction on a first page, the method further includes: displaying a fifth prompt message, the fifth prompt message being used to prompt the user that sliding in the first direction will trigger a new conversation on the electronic device. In this way, the electronic device can display the fifth prompt message before receiving the first input, and use the fifth prompt message to prompt the user how to trigger a new conversation on the electronic device.
[0019] In one possible implementation, after displaying the first prompt message and before receiving the third conversation data, the method further includes: if a third input is received; in response to the third input, canceling the display of the first prompt message; after canceling the display of the first prompt message, receiving the third conversation data, and displaying the second conversation data. In this way, the electronic device can cancel the new conversation operation in response to the third input.
[0020] In one possible implementation, before displaying the first interface, the method further includes: displaying the first interface; receiving a fourth input; and, in response to the fourth input, displaying a first display area, wherein the first display area displays the second portion of the first page. Thus, when the electronic device displays the first interface, the first display area can be displayed in response to the fourth input, wherein the first display area is used to display conversation data between the electronic device and the user.
[0021] In some examples, when the electronic device displays the second portion of the first page, the first page does not include the plurality of conversation data. In this way, the electronic device can start a new conversation with the user when the smart assistant function is turned on.
[0022] In other examples, when the electronic device displays the second part of the first page, the first page includes the plurality of conversation data. In this way, the electronic device can display the historical conversation data when the smart assistant function is turned on, making it easier for the user to view the historical conversation data.
[0023] In one possible implementation, when the first display area displays the second portion of the first page, the length of the first display area is the first length; when the first display area displays the first portion of the first page, the length of the first display area is the second length, where the second length is greater than the first length. In this way, the electronic device can increase the length of the first display area as the conversation data between the user and the electronic device increases.
[0024] In a possible implementation, the first display area belongs to a first card component. In this way, the electronic device can display the first page in the form of a card component.
[0025] In one possible implementation, the first direction is from the bottom of the electronic device to the top of the electronic device, or from the left side of the electronic device to the right side of the electronic device. In this way, setting the input that triggers the electronic device to execute a new conversation operation as a swipe to the top or right side can better make the user associate the historical conversation data with pushing it off the screen, which is more in line with the user's usage habits.
[0026] In a second aspect, the present application provides an electronic device comprising: a touch screen, one or more processors and one or more memories; the touch screen, one or more memories are coupled to one or more processors, and the one or more memories are used to store computer executable programs. When the one or more processors execute the computer executable programs, the electronic device executes any possible implementation method as in the first aspect.
[0027] In a third aspect, the present application provides a computer-readable storage medium storing a computer program. When the computer program runs on a processor of an electronic device, the electronic device executes any possible implementation method as described in the first aspect.
[0028] In a fourth aspect, the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any possible implementation method as described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] FIG1 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0030] FIG2 is a software structure block diagram of an electronic device provided in an embodiment of the present application;
[0031] Figures 3A-3M are a set of interface diagrams of the conversation interaction method provided in an embodiment of the present application;
[0032] 4A-4B are another set of interface diagrams of the conversation interaction method provided in an embodiment of the present application;
[0033] 5A-5D are another set of interface diagrams of the conversation interaction method provided in an embodiment of the present application;
[0034] 6A-6H are another set of interface diagrams of the conversation interaction method provided in an embodiment of the present application;
[0035] 7A-7E are another set of interface diagrams of the conversation interaction method provided in an embodiment of the present application;
[0036] FIG8 is a flow chart of a conversation interaction method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The following is a clear and detailed description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0038] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0039] After receiving the user's input to wake up the smart assistant, the electronic device can display a dialogue interface in response to the input. Among them, the input to wake up the voice assistant may include but is not limited to voice input including a preset wake-up word (for example, "Xiaoyi, Xiaoyi"), a long press input for the power button, an input for the voice assistant icon (for example, a single click), etc. The electronic device can display the dialogue data between the user and the electronic device in the dialogue interface to facilitate the user to browse the historical dialogue data. After receiving the dialogue data input by the user, the electronic device can obtain relevant information about the dialogue data, and determine the reply dialogue data (also called reply data) based on the obtained relevant information through artificial intelligence technology.
[0040] To ensure that the electronic device can obtain response data that better meets the user's needs, the electronic device can use historical conversation data and related information as reference data during the conversation with the user. When the electronic device receives the user's input conversation data, it can determine the response data based on the user's input conversation data and the reference data. It is understood that the more conversation data between the electronic device and the user, the more relevant the electronic device's response will be to the user.
[0041] Specifically, after receiving input from the user to wake up the smart assistant, the electronic device can respond to the input and obtain the conversation data entered by the user. The electronic device can use the conversation model to obtain reply data based on the conversation data. During the conversation with the user, the electronic device can learn from the historical conversation data between the electronic device and the user. In other words, the electronic device can adjust the parameters of the electronic device's conversation model based on the historical conversation data. The electronic device can use the adjusted conversation model to determine reply data based on the conversation data entered by the user.
[0042] In the embodiments of the present application, it can be considered that an electronic device that has not communicated with the user is in an initial state, and an electronic device that has communicated with the user is in a non-initial state. The dialogue model of an electronic device in an initial state is also in an initial state, and the dialogue model of an electronic device in a non-initial state is also in a non-initial state. For example, when an electronic device receives input from a user to wake up a smart assistant, it is in an initial state, and the dialogue model of the electronic device in the initial state has not learned the dialogue data. After receiving the dialogue data input by the user, the electronic device is in a non-initial state, and the dialogue model of the electronic device in the non-initial state is learning historical dialogue data or has already learned historical dialogue data.
[0043] It is understood that after receiving the user's input to end the current conversation, the electronic device can, in response to the input, set the electronic device to the initial state, that is, set the conversation model to the initial state. After receiving the user's input to wake up the smart assistant again, the electronic device can use the conversation model in the initial state to obtain reply data based on the conversation data entered by the user.
[0044] In some application scenarios, an electronic device in an initial state may obtain reply data 1 based on conversation data 1 input by the user. An electronic device in a non-initial state may obtain reply data 2 based on conversation data 1, and reply data 1 and reply data 2 are different.
[0045] The dialogue model used by the electronic device in the initial state may be a dialogue model provided by the dialogue server, wherein the dialogue server may be configured to train the dialogue model based on training data using artificial intelligence technology.
[0046] Next, the electronic device provided by the embodiments of the present application is introduced.
[0047] The electronic device may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device.
[0048] FIG1 shows a schematic structural diagram of an electronic device.
[0049] The following embodiments are described in detail using an electronic device as an example. It should be understood that the electronic device shown in FIG1 is merely an example, and that the electronic device may have more or fewer components than shown in FIG1 , may combine two or more components, or may have a different component configuration. The various components shown in the figure may be implemented in hardware, including one or more signal processing and / or application-specific integrated circuits, software, or a combination of hardware and software.
[0050] The electronic device may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0051] It is understood that the structures illustrated in the embodiments of the present invention do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0052] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0053] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals based on instruction operation codes and timing signals to complete the control of instruction fetching and execution.
[0054] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0055] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0056] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0057] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the electronic device's wireless charging coil. While charging the battery 142, the charging management module 140 can also power the electronic device through the power management module 141.
[0058] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0059] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0060] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0061] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied in electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0062] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0063] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0064] In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS).
[0065] The electronic device implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0066] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display screen panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniLED, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device can include one or N display screens 194, where N is a positive integer greater than one.
[0067] The electronic device can realize the shooting function through the ISP, camera 193, video codec, GPU, display 194 and application processor.
[0068] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and other factors. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0069] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0070] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when an electronic device selects a frequency, the DSP performs a Fourier transform on the frequency energy.
[0071] Video codecs are used to compress or decompress digital video. Electronic devices may support one or more video codecs. This allows them to play or record videos in a variety of encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0072] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU enables intelligent cognitive applications in electronic devices, such as image recognition, face recognition, speech recognition, and text comprehension.
[0073] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0074] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0075] The electronic device can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor. For example, music playback, recording, etc. The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be set in the processor 110, or some functional modules of the audio module 170 can be set in the processor 110. The speaker 170A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. The microphone 170C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. The headphone jack 170D is used to connect wired headphones.
[0076] The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 180A can be provided on the display screen 194. The gyroscope sensor 180B can be used to determine the motion posture of the electronic device. The air pressure sensor 180C is used to measure air pressure. The magnetic sensor 180D includes a Hall effect sensor. The electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip cover. The acceleration sensor 180E can detect the magnitude of the electronic device's acceleration in various directions (generally three axes). The distance sensor 180F is used to measure distance. The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector. The electronic device can use the proximity light sensor 180G to detect when a user holds the electronic device close to their ear to make a call, thereby automatically turning off the screen to save power. The ambient light sensor 180L is used to sense the brightness of ambient light. The fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect temperature. The touch sensor 180K, also known as the "touch panel," is also known as the touch panel. The touch sensor 180K can be mounted on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen." The bone conduction sensor 180M can capture vibration signals. The buttons 190 include a power button, a volume button, and other buttons. These buttons can be mechanical or touch-sensitive. The motor 191 can generate vibration prompts. The indicator 192 can be an indicator light that can indicate charging status, battery level changes, messages, missed calls, and notifications. The SIM card interface 195 is used to connect a SIM card.
[0077] The following describes the software structure of the electronic device provided in the embodiment of the present application.
[0078] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes an operating system of a layered architecture as an example to illustrate the software structure of the electronic device.
[0079] FIG2 is a block diagram of the software structure of the electronic device according to an embodiment of the present application.
[0080] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, an operating system is divided into four layers: the application layer, the application framework layer, the runtime and system libraries layer, and the kernel layer.
[0081] The application layer can include a series of application packages.
[0082] As shown in Figure 2, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and smart assistant. Among them, the smart assistant application can be used to provide a smart assistant function. When the smart assistant function is turned on, the electronic device can communicate with the user.
[0083] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0084] As shown in FIG2 , the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, and the like.
[0085] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0086] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0087] The phone manager is used to provide communication functions for electronic devices, such as call status management (including answering, hanging up, etc.).
[0088] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0089] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0090] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0091] The runtime can refer to all code libraries and frameworks required for a program to run. For example, for the C language, the runtime includes a series of function libraries required to run C programs. For the Java language, the runtime includes the core library and the virtual machine. The core library includes the functions that the Java language needs to call. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files in the application layer and application framework layer as binary files. The virtual machine is responsible for performing functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0092] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0093] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0094] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H. 264, MP3, AAC, AMR, JPG, PNG, etc.
[0095] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0096] A 2D graphics engine is a drawing engine for 2D drawings.
[0097] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, sensor driver, etc.
[0098] The following example illustrates the workflow of electronic device software and hardware, using the scenario of enabling the smart assistant function.
[0099] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into raw input events (including touch coordinates, timestamp of the touch operation and other information). The raw input events are stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the smart assistant application icon as an example, the smart assistant application calls the interface of the application framework layer to start the smart assistant application. Optionally, the smart assistant application can also call the kernel layer through the interface of the application framework layer to start the audio driver and collect the user's audio through the microphone. The smart assistant application can call the relevant interface of the application framework layer, obtain conversation data based on the collected audio recognition, and send the conversation data to the display screen 194 for display.
[0100] In one possible implementation, after receiving input from a user to wake up a smart assistant, the electronic device displays a conversation interface in response to the input. The conversation interface is used for the user to engage in a conversation with the electronic device. The conversation interface includes a conversation display area and a menu bar control. The conversation display area is used to display conversation data between the user and the electronic device. The menu bar control can be used to trigger the electronic device to display a menu bar. The menu bar includes one or more setting controls, which can be used to set the conversation interface, including a new conversation control. After receiving input to the menu bar control, the electronic device can display the menu bar in response to the input. After receiving input to the new conversation control in the menu bar, the electronic device can execute a new conversation operation in response to the input. In this way, after executing the new conversation operation, the electronic device can clear the historical conversation data between the electronic device and the user. After clearing the historical conversation data, the electronic device can reset the conversation model to its initial state. The historical conversation data does not affect the content of the conversation between the electronic device and the user after the new conversation is created. However, the user needs to select the corresponding function from a menu / button, which makes the interaction less natural. Each new conversation requires multiple steps, which is cumbersome.
[0101] In another possible implementation, after receiving input from the user to wake up the smart assistant, the electronic device displays a conversation interface in response to the input. The conversation interface includes a conversation display area and a new conversation control. The conversation display area is used to display the conversation data between the user and the electronic device. After receiving input from the new conversation control, the electronic device can execute a new conversation operation in response to the input. In this way, after clearing the historical conversation data, the electronic device can resume the conversation with the user. The electronic device's reply will not be affected by the historical conversation data, and a new reply can be given to the user. However, the new conversation control occupies the visual space of the electronic device display screen, increases the complexity of the conversation interface, and has a poor user experience.
[0102] An embodiment of the present application provides a method for dialogue interaction. An electronic device includes a touch screen. After receiving input from a user to wake up a smart assistant, the electronic device can, in response to the input, display a dialogue display area on the touch screen. The dialogue display area includes a chat page, and the chat page is used to display dialogue data between the user and the electronic device. The electronic device can, after receiving input from a user sliding a first distance in a first direction on the chat page and leaving the touch screen of the electronic device, respond to the input and perform a new dialogue operation. Wherein, the first distance is greater than or equal to a preset distance. When the first direction is a longitudinal direction (for example, from the bottom of the electronic device to the top of the electronic device), the preset distance is the product of the longitudinal distance of the dialogue display area and a preset ratio 1 (for example, 50%, 80%, etc.). When the first direction is a transverse direction (for example, from the left side of the electronic device to the right side of the electronic device, or from the right side of the electronic device to the left side of the electronic device), the preset distance is the product of the longitudinal distance of the dialogue display area and a preset ratio 1. In this way, the electronic device can set the dialogue model to the initial state in response to the input of sliding the first distance in the first direction and start a new dialogue, making user operation more convenient. In addition, the dialogue interface does not need to provide controls or icons for triggering new dialogue operations, making the dialogue interface more concise and beautiful.
[0103] In some examples, the electronic device may display a prompt message on the touch screen prompting the user to start a new conversation with the electronic device in response to an input of sliding the device in a first direction and a first distance. In this way, the user can start a new conversation with the electronic device according to the prompt message.
[0104] In some examples, the electronic device can cancel the display of historical conversation data in the chat page in response to an input of sliding the device in a first direction by a first distance. In this way, the electronic device can start a new conversation without being disturbed by the historical conversation data, and provide the user with a more concise chat page.
[0105] In one possible implementation, the first direction is from the bottom of the electronic device to the top of the electronic device, and the preset distance is the product of the longitudinal distance of the conversation display area and a preset ratio of 1. The electronic device can, in response to receiving a user input requesting to wake up the smart assistant, display a conversation interface. The conversation interface includes a conversation display area, which includes a chat page. Upon receiving a user input requesting to swipe away from the touch screen of the electronic device by a first distance on the chat page, the electronic device can, in response to the input, initiate a new conversation. The first distance is greater than or equal to the preset distance. In this way, the electronic device can reset the conversation model to its initial state and initiate a new conversation in response to the upward swipe input, simplifying user operation. Furthermore, the conversation interface does not need to provide a control or icon for triggering the new conversation operation, making the conversation interface more concise and aesthetically pleasing. It should be noted that the preset distance being the product of the longitudinal distance of the conversation display area and the preset ratio of 1 is merely an example. The preset distance can also be the product of the longitudinal distance of the conversation interface and the preset ratio of 1, and this is not limited in this embodiment of the present application.
[0106] Exemplarily, as shown in FIG3A , the electronic device displays a desktop 300. The desktop 300 may include a plurality of application icons (for example, a smart assistant application icon 301, etc.). Among them, the smart assistant application icon 301 can be used to trigger the electronic device to display the interface of the smart assistant application, which can be used to wake up the smart assistant. Optionally, a status bar is also displayed above the desktop 300, and the status bar may include information such as the strength indicator of the communication signal, the battery value, and the time. Optionally, there may be a tray (dock) area below the desktop 300, and the dock area may include one or more tray icons (for example, a dial application icon, a message application icon, a contact application icon, a camera application icon, etc.).
[0107] After receiving the user's input to wake up the smart assistant, the electronic device can respond to the input and display the dialogue interface 310 as shown in Figure 3B. Among them, the input to wake up the smart assistant can be a specific voice command. For example, the specific voice command can be a preset voice command, or a voice command input by the user in advance. Here, the voice command can be "Xiao Yi Xiao Yi". It should be noted that it is not limited to waking up the smart assistant through voice commands. The electronic device can also receive input from the user by long pressing the power button to wake up the voice assistant. Alternatively, the electronic device can receive the user's input for a specified control in the interface of the smart assistant application to wake up the voice assistant, etc., and the embodiments of the present application are not limited to this.
[0108] As shown in Figure 3B, conversation interface 310 includes a conversation display area 311. Conversation display area 311 includes a chat page 312. Chat page 312 is used to display historical conversation data between the user and the electronic device. Optionally, conversation interface 310 may also include a function bar 313. Function bar 313 may include one or more function controls. These one or more function controls may include, but are not limited to, a keyboard control 314, an add control 316, and a voice control 315. Keyboard control 314 can be used to trigger the electronic device to display a keyboard area, where a user can enter text messages. Add control 316 can be used to trigger the electronic device to display an add area, where images, documents, and other stored information can be sent to the conversation model. Voice control 315 can be used to trigger the electronic device to stop collecting the user's audio data. Voice control 315 can also be used to indicate that the electronic device is currently collecting the user's audio data. The electronic device can convert the collected audio data into text data and display the text data on the chat page. Optionally, conversation interface 310 may also include a more control 317, which can be used to trigger the electronic device to display a menu bar. Optionally, the dialogue interface 310 may further include prompt information for prompting the user to trigger a new dialogue on the electronic device by sliding up input.
[0109] Optionally, after receiving the user's input to wake up the smart assistant, the electronic device may, in response to the input, display the dialogue interface 310 shown in FIG3B while outputting an input prompt for the user to enter dialogue data. For example, the electronic device may announce the input prompt by voice. For example, the input prompt may be: "I am here." In this way, the user can enter dialogue data into the electronic device after hearing the input prompt.
[0110] After receiving conversation data input by the user, the electronic device may display the conversation data. For example, the conversation data may be voice input, such as conversation data 31 of "Write an article about Field 1." After receiving conversation data 31 input by the user, the electronic device may display a dialog box 321 as shown in FIG3C . Dialog box 321 may display the conversation data input by the user in the form of text. Here, the text in dialog box 321 is the conversation data 31 input by the user.
[0111] When the electronic device receives the user's voice input, it can recognize the input voice information and obtain dialogue data 31. The electronic device can use the initial dialogue model to obtain response data 32 based on dialogue data 31. After obtaining response data 32, the electronic device can display a dialogue interface 310 as shown in FIG3D .
[0112] As shown in Figure 3D , the chat page 312 of the conversation interface 310 includes multiple dialog boxes. These multiple dialog boxes include dialog box 321 and dialog box 331. Dialog box 321 is used to display the conversation data 31 entered by the user, and dialog box 331 is used to display the response data 32 determined by the electronic device based on the conversation data. Dialog interface 310 may also include a start conversation control 333, which can be used to trigger the electronic device to collect the user's audio data. It should be noted that upon receiving the user's input to the start conversation control 333, the electronic device may collect the user's audio data, remove the display of the start conversation control 333, and display the voice control 315 shown in Figure 3B . Similarly, when the electronic device displays the voice control 315 shown in Figure 3B , upon receiving the user's input to the voice control 315, the electronic device may stop collecting the user's audio data, derive conversation data based on the user's audio data, remove the display of the voice control 315, and display the start conversation control 333.
[0113] Optionally, the electronic device can search for activity information related to the conversation data based on the conversation data input by the user. The electronic device can display the activity information. In this way, generally, the user enters the conversation data to ask the electronic device a question, and the electronic device displays the activity information related to the conversation data, which can help the user better understand the conversation data. For example, the electronic device can use a memo application or a calendar application to remind the user of the time of the event when the event starts or some time before the event starts. For example, the electronic device can also display a dialog box 332 in the chat page 312 shown in Figure 3D. The dialog box 332 can be used to indicate that the electronic device has added a memo information, which can be used to remind the user to participate in activities in the field related to the conversation data 31.
[0114] When displaying conversation interface 310 as shown in FIG3D , the electronic device may, upon receiving user input for the start conversation control 333 , collect user audio data in response to this input. Based on the collected audio data, the electronic device determines that conversation data 33 is "Question 1." Based on this determined conversation data 33, the electronic device may display conversation interface 310 as shown in FIG3E . This conversation interface 310 includes dialog box 341 , which contains the most recently entered conversation data 33.
[0115] Optionally, the electronic device collects the user's audio data when the duration of displaying the dialogue interface 310 shown in FIG3D reaches a preset waiting time. In this way, the electronic device can actively collect the user's audio data after displaying the reply data for a period of time, without the user having to trigger the electronic device to collect audio data.
[0116] After the electronic device obtains the conversation data 33 included in dialog box 341, it can use the non-initial conversation model to obtain response data 34 based on conversation data 33. Specifically, the electronic device can adjust the initial conversation model based on conversation data 31 and response data 32 to obtain the non-initial conversation model. After obtaining response data 34, the electronic device can display dialog box 342, as shown in FIG3F , based on response data 34. As shown in FIG3F , dialog box 342 includes response data 34. For example, response data 34 includes textual information such as: "In domain 1, question 1XXX."
[0117] When the electronic device displays the conversation interface 310 shown in FIG3F , after receiving an input of sliding up a first distance as shown in FIG3G , it can, in response to the input, perform a new conversation operation and display the conversation interface 310 shown in FIG3H . As shown in FIG3H , the chat page 312 in the conversation interface 310 cancels the display of the multiple dialog boxes shown in FIG3F .
[0118] Optionally, conversation interface 310 may further include prompt 351, which may be used to inform the user that the electronic device has established a new conversation. For example, prompt 351 may be a text prompt: "Let's start a new conversation." It is understood that when the electronic device displays conversation interface 310 as shown in FIG3F , it may reset the conversation model to its initial state upon receiving an upward swipe input of the first distance as shown in FIG3G . This allows the electronic device to initiate a new conversation with the user without being affected by historical conversation data.
[0119] When the electronic device displays the dialogue interface 310 shown in Figure 3H, the electronic device may, after receiving the user's input for the start dialogue control 333, respond to the input and collect the user's audio data. Here, based on the collected audio data, the electronic device determines that the dialogue data 35 is: "Question 1". Based on the determined dialogue data 35, the electronic device may display the dialogue interface 310 shown in Figure 3I. The dialogue interface 310 includes a dialog box 352, which includes the dialogue data 35 most recently input by the user. Here, the dialogue data 35 is the same as the dialogue data 33. Optionally, the dialogue interface 310 shown in Figure 3H may further include prompt information 351. Optionally, the electronic device collects the user's audio data when the duration of displaying the dialogue interface 310 shown in Figure 3H reaches a preset waiting time.
[0120] After the electronic device obtains the conversation data 35 included in the dialog box 352, it can use the initial conversation model to obtain reply data 36 based on the conversation data 35. Among them, the conversation data 33 and the conversation data 35 are the same, and the reply data 36 and the reply data 34 are different. After obtaining the reply data 36, the electronic device can display the dialog box 353 shown in Figure 3J based on the reply data 36. As shown in Figure 3J, the dialog box 353 includes reply data 36. For example, the reply data 36 includes text information: "Question 1XXX". In this way, after the electronic device receives the user input and creates a new conversation, the electronic device is not affected by the historical conversation data and can determine different reply data for the same conversation data entered by the user. Optionally, the conversation interface 310 shown in Figure 3J can also include prompt information 351. In this way, the electronic device can prompt the user to start a new conversation with the electronic device through the prompt information 351.
[0121] In an embodiment of the present application, the electronic device canceling the display of historical conversation data can be used to reset the electronic device to an initial state. The electronic device no longer uses the historical conversation data and determines the reply data. The electronic device may also store the historical conversation data and display the historical conversation data after receiving a user input to view the historical conversation data.
[0122] In some examples, the electronic device may perform a new conversation operation and cancel the display of the historical conversation data displayed on the chat page after receiving an input of sliding in a first direction (e.g., sliding up) for a first distance. The electronic device may redisplay the historical conversation data on the chat page after receiving a specified input from the user. For example, the specified input may be an input of sliding a second distance in a second direction on the chat page. In some examples, the second direction is opposite to or the same as the first direction. In some examples, the second distance is greater than or equal to a preset distance. In this way, the electronic device can redisplay the historical conversation data to facilitate the user to view the historical conversation data. It will be understood that the specified input is only an example, and the specified input may be other inputs, for example, the specified input may be an input of double-clicking on the chat page, etc., and the embodiments of the present application are not limited to this.
[0123] It can be understood that after the electronic device displays a prompt message prompting the user to start a new conversation with the electronic device in response to an input of sliding a first distance in a first direction, if the electronic device receives a specified input, the electronic device can cancel the display of the prompt message in response to the specified input.
[0124] Optionally, when the electronic device cancels display of the historical conversation data in the conversation interface, it may also display historical prompt information. The historical prompt information may be used to prompt the user that the electronic device may redisplay the historical conversation data after receiving a specified input.
[0125] For example, when displaying the conversation interface 310 shown in FIG3F , the electronic device may, upon receiving an input indicating a swipe up a first distance as shown in FIG3G , execute a new conversation operation in response to the input and display the conversation interface 310 shown in FIG3K . As shown in FIG3K , the conversation interface 310 does not include the one or more dialog boxes shown in FIG3F . Optionally, the conversation interface 310 may also include prompt information 355 . Prompt information 355 may be used to prompt the user that a specified input may be used to trigger the electronic device to redisplay historical conversation data. For example, prompt information 355 may include the text prompt information shown in FIG3K : "Pull down to view history." It should be noted that prompt information 355 is not limited to the text prompt information shown in FIG3K , and may also include the text prompt information: "Swipe back to view history." This is not limited to this embodiment of the present application. It is understood that when displaying the conversation interface 310 shown in FIG3K , the electronic device may, upon receiving a specified input from the user, display the conversation interface 310 shown in FIG3F or the conversation interface 310 shown in FIG3L . As shown in FIG3L , the conversation interface 310 may include the one or more dialog boxes shown in FIG3F . Optionally, the dialogue interface 310 may further include prompt information 361. For a description of the prompt information 361, reference may be made to the description of the prompt information 351, which will not be repeated here.
[0126] In other examples, after receiving an input indicating a swipe in a first direction (e.g., swiping up) for a first distance, the electronic device performs a new conversation operation. The electronic device may continue to display historical conversation data on the chat page. In this way, after the electronic device creates a new conversation, the user can still view historical conversation data in the conversation interface. In some scenarios, this facilitates the user to compare different responses to the same question on the electronic device. For example, when the electronic device displays the conversation interface 310 shown in FIG3F , after receiving an input indicating a swipe up for a first distance as shown in FIG3G , the electronic device may, in response to the input, display the conversation interface 310 shown in FIG3L . As shown in FIG3L , the conversation interface 310 includes one or more dialog boxes shown in FIG3F . Optionally, the conversation interface 310 may also include prompt information 361 . For a description of prompt information 361 , please refer to the description of prompt information 351 and will not be repeated here. It is understood that when the electronic device displays the conversation interface 310 shown in FIG3L , after receiving conversation data input by the user, the dialog box displaying the conversation data may be updated on the chat page 312 .
[0127] It should be noted that the above-mentioned electronic device collects the user's audio data and obtains conversation data based on the audio data is only an example. The electronic device can also receive the user's input for the keyboard control 314 as shown in Figure 3B, display the keyboard area, and receive the conversation data typed by the user through the keyboard area. The embodiments of the present application are not limited to this.
[0128] In some examples, the electronic device can control the chat page to move in a first direction when receiving input indicating that the user has swiped the chat page in a first direction (e.g., swiped up) a first distance. The distance the chat page moves is less than or equal to the distance the user has swiped the chat page. In this way, the electronic device can control the chat page to move upward to show the user the process of historical conversation data being moved off the touch screen, allowing the user to understand that swiping upward can trigger a new conversation on the electronic device.
[0129] Exemplarily, when the electronic device displays the conversation interface 310 shown in FIG3F , it may display the conversation interface 310 shown in FIG3M upon receiving an input of sliding up a first distance as shown in FIG3M . Specifically, compared to the chat page 312 shown in FIG3F , the chat page 312 shown in FIG3M has moved upward by a first distance. When the electronic device receives an input of the user sliding up a first distance to display the conversation interface 310 shown in FIG3M , it may, after detecting an input of the user leaving the touch screen of the electronic device, perform a new conversation operation in response to the input. The electronic device may also display the conversation interface 310 shown in FIG3H or the conversation interface 310 shown in FIG3K in response to the input. In this way, the electronic device can push historical conversation data out of the conversation display area of the electronic device by sliding up a first distance, so that the electronic device can start a new conversation with the user.
[0130] In some examples, the electronic device can control the chat page to move in the first direction when receiving input that the user slides the chat page in the first direction (for example, swipe up) for a first distance. After the electronic device detects that the user has slid the first distance in the first direction, when the user leaves the touch screen, the electronic device controls the chat page to move in the second direction to the position before receiving the first distance of sliding in the first direction, and performs a new conversation operation when the chat page moves to the previous position, and the second direction is opposite to the first direction. In this way, the electronic device can indicate that the user is sliding the first distance in the first direction by controlling the chat page to move. After controlling the chat page to move in the first direction, the electronic device can control the chat page to move in the second direction. Optionally, when performing the new conversation operation, the electronic device can retain the historical conversation data displayed in the chat page to facilitate the user to view the historical conversation data.
[0131] For example, when the electronic device receives input that the user swipes up a first distance and displays the conversation interface 310 shown in Figure 3M, after detecting input that the user leaves the touch screen of the electronic device, the electronic device can, in response to the input, control the chat page 312 to slide down, and when the chat page 312 slides down to the position of the chat page 312 shown in Figure 3F, display the chat page 312 shown in Figure 3H. Alternatively, when the electronic device receives input that the user swipes up a first distance and displays the conversation interface 310 shown in Figure 3M, after detecting input that the user leaves the touch screen of the electronic device, the electronic device can, in response to the input, control the chat page 312 to slide down until the electronic device displays the chat page 312 shown in Figure 3L.
[0132] In some examples, the electronic device may display a new conversation prompt message 1 when it detects that the distance the user swipes in the first direction on the chat page of the conversation interface is greater than or equal to a third distance during the process of receiving an input in which the user swipes (e.g., swipes up) a first distance and leaves the touch screen of the electronic device. The new conversation prompt message 1 can be used to prompt the user that if the user continues to swipe up, the electronic device will be triggered to perform a new conversation operation. The third distance is less than a preset distance. In this way, the electronic device can display information to prompt the user that the swipe up input is used to trigger the electronic device to perform a new conversation operation during the process of receiving the user's swipe up input, so that the user can understand the operation triggered by the swipe up input, avoid the situation where the user accidentally touches the electronic device to create a new conversation, and facilitate the user to decide whether to create a new conversation.
[0133] Exemplarily, the electronic device displays the conversation interface 310 shown in FIG3F , and the electronic device receives a user's upward swipe input on the chat page 312. The electronic device may display the conversation interface 310 shown in FIG4A when detecting that the distance the user has swiped on the chat page reaches a third distance. As shown in FIG4A , the conversation interface 310 includes prompt information 401. Prompt information 401 is a new conversation prompt information 1, which can be used to prompt the user that if the user continues to swipe up, the electronic device will be triggered to perform a new conversation operation. The prompt information 401 may include but is not limited to text prompt information, image prompt information, audio prompt information, etc. For example, prompt information 401 may include text prompt information: "Continue to swipe up more than half a screen to create a new conversation."
[0134] In some examples, the electronic device may display a new conversation prompt message 2 when it detects that the distance the user swiped in the first direction on the chat page is greater than or equal to a fourth distance during the process of receiving input that the user swiped (e.g., swiped up) a first distance and left the touch screen of the electronic device. The new conversation prompt message 2 can be used to prompt the user to leave the touch screen of the electronic device, which will trigger the electronic device to create a new conversation. The fourth distance is greater than or equal to a preset distance. In this way, the electronic device can use the new conversation prompt message 2 to prompt the user that there is no need to continue the swiping up operation, and that the electronic device can trigger a new conversation by simply leaving the touch screen.
[0135] Exemplarily, the electronic device displays the conversation interface 310 shown in FIG3F , and the electronic device receives a user's upward swipe input on the chat page 312. The electronic device may display the conversation interface 310 shown in FIG4B when detecting that the distance the user has swiped on the chat page reaches a fourth distance. As shown in FIG4B , the conversation interface 310 includes prompt information 402. Prompt information 402 is a new conversation prompt information 2, which can be used to prompt the user that if the user leaves the touch screen, the electronic device will be triggered to perform a new conversation operation. The prompt information 402 may include, but is not limited to, text prompt information, image prompt information, audio prompt information, etc. For example, the prompt information 402 may include a text prompt information: "A new conversation will be created after releasing the touch screen."
[0136] Alternatively, the electronic device displays the conversation interface 310 shown in FIG3F , and receives a swipe-up input from the user on the chat page 312. Upon detecting that the user has swiped up on the chat page to a third distance, the electronic device may display the conversation interface 310 shown in FIG4A . Upon detecting that the user has swiped up on the chat page to a fourth distance, the electronic device displays the conversation interface 310 shown in FIG4A .
[0137] It is understandable that when the electronic device detects that the distance the user has swiped in the first direction on the chat page is less than a preset distance, it detects that the user has left the touch screen, and the electronic device can continue to display the chat page including the historical conversation data. Among them, the conversation model of the electronic device is the same as the conversation model before receiving the user's sliding input. That is, the electronic device will not perform the operation of creating a new conversation. In this way, if the user does not want to trigger the electronic device to perform the operation of creating a new conversation, the user slides a distance in the first direction on the touch screen and can directly leave the touch screen when the sliding distance is less than the preset distance, without changing the conversation model of the electronic device. For example, the electronic device displays the conversation interface 310 shown in Figure 3F, the electronic device receives the user's upward swipe input on the chat page 312, and the electronic device detects that the distance the user has slid on the chat page is less than the preset distance when leaving the touch screen, and the electronic device continues to display the conversation interface 310 shown in Figure 3F.
[0138] In some examples, when the electronic device controls the chat page to move in a first direction as the user slides in the first direction, the electronic device can control the chat page to move in a third direction when it detects that the user leaves the touch screen and the distance the chat page slides is less than a preset distance, until the electronic device displays the chat page before receiving the user's sliding input, and the third direction is opposite to the first direction.
[0139] In some examples, after detecting that the user slides a chat page in a first direction for a first distance, then slides in a third direction for a fifth distance, and leaves the touch screen after sliding in the third direction for the fifth distance, the electronic device continues to display the chat page including historical conversation data. The difference between the first distance and the fifth distance is less than the preset distance, and the third direction is opposite to the first direction. In this way, the electronic device can receive the user's input and cancel the operation of creating a new conversation. For example, the electronic device displays the conversation interface 310 shown in Figure 4B, and the electronic device detects that the user has not left the touch screen. The electronic device detects that the user slides down for a fifth distance and leaves the touch screen of the electronic device after sliding down for the fifth distance, and the electronic device can display the conversation interface 310 shown in Figure 3F.
[0140] In some examples, when displaying conversation data on a chat page, the electronic device may display a prompt message prompting the user to trigger a new conversation on the electronic device by sliding in a first direction by a first distance. Thus, after receiving the conversation data input by the user, the electronic device determines that the user has a desire to create a new conversation and may prompt the user, through the prompt message, to trigger the new conversation on the electronic device by sliding in the first direction by a first distance.
[0141] In some examples, after receiving input from the user to wake up the smart assistant for the first time, the electronic device may, in response to the input, display a prompt message prompting the user to trigger a new conversation on the electronic device by sliding in a first direction a first distance. In this way, when the user first uses the smart assistant function, the electronic device prompts the user to trigger a new conversation on the electronic device by sliding in a first direction a first distance. Afterwards, the electronic device may not display the prompt message in the conversation interface, or it may help the user trigger a new conversation on the electronic device through a simple gesture.
[0142] In one possible implementation, the first direction is a direction from the right side of the electronic device to the left side of the electronic device, and the preset distance is the product of the horizontal distance of the conversation display area and the preset ratio 1. After receiving the user's input to wake up the smart assistant, the electronic device can respond to the input and display a conversation interface, where the conversation interface includes a conversation display area, and the conversation display area includes a chat page. After receiving the user's input that the chat page swipes right a first distance and leaves the touch screen of the electronic device, the electronic device can respond to the input and perform a new conversation operation. In this way, the electronic device can set the conversation model to the initial state in response to the right swipe input and start a new conversation, making the user operation easier. In addition, the conversation interface does not need to provide controls or icons for triggering the new conversation operation, making the conversation interface more concise and beautiful.
[0143] In some examples, the electronic device may execute a new conversation operation after receiving a right swipe input of a first distance, wherein the conversation interface maintains display of historical conversation data.
[0144] In other examples, after receiving a right-swipe input of a first distance, the electronic device may execute a new conversation operation and cancel the display of historical conversation data in the conversation interface. After receiving a specified input from the user, the electronic device may redisplay the historical conversation data in the chat page. Specifically, the description of the specified input can be found in the above embodiment and will not be repeated here. In this way, the electronic device can redisplay the historical conversation data, making it easier for the user to view the historical conversation data. Optionally, when canceling the display of historical conversation data in the conversation interface, the electronic device may also display a historical prompt message. The historical prompt message can be used to prompt the user that the electronic device can redisplay the historical conversation data after receiving the specified input.
[0145] Optionally, after creating a new conversation, the electronic device may display a prompt message on the conversation interface to remind the user that the electronic device has created a new conversation.
[0146] Optionally, when the electronic device receives an input that the user swipes right on the chat page, it displays a sliding line, the length of which is the same as the distance the user swipes right. In this way, the electronic device can prompt the user that the user is sliding right through the sliding line.
[0147] Exemplarily, when the electronic device displays the dialogue interface 310 as shown in Figure 3F, it can perform a new dialogue operation in response to the input after receiving the input of sliding right for a first distance as shown in Figure 5A. The electronic device can also display the dialogue interface 310 as shown in Figure 3H in response to the input, or display the dialogue interface 310 as shown in Figure 3K, or display the dialogue interface 310 as shown in Figure 3L, or display the dialogue interface 310 as shown in Figure 5B. For details, please refer to the above embodiments and will not be repeated here. Optionally, when the electronic device receives the input of sliding right for a first distance as shown in Figure 5A, it displays a sliding line 501, and the length of the sliding line 501 increases with the increase of the sliding distance.
[0148] As shown in Figure 5B, the dialogue interface 310 includes a prompt message 502, which can be used to prompt the user that the electronic device can be triggered to display historical dialogue data through a specified input. For example, the prompt message 502 can include the text prompt message shown in Figure 5B: "Swipe left to view historical records." It should be noted that, in addition to being limited to the text prompt message shown in Figure 5B, the prompt message 502 can also include a text prompt message: "Swipe back to view historical records." This is not limited in the embodiments of the present application. The electronic device displays the dialogue interface 310 as shown in Figure 5B. The electronic device can display the dialogue interface 310 as shown in Figure 5A when it detects that the distance the user slides to the left exceeds the preset sliding distance 1 when the user leaves the touch screen.
[0149] In some examples, after receiving the user's input to wake up the smart assistant for the first time, the electronic device can, in response to the input, display a prompt message prompting the user to trigger a new conversation on the electronic device by swiping up. In this way, when the user first uses the smart assistant function, the electronic device prompts the user to trigger a new conversation on the electronic device by swiping right. After that, the electronic device may not display the prompt message in the conversation interface, or it may help the user trigger a new conversation on the electronic device through a simple gesture.
[0150] In other examples, the electronic device can control the chat page to move right after receiving input that the user swipes right on the chat page a first distance. The distance the chat page moves right is less than or equal to the distance the user swipes right on the chat page. In this way, the electronic device can control the chat page to move right to show the user the process of historical conversation data being moved off the touch screen, allowing the user to understand that swiping right can trigger a new conversation on the electronic device.
[0151] In some examples, the electronic device may display a new conversation prompt message 1 when it detects that the user has swiped right on the chat page of the conversation interface for a first distance and then left the touch screen of the electronic device while receiving input from the user. The new conversation prompt message 1 can be used to prompt the user that if the user continues to swipe right, the electronic device will trigger the execution of a new conversation operation. The third distance is less than a preset distance. In this way, the electronic device can display a message prompting the user that the right swipe input triggers the electronic device to execute a new conversation operation while receiving the user's right swipe input. This helps the user understand the operation triggered by the right swipe input, avoids the situation where the user accidentally touches the electronic device and causes a new conversation to be created, and facilitates the user's decision whether to create a new conversation.
[0152] Exemplarily, the electronic device displays the conversation interface 310 shown in FIG3F , and the electronic device receives a right swipe input from the user on the chat page 312. When the electronic device detects that the distance the user swipes right on the chat page reaches a third distance, the electronic device may display the conversation interface 310 shown in FIG5C . As shown in FIG5C , the conversation interface 310 includes prompt information 511 , which is a new conversation prompt information 1 , which can be used to prompt the user that if the user continues to swipe right, the electronic device will be triggered to perform a new conversation operation. The prompt information 511 may include but is not limited to text prompt information, image prompt information, audio prompt information, etc. For example, the prompt information 511 may include a text prompt information: "Continue to swipe right for more than half a screen to create a new conversation." Optionally, the electronic device may display a sliding line 512. The description of the sliding line 512 can be found in the above embodiment and will not be repeated here.
[0153] In some examples, the electronic device may display a new conversation prompt message 2 when it detects that the user has swiped right on the chat page for a fourth distance, while receiving input from the user swiping right on the chat page for a first distance and then leaving the touch screen of the electronic device. The new conversation prompt message 2 can be used to prompt the user to leave the touch screen of the electronic device to trigger a new conversation on the electronic device. The fourth distance is greater than or equal to a preset distance. Thus, the electronic device can use the new conversation prompt message 2 to prompt the user that they no longer need to swipe right and that leaving the touch screen will trigger a new conversation on the electronic device.
[0154] Exemplarily, the electronic device displays the conversation interface 310 shown in FIG3F , and the electronic device receives a right swipe input from the user on the chat page 312. The electronic device may display the conversation interface 310 shown in FIG5D when detecting that the distance the user swipes right on the chat page reaches a fourth distance. As shown in FIG5D , the conversation interface 310 includes prompt information 521. Prompt information 521 is a new conversation prompt information 2, which can be used to prompt the user that if the user leaves the touch screen, the electronic device will be triggered to perform a new conversation operation. The prompt information 521 may include but is not limited to text prompt information, image prompt information, audio prompt information, etc. For example, the prompt information 521 may include a text prompt information: "A new conversation will be created after releasing the hand." Optionally, the electronic device may display a sliding line 522. The description of the sliding line 522 can be found in the above embodiment and will not be repeated here.
[0155] Alternatively, the electronic device displays the conversation interface 310 shown in FIG3F , and the electronic device receives a right swipe input from the user on the chat page 312. The electronic device may display the conversation interface 310 shown in FIG5C upon detecting that the distance the user has swiped right on the chat page has reached a third distance. The electronic device displays the conversation interface 310 shown in FIG5C , and upon detecting that the distance the user has swiped right on the chat page has reached a fourth distance, the electronic device displays the conversation interface 310 shown in FIG5D . It is understandable that when the electronic device displays the conversation interface 310 shown in FIG5D , if it detects that the user has left the touch screen of the electronic device, the electronic device may execute a new conversation operation. For details, please refer to the above embodiments, which will not be described in detail here.
[0156] Similarly, when the electronic device detects that the distance the user swipes right on the chat page is less than a preset distance, it detects that the user has left the touch screen, and the electronic device can continue to display the chat page including the historical conversation data. Among them, the conversation model of the electronic device is the same as the conversation model before receiving the user's right swipe input. The electronic device will not perform the operation of creating a new conversation. In this way, if the user swipes right on the touch screen for a certain distance when he does not want to trigger the electronic device to perform the operation of creating a new conversation, he can directly leave the touch screen when the right swipe distance is less than the preset distance, and the conversation model of the electronic device will not be changed. For example, the electronic device displays the conversation interface 310 shown in Figure 3F, the electronic device receives the user's right swipe input on the chat page 312, and the electronic device detects that the distance the user swipes right on the chat page is less than the preset distance when leaving the touch screen, and the electronic device continues to display the conversation interface 310 shown in Figure 3F.
[0157] In some examples, if the chat page of the electronic device moves to the right with the user's right swipe input, the electronic device can control the chat page to move to the left when it detects that the user leaves the touch screen and the distance the chat page swipes to the right is less than a preset distance, until the electronic device displays the interface before receiving the user's right swipe input.
[0158] In some examples, after detecting that the user swipes right on the chat page for a first distance, then swipes left for a fourth distance, and leaves the touch screen after swiping left for the fourth distance, the electronic device may continue to display the chat page including historical conversation data. The difference between the first distance and the fourth distance is less than the preset distance. In this way, the electronic device can receive the user's input and cancel the operation of creating a new conversation. Exemplarily, the electronic device displays the conversation interface 310 shown in Figure 5D, and at this time the electronic device detects that the user has not left the touch screen. The electronic device detects that the user swipes left for a fourth distance, and leaves the touch screen of the electronic device after swiping left for the fourth distance, and the electronic device may display the conversation interface 310 shown in Figure 3F. Optionally, when the electronic device receives input of a horizontal slide from the user, it can control the chat page 312 to move as the user slides.
[0159] Similarly, the electronic device can also receive input from the user swiping left on the chat page a first distance and leaving the touch screen of the electronic device, and in response to the input, perform a new conversation operation. Specifically, the description of the electronic device triggering the new conversation operation by swiping left can be found in the above embodiment and will not be repeated here.
[0160] In one possible implementation, the electronic device includes a touch screen. After receiving input from the user to wake up the smart assistant, the electronic device can display a conversation window in response to the input, the conversation window including a conversation display area, and the conversation display area including a chat page. After receiving input from the user sliding a first distance in a first direction on the chat page and leaving the touch screen of the electronic device, the electronic device can perform a new conversation operation in response to the input. In this way, the electronic device can perform a new conversation operation in response to input of sliding a first distance in a first direction on the chat page during the display of the conversation window. The electronic device can set the conversation model to an initial state and start a new conversation with the user, making the user operation easier. In addition, the conversation window does not need to provide controls or icons for triggering the new conversation operation, making the conversation window more concise and beautiful.
[0161] In some examples, the electronic device can adjust the vertical length of the conversation display area based on the conversation data, that is, adjust the vertical length of the conversation window. After the electronic device receives the input from the user to wake up the smart assistant, in response to the input, the vertical length of the displayed conversation window is a preset length 1. When the electronic device displays a dialog box in the conversation display area, it can adjust the vertical length of the conversation display area of the conversation window based on the vertical length of the displayed dialog box, so that the electronic device can display the complete dialog box until the electronic device adjusts the vertical length of the conversation window to a preset length 2. The electronic device keeps the vertical length of the conversation window unchanged, and the preset length 2 is greater than the preset length 1, and the preset length 2 is less than the vertical length of the touch screen of the electronic device. In this way, the electronic device can lengthen the length of the conversation window as the conversation data between the electronic device and the user increases. The electronic device can adjust the vertical length of the chat page based on the vertical length of one or more dialog boxes displayed in the chat page.
[0162] In some examples, the preset distance is the product of the vertical distance of the dialog display area and the preset ratio 1. This is only an example. The preset distance can also be the product of the vertical distance of the dialog window and the preset ratio 1. The embodiments of the present application are not limited to this.
[0163] Exemplarily, the electronic device displays the desktop 300 as shown in Figure 3A. After receiving the input from the user to wake up the smart assistant, the electronic device can respond to the input and display a conversation window 601 as shown in Figure 6A. As shown in Figure 6A, the conversation window 601 may include but is not limited to a conversation display area 602. The conversation display area 602 includes a chat page 603. Optionally, the conversation window 601 may also include a keyboard control 604, an add control 606, a voice control 605, etc. For details, please refer to the embodiment shown in Figure 3B, which will not be repeated here. Here, the vertical length of the conversation window 601 is length 61. Optionally, after receiving the input from the user to wake up the smart assistant, the electronic device can respond to the input and display the conversation window 601 as shown in Figure 6A, while outputting input prompt information for prompting the user to enter conversation data. For example, the electronic device can voice broadcast the input prompt information. For example, the input prompt information can be: "I am here."
[0164] After receiving the dialogue data input by the user, for example, the dialogue data can be dialogue data input by voice, such as dialogue data 31 of "write an article about field 1". The electronic device can display a dialog box 607 as shown in Figure 6B. The dialog box 607 can display the dialogue data input by the user in the form of text. Here, the text in the dialog box 607 is the dialogue data 31 input by the user. It should be noted that when the electronic device displays the dialogue window 601 as shown in Figure 6B, the vertical length of the dialog box 607 is less than the vertical length of the dialogue display area 602, and the electronic device keeps the vertical length of the dialogue window 601 unchanged. The vertical length of the dialogue window 601 shown in Figure 6B is length 61. The vertical length of the dialogue window 601 shown in Figure 6B is the same as the vertical length of the dialogue window 601 shown in Figure 6A.
[0165] After receiving the conversation data 31, the electronic device may use the initial conversation model to obtain reply data 32 based on the conversation data 31. After obtaining the reply data 32, the electronic device may display a conversation window 601 as shown in FIG6C.
[0166] As shown in Figure 6C , the chat page 603 of the conversation window 601 includes multiple dialog boxes. These multiple dialog boxes include dialog box 607 and dialog box 611. Dialog box 607 is used to display the conversation data 31 entered by the user, and dialog box 611 is used to display the reply data 32 determined by the electronic device based on the conversation data. Conversation window 601 may also include a start conversation control 621. For details, please refer to the embodiment shown in Figure 3D and will not be repeated here.
[0167] Optionally, the electronic device may further display a dialog box 332 in the chat page 312 shown in FIG3D . The dialog box 332 may be used to indicate that the electronic device has added a memo message, which may be used to prompt the user to participate in activities in a field related to the conversation data 31 .
[0168] Length 61 is a preset length 1. Since the sum of the vertical lengths of dialog box 607, dialog box 611, and dialog box 612 is greater than length 61, the electronic device may lengthen the vertical length of dialog display area 602 in dialog window 601 until dialog display area 602 can display all dialog boxes, or until the length of dialog window 601 reaches a preset length 2. Based on the sum of the vertical lengths of dialog box 607, dialog box 611, and dialog box 612, the electronic device adjusts the vertical length of dialog window 601 to a length 62 as shown in FIG. 6C .
[0169] When the electronic device displays the conversation window 601 shown in Figure 6C, the electronic device may, after receiving the user's input for the start conversation control 621, collect the user's audio data in response to the input. Here, based on the collected audio data, the electronic device determines that the conversation data 33 is "Question 1". Based on the determined conversation data 33, the electronic device may display the conversation window 601 shown in Figure 6D. The conversation window 601 includes a dialog box 631, which includes the conversation data 33. Compared with the conversation window 601 shown in Figure 6C, the conversation window 601 shown in Figure 6D also includes a dialog box 631. Based on the dialog box 631, the electronic device adjusts the vertical length of the conversation window 601 shown in Figure 6C from length 62 to length 63, resulting in the conversation window 601 shown in Figure 6D. Optionally, the electronic device collects the user's audio data when the duration of displaying the conversation window 601 shown in Figure 6C reaches a preset waiting time.
[0170] After obtaining conversation data 33, the electronic device may use a non-initial conversation model to obtain reply data 34 based on conversation data 33. The electronic device may adjust the initial conversation model based on conversation data 31 and reply data 32 to obtain a non-initial conversation model. After obtaining reply data 34, the electronic device may display dialog box 641 as shown in FIG6E based on reply data 34. Dialog box 641 includes reply data 34. Compared to conversation window 601 shown in FIG6D , conversation window 601 shown in FIG6E also includes dialog box 641. Based on dialog box 641, the electronic device adjusts the vertical length of conversation window 601 shown in FIG6D from length 63 to length 64, thereby obtaining conversation window 601 shown in FIG6E . It should be noted that when length 64 is a preset length 2, after displaying conversation window 601 shown in FIG6E , the electronic device receives conversation data input by the user and no longer adjusts the vertical length of conversation window 601. Instead, the electronic device may display one or more recent conversations in conversation window 601, which has a vertical length of length 64.
[0171] Next, taking the first direction from the bottom of the electronic device to the top of the electronic device and the preset distance being the product of the longitudinal distance of the conversation display area and the preset ratio 1 as an example, the conversation interaction method provided in the embodiment of the present application is introduced.
[0172] For example, the electronic device displays a conversation window 601 as shown in Figure 6E. After receiving an input from the user sliding a first distance on the chat page 603, the electronic device can perform a new conversation operation in response to the input.
[0173] In some examples, after executing the new conversation operation, the electronic device may display a prompt message for prompting the user that the electronic device has executed the new conversation operation. The electronic device may display the prompt message in the conversation window 601 shown in Figure 6E. For example, the prompt message may be the prompt message 351 shown in Figure 3H.
[0174] In some examples, the electronic device may also clear historical conversation data in the conversation window in response to a user input of sliding a first distance in a first direction on the chat page. For example, after receiving a user input of sliding a first distance on the chat page 603 shown in FIG6E , the electronic device may clear multiple dialog boxes in the conversation window 601 shown in FIG6E in response to the input.
[0175] In some examples, when the vertical length of a conversation window of an electronic device is greater than a preset length 1, the electronic device may, in response to a user input of sliding a first distance in a first direction on a chat page, clear the historical conversation data in the conversation window and adjust the vertical length of the conversation window to the preset length 1. For example, after receiving an input of a user sliding a first distance on a chat page 603 shown in FIG. 6F , the electronic device may, in response to the input, display a conversation window 601 as shown in FIG. 6F . As shown in FIG. 6F , the vertical length of conversation window 601 is length 61. Chat page 603 in conversation window 601 does not include a dialog box.
[0176] In some examples, after clearing the historical conversation data in the conversation window, the electronic device may redisplay the historical conversation data on the chat page upon receiving a specified input from the user. For example, the specified input may be a swipe in a second direction on the chat page by a second distance. In some examples, the second direction is opposite to or the same as the first direction. In some examples, the second distance is greater than or equal to a preset distance. Optionally, after clearing the historical conversation data in the conversation window, the electronic device may also display a history prompt message in the conversation window. The history prompt message may be used to notify the user that the electronic device may redisplay the historical conversation data upon receiving the specified input. For example, the history prompt message may be prompt message 671 shown in FIG. 6F . Prompt message 671 may be used to notify the user that the electronic device may redisplay the historical conversation data through a specified input. For example, prompt message 671 may include the text prompt message "Pull down to view history" as shown in FIG. It should be noted that prompt message 671 is not limited to the text prompt message shown in FIG. 6F ; it may also include a text prompt message "Swipe back to view history." This is not a limitation in the present embodiment.
[0177] In some examples, the electronic device can control the chat page to move in the first direction upon receiving input indicating that the user has swiped the chat page in the first direction by a first distance. The distance the chat page moves is less than or equal to the distance the user has swiped the chat page. In this way, the electronic device can control the chat page to move in the first direction to show the user the process of historical conversation data being moved off the touch screen, allowing the user to understand that swiping upward can trigger a new conversation on the electronic device.
[0178] In some examples, the electronic device may display a new conversation prompt message 1 when it detects that the user has swiped up a third distance on the chat page of the conversation interface while receiving input from the user in a first direction and away from the touch screen of the electronic device. The new conversation prompt message 1 can be used to prompt the user that if the user continues to swipe up, the electronic device will trigger the execution of a new conversation operation. The third distance is less than a preset distance. In this way, the electronic device can display a message prompting the user that the swipe up input triggers the electronic device to execute a new conversation operation while receiving the user's swipe up input, thereby helping the user understand the operation triggered by the swipe up input, avoiding situations where the user accidentally touches the electronic device to create a new conversation, and facilitating the user's decision whether to create a new conversation.
[0179] Exemplarily, the electronic device displays a conversation window 601 as shown in FIG6E , and the electronic device receives a user's upward swipe input on the chat page 603. The electronic device may display a conversation window 601 as shown in FIG6G when detecting that the distance the user has swiped on the chat page reaches a third distance. As shown in FIG6G , the conversation window 601 includes prompt information 651. Prompt information 651 is a new conversation prompt information 1, which can be used to prompt the user that if the user continues to swipe up, the electronic device will be triggered to perform a new conversation operation. The prompt information 651 may include but is not limited to text prompt information, image prompt information, audio prompt information, etc. For example, prompt information 651 may include text prompt information: "Continue to swipe up more than half a screen to create a new conversation."
[0180] In some examples, the electronic device may display a new conversation prompt message 2 when it detects that the user has swiped the chat page in the first direction for a first distance and then left the touch screen of the electronic device while receiving input from the user. The new conversation prompt message 2 can be used to prompt the user to leave the touch screen of the electronic device to trigger a new conversation on the electronic device. The fourth distance is greater than or equal to a preset distance. Thus, the electronic device can use the new conversation prompt message 2 to prompt the user that they no longer need to swipe up and that leaving the touch screen will trigger a new conversation on the electronic device.
[0181] Exemplarily, the electronic device displays a conversation window 601 as shown in FIG6E . The electronic device receives a user's upward swipe input on the chat page 603. When the electronic device detects that the distance the user has swiped up on the chat page reaches a fourth distance, the electronic device may display a conversation window 601 as shown in FIG6H . As shown in FIG6H , the conversation window 601 includes prompt information 661. Prompt information 661 is a new conversation prompt information 2, which can be used to prompt the user that if the user leaves the touch screen, the electronic device will be triggered to perform a new conversation operation. The prompt information 402 may include but is not limited to text prompt information, image prompt information, audio prompt information, etc. For example, prompt information 661 may include text prompt information: "A new conversation will be created after releasing the hand."
[0182] Alternatively, the electronic device displays the conversation window 601 shown in FIG6E , and receives a swipe-up input from the user on the chat page 603. The electronic device may display the conversation window 601 shown in FIG6G upon detecting that the user has swiped up on the chat page to a third distance. The electronic device displays the conversation window 601 shown in FIG6G , and upon detecting that the user has swiped up on the chat page to a fourth distance, displays the conversation window 601 shown in FIG6H .
[0183] It is understandable that when the electronic device detects that the distance that the user slides in the first direction (for example, swiping up) on the chat page is less than a preset distance, it detects that the user has left the touch screen, and the electronic device can continue to display the chat page including the historical conversation data. Among them, the conversation model of the electronic device is the same as the conversation model before receiving the sliding input, and the electronic device will not perform the operation of creating a new conversation. In this way, if the user accidentally touches the touch screen and slides a distance in the first direction on the touch screen when he does not want to trigger the electronic device to perform the operation of creating a new conversation, he can directly leave the touch screen when the distance slid in the first direction is less than the preset distance, and the conversation model of the electronic device will not be changed. For example, the electronic device displays the conversation window 601 shown in Figure 6G, the electronic device receives the user's upward sliding input on the chat page 603, and the electronic device detects that the distance the user slides on the chat page when leaving the touch screen is less than the preset distance, and the electronic device continues to display the conversation window 601 shown in Figure 6G.
[0184] In some examples, when the electronic device controls the chat page to move in a first direction as the user slides in the first direction, the electronic device can control the chat page to move in a third direction when it detects that the user leaves the touch screen and the distance the chat page slides is less than a preset distance, until the electronic device displays the chat page before receiving the user's sliding input, and the third direction is opposite to the first direction.
[0185] In some examples, after detecting that the user swipes a first distance in a first direction on a chat page, then swipes a fifth distance in a third direction, and leaves the touch screen after swiping the fifth distance in the third direction, the electronic device may continue to display the chat page including historical conversation data. In this way, the electronic device can receive the user's input and cancel the operation of creating a new conversation. For example, the electronic device displays a conversation window 601 as shown in Figure 6H, and at this time the electronic device detects that the user has not left the touch screen. The electronic device detects that the user swipes a fifth distance and leaves the touch screen of the electronic device after swiping the fifth distance, and the electronic device may display a conversation window 601 as shown in Figure 6G.
[0186] Similarly, when the electronic device displays a conversation window, the electronic device may also receive input from a user sliding horizontally (e.g., swiping left or right) on the chat page a first distance and leaving the touch screen of the electronic device, and in response to the input, perform a new conversation operation. Specifically, the description of the electronic device triggering the new conversation operation through the horizontal sliding input can be found in the above embodiment and will not be repeated here.
[0187] In one possible implementation, the electronic device includes a touch screen. After receiving input from the user to wake up the smart assistant, the electronic device can display a conversation card component in response to the input, the conversation card component including a conversation display area, and the conversation display area including a chat page. After receiving input from the user sliding a first distance in a first direction on the chat page and leaving the touch screen of the electronic device, the electronic device can perform a new conversation operation in response to the input. In this way, the electronic device can perform a new conversation operation in response to input of sliding a first distance in a first direction on the chat page. The electronic device can set the conversation model to an initial state and start a new conversation with the user, making the user operation easier. In addition, the conversation card component does not need to provide controls or icons for triggering the new conversation operation, making the conversation card component more concise and beautiful.
[0188] Among them, the card component can display some functional information of the application, which can be used to trigger the electronic device to display a specified page of the application. The card component can be displayed on the desktop or other designated shortcut interfaces (such as the negative one screen, service center, etc.). Card components can be added or deleted by the user. Some card components can be called widgets.
[0189] In some examples, the preset distance is the product of the longitudinal distance of the conversation display area and the preset ratio 1. This is only an example. The preset distance can also be the product of the longitudinal distance of the conversation card component and the preset ratio 1. The embodiments of the present application are not limited to this.
[0190] Exemplarily, the electronic device displays a desktop 700 as shown in FIG7A . For the description of desktop 700 , reference may be made to the description of desktop 300 shown in FIG3A , which will not be described in detail here. As shown in FIG7A , desktop 700 includes a conversation card component 701 . Conversation card component 701 includes a conversation display area 702 , which includes a chat page 703 . Chat page 703 can be used to display conversation data between a user and the electronic device. Optionally, conversation card component 701 may further include one or more functional controls, which may include but are not limited to a keyboard control 705 , an add control 706 , a start conversation control 704 , and the like. For details, reference may be made to the above-mentioned embodiments, which will not be described in detail here.
[0191] After receiving a user input for the start conversation control 704, the electronic device may, in response to the input, collect the user's audio data. Based on the collected audio data, the electronic device may determine conversation data 31. The electronic device may display a dialog box (not shown) including conversation data 31 on the chat page 703 shown in FIG7A . The electronic device may use the initial conversation model to obtain reply data 32 based on the conversation data 31. After obtaining reply data 32, the electronic device may display a dialog box including reply data 32, as shown in FIG7B . For example, FIG7B may display dialog boxes 707 and 708. For details, see the embodiment shown in FIG3D , which will not be described in detail here. After displaying the dialog box including reply data 32 on the chat page 703 shown in FIG7B , the electronic device may, in response to receiving an input for the start conversation control 704, collect the user's audio data. Optionally, the electronic device may collect the user's audio data when the duration of the dialog box including reply data 32 reaches a preset waiting time. Based on the collected audio data, the electronic device may determine conversation data 33. The electronic device may display a dialog box including the conversation data 33 in the chat page 703 shown in FIG7B . Specifically, the electronic device may display a dialog box including the conversation data 31, a dialog box including the reply data 32, and a dialog box including the conversation data 33. For a description of the above embodiment, no further details will be given here.
[0192] After obtaining conversation data 33, the electronic device can use the non-initial conversation model to obtain reply data 34 based on conversation data 33. Specifically, the electronic device can adjust the initial conversation model based on conversation data 31 and reply data 32 to obtain the non-initial conversation model. After obtaining reply data 34, the electronic device can display a conversation card component 701 as shown in FIG7C based on reply data 34. As shown in FIG7C , a chat page 703 in conversation card component 701 includes one or more dialog boxes. The one or more dialog boxes include dialog box 709 and dialog box 710. Dialog box 709 includes conversation data 33, and dialog box 710 includes reply data 34.
[0193] Next, taking the first direction from the bottom of the electronic device to the top of the electronic device and the preset distance being the product of the longitudinal distance of the conversation display area and the preset ratio 1 as an example, the conversation interaction method provided in the embodiment of the present application is introduced.
[0194] For example, the electronic device displays the conversation card component 701 shown in Figure 7C. After receiving an input from the user sliding a first distance on the chat page 603, the electronic device can execute a new conversation operation in response to the input.
[0195] In some examples, after executing the new conversation operation, the electronic device may display a prompt message to prompt the user that the new conversation operation has been executed. The electronic device may display the prompt message in the conversation card component 701 shown in Figure 7C. For example, the prompt message may be the prompt message 351 shown in Figure 3H.
[0196] In some examples, the electronic device may also clear the historical conversation data in the conversation window in response to a user input of sliding a first distance in a first direction on the chat page. For example, after receiving a user input of sliding a first distance on the chat page 703 shown in FIG. 7C , the electronic device may, in response to the input, display the conversation card component 701 shown in FIG. 7D . Optionally, the conversation card component 701 shown in FIG. 7D may also include prompt information 711. For a description of prompt information 711, please refer to the description of prompt information 351 shown in FIG. 3H , and will not be repeated here.
[0197] In some examples, after clearing the historical conversation data in the conversation window, the electronic device may redisplay the historical conversation data on the chat page after receiving a specified input from the user. For example, the specified input may be an input of sliding the chat page in a second direction a second distance. In some examples, the second direction is opposite to or the same as the first direction. In some examples, the second distance is greater than or equal to a preset distance. Optionally, after clearing the historical conversation data in the conversation display area, the electronic device may also display historical prompt information in the conversation card component. The historical prompt information may be used to prompt the user that the electronic device may redisplay the historical conversation data after receiving the specified input. For details, please refer to the above embodiments and will not be repeated here.
[0198] In some examples, the electronic device may control the chat page to move in the first direction when receiving input from the user sliding a first distance in the first direction on the chat page. The distance the chat page moves in the first direction is less than or equal to the distance the user slides in the first direction on the chat page. In this way, the electronic device can control the chat page to move as the user slides input, showing the user the process of historical conversation data being moved out of the touch screen, and letting the user understand that sliding in the first direction can trigger the electronic device to create a new conversation. Exemplarily, the electronic device may display the conversation card component 701 shown in FIG7E when receiving input from the user sliding a first distance on the chat page shown in FIG7C. The electronic device displays the conversation card component 701 shown in FIG7E and may perform a new conversation operation when receiving input from the user leaving the touch screen.
[0199] In some examples, the electronic device may display a new conversation prompt message 1 when it detects that the user has moved a third distance in the first direction from the chat page of the conversation interface while receiving input from the user moving a first distance in the first direction and away from the touch screen of the electronic device. The new conversation prompt message 1 may be used to prompt the user that continuing to swipe in the first direction will trigger the electronic device to execute a new conversation operation. The third distance is less than a preset distance. In this way, the electronic device may display a message prompting the user that the swipe up input triggers the electronic device to execute a new conversation operation while receiving the user's swipe up input. This helps the user understand the operation triggered by the swipe up input, avoids situations where the user accidentally triggers a new conversation on the electronic device, and facilitates the user's decision whether to create a new conversation.
[0200] In some examples, the electronic device may display a new conversation prompt message 2 when it detects that the user has swiped the chat page in the first direction for a first distance and then left the touch screen of the electronic device while receiving input from the user. The new conversation prompt message 2 can be used to prompt the user to leave the touch screen of the electronic device to trigger a new conversation on the electronic device. The fourth distance is greater than or equal to a preset distance. Thus, the electronic device can use the new conversation prompt message 2 to prompt the user that they no longer need to swipe up and that leaving the touch screen will trigger a new conversation on the electronic device.
[0201] It is understandable that when the electronic device detects that the distance the user has swiped in the first direction on the chat page is less than a preset distance, it detects that the user has left the touch screen, and the electronic device can continue to display the chat page including the historical conversation data. Among them, the conversation model of the electronic device is the same as the conversation model before receiving the input of the user sliding in the first direction, and the electronic device will not perform the operation of creating a new conversation. In this way, if the user does not want to trigger the electronic device to execute the operation of creating a new conversation, he can directly leave the touch screen when the distance swiping in the first direction is less than the preset distance, and the conversation model of the electronic device will not be changed.
[0202] In some examples, when the electronic device controls the chat page to move in a first direction as the user slides in the first direction, the electronic device can control the chat page to move in a third direction when it detects that the user leaves the touch screen and the distance the chat page slides is less than a preset distance, until the electronic device displays the chat page before receiving the user's sliding input, and the third direction is opposite to the first direction.
[0203] In some examples, after detecting that a user swipes a chat page in a first direction for a first distance, then swipes in a third direction for a fifth distance, and then leaves the touch screen after swiping in the third direction for the fifth distance, the electronic device may continue to display the chat page including historical conversation data. In this way, the electronic device can receive user input and cancel the operation of creating a new conversation.
[0204] Similarly, when the electronic device displays a conversation card component, it can also receive input from a user sliding horizontally (e.g., swiping left or right) on the chat page a first distance and leaving the touch screen of the electronic device, and in response to the input, perform a new conversation operation. Specifically, the description of the electronic device triggering the new conversation operation through horizontal sliding input can be found in the above embodiment and will not be repeated here.
[0205] In one possible implementation, an electronic device displays a first display area, the first display area including part or all of a first page, the first page including multiple conversation data. Upon receiving the first conversation data, the electronic device may display second conversation data in the first display area. Upon receiving a user swipe input in a first direction, the electronic device may, in response to the input, display a first prompt message prompting the user to start a new conversation with the electronic device. After displaying the first prompt message, upon receiving third conversation data identical to the first conversation data, the electronic device may display fourth conversation data in the first display area, the fourth conversation data being different from the second conversation data. In this way, the electronic device can execute a new conversation operation in response to a user swipe input in a first direction on the first page, facilitating the user initiating a new conversation with the electronic device without displaying a control or icon for creating a new conversation, thereby making the first display area more concise and aesthetically pleasing. In some examples, the user swipe input in the first direction is a swipe input in the first direction on the first page. In some examples, the user swipes in the first direction a distance greater than or equal to a preset distance.
[0206] Next, a flow chart of the conversation interaction method provided in an embodiment of the present application is introduced.
[0207] Exemplarily, as shown in FIG8 , the dialogue interaction method includes the following steps:
[0208] S801. The electronic device displays a first display area, where the first display area displays a first portion of a first page, where the first page includes a plurality of conversation data.
[0209] For example, the first display area may be the conversation display area 311 shown in FIG3D , and the first page may be the chat page 312 shown in FIG3D . Alternatively, the first display area may be the conversation display area 602 shown in FIG6C , and the first page may be the chat page 603 shown in FIG6C . Alternatively, the first display area may be the conversation display area 702 shown in FIG7B , and the first page may be the chat page 703 shown in FIG7B , and so on.
[0210] S802. The electronic device receives first conversation data.
[0211] The electronic device may receive first conversation data input by the user. For example, the description of the first conversation data may refer to the embodiment shown in FIG3F , which will not be repeated here.
[0212] S803. The electronic device displays the second conversation data in the first display area based on the first conversation data.
[0213] After receiving the first conversation data, the electronic device can use the conversation model to obtain second conversation data based on the first conversation data. The electronic device can then display the second conversation data. This conversation model is a non-initial conversation model, which the electronic device can obtain using the multiple conversation data items included in the first page and the initial conversation model. For details, please refer to the embodiment shown in FIG3G , which will not be further described here.
[0214] S804. The electronic device receives a sliding input in a first direction on the first page.
[0215] For example, the input of sliding in the first direction on the first page can be an input of sliding on the chat page 312 shown in Figure 3G, or it can be an input of sliding right on the chat page 312 shown in Figure 5A, or it can be an input of sliding on the chat page 603 shown in Figure 6E, or it can be an input of sliding on the chat page 703 shown in Figure 7C, and so on.
[0216] In some examples, the electronic device may display new conversation prompt information 1 when receiving input of sliding in a first direction on a first page.
[0217] In some examples, the electronic device may display a new conversation prompt message 1 when it detects that the distance that the user slides in the first direction on the first page is greater than or equal to the third distance.
[0218] In some examples, the electronic device may display new conversation prompt information 2 when receiving input of sliding in a first direction on the first page.
[0219] In some examples, the electronic device may display a new conversation prompt message 2 when it detects that the distance that the user slides in the first direction on the first page is greater than or equal to a fourth distance.
[0220] S805. The electronic device executes a new dialogue operation in response to the sliding input.
[0221] The electronic device may set the dialogue model to an initial state in response to the sliding input. For details, please refer to the above embodiment and will not be described in detail here.
[0222] In some examples, the electronic device may, in response to the input, cancel display of the conversation data on the first page, where the conversation data may include the first conversation data and the second conversation data. It is understood that when the vertical length of the first page is less than or equal to the vertical length of the dialog box including the second conversation data, the first page of the electronic device displays only the second conversation data. After clearing the conversation data displayed on the first page, the electronic device cancels display of the second conversation data.
[0223] In some examples, the electronic device may, in response to the input, perform a new conversation operation and cancel display of the conversation data on the first page. After canceling display of the conversation data on the first page, if the electronic device receives a swipe input in a second direction on the first page, the electronic device may redisplay the conversation data on the first page in response to the swipe input in the second direction on the first page. In some examples, the second direction is the same as or opposite to the first direction.
[0224] S806. The electronic device receives third conversation data that is the same as the first conversation data.
[0225] After executing the new dialogue operation, the electronic device receives the third dialogue data input by the user. For example, the description of the third dialogue data can refer to the embodiment shown in FIG3I , which will not be repeated here.
[0226] S807. The electronic device displays fourth conversation data in the first display area based on the third conversation data, where the fourth conversation data is different from the second conversation data.
[0227] After receiving the third conversation data, the electronic device can use the conversation model to obtain fourth conversation data based on the third conversation data. The electronic device can then display the fourth conversation data. This conversation model is the initial conversation model. For details, see the embodiment shown in FIG3J , which will not be further described here.
[0228] In some examples, when the electronic device detects that the user leaves the touch screen and detects that the distance the user slides in the first direction on the first page is less than a preset distance, the electronic device does not perform a new conversation operation.
[0229] In some examples, the electronic device receives input from a user sliding a first distance in a first direction on a first page, and detects that the user, without releasing the touch screen, slides a fifth distance in a third direction on the first page, the difference between the first distance and the fifth distance is less than a preset distance, and the third direction is opposite to the first direction. The electronic device does not perform a new conversation operation.
[0230] In some examples, the electronic device displays the first interface before displaying the first portion of the first page. After the electronic device displays the first interface, the electronic device may display the first display area including the second portion of the first page after receiving user input (e.g., input for starting the smart assistant, or input for adding a card component of the smart assistant).
[0231] When the electronic device displays the second portion of the first page, the first page includes the multiple conversation data. This allows the electronic device to display historical conversation data when the smart assistant function is reactivated, making it easier for the user to review historical conversation data. Optionally, upon receiving conversation data input by the user, the electronic device can generate reply data based on the multiple conversation data on the first page and the conversation data input by the user.
[0232] Alternatively, when the electronic device displays the second part of the first page, the first page does not include the plurality of conversation data. In this way, the electronic device can start a new conversation with the user when the smart assistant function is re-enabled.
[0233] It should be noted that the display of the conversation display area including the historical conversation data between the electronic device and the user is not limited to the above-mentioned conversation interface, conversation window, and conversation card component. The electronic device can display the conversation display area including the chat page through other display forms (for example, floating window, half-screen, etc.), and the embodiment of the present application is not limited to this. Among them, when the electronic device displays the conversation display area through other display forms, it can also trigger the electronic device to perform a new conversation operation through the conversation interaction method provided in the embodiment of the present application.
[0234] It should also be noted that the above-mentioned input of swiping up for a first distance and swiping right for a first distance are only examples and are not limited to the swipe-up input and the swipe-right input. For example, the electronic device may also perform a new conversation operation in response to the user's input of swiping left for a first distance, or perform a new conversation operation in response to the user's input of sliding to the upper right for a distance exceeding the product of the diagonal distance of the conversation display area and the preset ratio 1, etc. The embodiments of the present application do not limit this. The sliding input here can be a single-finger sliding input or a multi-finger sliding input (for example, an input of sliding two fingers down for more than a preset distance), etc. The embodiments of the present application do not limit this. In the embodiments of the present application, triggering the electronic device to perform a new conversation operation through swiping up and / or swiping right is a more preferred solution.
[0235] In some examples, the electronic device can provide the user with a function to set a user input that triggers the electronic device to perform a new conversation operation. In this way, the electronic device can set the user input that triggers the electronic device to perform a new conversation operation based on the user's sliding preferences, which is convenient for the user.
[0236] In some examples, after an electronic device executes a new conversation operation and before receiving user input, if it receives a user input to cancel the new conversation operation, the electronic device may cancel the new conversation operation in response to this input. For example, the input to cancel the new conversation operation may be a swipe in a fourth direction a sixth distance. In this way, the electronic device may cancel the new conversation operation in response to this input and adjust the conversation model of the electronic device to the state before the new conversation operation was executed. For example, the fourth direction may be the same as the first direction. For example, the electronic device may execute a new conversation operation in response to a swipe down a first distance. After executing the new conversation operation and before receiving user input, the electronic device may cancel the new conversation operation in response to receiving a swipe down a first distance again. It should be noted that the new conversation operation may be canceled not only by receiving a swipe up a first distance but also by other inputs. For example, the electronic device may cancel the new conversation operation after receiving a two-finger swipe down a first distance, and this is not limited to this in the present embodiments.
[0237] Exemplarily, the electronic device displays a conversation interface 310 as shown in FIG3H . After receiving an input to cancel a new conversation operation, the electronic device may display a conversation interface 310 as shown in FIG3F in response to the input. If the electronic device receives conversation data 37 after displaying the conversation interface 310 as shown in FIG3F . The electronic device may use a non-initial conversation model to obtain reply data 38 based on conversation data 37. Specifically, the electronic device may adjust the initial conversation model based on conversation data 31, reply data 32, conversation data 33, and reply data 34 to obtain a non-initial conversation model. Specifically, conversation data 37 and conversation data 35 are the same as conversation data 33. Compared with reply data 36, reply data 38 is more relevant to reply data 34. In some examples, reply data 38 is the same as reply data 34.
[0238] In one possible implementation, after receiving user input to wake up the smart assistant, the electronic device can send the user's input conversation data to a conversation server. The conversation server can use the conversation model to obtain reply data based on the conversation data. After obtaining the reply data, the conversation server can send the reply data to the electronic device. After receiving the reply data sent by the conversation server, the electronic device can display the reply data. In this way, after receiving the user's input conversation data, the electronic device can obtain the reply data through the conversation server. Because the hardware performance of the conversation server is higher than that of the electronic device, the conversation server can use higher computing power and a larger conversation model to obtain more intelligent reply data.
[0239] It should be noted that after the electronic device receives the user's input to wake up the smart assistant, it can notify the dialogue server to start the conversation. The dialogue server can use the dialogue model in the initial state to obtain reply data based on the dialogue data. During the dialogue process, the dialogue server can adjust the parameters of the dialogue model based on the historical dialogue data to obtain a dialogue model in a non-initial state. After receiving the dialogue data, the dialogue server can use the dialogue model in the non-initial state to obtain reply data based on the dialogue data. The electronic device can notify the dialogue server to set the dialogue model to the initial state after receiving the input to turn off the smart assistant. Similarly, the electronic device can notify the dialogue server to set the dialogue model to the initial state after receiving the input to create a new dialogue.
[0240] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A conversational interaction method, characterized in that: Applied to an electronic device, the electronic device includes a touch screen; the method includes: Displaying a first display area, wherein the first display area displays a first portion of a first page, the first page including a plurality of conversation data; receiving first conversation data, and displaying second conversation data in the first display area; receiving a first input, where the first input is a sliding operation on the first page in a first direction; In response to the first input, displaying first prompt information, where the first prompt information is used to prompt a user to start a new conversation with the electronic device; After the first prompt information is displayed, third conversation data identical to the first conversation data is received, and fourth conversation data is displayed in the first display area. The fourth conversation data is different from the second conversation data.
2. The method according to claim 1, characterized in that The sliding distance of the first input is greater than or equal to a preset distance.
3. The method according to claim 1 or 2, characterized in that During the process of receiving the first input, the method further includes: The first page is controlled to move in the first direction, and the distance the first page moves is less than or equal to the sliding distance of the first input.
4. The method according to any one of claims 1 to 3, characterized in that The displaying of first prompt information in response to the first input specifically includes: In response to the first input, the first prompt information is displayed and the dialog data in the first page is canceled.
5. The method according to claim 4, characterized in that After displaying the first prompt information and canceling display of the conversation data on the first page in response to the first input, the method further includes: receiving a second input; In response to the second input, the conversation data in the first page is redisplayed.
6. The method according to claim 5, characterized in that The second input is a sliding input in a second direction, and the second direction is opposite to the first direction.
7. The method according to any one of claims 4 to 6, characterized in that After displaying the first prompt information and canceling display of the conversation data on the first page in response to the first input, the method further includes: Display second prompt information, where the second prompt information is used to prompt the user to trigger the electronic device to redisplay the conversation data in the first page through the second input.
8. The method according to any one of claims 1 to 7, characterized in that During the process of receiving the first input, the method further includes: Displaying a third prompt message, wherein the third prompt message is used to prompt the user that continuing to slide in the first direction will trigger the electronic device to create a new dialogue.
9. The method according to any one of claims 1 to 8, characterized in that During the process of receiving the first input, the method further includes: Displaying a fourth prompt message, wherein the fourth prompt message is used to prompt the user that leaving the touch screen will trigger the electronic device to create a new dialogue.
10. The method according to any one of claims 1 to 9, characterized in that Before receiving the first input, the method further includes: A fifth prompt message is displayed, where the fifth prompt message is used to prompt the user that sliding in the first direction will trigger the electronic device to create a new conversation.
11. The method according to any one of claims 1 to 10, characterized in that After displaying the first prompt information and before receiving the third conversation data, the method further includes: If a third input is received; In response to the third input, canceling display of the first prompt information; After canceling the display of the first prompt information, the third dialogue data is received and the second dialogue data is displayed.
12. The method according to any one of claims 1 to 11, characterized in that Before displaying the first display area, wherein the first display area displays the first part of the first page, the method further includes: Display the first interface; receiving a fourth input; In response to the fourth input, the first display area is displayed, wherein the first display area displays the second portion of the first page.
13. The method according to claim 12, characterized in that When the first display area displays the second part of the first page, the length of the first display area is the first length; when the first display area displays the first part of the first page, the length of the first display area is the second length, and the second length is greater than the first length.
14. The method according to any one of claims 1 to 11, characterized in that The first display area belongs to a first card component.
15. The method according to any one of claims 1 to 14, characterized in that The first direction is a direction pointing from the bottom of the electronic device to the top of the electronic device, or the first direction is a direction pointing from the left side of the electronic device to the right side of the electronic device.
16. An electronic device, characterized in that: The electronic device comprises a touch screen, one or more processors, one or more memories and a touch screen; wherein the touch screen and the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer executable programs, and when the one or more processors execute the computer executable programs, the electronic device executes the method as described in any one of claims 1 to 15.
17. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is run on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 15.
18. A computer program product, characterized in that When the computer program product is run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Method and device for conducting multi-round conversation based on topic keyword guidance
CN109086329A
Man-machine dialogue model training method and man-machine dialogue method
CN113050787A
Virtual character driving method, system and equipment based on multi-modal data
CN114840090A
Application initiated conversations for chatbots
US20200344186A1