Input method, electronic equipment and computer readable storage medium
By recognizing the intent behind the user's text input, electronic devices provide predictive text and recommendation services, solving the problem of cumbersome user interface switching operations and improving the convenience and efficiency of text input.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2026-03-10
AI Technical Summary
Switching between different user interfaces is cumbersome and affects the efficiency of text input.
Electronic devices can provide corresponding services by recognizing the user's textual intent, including displaying suggested words and recommendation services, thus reducing the need for interface switching.
It improves the ease and efficiency of text editing for users, meeting diverse user needs.
Smart Images

Figure CN121635757A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal and communication technology, and in particular to input methods, electronic devices and computer-readable storage media. Background Technology
[0002] Electronic devices often provide users with an entry point for text editing through input method applications. In some scenarios, while editing text in one user interface, a user may need to access information or functions provided by another user interface. In such cases, the user has to go through a cumbersome process of switching between the two user interfaces, which affects the user's efficiency when inputting text. Summary of the Invention
[0003] This application provides an input method, an electronic device, and a computer-readable storage medium. In this method, after the electronic device receives text content edited by a user, it can identify the user's intent based on the input text and then provide one or more services to the user based on that intent. In this way, the electronic device can accurately determine the user's needs during text editing and thus provide corresponding services, improving the user experience.
[0004] In a first aspect, embodiments of this application provide an input method applied to an electronic device. The method includes: the electronic device displaying a first input box in a chat interface; the electronic device detecting a first operation of inputting first text into the first input box; in response to the first operation, the electronic device performing intent recognition on the first text to obtain a first user intent; the electronic device displaying one or more suggested words in the chat interface, the one or more suggested words containing first recommended text, the first recommended text being determined by the electronic device based on the first user intent; the electronic device detecting a second operation on the first recommended text; in response to the second operation, the electronic device providing a first recommendation service, the first recommendation service being determined by the electronic device from multiple recommendation services based on the first user intent.
[0005] The electronic device can determine the first text entered in the first input box, and then recognize the first text to obtain the first user intent. Based on this first user intent, the electronic device can display first recommended text. When the user interacts with the first recommended text, the electronic device can provide corresponding first recommended services based on the first user intent. In other words, the electronic device can determine the user intent through the text entered by the user, and thus provide corresponding services based on that intent. This allows the electronic device to meet the diverse needs of users during chat and improve the user experience.
[0006] In conjunction with the first aspect, in some embodiments, multiple recommendation services can be provided by one or more applications. These applications can be third-party applications or applications within the electronic device's system, such as system settings applications, gallery applications, etc. In this way, the electronic device can provide users with diverse services through applications from multiple sources.
[0007] In conjunction with the first aspect, in some embodiments, one or more applications include one or more of the following: applications installed on an electronic device, and applications not installed on an electronic device.
[0008] In this context, applications not installed on the electronic device can refer to applications installed on a remote server. That is to say, based on user intent, the electronic device can provide services from both native applications and applications installed on a remote cloud server. This way, users don't need to download all types of applications, and the electronic device can provide a more comprehensive range of services.
[0009] In conjunction with the first aspect, in some embodiments, when the electronic device provides the first recommended service in the chat interface, it also displays a send button. The method further includes: the electronic device detects a third operation acting on the send button, and in response to the third operation, the electronic device pushes a first chat message in the chat window, the first chat message containing the first recommended service.
[0010] The electronic device can provide a send button, which can be used to push chat messages containing the first recommended service. In this way, the contact's electronic device can also access information contained in the first recommended service (such as weather information, store information), or use the first recommended service.
[0011] In conjunction with the first aspect, in some embodiments, the first recommendation service in the first chat message can receive a user's click operation to enter the first user interface, and the first user interface includes the first recommendation service.
[0012] The first recommended service can be a card containing a hyperlink. When the first chat message contains the first recommended service, the electronic device can receive the operation applied to the first chat message, respond to the operation and enter the first user interface corresponding to the first recommended service, and then use the first recommended service in the first user interface.
[0013] In conjunction with the first aspect, in some embodiments, the electronic device performs intent recognition on the first text to obtain a first user intent, including: the electronic device inputs the first text into a first neural network to obtain the first user intent.
[0014] The electronic device can input the first text into the first neural network, and the first neural network can output the first user intent. The first neural network can contain multiple neural networks, which can implement one or more functions of the metadata preprocessing module, the natural language processing module, the spatial awareness module, and the behavior awareness module in the capability platform, as well as the intent enhancement module and the intent prediction module in the intent recognition module.
[0015] In conjunction with the first aspect, in some embodiments, the electronic device performs intent recognition on the first text to obtain a first user intent, including: the electronic device inputs the first text into a first neural network to obtain multiple user intents, the multiple user intents including the first user intent; the electronic device sorts the multiple user intents based on the first content, and determines the first user intent with the highest order from the multiple user intents.
[0016] In this system, the electronic device can input multiple user intentions into a service ranking module. The service ranking module can then rank these multiple user intentions based on a first set of content, determining the highest-ranking first user intention. In this way, the input method application in the electronic device can display the first recommended text based on the first user intention and load the first recommended service.
[0017] In conjunction with the first aspect, the first content may include one or more of the following: the frequency of service usage corresponding to multiple intents, the weight of multiple intents, and user profiles.
[0018] In other words, electronic devices can determine the order of multiple intentions based on the frequency of service usage corresponding to the intention, the weight of multiple intentions, and user profiles. The weights of these multiple intentions can be preset by the electronic device or set by the user. The user profiles can include the user's needs in text editing scenarios in chat applications, user preferences, user behavior habits in different scenarios and time periods, and so on.
[0019] In conjunction with the first aspect, in some embodiments, the first text includes multiple segments, the multiple segments including the first segment, the first segment being the last segment input in the first operation, and the electronic device performing intent recognition on the first text to obtain the first user intent includes: the electronic device performing intent recognition on the first segment in the first text to obtain the first user intent.
[0020] In other words, each time an electronic device receives a segment of user input, it can perform intent recognition on that segment. This ensures that the electronic device consistently identifies the user's intent based on the most recently entered segment, allowing it to more accurately determine the user's current needs and provide corresponding services. Furthermore, compared to intent recognition based on the entire user input, segment-based intent recognition allows the electronic device to react more quickly after each segment is entered, thus providing the appropriate service. The aforementioned segments can refer to phrases separated by punctuation marks.
[0021] In conjunction with the first aspect, in some embodiments, the first text includes multiple segments, including a first segment, which is the last segment entered in the first operation, and a second segment, which is the segment entered before the first segment. The electronic device performs intent recognition based on the first segment in the first text to obtain a first user intent, including: the electronic device determining that the content of the first segment lacks an entity; and the electronic device performing intent recognition on the first segment and the second segment to obtain the first user intent.
[0022] In other words, when an electronic device cannot identify the complete user intent based on a single sentence segment, it can also identify the user intent based on one or more sentences before or after that sentence segment, thereby obtaining a more accurate user intent, and thus more accurately determining user needs and providing corresponding services to the user.
[0023] In conjunction with the first aspect, in some embodiments, the method further includes: the electronic device detecting a fourth operation of inputting second text in a first input box; in response to the fourth operation, the electronic device performing intent recognition on the second text to obtain a second user intent; and the electronic device providing a second recommendation service, the second recommendation service being determined by the electronic device based on the second user intent.
[0024] In other words, in some scenarios, electronic devices can proactively provide services to users without requiring them to click on the recommended text. This makes it easier for users to notice the services offered by the electronic device and subsequently use them, thereby increasing the utilization rate of services provided by the electronic device based on intent.
[0025] In conjunction with the first aspect, in some embodiments, after the electronic device provides the second recommendation service, the method further includes: the electronic device detecting a fifth operation of entering third text in the first input box, and in response to the fifth operation, the electronic device stopping the provision of the second recommendation service.
[0026] In other words, as the user continues to input text, the electronic device can hide its actively offered secondary recommendation service to prevent the secondary recommendation service from affecting the user's text input.
[0027] In conjunction with the first aspect, in some embodiments, after the electronic device stops providing the second recommendation service, the method further includes: the electronic device detecting a sixth operation acting on the second text, and in response to the sixth operation, the electronic device resuming the second recommendation service.
[0028] In other words, after an electronic device hides the second recommended service, if a user wants to use it again, they can do so through a sixth action on the second text (such as clicking on a keyword in the second text). This allows users to control whether their electronic device displays or hides the second recommended service based on their needs.
[0029] In conjunction with the first aspect, in some embodiments, the electronic device provides the first recommendation service via a card, or via a window, or via a user interface.
[0030] In other words, electronic devices can provide services in various ways based on service characteristics, thereby better providing corresponding services to users and improving the user experience when using services.
[0031] In conjunction with the first aspect, in some embodiments, after the electronic device displays the first input box in the chat interface, the method further includes: the electronic device receiving a seventh operation applied to the first input box, and in response to the seventh operation, the electronic device raising a first soft keyboard below the input box.
[0032] by Figures 3B-3C Taking the illustrated embodiment as an example, the seventh operation could be, for example, clicking the first input box (i.e., the operation of input box 312), and in response to this operation, such as... Figure 3C As shown, the electronic device raises a first soft keyboard (i.e., soft keyboard 313) from the bottom of the screen, and the first soft keyboard is displayed below the first input box. The first operation can be the electronic device entering first text in the first input box using the first soft keyboard. Multiple suggested words can be displayed inside the first soft keyboard.
[0033] In conjunction with the first aspect, in some embodiments, after the electronic device detects a first operation of entering first text in the first input box, the method further includes: the electronic device displaying a send message button; the electronic device receiving an eighth operation by the user on the send message button, and in response to the eighth operation, the electronic device sending the first text in the first input box to another electronic device and displaying a second chat message containing the first text in a chat window.
[0034] refer to Figure 3G-Figure 3HIn the illustrated embodiment, the message sending button can be, for example, a send button 314. The electronic device can receive an eighth operation performed by the user on the send button 314. The eighth operation can be clicking the send button 314. In response to this operation, the electronic device can send all the content in the first input box to the contact "Lucy". Subsequently, the electronic device can display the chat message sent by the electronic device in the chat window 311.
[0035] In conjunction with the first aspect, in some embodiments, the electronic device provides a first recommendation service via a card, the electronic device providing the first recommendation service including: the electronic device displays a first card, the first card including the first recommendation service.
[0036] by Figure 4C In the illustrated embodiment, the first card can be, for example, a weather card 402. The electronic device can provide a first recommendation service through the weather card 402. Figure 4C In the illustrated embodiment, the first recommended service may include services such as sharing and viewing the weather.
[0037] In conjunction with the first aspect, in some embodiments, after the electronic device displays the first card, the method further includes the electronic device receiving a ninth operation performed by a user on the first card, and in response to the ninth operation, the electronic device switching the first card to a second card, the second card also including the first recommendation service, the second card containing different content from the first card.
[0038] by Figures 4E-4F In the illustrated embodiment, the electronic device can receive a ninth operation from the user on the first card (weather card 402). This ninth operation could be, for example, swiping the weather card 402 to the left. In response to the ninth operation, the electronic device switches the weather card 402 to a second card (weather card 412). The second card also provides the service of viewing and sharing the weather, but it contains information such as clothing guidelines and wind speed, while the first card contains temperature information for various time periods. The content of the second card differs from that of the first card. In this way, the user can select from multiple cards based on their needs, satisfying their desire to view and share different weather information.
[0039] In conjunction with the first aspect, in some embodiments, the electronic device provides a first recommendation service through a window, which includes: the electronic device displays a first window on top of the chat interface, the first window being used to provide the first recommendation service.
[0040] In conjunction with the first aspect, in some embodiments, the electronic device provides a first recommendation service, including: the electronic device searches for first information in a network, wherein the first information is determined based on a first user intent.
[0041] refer to Figures 10B-10C In the embodiment shown, the electronic device can search for "good places to go during the May Day holiday" through the search interface 1002 based on a first user intent (travel planning intent) and display the search results, thereby helping the user to quickly obtain information.
[0042] Secondly, embodiments of this application provide an input method applied to an electronic device. The method includes: the electronic device displaying a first input box; the electronic device detecting a first operation of inputting first text into the first input box; in response to the first operation, the electronic device performing intent recognition on the first text to obtain a first user intent; the electronic device displaying one or more suggested words, the one or more suggested words containing first recommended text, the first recommended text being determined by the electronic device based on the first user intent; the electronic device detecting a second operation on the first recommended text; in response to the second operation, the electronic device providing a first recommendation service, the first recommendation service being determined by the electronic device from multiple recommendation services based on the first user intent.
[0043] refer to Figures 4A-4G In the illustrated embodiment, the first input box can be, for example, input box 312, and the first text can be, for example, "It's getting colder in Beijing, you should wear more clothes." The electronic device can perform intent recognition based on the first text and then display multiple suggested words, including "you," "!", "don't," and the first recommended text "Beijing temperature." The first recommended text, also known as recommended text 401, can be determined by the electronic device based on the first user's intent. The electronic device can detect a second operation on the first recommended text, such as a click operation, and then provide a service to view and share the weather.
[0044] refer to Figures 12A-12E In the illustrated embodiment, the first input box can be, for example, the text editing area 1202. The first text can be "Today's weather". The electronic device can perform intent recognition based on the first text to obtain a first user intent, which could be the user's intention to check today's weather. Then, the electronic device can display a first recommended text, i.e., recommended text 1204, based on the first user intent. The electronic device can detect the operation performed on the recommended text 1204, and then provide services such as inserting weather information into the first input box and sharing weather information through the weather card 1205.
[0045] Understandably, electronic devices can provide corresponding services based on user intent in various text editing scenarios, meeting users' diverse needs during text editing. Furthermore, electronic devices can offer different services based on different text editing scenarios. For example, in a chat scenario, if the electronic device determines that the user intends to view and share the weather, it can provide a service to share weather information with contacts. In a note-taking scenario, after determining that the user intends to view and share the weather, the electronic device can provide services such as inserting weather cards into the notes or sharing the weather on social media, such as sharing with other contacts or sharing to Moments, thereby meeting users' needs in different text editing scenarios.
[0046] Thirdly, this application provides an electronic device including a display screen, a memory, and a processor coupled to the memory; the display screen is used to display an interface, the memory stores a computer program, and when the processor executes the computer program, the electronic device implements the method described in any one of the first aspects.
[0047] Fourthly, this application provides a computer-readable storage medium storing a computer program or computer instructions, which are executed by a processor to implement the method described in any of the first aspects above.
[0048] Fifthly, embodiments of this application provide a computer program product, which, when executed by a processor, implements the method described in any of the first aspects above.
[0049] In a sixth aspect, embodiments of this application provide a chip including a processor and a memory, wherein the memory is used to store computer programs or computer instructions, and the processor is used to execute the computer programs or computer instructions stored in the memory, causing the chip to perform the method described in any of the first aspects above.
[0050] The solutions provided in the third to sixth aspects above are used to implement or cooperate with the methods provided in the first or second aspects above, and therefore can achieve the same or corresponding beneficial effects as the methods in the first or second aspects, which will not be elaborated here. Attached Figure Description
[0051] Figure 1 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application;
[0052] Figure 2 This is a software structure block diagram of the electronic device 100 according to an embodiment of this application;
[0053] Figures 3A-3HThis is a user interaction diagram illustrating how some electronic devices 100 provide currency conversion services via cards, as provided in this application embodiment.
[0054] Figures 4A-4G This is a user interaction diagram illustrating how some electronic devices 100 provide weather sharing services via cards, as provided in the embodiments of this application.
[0055] Figures 5A-5F This is a user interaction diagram illustrating how some electronic devices 100 provide shared store services via cards, as provided in the embodiments of this application.
[0056] Figures 6A-6C This is a user interaction diagram illustrating how some electronic devices 100 provide trip sharing services via cards, as provided in embodiments of this application.
[0057] Figures 7A-7C This is a user interaction diagram illustrating how some electronic devices 100 provide a service for sharing trending events via cards, as provided in embodiments of this application.
[0058] Figures 8A-8I This is a user interaction diagram illustrating how some other electronic devices 100 provide shared store services via cards, as provided in the embodiments of this application.
[0059] Figures 9A-9D This is a schematic diagram illustrating the user interaction of some electronic devices 100 provided in this application embodiment, which provides a schedule creation service through a window;
[0060] Figures 10A-10C This is a user interaction diagram illustrating the search service provided by some electronic devices 100 according to embodiments of this application;
[0061] Figures 11A-11D This is a user interaction diagram of some electronic devices 100 based on multiple sentence segments to identify user intent, as provided in the embodiments of this application;
[0062] Figures 12A-12E This is a user interaction diagram illustrating the services provided by some electronic devices 100 in a note-editing scenario according to embodiments of this application;
[0063] Figure 13 This is a flowchart of the input method provided in the embodiments of this application;
[0064] Figure 14 This is a schematic diagram of the structure of an input device provided in an embodiment of this application;
[0065] Figure 15 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation
[0066] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.
[0067] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0068] Electronic devices often provide users with an entry point for text editing through input method applications. In some scenarios, while editing text in one user interface, a user may need to access information or functions from another user interface. This necessitates a cumbersome process of switching between user interfaces. For example, when discussing travel plans with someone in a chat application, a user might want to check the recent weather. In this case, the user first needs to switch from the chat application's interface to the weather application's interface to check the weather, and then switch back from the weather application's interface to the chat application to continue chatting. This switching process may also require multiple steps. For instance, when switching from the chat application's interface to the weather application's interface, the user might need to first display the chat application in the background to enter the device's home screen, then locate the weather application's icon or card on the home screen, and finally click on the weather application's icon or card to enter the weather application's interface to check the weather. It's clear that in these scenarios, users need to jump between multiple user interfaces, resulting in low efficiency.
[0069] To meet the diverse needs of users in text input scenarios, embodiments of this application provide an input method, an electronic device, and a computer-readable storage medium. In this method, after receiving text entered by a user in an input box, the electronic device can identify the intent contained in the text. Based on the identified intent, the electronic device can then provide one or more services. These services can be provided by displaying cards or window interfaces, or by navigating to a user interface, etc. This allows users to quickly access the services provided by the electronic device without performing cumbersome operations, thereby improving the ease of operation for users during text editing.
[0070] For example, electronic device 100 can pre-store various intents, and can provide corresponding services to users based on these intents. These various intents may include, but are not limited to: calendar creation intent, to-do list creation intent, alarm clock creation intent, order information sharing intent, weather intent, encyclopedia search intent, health consultation intent, travel planning intent, navigation intent, audio-visual entertainment intent, etc. Among these, order information sharing intent can be further divided into train / flight information sharing intent, airplane / flight information sharing intent, restaurant order sharing intent, hotel order sharing intent, etc.
[0071] If the electronic device 100 receives text input by the user containing address information (such as "the address of the restaurant is on XX street"), and the electronic device 100 identifies the travel intention from the text, then the electronic device 100 can determine that the user has a navigation intention, and the electronic device 100 can provide the user with route planning services from the current location to the address contained in the text.
[0072] When electronic device 100 receives text input from a user containing terms such as horoscopes, MBTI personality tests (e.g., "What kind of personality is ISTJ? Let me see"), and titles of famous works (e.g., "Who painted Girl with a Pearl Earring?"), and electronic device 100 determines that the user has a tendency to search encyclopedias, electronic device 100 can then provide a service to search for the aforementioned terms in encyclopedias. These terms may be stored on a server or internally within electronic device 100.
[0073] When electronic device 100 receives text input from a user that contains health information, such as a person's physiological or psychological index, disease name, drug name, or symptoms (e.g., "Irritable, have had a headache for several days"), electronic device 100 can determine that the user intends to seek health advice. In this case, electronic device 100 can search for relevant articles or suggestions to provide the user with health advice services.
[0074] When electronic device 100 receives text input from a user containing titles of TV series, movies, music, books, etc., electronic device 100 can determine that the user has a tendency to share audio-visual entertainment. Therefore, electronic device 100 can provide a corresponding service for sharing film and television entertainment information. Electronic device 100 can provide this type of service through cards.
[0075] If the electronic device 100 receives text input from the user containing travel plans (such as "preparing to trek to Yubeng"), the electronic device 100 can determine that the user intends to travel. The electronic device 100 can then provide information on travel destinations, accommodation recommendations, and travel guides, etc.
[0076] If electronic device 100 receives text input from a user that contains reminder information (e.g., text content instructing the user or others to do something, such as "I need to take Wangzai to get his rabies vaccine on Sunday," "I'm going on a business trip tomorrow, remember to remind me to bring my ID card," or "I need to go for a medical check-up tomorrow morning, I have to get up around 6 a.m."), then electronic device 100 can determine that the user intends to create a schedule and can provide a service to quickly create a schedule. Additionally, electronic device 100 can also determine from the reminder information that the user intends to create a to-do list, and can provide a service to quickly create to-do items. Alternatively, electronic device 100 can determine from the reminder information that the user intends to create an alarm clock, and can provide a service to quickly create an alarm clock reminder. In some embodiments, when electronic device 100 receives text input from a user that contains reminder information, electronic device 100 can also determine from the text that the user intends to share schedule information, for example, if the text is "The meeting has started, hurry up and join the meeting," then electronic device 100 can provide a service to share meeting information.
[0077] The intent to share order-related information can contain multiple sub-intents. For example, when electronic device 100 receives text input from a user containing train numbers, train station names, etc., such as "I arrive at Nanjing South Station tonight," electronic device 100 can determine that the user intends to share train / flight information, and thus can provide the service of sharing train / flight information. Similarly, when electronic device 100 receives text input from a user containing flight numbers, airport names, etc., such as "I arrive at Chaoyang Airport at 10 o'clock," electronic device 100 can determine that the user intends to share flight information, and thus can provide the service of quickly sharing flight information. Likewise, when electronic device 100 receives text input from a user containing hotel names, such as "I'm staying at the XX Hotel in Sanya, is it close to your hotel?", electronic device 100 can determine that the user intends to share hotel information, and thus can provide the service of quickly sharing hotel information.
[0078] When electronic device 100 receives text input by a user that contains weather information, such as "It always rains in Nanjing on weekends," electronic device 100 can recognize that the text contains the intention to share the weather, and then electronic device 100 can provide a service to quickly share the weather.
[0079] If electronic device 100 receives text input from a user containing express delivery information, this information may include: the name of the express delivery company, the tracking number, and related text such as "express delivery" or "package". For example, if electronic device 100 receives the user's input: "I'm getting off work late today, you can go home and pick up your package first," then electronic device 100 can determine that the user intends to share express delivery information and thus provide the user with a service to share express delivery information.
[0080] If electronic device 100 receives text input from a user that mentions photo information, such as place name, "photo", "photograph", "picture", etc., electronic device 100 can determine from the text that the user intends to share photos. Then, electronic device 100 can search for relevant photos in cloud server or memory storage and provide photo sharing service.
[0081] If electronic device 100 receives text input from a user that contains electronic device settings information, such as mentioning features of electronic device 100 in the text, like "Why is my phone battery draining so quickly lately?", then electronic device 100 can recognize the user's input of settings-related words and provide the user with a quick way to jump to the corresponding settings option (such as battery management). Alternatively, electronic device 100 can provide intelligent suggestions based on the user's input words, such as suggesting that the user turn on power-saving mode based on the user's input of "low battery".
[0082] When electronic device 100 receives text input from a user that contains information about shops and restaurants, such as "Let's have a barbecue tonight," electronic device 100 can determine that the user intends to find a restaurant based on the above information and user profile. In this case, electronic device 100 can provide a list of nearby restaurants, user reviews, and reservation links, etc.
[0083] If the electronic device 100 receives text input from the user containing an item description or name, such as "XX store's new XX product is really nice," then the electronic device 100 can determine from the text that the user intends to purchase the product. The electronic device 100 can then provide a product sharing service. Furthermore, the electronic device 100 can also provide shopping discount information for the product.
[0084] If the electronic device 100 receives text input from the user that mentions learning information, such as subjects, skills, certificate names, etc., for example, the text could be "My English is terrible, it takes me forever to think of a word," then the electronic device 100 can determine that the user has the intention to improve themselves or make a learning plan. In this case, the electronic device 100 can provide the user with learning resources or related skills, etc.
[0085] When electronic device 100 receives text input from a user that mentions celebrities or trending events, electronic device 100 can determine from the text that the user intends to share trending events, and then electronic device 100 can provide the user with a service to quickly share trending events.
[0086] The electronic device 100 can provide corresponding services to users through cards, browser searches, or window interfaces. The method by which the electronic device 100 provides services based on user intent can be referred to the description of the following embodiments, which will not be elaborated here.
[0087] For ease of description and better understanding, this application embodiment uses a chat scenario as an example to introduce the input method. It is not limited to the chat scenario. The input method provided in this application embodiment can also be applied to other input scenarios. This application embodiment does not limit the scenarios in which the input method can be applied.
[0088] Similarly, this application embodiment uses a Chinese text editing scenario as an example to introduce the input method of an electronic device. It is not limited to Chinese text editing scenarios. This input method can also be applied to text editing scenarios in other languages, such as English, Russian, Japanese, etc. The input method of an electronic device in text editing scenarios in other languages can refer to the input method of an electronic device in Chinese text editing scenarios, which will not be repeated here.
[0089] The exemplary electronic device 100 provided in the embodiments of this application will be introduced first below.
[0090] Figure 1 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application.
[0091] The following description uses electronic device 100 as an example to illustrate the embodiment. It should be understood that electronic device 100 may have more than Figure 1 The more or fewer components shown can be combined into two or more components, or they can have different component configurations. Figure 1 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0092] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, sensor module 180, display screen 194, etc. Sensor module 180 may include pressure sensor 180A, touch sensor 180B, etc.
[0093] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0094] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0095] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0096] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0097] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0098] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs can enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding. In some embodiments, electronic devices can use NPUs to perform intent recognition on text, etc.
[0099] The external storage 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 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0100] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application required for a function (such as facial recognition, fingerprint recognition, mobile payment, etc.). The data storage area may store data created during the use of electronic device 100 (such as facial information template data, fingerprint information templates, etc.). Furthermore, internal memory 121 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0101] Pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 180A may be disposed on display screen 194. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 may also calculate the touch position based on the detection signal from pressure sensor 180A.
[0102] Touch sensor 180B, also known as a "touch panel," can be located on display screen 194. The touch sensor 180B and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180B is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194.
[0103] Figure 2 This is a software structure block diagram of the electronic device 100 according to an embodiment of this application.
[0104] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom: the application layer, the application framework layer, the system library layer, and the kernel layer.
[0105] The application layer can include a series of applications, such as Figure 2 As shown, the application package can include chat applications and input method applications, etc.
[0106] Chat applications can provide voice and text chat functionality with other electronic devices. Chat applications include an input field, which displays the text entered by the user through an input method application.
[0107] Input method applications can be used to provide text input operations. In this embodiment, the input method application can also identify user intent based on the text input by the user, and then provide one or more services based on the user intent. These services can be provided by an application, which can be an application installed on an electronic device, or an application from a remote server.
[0108] An input method application may include a data preprocessing module, a service loading module, and a service triggering module. The data preprocessing module is used to classify the intent of the user's input.
[0109] The data preprocessing module may include a user input module, an intent classification module, and a service toolkit. The user input module receives user actions (such as clicks on the soft keyboard or handwritten characters) and determines the text content based on these actions. The intent classification module can invoke one or more modules in the framework layer through the service toolkit to implement intent recognition and other functions.
[0110] The service loading module can determine recommended text based on user intent identified from the text entered by the user, and preload services based on user intent, wherein the recommended text is the entry point for triggering electronic device 100 to provide the corresponding service.
[0111] The service triggering module can start and provide services when a service is triggered.
[0112] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0113] like Figure 2 As shown, the application framework layer may include a metadata preprocessing module, a capability middleware module, an intent recognition module, a service sorting module, a service management framework, and a multi-window module.
[0114] The metadata preprocessing module can preprocess the text input by the user, make a preliminary judgment on the user intent contained in the text, and the preprocessed user intent will be input into the capability platform module.
[0115] The capability platform module can further refine the intents identified by the metadata preprocessing module to obtain more precise intents. This module can include a natural language processing module, a spatial awareness module, and a behavior awareness module. The natural language processing module can identify entities contained in the text, such as addresses, movies, music, books, products, encyclopedia entries, food, system names, and times, as well as extract sentiment features, keywords, and intentions from the text. The spatial awareness module identifies the current time and the geographical location of the electronic device 100, while the behavior awareness module determines the application scenario in which the user inputs text. The capability platform module can further refine the intents identified by the metadata preprocessing module based on the processing results of the above modules, and then send the refined intents to the intent recognition module. The intent recognition module receives the processing results identified by the capability platform module and then obtains services based on these results. This intent recognition module can include an intent enhancement module, an intent prediction module, and an intent query module.
[0116] The intent query module can query the service management framework for the service corresponding to the intent based on the processing results of the capability platform module. For example, after the capability platform module outputs a movie name to the intent query module, the intent query module can determine that the user may have the intent to share that movie. Alternatively, the capability platform module can output information such as "Beijing," "flight," and "8 o'clock" obtained from text to the intent query module, which can determine that the user may have the intent to obtain information about Beijing's 8 o'clock flight, or the Beijing weather, or the route to the airport, and so on. The intent query module can pass the user intent it identifies to the intent enhancement module and the intent prediction module, thereby obtaining one or more derived intents based on the deterministic intent.
[0117] The intent enhancement module can further determine the user's intent based on the identified intent. For example, if the intent enhancement module recognizes that the user has the intent to buy coffee, it can infer from the user profile that the user often drinks a certain brand of coffee, and then the intent enhancement module can determine to recommend that brand of coffee to the user.
[0118] The intent prediction module can predict the user's most desired intent when multiple intents exist. For example, after a user enters a text, the text may contain multiple intents such as getting a ride or getting navigation. The intent prediction module can determine which one or more services the user wants to choose from among the multiple services based on factors such as the location of the electronic device.
[0119] The intent recognition module can pass one or more finalized intents to the service management framework module, which can then match the intent with one or more services and finally pass one or more services to the intent recognition module.
[0120] Since the intent recognition module may recognize multiple intents and obtain multiple services from the service management framework, the service ranking module can rank these services. The service ranking module can rank the services based on user intent, frequency of user service usage, or one or more items in the user profile, thereby determining one or more services that rank higher. Finally, the service input parameter module can pass the parameters of one or more determined services to the service loading module of the input method application.
[0121] The multi-window module can be invoked by the service trigger module of the input method application, thereby enabling services to be provided to users through windows.
[0122] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0123] The Surface Manager is used to manage the display subsystem and provides the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.
[0124] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0125] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0126] A 2D graphics engine is a graphics engine for 2D drawing.
[0127] The kernel layer is the layer between hardware and software. The kernel layer includes at least the display driver, camera driver, audio driver, sensor driver, and virtual card driver.
[0128] The following example illustrates the process by which an electronic device 100 identifies user intent from text input by the user and provides services based on that intent.
[0129] Taking a chat scenario as an example, a chat application can include an input box. When the electronic device 100 receives a user's click action on the input box, the electronic device 100 can respond to this action by bringing up the soft keyboard of the input method application. Then, the user input module in the input method application can determine the text content entered by the user based on the user's operation on the soft keyboard, and this text content will be displayed in the input box of the chat application for the user to view.
[0130] Then, the intent classification module in the input method application can call the service toolkit to identify the user intent contained in the text content within the input box. The text in the input box is then fed into the metadata preprocessing module. The metadata preprocessing module can initially determine the user intent based on the text content. For example, assuming the user inputs "Afternoon tea time," the metadata preprocessing module can determine multiple intents, including the intent to share the store, the intent to plan a route to the milk tea shop, and so on.
[0131] Furthermore, the metadata preprocessing module can send the user intent it initially identifies, along with the user's original input text, to the capability platform module. The capability platform module can then refine the user intent based on the natural language processing module, spatial awareness module, and behavior awareness module. For example, if the behavior awareness module determines that the user frequently orders milk tea at the current time, the capability platform module can further refine the user's "intent to share the store" to "intent to share the milk tea store." Alternatively, if the natural language processing module identifies the entity "afternoon tea" from "afternoon tea time has arrived," it can also refine the intent to "intent to share the milk tea store."
[0132] The capability platform module can send refined user intents (also known as basic intents) to the intent recognition module. When the capability platform module cannot obtain enough information to refine the intent from the raw text, it can directly send the intent initially identified by the metadata preprocessing module to the intent recognition module. The intent recognition module can generate derived intents through the intent enhancement module and the intent prediction module. For example, the intent enhancement module can predict which milk tea shop a user prefers. The intent prediction module can predict which intent the user wants; for example, it can predict which of the multiple intents provided by the capability platform, such as the intent to share a shop or the intent to plan a route to a milk tea shop, the user's most desired intent is to share a shop. Finally, the aforementioned basic and derived intents are input into the intent query module. The intent query module can determine the service corresponding to the user intent and the method of providing the service (e.g., displaying a card, providing a window, or navigating to another interface) based on the service management framework.
[0133] Furthermore, the intent recognition module can send the service corresponding to the user's intent to the service ranking module. The service ranking module can assign weights to multiple services based on the user's input text, thereby ranking the services. Specifically, the service ranking module can prioritize basic intents and prioritize derived intents. Alternatively, the service ranking module can also rank services based on the user's service usage habits. Finally, the service ranking module passes service parameters to the input method application's service loading module through the service input parameter module. The service loading module can display recommended text in the suggested words based on the user's intent and load the service. When the electronic device 100 receives a user action on the recommended text, such as a click, the service triggering module in the input method application can call the multi-window module to implement the specific service. For example, the service triggering module displays a window through the multi-window module, thereby providing the corresponding service to the user.
[0134] The following are schematic diagrams illustrating a series of user interfaces (UI) involved in the input method provided in the embodiments of this application.
[0135] In some embodiments, after determining the intent of the text entered by the user in the input box, the electronic device 100 can provide the user with one or more services via a card.
[0136] Figures 3A-3H This is a user interaction diagram of some electronic devices 100 provided in the embodiments of this application, which provide currency conversion services through cards.
[0137] like Figure 3A As shown, the electronic device 100 can display the main interface 300 of a chat application. The main interface 300 may include a chat list 301, which can be used to select contacts for chatting. The chat list 301 may contain multiple contact options, which display contact information, such as the contact's avatar, nickname, etc. Among these multiple contact options, there may be a contact option 302, which may contain the nickname "Lucy" and the avatar of the contact "Lucy".
[0138] Electronic device 100 can receive user actions on contact option 302, such as a click, and in response to this action, electronic device 100 can display, for example, a... Figure 3B The chat interface 310 is shown. The chat interface 310 can be used to send chat messages to another electronic device (such as the electronic device used by the contact "Lucy"), and to view chat messages sent by another electronic device to electronic device 100.
[0139] like Figure 3B As shown, the chat interface 310 may include a chat window 311 and an input box 312. The chat window 311 may be used to display one or more chat messages, and the input box 312 may be used to display text content edited by the user to be sent. The input box 312 may contain a cursor 312A, which is used to indicate the position of text input. Figure 3B The chat window 311 shown can contain two chat messages. These two chat messages can be sent by the electronic device used by the contact "Lucy" and received by the electronic device 100. The first chat message is "How much did you pay for this bag?", and the second chat message is a picture of the bag.
[0140] Electronic device 100 can receive user input field clicks on input field 312, such as... Figure 3C As shown, in response to this operation, the electronic device 100 can bring up the soft keyboard 313 provided by the input method application. The soft keyboard 313 can be used to input text, wherein... Figure 3C The soft keyboard 313 shown is a 9-key Pinyin layout, but is not limited to this. Figure 3C The layout of the soft keyboard 313 shown can also be other layouts, such as a 26-key Pinyin layout, an English layout, etc. Alternatively, the soft keyboard 313 can also be a handwriting soft keyboard, or a voice keyboard that converts user speech into text, etc. The embodiments of this application do not limit the layout of the soft keyboard 313.
[0141] Electronic device 100 can receive text editing operations performed by the user via soft keyboard 313, and then reply to the chat message "How much did you pay for this bag?" sent by the contact "Lucy", such as... Figure 3D As shown, the input method application in electronic device 100 determines through the user input module that the user has entered "approximately 1000 US dollars" in input box 312. Then, electronic device 100 displays "approximately 1000 US dollars" in input box 312, and the cursor position moves to after the last character "gold". Electronic device 100 can display a send button 314, which is used to send the text in input box 312 to the electronic device where the contact "Lucy" is located via a server.
[0142] Electronic device 100 can determine and display one or more suggested words based on the phrase "approximately US$1000" in input box 312. These suggested words can be characters, phrases, punctuation marks, emoticons, etc. In this embodiment, the suggested words may also include recommended text determined by the electronic device based on user intent. The suggested words may include "exchange rate," "appreciation," and recommended text 315 ("¥7200"). "Exchange rate" and "appreciation" can be predicted by electronic device 100 based on the user's text input habits, the characters or words preceding the cursor position, the user's most recently entered characters or words (e.g., US dollars), etc. Depending on the cursor position, electronic device 100 can provide different suggested words. When electronic device 100 receives a user click on "exchange rate," it can input "exchange rate" into the cursor position in input box 312, thus changing the text in input box 312 to "approximately US$1000 exchange rate."
[0143] The electronic device 100 may include recommended text 315 among the multiple suggested words. The recommended text 315 may be obtained by the electronic device 100 based on the intent recognition of the text "approximately US$1,000" in the input box 312. When the user enters a currency unit other than RMB in the input box 312, the user may expect to know its RMB price. The electronic device 100 can determine that the user intends to perform currency conversion and then display the recommended text 315 corresponding to the currency conversion service.
[0144] Electronic device 100 can receive a user's click on the recommended text 315, and in response to the operation, electronic device 100 can convert currency card 316 and return button 317.
[0145] The currency conversion card 316 can display the currency conversion information of the electronic device 100 to the currency in the input box 312. For example, the currency conversion card 316 can display: $1000 * 7.2 = ¥7200.00, and the latest currency conversion unit 1 US dollar ≈ 7.2 RMB. The currency conversion unit can be obtained by the electronic device 100 from the network.
[0146] The currency conversion card 316 may also include a details button 318 and a result button 319. The details button 318 provides an entry point for detailed currency conversion information. When the electronic device 100 receives a click on the details button 318, it can display the user interface of the currency conversion application in full screen or a window, thus providing users with more comprehensive currency conversion services. For example, the electronic device 100 can provide conversions of US$1000 to other currency units, or it can provide currency conversion functions for other denominations. The result button 319 allows users to input the currency conversion result into the input box 312.
[0147] In some embodiments, after the electronic device 100 receives a user's left-swipe operation on the currency conversion card 316, the electronic device 100 can also display other currency conversion cards, which can convert US$1,000 into other currencies. The operation methods of the other currency conversion cards can refer to the operation method of the currency conversion card 316 described above, and will not be repeated here.
[0148] The back button 317 can provide a redisplay. Figure 3D The entry point for the soft keyboard 313 is shown.
[0149] like Figure 3E As shown, the electronic device 100 can receive the user's click on the usage result button 319, and in response to the operation, such as... Figure 3F As shown, the electronic device 100 can display the currency conversion result in the input box 312. The electronic device 100 can display "approximately US$1,000 (RMB 7,200)" in the input box 312.
[0150] When a user wants to continue text editing using the soft keyboard, they can click the back button 317. The electronic device 100 can receive the user's click on the back button 317 and respond to the action as follows: Figure 3GAs shown, the electronic device 100 can re-display the 9-key Pinyin soft keyboard 313, allowing the user to continue text editing. The electronic device 100 can receive user input to the send button 314. In response to this input, the electronic device 100 can send a chat message to the electronic device used by the contact "Lucy." This chat message can include the text content in the input box 312. Simultaneously, the electronic device 100 can display the chat message containing the text content in the input box 312 in the chat window 311, and then clear the text content in the input box 312. Figure 3H As shown, chat window 311 displays a chat message sent by electronic device 100, the content of which is: "Approximately US$1,000 (RMB 7,200)".
[0151] As can be seen, the electronic device 100 can provide users with convenient tools through cards, so that users can directly obtain the currency conversion results without having to jump to the user interface of applications such as currency conversion, reducing the cumbersome operation for users.
[0152] Beyond currency conversion, in some embodiments, the electronic device 100 can also provide functions such as world clock lookup, calendar lookup, and lottery winning number lookup via cards. For example, when a time from another time zone (e.g., Paris time) is entered in input box 312, the electronic device 100 can provide a service to convert that time zone to Beijing time. When the electronic device 100 determines that a date or holiday has been entered in input box 312, it can provide a service to convert the Gregorian calendar date to the lunar calendar date, or vice versa, or display the Gregorian and lunar calendar dates corresponding to the holiday. When lottery-related content is entered in input box 312, the electronic device 100 can provide a service to display lottery winning numbers, and so on. These types of functions typically involve querying only a small amount of information, which may mean that the query results are less than a preset number of characters. Therefore, the electronic device 100 can directly display the query results in the card, so that the user does not need to enter the corresponding user interface to perform the query, etc.
[0153] Figures 4A-4G This is a user interaction diagram of some electronic devices 100 provided in the embodiments of this application, which provide weather viewing services via cards.
[0154] like Figure 4A As shown, the electronic device 100 can display a chat interface 310, which may include a chat window 311 and a soft keyboard 313. The method for the electronic device to enter the chat interface 310 can be found in [reference needed]. Figures 3A-3C The description of the illustrated embodiments will not be repeated here.
[0155] The chat window 311 can display chat messages sent by the contact "Lucy," such as "It's getting colder this week, wear more clothes." The electronic device 100 can receive operations performed on the soft keyboard 313 and reply to the chat message, responding to the aforementioned operations, such as... Figure 4B As shown, the electronic device 100 can display text content entered by the user via the soft keyboard 313 in the input box 312. The text content could be, for example, “It’s getting colder in Beijing, so you should wear more clothes.”
[0156] Electronic device 100 can perform intent recognition based on the text content entered in input box 312. For example, electronic device 100 can determine from the sentence "It's getting colder in Beijing, you should wear more clothes" that the user may intend to get information about Beijing's weather. Therefore, electronic device 100 can display recommended text 401 among multiple suggested keywords. The content of recommended text 401 can be determined based on the intent of the text content entered in input box 312, and may include keywords, summaries, etc., of the aforementioned text content. Electronic device 100 can receive user actions on recommended text 401, and in response to these actions, electronic device 100 can display, for example... Figure 4C The weather card 402 shown can display the highest and lowest temperatures in Beijing for the day ("9℃ / -2℃"), the current temperature in Beijing ("5℃"), air quality ("Good"), weather conditions ("Sunny"), and the weather and temperature conditions in Beijing for several hours to come. For example, 9:00: Sunny, temperature 5℃; 10:00: Sunny, temperature 6℃; 11:00: Sunny, temperature 7℃; 12:00: Sunny, temperature 8℃.
[0157] The weather card 402 may include a details button 403 and a send button 404. The details button 403 is used to view more detailed weather information, and the send button 404 can be used to send the weather card 402 to the electronic device of the contact "Lucy". Optionally, in addition to sending the weather card 402 to the electronic device of the contact "Lucy", the send button 404 can also be used to send text content within the input box.
[0158] like Figure 4C As shown, the electronic device 100 can receive a user's action on the details button 403, and in response to this action, the electronic device 100 can display as shown in the image. Figure 4DThe weather details interface 410 shown can be provided by a weather application. It can contain detailed weather information for Beijing on the current day and in recent days. For example, in addition to the information in the weather card 402, it can also include recent weather trends, including yesterday's weather, recent weather conditions, and weather conditions for the next day or more. Furthermore, the weather details interface 410 can also include information such as air quality, comfort level, wind direction and force, and sunrise and sunset times. Figure 4D (Not shown in the image). The aforementioned air quality may include, for example, the pollution index of the air on that day, as well as the concentration of inhalable particulate matter, the concentration of toxic and harmful gases, etc. The aforementioned comfort level may include, for example, air humidity, UV index, perceived temperature, clothing recommendations, exercise recommendations, car wash recommendations, etc.
[0159] The weather details interface 410 contains detailed weather information for Beijing today and today, as well as a return button 411. The return button 411 is used to return to the chat interface 310, providing users with a quick way to return to the chat interface 310. For example... Figure 4D As shown, the electronic device 100 can receive the user's action on the return button 411, and respond to the action as follows: Figure 4E As shown, electronic device 100 can switch to chat interface 310.
[0160] In some embodiments, when the card displayed by the electronic device 100 does not contain the information the user wants, the electronic device 100 can also switch the card in response to a user operation. For example, as Figure 4E As shown, the electronic device 100 can receive a user's action of pressing and swiping left on the weather card 402. In response to this action, the electronic device 100 can switch the weather card 402, as shown below. Figure 4E The weather card 402 shown is switched to the one shown. Figure 4F The weather card shown is 412. (As shown) Figure 4F As shown, weather card 412 may contain weather information different from weather card 402. For example, weather card 412 may include the highest temperature (9℃), lowest temperature (-2℃), wind force (northeast wind, level 2) in Beijing for the day, and clothing recommendations ("It is recommended to wear a coat"). Weather card 412 may also include a details button 413 and a send button 414. The details button 413 can be referred to the description of details button 403 above. When electronic device 100 receives the user's click on details button 413, in response to the operation, electronic device 100 may switch to... Figure 4D The weather details interface 410 shown; the send button 414 can be referred to in the previous introduction about the send button 404, and will not be repeated here.
[0161] Electronic device 100 can receive a user's click on the send button 414. In response to this click, electronic device 100 can send a message to the contact "Lucy's" electronic device, which may include the content of the weather card 412. Furthermore, electronic device 100 can display this chat message in the chat window. Figure 4G As shown, the electronic device 100 can display the content of the weather card 412 in the chat window 311. The content of the weather card 412 can be displayed in the chat window 311 as an image. It is not limited to images; it can also be a link, etc., and this embodiment does not impose any limitations on this. Specifically, when the chat message sent by the electronic device 100 contains a card with a link, when the electronic device 100 receives a user clicking on the chat message sent by the electronic device 100 in the chat window 311, the electronic device 100 can respond to this operation by jumping to, for example,... Figure 4D The weather details interface shown is 410.
[0162] It is understood that, not limited to the text content in the input box 312, the electronic device 100 can also determine the user's intention to share the weather based on other text content. For example, when the user enters information such as location and weather, such as "Beijing" or "temperature drop" in the input box 312 via the soft keyboard 313, the electronic device 100 can determine the user's intention to share the weather based on this information, and then the electronic device 100 can provide a weather sharing service through weather cards. Alternatively, when the user enters travel plan information (which may include time, location, and content), such as "this Saturday" or "camping," in the input box 312 via the soft keyboard 313, the electronic device 100 can also determine the user's intention to share the weather based on this travel plan information, and then provide a service through weather cards to view the location mentioned in the travel plan information, or a frequently used address stored by the electronic device 100, or the weather at the current location of the electronic device 100.
[0163] As can be seen, electronic devices can provide multiple cards for each service. These cards can be generated by system applications within the electronic device or by third-party applications; this embodiment does not impose any limitations on this. Each card can contain different information, or it can have different styles, etc. Users can select the appropriate card to view or send based on their needs. Figures 4A-4G The cards shown are for illustrative purposes only. Electronic devices can provide more or fewer cards based on a service. The interaction methods when electronic devices provide more or fewer cards can be found in [reference needed]. Figures 4A-4G The interaction method when two cards are provided is shown, and will not be described in detail here.
[0164] In some embodiments, the electronic device 100 may display multiple recommended texts, not just one within the suggested keywords. These multiple recommended texts may belong to the same service provided by the same user intent, or they may belong to different services provided by different user intents. These different user intents may correspond to services ranked highly by the service weight sorting module in the electronic device 100.
[0165] Figures 5A-5F This is a user interaction diagram of some electronic devices 100 provided in the embodiments of this application, which provide shared store services through cards.
[0166] like Figure 5A As shown, the electronic device 100 displays a chat interface 310, which may include a chat window 311, an input box 312, and a soft keyboard 313. The electronic device 100 enters... Figure 5A The method of the chat interface 310 shown can be referred to the description in the foregoing embodiments, and will not be repeated here.
[0167] The chat window 311 can contain chat messages sent from the contact "Lucy" to the electronic device 100. The content of the chat message could be: "No overtime today, let's go get something nice to eat." The electronic device 100 can receive and respond to user actions on the soft keyboard 313 for text editing, such as... Figure 5B As shown, the electronic device 100 can display text content edited by the user in the input box 312 based on the user's operation on the soft keyboard 313. This text content could be "Okay, let's go eat at AA restaurant, it's been a long time since I've eaten there." The electronic device 100 can display multiple suggested words, such as "you," "," and "la." Furthermore, the electronic device 100 can determine that the user intends to share the store based on the above text content and then display recommended text 501 in the suggested words. The recommended text 501 can contain keywords of the text content entered by the user, such as "AA restaurant."
[0168] Electronic device 100 can receive user actions on recommended text 501, and in response to these actions, electronic device 100 can display, for example... Figure 5CThe food card 511 shown can be generated by electronic device 100 after obtaining information about "AA Restaurant" from a food group-buying application (i.e., a food group-buying APP). The food group-buying APP can be a third-party application installed on electronic device 100, a system application of electronic device 100, or an application on a cloud server. Food card 511 can include information such as the distance of AA Restaurant from the location of electronic device 100, average cost per person, and the rating of AA Restaurant in the food group-buying APP. Food card 511 can include an order button 512 and a send button 513. The order button 512 can be used to jump to the ordering interface of AA Restaurant in the food group-buying APP, where users can reserve a time and number of people to dine at AA Restaurant within the agreed time. The send button 513 is used to share food card 511 with the electronic device of contact "Lucy".
[0169] In some embodiments, the electronic device 100 can receive user actions on the food card 511 to switch the food card. These actions could include, for example, swiping left, right, up, or down on the food card 511, thereby allowing the electronic device 100 to switch the food card 511 to other food cards. These other food cards may include one or more of the following: cards containing information about AA Restaurant's chain stores at other addresses, cards containing other information about AA Restaurant, cards containing information about other restaurants similar to AA Restaurant, cards containing information about restaurants within a preset distance of the location of the electronic device 100, and so on.
[0170] like Figure 5C As shown, electronic device 100 can receive a user's action on send button 513. In response to this action, electronic device 100 can send a message to the electronic device of contact "Lucy," which may contain information from the food card 511. Furthermore, as... Figure 5D As shown, the electronic device 100 can display chat messages 514 sent by the electronic device 100 within the chat window 311. The chat messages 514 may include information from the food card 511. In some embodiments, the chat messages 514 may be in image format. The electronic device 100 can receive a user's save operation on the chat messages 514, and thus store the information contained in the chat messages 514 as images. Alternatively, the chat messages 514 may also contain a sharing link provided by a food group-buying app, which can be used to jump to the interface corresponding to the AA restaurant in the food group-buying app. Figure 5D As shown, the electronic device 100 can receive the user's click on the chat message 514, and in response to this operation, the electronic device 100 can switch from the chat interface 310 to... Figure 5EThe restaurant details page 515 shown can be provided by a food group-buying APP. It can contain detailed information about the AA restaurant, including information from the food card 511 (such as the distance of the AA restaurant from electronic devices, the AA restaurant's rating, and the average cost per person at the AA restaurant). It can also provide access to purchase AA restaurant's set meals and vouchers, rate the AA restaurant, reserve a table at the AA restaurant, view the AA restaurant's dishes, and view the dishes or promotional photos uploaded by the AA restaurant.
[0171] The restaurant details page 515 may include a back button 516, which provides the user with an entry point to return to the chat interface 310. For example... Figure 5E As shown, the electronic device 100 can receive the user's action on the return button 516, and respond to the action as follows: Figure 5F As shown, the electronic device 100 can return to the chat interface 310, allowing the user to return to the text editing interface and continue chatting.
[0172] It should be noted that the text content corresponding to the above-mentioned intention to share a store is merely an example and does not constitute a limitation of the embodiments of this application. In some embodiments, when the text content in the input box 312 contains one or more of the following: time (e.g., Saturday evening), location (e.g., Qianmen Street), store name (e.g., AA Restaurant), the electronic device 100 can determine that the user intends to share a store, and thus the electronic device 100 can provide a store sharing card. Optionally, when the text content does not contain a specific store name, the recommended text in the associated words can contain store categories such as "food" rather than specific store names, and the electronic device 100 can provide the user with cards corresponding to stores within a preset distance.
[0173] Figures 6A-6C This is a user interaction diagram of some electronic devices 100 provided in the embodiments of this application, which provide a shared trip service via a card.
[0174] like Figure 6A As shown, the electronic device 100 displays a chat interface 310. For details about the chat interface 310, please refer to the description in the foregoing embodiments, which will not be repeated here. Figure 6A The chat window 311 within the chat interface 310 can display chat messages sent by the contact "Lucy," such as "What time will you arrive in Beijing?". The electronic device 100 can receive text editing operations from the user on the soft keyboard 313, and then display the edited text in the input box 312. For example... Figure 6BAs shown, electronic device 100 displays "Landing at Daxing Airport at 10 AM today" in input box 312. This text content can be determined by electronic device 100 based on the user's text editing operation on soft keyboard 313. Electronic device 100 can recognize the above text content. For example, electronic device 100 can recognize that it contains the intent to share flight information or route information. Therefore, electronic device 100 can display recommended text 600 in the suggested keywords. The text of recommended text 600 may contain the keyword "landing at 10 AM" in input box 312. Electronic device 100 can receive the user's operation on recommended text 600. In response to this operation, electronic device 100 can query information such as train timetables and flight schedules, generate corresponding cards based on the above information, and display them. Figure 6C As shown, the electronic device 100 can display a flight card 601, which may contain flight information, including the airline name (“AA Airlines”), flight date (August 15, Thursday), origin and destination (Shanghai Hongqiao T1 to Beijing Daxing), departure time (19:40) and arrival time (22:00), etc. Not limited to the above, the flight card 601 may contain more than... Figure 6C The content of the flight card 601 is not limited in this embodiment, which may show more or less flight information. In some embodiments, the electronic device 100 can receive user operations on the flight card 601 and provide a flight card containing different flight information in response to the operation. The flight card 601 may include a "View Itinerary" button 602 and a "Send" button 603. The "View Itinerary" button 602 can be used to jump to the details page of the flight corresponding to the flight card 601, through which the electronic device 100 can provide more detailed flight information. The "Send" button 603 is used to share the information of the flight card 601 with the contact "Lucy". For a description of the "Send" button 603, please refer to the above. Figure 5C The description of the send button 513 in the food card 511 will not be repeated here.
[0175] It should be noted that, Figures 6A-6C The text corresponding to the intent to share flight information is merely an example and does not constitute a limitation of the embodiments of this application. In some embodiments, when the text content in the input box 312 includes one or more items such as travel mode, flight number, high-speed rail number, arrival time, and location, the electronic device 100 can determine that the user intends to share flight information or route information based on the text content. Then, the electronic device 100 can query the corresponding flight information, high-speed rail information, etc., from the server or from pre-stored tickets, air tickets, etc. purchased by the user based on the text content, and generate the corresponding card based on the above information, thereby providing the user with the service of sharing flight information or route information.
[0176] Figures 7A-7C This is a user interaction diagram of some electronic devices 100 provided in the embodiments of this application, which provide a service for sharing hot events through cards.
[0177] like Figure 7A As shown, the electronic device 100 can display a chat interface 310, where the chat window 311 can display chat messages sent by the contact "Lucy," such as "There's been another twist in the AA celebrity incident today." The electronic device 100 can receive user actions on the soft keyboard 313 and then determine the text content corresponding to the user actions. Figure 7B As shown, the electronic device 100 can display text content input by the user within the input box 312. This text content could be, for example, "What, is it the AA event?". The electronic device 100 can determine multiple related words based on the text content within the input box 312 and the cursor position, such as "?", "!", "I", and "you". These related words can also include recommended text 701 corresponding to the user's intent determined by the electronic device 100 based on the text content within the input box 312. The content of recommended text 701 can be keywords related to a trending event mentioned in the text content within the input box 312, i.e., "AA event". Specifically, the electronic device 100 can determine the presence of keywords related to a trending event within the input box 312, then determine the user's intent to discuss and share the trending event, and subsequently display the recommended text 701. Recommended text 701 can be seen as an entry point for the electronic device 100 to provide a service for sharing trending events. The keywords of the aforementioned hot topics can be pre-stored in the memory of the electronic device 100, or in the cloud server. Alternatively, the keywords of the hot topics can be obtained from the network by the electronic device 100 after determining that the user intends to discuss or share the hot topics. Or, they can be extracted by the electronic device 100 from the text content entered by the user in the input box 312.
[0178] like Figure 7B As shown, the electronic device 100 can receive a user's action on the recommended text 701, and in response to this action, the electronic device 100 can display as shown in the image. Figure 7CThe trending search card 711 shown can contain content provided by a third-party application (such as Weibo) or by the system application of the electronic device 100. The trending search card 711 may include keywords and summaries of trending events. It may also include a "View Details" button 712 and a "Send" button 713. The "View Details" button 712 allows access to the details page of the trending topic, providing the electronic device 100 with more detailed information about the event ("AA event"), including user comments and the development of the AA event. The "Send" button 713 sends the content of the trending search card 711 to the electronic device of the contact "Lucy," and the electronic device 100 can display a chat message containing the content of the trending search card 711 in a chat window. This chat message may include images or clickable share links that lead to the details page of the AA event.
[0179] As can be seen, electronic device 100 can recognize user intent based on the text content entered by the user, and then provide corresponding services to the user through one or more cards based on the user intent. In this way, users can quickly use the services provided by electronic device 100 without frequently switching interfaces, improving the user's efficiency when using electronic device 100. Furthermore, in chat scenarios, electronic device 100 can receive and respond to the user's operation of sharing card content, sharing the card content with the contact's electronic device. In this way, the other contact can also quickly view the information shared by electronic device 100. In addition to containing information, the card can also contain links that allow the user to jump to the corresponding details interface (such as weather details interface 410, restaurant details interface 515, etc.), so that both the user and the other contact can quickly obtain the corresponding functions through the card, thereby improving the experience for both parties in the chat.
[0180] In some embodiments, after recognizing the intent contained in the text content entered by the user, the electronic device 100 can proactively provide corresponding services without needing to receive the user's click operation on the recommended text.
[0181] Figures 8A-8I This is a user interaction diagram illustrating how some other electronic devices 100 provided in this application provide shared store services via cards.
[0182] like Figure 8AAs shown, the electronic device 100 displays a chat interface 310. The chat window 311 of the chat interface 310 can contain chat messages received by the electronic device 100 from the contact "Lucy." The content of the chat messages could be "Where are you planning to go today?". The electronic device 100 can receive user input on the soft keyboard 313 and then display the text content entered by the user via the soft keyboard 313 in the input box. For example... Figure 8B As shown, the electronic device 100 can display the user's input "Let's go get a milk tea" in the input box 312. Then, the electronic device 100 can determine that the text contains an intent to share a milk tea shop, and subsequently, the electronic device 100 can highlight the keyword "milk tea" in the input box 312 to attract the user's attention to the keyword. This highlighting can be, for example, bolding the words "milk tea" and adding a border; it is not limited to this display method and other display methods are also possible. This embodiment of the application does not limit this.
[0183] Furthermore, such as Figure 8C As shown, the electronic device 100 can display multiple store cards, each of which can contain information about a milk tea shop. This milk tea shop information can be obtained by the electronic device 100 from the network. Specifically, the electronic device 100 can obtain the milk tea shop information through a third-party application, such as a food group-buying app, and then generate and display the store cards. The multiple store cards can include store card 801 and store card 802. Store card 801 can contain the store name "AA Milk Tea (Flagship Store)" and a store icon, while store card 802 can contain the store name "BB Fruit Tea (XX Road Store)" and a store icon. The information contained in the above-mentioned store cards is merely an example and not intended to limit the embodiments of this application. In some embodiments, the store cards can contain more information than... Figure 8C The device can display more or less information, such as the store address, store rating, and distance from the electronic device 100. Optionally, when the electronic device 100 receives a user's click on the keyword "milk tea," it can cancel the display of the store card in response to this action.
[0184] The electronic device 100 can sort stores based on one or more of the following: the distance between the store location and the electronic device 100, the store's rating, the relevance of the store type to the store type mentioned in the user's text (e.g., milk tea), and the frequency of the user's purchases of products in the store (pre-stored in the electronic device 100). The electronic device 100 can then display multiple store cards in this order. The electronic device 100 can receive a user's leftward swipe gesture on store card 802. In response to this gesture, the electronic device 100 can display other store cards sequentially in the aforementioned order, such as... Figure 8DAs shown, the electronic device 100 can display a store card 803, which may include the store name "CC Fruit Tea (XX Road Store)" and a store icon, etc. Taking the electronic device 100 sorting stores according to their location and distance from the electronic device 100 as an example, among AA Milk Tea (Flagship Store), BB Fruit Tea (XX Road Store), and CC Fruit Tea (XX Road Store), the electronic device 100 is closest to AA Milk Tea (Flagship Store) and furthest from CC Fruit Tea (XX Road Store). Therefore, the electronic device can display the store card 801 corresponding to AA Milk Tea (Flagship Store) at the front and the store card 803 corresponding to CC Fruit Tea (XX Road Store) at the back. The electronic device 100 is not limited to the above-mentioned store cards; it can also display more or fewer store cards, and this embodiment does not limit this. Optionally, the electronic device 100 may receive text content entered by the user in the input box 312 and wait a preset time before displaying the store card. This preset time may be, for example, two seconds, three seconds, etc., and this embodiment does not limit this.
[0185] In some embodiments, when the electronic device 100 receives an instruction from the user to continue entering text, the electronic device 100 can hide the store card. For example... Figure 8E As shown, the electronic device 100 inputs "What do you think?" via the soft keyboard 313. The electronic device 100 can display the above text content input by the user in the input box 312. During the process of receiving the above content input by the user, the electronic device 100 can hide the store card to avoid the store card obscuring the chat messages in the chat window and affecting the user's chat experience.
[0186] like Figure 8F As shown, the electronic device 100 can receive the user's operation on the keyword in the input box 312. This operation can be, for example, the user clicking on the highlighted keyword in the input box 312 (i.e., clicking "milk tea"). In response to this operation, the electronic device 100 can display multiple store cards again, so that the user can select a store card to share again after completing the text editing.
[0187] like Figure 8G As shown, electronic device 100 can receive operations performed by a user on store card 801 among multiple store cards. In response to these operations, electronic device 100 can send a message to the electronic device of contact "Lucy," which may contain the content of store card 801. Furthermore, as... Figure 8HAs shown, the electronic device 100 can display chat messages 804 sent by the electronic device 100 within the chat window 311. The chat message 804 can be an image containing the content of the store card 801. Optionally, the chat message 804 can also contain a card (or link) that allows navigation to the details page of the store corresponding to the store card 801. After the electronic device 100 receives an operation from the user on the chat message 804, in response to this operation, the electronic device 100 can access the details page of the store corresponding to the store card 801. This details page can contain detailed information about the store corresponding to the store card 801 (i.e., AA Milk Tea (Flagship Store)), such as the store's address, rating, uploaded images, store reviews, coupons, and package purchase links. The details page can be provided by the electronic device 100's system application or by a third-party application. This third-party application can be an application installed on the electronic device 100 or an application installed on a cloud server; this embodiment does not limit this. Optionally, the details page can be provided by a food group-buying app, and the content included in the details page can refer to... Figure 5E The restaurant details page 515 shown here will not be repeated here.
[0188] In some embodiments, after the electronic device 100 receives the user's click on the store card, such as Figure 8H As shown, the electronic device 100 can hide the store cards to facilitate continued text input by the user and prevent the store cards from obscuring chat messages. When the user still wants to share a store card, they can click the keyword "milk tea" in the input box again. The electronic device 100 can respond to the user's click of the keyword again and display multiple store cards again. The method by which the electronic device 100 receives user input to share other store cards can be referred to the description of the method of sharing store card 801 by the electronic device 100 above, and will not be repeated here.
[0189] Optionally, after sending the store card 801 to the contact "Lucy's" electronic device, the electronic device 100 may still display multiple store cards, making it convenient for the user to select multiple store cards to share.
[0190] Optionally, after the electronic device 100 displays multiple store cards, in response to the user's action of clicking the keyword in the input box again, the electronic device 100 can cancel the display of multiple store cards. This is not limited to canceling the display of store cards after clicking the keyword; it could also be that the electronic device 100 cancels the display of store cards after receiving an action from the user clicking on other areas (e.g., areas outside the store cards in the chat window 311). This embodiment of the application does not impose such limitations.
[0191] like Figure 8H As shown, once the user confirms that the text in input box 312 has been edited, they can click the send button 314. Electronic device 100 can receive the user's action on send button 314, and in response to this action, electronic device 100 can send the text in input box 312 to "Lucy's" electronic device, and thus, as... Figure 8I As shown, the electronic device 100 can display chat messages sent by the electronic device 100 in the chat window 311, which may include the text content "Let's go get a milk tea, what do you think?" in the input box 312. Furthermore, the electronic device 100 can clear the text content already sent in the input box 312, making it easier for the user to input new text content.
[0192] In other words, once the electronic device 100 recognizes the user's intent in inputting text, the user doesn't need to click anything. The electronic device 100 can proactively provide the corresponding service through multiple cards. This allows the user to quickly access the service without excessive operations, reducing the user's workload. Furthermore, the way the electronic device 100 proactively displays multiple cards makes the function easier for users to discover, increasing its usage rate and meeting the user's need to quickly access one or more services while editing text.
[0193] Optionally, the electronic device 100 can provide services with sharing intent through cards. When the electronic device 100 determines that the text content edited by the user contains the intent to share certain information, such as TV series, music, books, product information, store information, food delivery information, celebrity information, hot topic information, express delivery information, train and plane flight information, hotel information, etc., the electronic device 100 can provide corresponding services through cards.
[0194] In addition to providing services to users via cards, in some embodiments, the electronic device 100 may also provide one or more services to users via windows.
[0195] Figures 9A-9D This is a schematic diagram of user interaction provided by some electronic devices 100 in this application embodiment, which provides a schedule creation service through a window.
[0196] like Figure 9A As shown, the electronic device 100 displays a chat interface 310. The chat window 311 of the chat interface 310 can display chat messages sent by the contact "Lucy," which may include: "You're going on a business trip tomorrow, I'm at home helping you pack." The electronic device 100 can receive user input on the soft keyboard 313 provided by the input method application, determine the text content entered by the user based on this input, and, as... Figure 9BAs shown, the electronic device 100 can display text content entered by the user via the soft keyboard 313 in the input box 31. This text content could include, for example, "Okay, I'm going home tonight, please remember to remind me to bring my ID card." The electronic device 100 can perform intent recognition on this text content. Specifically, the electronic device 100 can determine whether the matter indicated by the text content is important based on the user's language habits (i.e., user profile). If the electronic device 100 determines that the text content involves important matters, it can then determine that the user has the intent to create a to-do list or set an alarm. The electronic device 100 can then display recommended text for both intents, allowing the user to choose which service to use.
[0197] like Figure 9B As shown, the electronic device 100 displays recommended text 901 and recommended text 902. Recommended text 901 is determined by the electronic device 100 based on the intention to create a to-do, and recommended text 901 may contain "create to-do". Recommended text 902 may be determined by the electronic device 100 based on the intention to create an alarm, and recommended text 902 may contain "create alarm".
[0198] Electronic device 100 can receive a user's click action on the recommended text 901, and in response to this action, electronic device 100 can provide a to-do service. For example... Figure 9CAs shown, the electronic device 100 can display a new schedule window 911 above the chat interface 310. The new schedule window 911 is used to create to-do items. The title, location, time, and reminder time of the to-do item can be filled in the new schedule window 911. The new schedule window 911 may contain a save button 912, a close button 913, and a move button 914. The save button 912 is used to save the to-do items in the new schedule window 911, and the close button 913 is used to close the new schedule window 911. When the electronic device 100 receives a click operation from the user on the close button 913, the electronic device 100 can close the new schedule window 911. The movement button 914 is used to change the position of the new schedule window 911 on the display screen. For example, the electronic device 100 can receive a user's operation of pressing and dragging the movement button 914. In response to this operation, the display position of the new schedule window 911 will move according to the position of the user's press until the user lifts their finger. This allows the user to move the position of the new schedule window 911 and prevent it from obscuring the content the user wants to view in the chat interface 310. In addition, the electronic device 100 can also receive a user's operation of pressing at any corner of the new schedule window 911 and sliding it inwards. In response to this operation, the electronic device 100 can proportionally reduce the size of the new schedule window 911 based on the sliding distance. Correspondingly, the electronic device 100 can also receive a user's operation of pressing at any corner of the new schedule window 911 and sliding it outwards. In response to this operation, the electronic device 100 can proportionally enlarge the size of the new schedule window 911 based on the sliding distance. This allows users to adjust the size of the new schedule window 911 according to their own needs. For example, users can increase the size of the new schedule window 911 to make it easier for them to input data within the new schedule window 911; users can also decrease the size of the new schedule window 911 to reduce the obstruction of the new schedule window 911 on the chat interface 310.
[0199] Electronic device 100 can receive user operations such as editing to-do items in the new schedule window 911, for example... Figure 9CAs shown, the newly created schedule window 911 displays the content of the to-do item edited by the user. The title of the to-do item is "Bring your ID card," and the estimated completion time is 19:30-20:30 on August 15th. The reminder time for the to-do item is 10 minutes before the estimated completion time. The reminder method is: only one reminder is needed, no further reminders are required. Furthermore, the electronic device 100 can receive the user's operation on 902. In response to this operation, the electronic device 100 can store the content of the to-do item set by the user in the newly created schedule window 911. Thus, when the reminder time for the to-do item arrives, the electronic device 100 can remind the user to complete the to-do item through an alarm clock, notification, etc.
[0200] like Figure 9D As shown, after storing the contents of the to-do list on the electronic device 100, the new schedule window 911 can be closed, allowing the user to continue chatting in the chat interface 310.
[0201] As can be seen, when a user is editing text, the electronic device 100 can provide services to the user through a window. In this way, after the user obtains the service (or function) in the window, he / she can immediately close the window and return to continue editing the text without having to go through multiple user interface jumps to obtain the above services, thus improving the convenience of user operation.
[0202] Optionally, the electronic device 100 can provide services for creating class intents through a window. For example, when the electronic device 100 determines that the text content edited by the user contains intents such as creating a schedule, creating an alarm clock, or creating a to-do list, the electronic device 100 can provide corresponding services through a window.
[0203] In some embodiments, the electronic device 100 can also provide search services to users via a browser when editing text.
[0204] Figures 10A-10C This is a user interaction diagram illustrating the search service provided by some electronic devices 100 in the embodiments of this application.
[0205] like Figure 10A As shown, the electronic device 100 displays a chat interface 310. The chat window 311 in the chat interface 310 contains a chat message sent by the contact "Lucy". The chat message may be: "The May Day holiday is coming soon, what are you planning to do?" The electronic device 100 can receive the user's operation on the soft keyboard 313 to reply to the above chat message.
[0206] like Figure 10BAs shown, the electronic device 100 can display the text content entered by the user via the soft keyboard 313 in the input box 312: "Planning to travel during the May Day holiday". Furthermore, the electronic device 100 can determine the user's intent based on the text content, confirming the user's intention to plan a trip, and can then provide a service to search for travel plans. The electronic device 100 can also display recommended text 1001, which may contain the text "Good places to go during the May Day holiday". The content of the recommended text 1001 can be determined by the electronic device 100 based on the intent of the text content in the input box 312. The electronic device 100 can receive user actions on the recommended text 1001 and respond to these actions, such as... Figure 10C As shown, electronic device 100 can launch a browser and search for "good places to go during the May Day holiday," thereby displaying search interface 1002. Search interface 1002 can contain search results for "good places to go during the May Day holiday" from the network, such as travel guides and recommendations. This allows users to easily obtain travel suggestions for the May Day holiday provided by electronic device 100. Users can click on content in search interface 1002 to jump to the corresponding interface to view more detailed information. For example, search interface 1002 can contain hyperlink 1003. Electronic device 100 can receive user actions on hyperlink 1003, and in response, can jump to the user interface corresponding to hyperlink 1003, allowing users to view more detailed information about "Wuzhen tourism." In addition, users can also search for other content they want to know through search interface 1002.
[0207] The search interface 1002 may also include a back button 1004, which is used to exit the search interface 1002. When the electronic device 100 receives an operation from the user on the back button 1004, in response to this operation, the electronic device 100 can return to the previous screen. Figure 10B The chat interface shown in 310 allows users to continue chatting.
[0208] In other words, when an electronic device determines that a user intends to search for certain information based on the text input by the user, the electronic device 100 can provide the user with a quick browser search function. This eliminates the need for the electronic device 100 to go through the cumbersome process of opening a browser and searching; the user can simply click on the recommended text to quickly find the content they want, improving the user experience. Furthermore, after obtaining the desired content, the electronic device 100 can quickly return to the previous text editing scenario, further reducing the complexity of the operation.
[0209] In some embodiments, the electronic device 100 may identify the user's intent based on a sentence segment. When the electronic device 100 cannot fully identify the user's intent based on a certain sentence segment, it may also identify the user's intent based on the sentence segments before or after that sentence segment.
[0210] Figures 11A-11D This is a user interaction diagram of some electronic devices 100 based on multiple sentence segments to identify user intent, as provided in the embodiments of this application.
[0211] like Figure 11A As shown, the electronic device 100 can display a chat interface 310, which may include a chat window 311, an input box 312, and a soft keyboard 313. The chat window 311 may contain a message received by the electronic device 100 from the contact "Lucy": "Any recommendations for travel during the May Day holiday?" The electronic device 100 can display a sentence entered by the user via the soft keyboard 313 in the input box 312, which may include: "I went to Shangri-La before, it was very beautiful." The electronic device 100 can identify the user's intent based on this text content. If the electronic device 100 does not identify a user intent that matches one or more of its services, the suggested words displayed by the electronic device 100 may not include recommended text determined based on the user's intent.
[0212] Electronic device 100 can receive user input of sentence segments via soft keyboard 313, such as Figure 11B As shown, in response to the above operation, the electronic device 100 can display the sentence entered by the user in the input box 312: "Let me show you the photos I took there." The electronic device 100 can determine that the user intends to share photos based on the sentence "Let me show you the photos I took there." However, the reference of "there" in the sentence is not clear, and the electronic device 100 cannot obtain an entity associated with sharing photos from the sentence. Therefore, the electronic device 100 can search for the previous sentence: "I went to Shangri-La before." In this way, the electronic device 100 can determine that the user intends to share photos of Shangri-La, and then display recommended text 1101 in the suggested words. Recommended text 1101 may include the text "Shangri-La."
[0213] Electronic device 100 can receive user actions on recommendation text 1101. In response to this action, electronic device 100 can search for photos of Shangri-La from a photo library. This photo library may include images stored in the electronic device 100's memory, and / or images stored on a cloud server, etc. Specifically, electronic device 100 can identify one or more photos as Shangri-La photos based on photo location markers. These location markers can be determined by the electronic device 100's location when taking the photo, or they can be manually determined by the user. Alternatively, electronic device 100 can also identify photo content in the photo library and then identify one or more photos of Shangri-La based on that content.
[0214] like Figure 11C As shown, the electronic device 100 can display one or more photos of Shangri-La found in the search, including photos 1102 and 1103. In some embodiments, the electronic device 100 can receive a user's action of swiping left on photo 1102 or photo 1103, and in response to this action, the electronic device 100 can display photos of other Shangri-La found in the search. Each photo may contain information such as the date the photo was taken.
[0215] Electronic device 100 can receive user actions on photo 1102, such as clicking on photo 1102. In response to this action, electronic device 100 can send photo 1102 to the electronic device of contact "Lucy," and, as... Figure 11D As shown, the electronic device 100 can display chat messages sent by the electronic device 100, which include photos 1102, in the chat window 311.
[0216] In other words, electronic device 100 can perform intent recognition based on sentence segments, and then provide corresponding services based on the recognized user intent. Since sentence segments are often short, it takes less time for electronic device 100 to recognize user intent based on sentence segments compared to recognizing all the content the user has already entered. This allows the electronic device to respond more quickly after the user enters a sentence segment and provide the corresponding service. When electronic device 100 cannot recognize a complete intent based on a certain sentence segment—for example, electronic device 100 recognizes a sharing intent, but the sentence segment does not contain the content the user wants to share—electronic device 100 can still recognize the user's intent based on one or more preceding sentence segments, and then provide more accurate services based on the complete intent, thereby improving the user's experience when inputting text.
[0217] Not limited to chat scenarios, electronic device 100 can also provide users with one or more services in other text editing scenarios.
[0218] Figures 12A-12E This is a user interaction diagram illustrating how some electronic devices 100 provided in this application provide services in a note-editing scenario.
[0219] like Figure 12A As shown, the electronic device 100 can display a note editing interface 1200, wherein the note editing interface 1200 can be a user interface provided by a note-taking application, and the note editing interface 1200 can be used to edit notes, wherein the notes are used to provide users with the function of recording, and the notes can contain text, images, audio and other content.
[0220] The note-editing interface 1200 may include a title editing bar 1201, a body text editing area 1202, a soft keyboard 313, and a save button 1203. The title editing bar 1201 is used to edit the note's title, and the body text editing area 1202 is used to edit the note's body text. The save button 1203 is used to save the note's content. The electronic device 100 can receive user input on the soft keyboard 313, and based on this input, the electronic device 100 can determine the user-inputted text content and display it in the body text editing area 1202. Figure 12B As shown, the electronic device 100 displays the user-edited text "Today's Weather" in the text editing area 1202. The electronic device 100 can identify the intent contained in the text content and then determine that the user intends to check the weather. Furthermore, the electronic device 100 can display recommended text 1204 among multiple suggested keywords. The content of the recommended text 1204 could be "Beijing Temperature". The electronic device 100 can determine the content of the recommended text 1204 based on the user's intent to check the weather and the current location of the electronic device 100.
[0221] like Figure 12B As shown, the electronic device 100 can receive a user's action on the recommended text 1204, and in response to this action, the electronic device 100 can display as shown in the image. Figure 12C The weather card 1205 is shown. For a description of the content of weather card 1205, please refer to the aforementioned description of weather card 402; it will not be repeated here. Weather card 1205 may include an insert button 1206 and a share button 1207. The insert button 1206 is used to insert weather card 1205 into a notepad, and the share button 1207 is used to share weather card 1205 with other devices or to the user's social media through chat applications or other applications.
[0222] like Figure 12C As shown, the electronic device 100 can receive a user's operation on the insert button 1206. In response to this operation, the electronic device 100 inserts the weather card 1205 into the notebook, as shown. Figure 12DAs shown, the electronic device 100 can insert a weather card 1205 into the text editing area 1202. The weather card 1205 can be inserted into the text editing area 1202 in the form of an image.
[0223] Furthermore, the electronic device 100 can receive the user's operation on the save button 1203, and respond to the operation as follows: Figure 12E As shown, the electronic device 100 can store the notes edited by the user within the note-editing interface 1200. This allows the user to view the notes at any time.
[0224] In other words, in other text editing scenarios, the electronic device 100 can also provide corresponding services to users based on the text content they input, thereby meeting the diverse needs of users when editing text.
[0225] It is understandable that, not limited to weather services, electronic device 100 can also provide the same services as in chat scenarios in other text editing scenarios. The methods by which electronic device 100 provides services in other text editing scenarios can refer to the methods for providing services in chat scenarios, and will not be repeated here.
[0226] The input method provided in the embodiments of this application is described below.
[0227] Figure 13 This is a flowchart of the input method provided in the embodiments of this application, such as... Figure 13 As shown, this input method may include, but is not limited to, the following steps:
[0228] S1301, The electronic device displays the first input box in the chat interface.
[0229] The chat interface can be a user interface provided by a chat application for communicating with other contacts or electronic devices. Such chat applications can be, for example, instant messaging applications, SMS applications, etc. The electronic device 100 can display chat messages sent by other contacts or electronic devices in the chat interface, and can also display chat messages sent by the electronic device 100 to other contacts or electronic devices. Furthermore, the electronic device 100 can also provide a text editing entry point for the user in the chat interface. The chat interface can be, for example, the chat interface 310 in the aforementioned embodiment.
[0230] The chat interface may display a first input box, which is used to edit the text content of chat messages to be sent to other contacts or electronic devices. The first input box may be, for example, the input box 312 in the aforementioned embodiment.
[0231] S1302, The electronic device detects a first operation of inputting first text into the first input box. In response to the first operation, the electronic device performs intent recognition on the first text to obtain the first user intent.
[0232] The electronic device 100 can detect a first operation of inputting first text into a first input box. This first operation may be, for example, an operation performed on the soft keyboard 313 provided by an input method application. Based on this first operation, the electronic device 100 can determine the first text input by the user, and then perform intent recognition on the first text to obtain a first user intent.
[0233] S1303. The electronic device displays one or more suggested words in the chat interface, and the one or more suggested words contain a first recommended text, which is determined by the electronic device based on a first user intent.
[0234] An electronic device can display one or more suggested words, which can be determined by the electronic device based on the content of a first text. The suggested words may include a first recommended text. The first recommended text can be determined by the electronic device 100 based on a service corresponding to a first user intent. The text content included in the first recommended text can be a summary of the first text, keywords, or text indicating the service.
[0235] For example, in Figure 3D In the illustrated embodiment, the first text "approximately US$1,000" and the content of the first recommended text "¥7,200" can indicate a currency conversion service.
[0236] exist Figure 4B In the illustrated embodiment, the first text is "It's getting colder in Beijing, you should wear more clothes," and the content of the first recommended text, "Beijing temperature," could indicate that a service is offered to share Beijing weather information. Figure 5B In the embodiment shown, the first text is “Okay, let’s go eat at AA restaurant, it’s been a long time since I’ve eaten there”, and the content of the first recommendation text “AA restaurant” is the keyword “AA restaurant” in the first text.
[0237] exist Figure 9B In the illustrated embodiment, the first text is "Okay, I'll be home tonight, please remember to remind me to bring my ID card." The content of the first recommended text can be "Create a to-do," which can be used to indicate the intention to provide the creation of a to-do item. It is not limited to "Create a to-do," the content of the first recommended text can also be a summary of the first text, which can summarize the content of the first recommended text, such as "Reminder to bring ID card."
[0238] S1304. The electronic device detects a second operation on the first recommended text. In response to the second operation, the electronic device provides a first recommendation service, which is determined by the electronic device from multiple recommendation services based on a first user intent.
[0239] The electronic device 100 can detect a second operation on the first recommended text, such as clicking the first recommended text, and thus the electronic device 100 can provide a first recommended service associated with the first user intent. The electronic device 100 may include multiple recommended services, and can determine the first recommended service from among the multiple recommended services based on the first user intent.
[0240] by Figure 3D - Figure 3G In the illustrated embodiment, the first recommended text can be recommended text 315. The electronic device 100 provides the first recommended service through a currency conversion card 316. The first user intent can be a user intent related to currency conversion, and the first recommended service can be a currency conversion service. The electronic device 100 can perform currency conversion based on the currency in the first text and then provide the user with a currency conversion service. Furthermore, the electronic device 100 can respond to user actions (such as clicking the "Use Result" button 319) by using the currency conversion result.
[0241] by Figures 4B-4G In the example shown, the first recommended text can be recommended text 401. The electronic device 100 provides the first recommended service through the weather card 412. The first user intent can be the intent to share the weather. Here, the first recommended service can be, for example, a service to view the weather and / or share the weather.
[0242] by Figures 5B-5F In the illustrated embodiment, the first recommendation text can be recommendation text 501, and the electronic device 100 provides the first recommendation service through a food card 511. Here, the first user intent can be the intent to share a store, and the first recommendation service can include sharing the store entered by the user in the text (…). Figures 5C-5D The illustrated embodiment) jumps to the user interface for store details ( Figures 5D-5E The illustrated embodiment includes one or more services such as jumping to the restaurant details page (515), quick ordering, and quick purchase of coupons.
[0243] by Figures 6A-6C In the illustrated embodiment, the first user intent may be the intent to share flight information, the first recommended text may be recommended text 600, and the electronic device 100 provides the first recommended service through the flight card 601. The first recommended service may be one or more of the following: viewing flight itinerary information (displayed in the flight card 601), viewing detailed flight itinerary content (implemented by the view itinerary button 602), and sharing flight information (implemented by the send button 603).
[0244] by Figures 7A-7CIn the illustrated embodiment, the first user intent may be the intent to share a trending event. The electronic device 100 provides a first recommendation service through the trending search card 711. The first recommendation text may be the recommendation text 701. The first recommendation service may include: viewing a summary of the trending event (the summary of the trending event is displayed in the trending search card 711), viewing the latest status of the trending event (implemented by the view details button 712), and sharing one or more services from the trending event (implemented by the send button 713).
[0245] by Figures 9A-9D In the illustrated embodiment, the first user intent may be the intent to create a to-do item, the first recommended text may be recommended text 901, and the electronic device 100 may provide the first recommended service by displaying a new schedule window 911. The first recommended service may include: creating a to-do item.
[0246] by Figures 10A-10C In the illustrated embodiment, the first user intent may be a travel planning intent, the first recommendation text may be recommendation text 1001, and the electronic device 100 may provide the first recommendation service by jumping to the search interface 1002. The first recommendation service may include one or more services such as searching for travel guides for the user and making travel plans.
[0247] by Figures 11A-11D In the illustrated embodiment, the first user intent may be to share photos (of Shangri-La), and the first recommendation text may be recommendation text 1101. The electronic device 100 can provide a first recommendation service by searching for and displaying photos of Shangri-La in the gallery, and then displaying one or more photos of Shangri-La through cards. The first recommendation service may include: sharing photos selected by the user.
[0248] by Figures 12A-12D In the example shown, the first user intent may be to share the weather, the first recommended text may be recommended text 1204, and the electronic device 100 may provide the first recommended service through the weather card 1205. The first recommended service may be: viewing weather information, inserting weather information into the text editing area 1202, or sharing one or more services in the weather card 1205.
[0249] In some embodiments, multiple recommendation services are provided by one or more applications. These applications may be applications installed within the electronic device 100, including system applications such as settings apps, gallery apps, browser apps, etc., or third-party applications such as food group-buying apps, etc. Alternatively, the applications may be applications not installed on the electronic device but installed on a cloud server.
[0250] In some embodiments, when the electronic device provides the first recommended service in the chat interface, it also displays a send button. The method further includes: the electronic device detects a third operation acting on the send button, and in response to the third operation, the electronic device pushes a first chat message in the chat window, the first chat message containing the first recommended service.
[0251] refer to Figure 4F In the embodiment shown, the send key can be, for example, the send button 414, and the third operation can be the operation of clicking the send button 414. In response to this operation, the electronic device 100 can display the first chat message sent by the electronic device 100 in the chat window 311. The content of the first chat message can include a first recommended service (i.e., viewing weather information).
[0252] In some embodiments, the first recommendation service in the first chat message can receive a user's click to enter the first user interface, and the first user interface includes the first recommendation service.
[0253] refer to Figures 5C-5E In the illustrated embodiment, the send key can be, for example, a send button 513, and the third operation can be clicking the send button 513. In response to this operation, the electronic device 100 can display the chat message 514 sent by the electronic device 100 in the chat window 311. The chat message 514 may contain a first recommended service, such as... Figure 5D As shown, the electronic device 100 can receive user actions on chat messages 514. The first user interface can be a restaurant details interface 515. The electronic device 100 can respond to the above actions by entering the restaurant details interface 515 to provide the user with the first recommendation service of viewing detailed information about AA restaurant and making a reservation.
[0254] In some embodiments, the electronic device performs intent recognition on the first text to obtain the first user intent, including: the electronic device inputs the first text into a first neural network to obtain the first user intent.
[0255] The first neural network may contain multiple neural networks, which can be used to implement the functions of the metadata preprocessing module, the capability platform module, and the intent recognition module. The electronic device 100 inputs the first text into the first neural network to obtain multiple user intents. The electronic device 100 can then input these multiple user intents into the service sorting module for sorting, determining one or more intents with the highest order from the multiple user intents. These one or more intents with the highest order may include the first user intent.
[0256] In some embodiments, the order of services stored in the service sorting module is preset by the electronic device 100. In other embodiments, the order of services stored in the service sorting module is dynamically changing, wherein the electronic device 100 can sort services corresponding to user intents based on first content, which may include one or more of the following: the frequency of use of services corresponding to multiple intents, the weight of multiple intents stored by the electronic device, and user profiles stored by the electronic device.
[0257] Electronic device 100 can record the number of times each intent-related service is used by the user. Specifically, if a user clicks on the recommended text of an intent, electronic device 100 considers that the service corresponding to that intent to have been used. Thus, electronic device 100 can determine the order of services corresponding to intents based on the number of times an intent is used. Electronic device 100 can also determine the order of services based on the weight of each intent; this weight can be preset by electronic device 100 or set by the user. Electronic device 100 can also determine the order of services based on user profiles, where user profiles refer to the likelihood of a user using each service in the current text editing scenario. Electronic device 100 can dynamically adjust the order of services based on the above-mentioned first point, thereby more accurately providing users with the services they want.
[0258] In some embodiments, the first text includes multiple segments, the multiple segments including a first segment, the first segment being the last segment input in the first operation, and the electronic device performing intent recognition on the first text to obtain a first user intent, including: the electronic device performing intent recognition on the first segment in the first text to obtain a first user intent.
[0259] In this system, electronic device 100 can perform intent recognition based on the most recently entered sentence segment by the user. This means that for each sentence segment entered by the user, electronic device 100 can identify the user's intent. Electronic device 100 can then provide services more quickly after user input, reducing user waiting time. For example, when electronic device 100 receives the user input "I'm going on a business trip tomorrow," it first identifies the user's intent based on this phrase. Then, when electronic device 100 receives the user input "Remember to remind me to bring my ID card," it can identify the user's intent to create a to-do item based on this phrase.
[0260] In some embodiments, the plurality of sentence segments further includes a second sentence segment, which is a sentence segment input before the first sentence segment. The electronic device performs intent recognition based on the first sentence segment in the first text to obtain a first user intent, including: the electronic device determining that an entity is missing in the first sentence segment; the electronic device performing intent recognition on the first sentence segment and the second sentence segment to obtain the first user intent.
[0261] refer to Figures 11A-11D In the illustrated embodiment, the first sentence segment could be, for example, "Let me show you the photos I took over there," and the second sentence segment could be, for example, "I went to Shangri-La before, it was beautiful." When the electronic device 100 identifies the user's intent from the first sentence segment, it determines that the intent of that sentence segment is not detailed enough. For example, it may only determine that the user intends to share photos, but the "over there" in that sentence segment is ambiguous, lacking an entity name associated with sharing photos, and it cannot know what content the user wants to share related to. Therefore, the electronic device 100 can determine the complete user intent based on the first sentence segment and the second sentence segment preceding it: that is, to share photos of Shangri-La. The second sentence segment is not limited to the sentence segment preceding the first segment; it can also be multiple segments, or the first segment can be one or more segments following the second segment. The aforementioned entity name can be a noun or phrase indicating a specific thing or event, such as an address, movie title, music title, book title, food name, or time. In this way, the electronic device 100 can provide users with more precise services.
[0262] In some embodiments, the method further includes: the electronic device detecting a fourth operation of inputting second text in a first input box; in response to the fourth operation, the electronic device performing intent recognition on the second text to obtain a second user intent; and the electronic device providing a second recommendation service, the second recommendation service being determined by the electronic device based on the second user intent.
[0263] In this scenario, after the electronic device detects the second user intent in the second text, it can provide a second recommendation service without requiring user interaction. (See reference...) Figures 8A-8C The illustrated embodiment. The second text could be "Let's go get a milk tea." The electronic device 100 can determine from the second text that the user intends to share a milk tea shop, and then provide the user with a service to share the milk tea shop through multiple cards. Specifically, the electronic device 100 can provide the second recommendation service to the user after a preset time (e.g., two seconds) following the user's input of the second text.
[0264] In some embodiments, after the electronic device provides the second recommendation service, the method further includes: the electronic device detecting a fifth operation of entering third text in the first input box, and in response to the fifth operation, the electronic device stopping the provision of the second recommendation service.
[0265] refer to Figures 8D-8E In the illustrated embodiment, the third text could be, for example, "What do you think?" When the electronic device 100 detects that the user continues to input text, it can stop providing the second recommendation service, that is, hide multiple store cards, thereby preventing the store cards from obstructing the user interface (such as a chat window) and affecting the user's text input.
[0266] In some embodiments, after the electronic device stops providing the second recommendation service, the method further includes: the electronic device detecting a sixth operation acting on the second text, and in response to the sixth operation, the electronic device re-providing the second recommendation service.
[0267] refer to Figures 8F-8G In the illustrated embodiment, the electronic device 100 can detect keywords (e.g., those used by the user) in the second text. Figure 8F The sixth operation (of the text "milk tea") is, for example, clicking a keyword in the second text. In response to this operation, the electronic device 100 can redisplay multiple store cards to provide the user with a second recommendation service. However, this is not limited to clicking a keyword in the second text; it can also be clicking any location within the second text. This embodiment of the application does not impose such limitations.
[0268] The first recommended service can be provided by electronic device 100 via a card, for example... Figure 3E The currency conversion card shown is 316. Figure 4C The weather card shown is 402. Figure 4F The weather card shown is 412. Figure 5C The food card shown is 511. Figure 6C The flight card shown is 601. Figure 7C The trending search card shown is 711. Figure 8C The store cards shown are 801 and 802.
[0269] Alternatively, the primary recommendation service can also be provided through a window, for example... Figure 9C The newly created schedule window 911 is shown.
[0270] Alternatively, the primary recommendation service could be provided by redirecting to the corresponding user interface, for example, such as... Figure 10C The electronic device 100 shown redirects to the search interface 1002, providing users with a service to search for travel guides for the May Day holiday.
[0271] The apparatus for performing the above method provided in the embodiments of this application will now be described. Figure 14 As shown, Figure 14 This is a schematic diagram of an input device provided in an embodiment of this application. The input device may be an electronic device as described in this application embodiment, or a chip or chip system within an electronic device.
[0272] like Figure 14 As shown, the input device 1400 may include a display unit 1401, a processing unit 1402, and an operation unit 1403.
[0273] The display unit 1401 is used to display a first input box in the chat interface; the operation unit 1403 is used to detect a first operation of inputting first text in the first input box; the processing unit 1402 is used to, in response to the first operation, perform intent recognition on the first text to obtain a first user intent; the display unit 1401 is also used to display one or more suggested words in the chat interface, the one or more suggested words containing a first recommended text, the first recommended text being determined by the processing unit 1402 based on the first user intent; the operation unit 1403 is used to detect a second operation on the first recommended text; the processing unit 1402 is also used to, in response to the second operation, provide a first recommendation service, the first recommendation service being determined by the processing unit 1402 from multiple recommendation services based on the first user intent.
[0274] The recommendation services may be provided by one or more applications. The one or more applications include one or more of the following: applications installed on input device 1400, and applications not installed on input device 1400.
[0275] In some embodiments, when the display unit 1401 provides the first recommendation service in the chat interface, it also displays a send button. The operation unit 1403 is further configured to detect a third operation performed on the send button. The display unit 1041 is further configured to, in response to the third operation, push a first chat message in the chat window. The first chat message contains the first recommendation service.
[0276] In some embodiments, the first recommendation service in the first chat message can receive a user's click to enter the first user interface, and the first user interface includes the first recommendation service.
[0277] In some embodiments, the processing unit 1402 performs intent recognition on the first text to obtain the first user intent, including: the processing unit 1402 inputs the first text into a first neural network to obtain the first user intent.
[0278] In some embodiments, the processing unit 1402 performs intent recognition on the first text to obtain a first user intent, including: the processing unit 1402 inputs the first text into a first neural network to obtain multiple user intents, the multiple user intents including the first user intent; the processing unit 1402 sorts the multiple user intents based on the first content, and determines the first user intent with the highest order from the multiple user intents.
[0279] In some embodiments, the first text includes multiple sentence segments, the multiple sentence segments include a first sentence segment, the first sentence segment is the last sentence segment input in the first operation, and the processing unit 1402 performs intent recognition on the first text to obtain the first user intent, including: the processing unit 1402 performs intent recognition based on the first sentence segment in the first text to obtain the first user intent.
[0280] In some embodiments, the first text includes multiple sentence segments, including a first sentence segment, which is the last sentence segment entered in the first operation, and a second sentence segment, which is the sentence segment entered before the first sentence segment. The processing unit 1402 performs intent recognition based on the first sentence segment in the first text to obtain a first user intent, including: the processing unit 1402 determines that the content of the first sentence segment is missing an entity; the processing unit 1402 performs intent recognition on the first sentence segment and the second sentence segment to obtain the first user intent.
[0281] In some embodiments, the operation unit 1403 is further configured to detect a fourth operation of inputting second text into the first input box, and the processing unit 1402 is further configured to perform intent recognition on the second text in response to the fourth operation to obtain a second user intent; the processing unit 1402 is further configured to provide a second recommendation service, the second recommendation service being determined based on the second user intent.
[0282] In some embodiments, after the processing unit 1402 provides the second recommendation service, it further includes: the operation unit 1403 detects a fifth operation of inputting third text in the first input box; the processing unit 1402 stops providing the second recommendation service in response to the fifth operation.
[0283] In some embodiments, after the processing unit 1402 stops providing the second recommendation service, the method further includes: the operation unit 1403 detecting a sixth operation applied to the second text; and the processing unit 1402 resuming the second recommendation service in response to the sixth operation.
[0284] The first recommendation service may be provided by the processing unit 1402 through a card, or through a window, or through a user interface.
[0285] Figure 15 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Figure 15 As shown, chip 1500 includes one or more processors 1501, communication lines 1502 and communication interfaces 1503. Optionally, chip 1500 also includes memory 1504.
[0286] In some implementations, memory 1504 stores elements such as executable modules or data structures, or subsets thereof, or extended sets thereof.
[0287] The methods described in the embodiments of this application can be applied to, or implemented by, processor 1501. Processor 1501 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the hardware of processor 1501 or by instructions in software form. Processor 1501 may be a general-purpose processor (e.g., a microprocessor or conventional processor), a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates, transistor logic devices, or discrete hardware components. Processor 1501 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0288] The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in mature storage media in the art, such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read-only memory (EEPROM). This storage medium is located in memory 1504, and processor 1501 reads information from memory 1504 and, in conjunction with its hardware, completes the steps of the above method.
[0289] The processor 1501, memory 1504 and communication interface 1503 can communicate with each other via communication line 1502.
[0290] In the above embodiments, the instructions stored in the memory for execution by the processor can be implemented in the form of a computer program product. This computer program product can be pre-written into the memory, or it can be downloaded and installed into the memory as software.
[0291] This application also provides a computer program product comprising one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. For example, available media may include magnetic media (e.g., floppy disk, hard disk, or magnetic tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid-state disk (SSD)).
[0292] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program or instructions. When the computer program or instructions are executed by a processor, they implement the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.
[0293] As one possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc storage; computer-readable media may include disk storage or other disk storage devices. Furthermore, any connecting cable may also be appropriately referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of media. As used herein, disks and optical discs include optical discs (CD), laser discs, optical discs, DVDs, floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0294] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0295] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0296] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0297] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. An input method, characterized by, The method is applied to an electronic device, and the method comprises: The electronic device displays a first input box in a chat interface; The electronic device detects a first operation of inputting a first text in the first input box, and in response to the first operation, the electronic device performs intent recognition on the first text to obtain a first user intent; The electronic device displays one or more association words in the chat interface, wherein the one or more association words comprise a first recommended text, and the first recommended text is determined by the electronic device based on the first user intent; The electronic device detects a second operation on the first recommended text, and in response to the second operation, the electronic device provides a first recommended service, and the first recommended service is determined by the electronic device from a plurality of recommended services based on the first user intent.
2. The method of claim 1, wherein, The plurality of recommended services are provided by one or more application programs.
3. The method of claim 2, wherein, The one or more application programs comprise one or more of the following: an application program installed on the electronic device, and an application program not installed on the electronic device.
4. The method according to any one of claims 1-3, characterized in that, When the electronic device provides the first recommended service in the chat interface, the electronic device also displays a send key, and the method further comprises: The electronic device detects a third operation acting on the send key, and in response to the third operation, the electronic device pushes a first chat message to a chat window, and the first chat message comprises the first recommended service.
5. The method of claim 4, wherein, The first recommended service in the first chat message can receive a click operation of a user to enter a first user interface, and the first user interface comprises the first recommended service.
6. The method according to any one of claims 1-5, characterized in that, The electronic device performs intent recognition on the first text to obtain a first user intent, comprising: The electronic device inputs the first text into a first neural network to obtain the first user intent.
7. The method according to any one of claims 1-5, characterized in that, The electronic device performs intent recognition on the first text to obtain a first user intent, comprising: The electronic device inputs the first text into a first neural network to obtain a plurality of user intents, wherein the first user intent is included in the plurality of user intents; The electronic device sorts the plurality of user intents based on first content to determine the first user intent with the highest order from the plurality of user intents.
8. The method of claim 7, wherein, The first content comprises one or more of the following: a frequency at which the plurality of intents corresponding services are used, a plurality of intent weights, and a user portrait.
9. The method according to any one of claims 1-8, characterized in that, The first text comprises a plurality of sentence segments, the plurality of sentence segments comprise a first sentence segment, the first sentence segment is a latest input sentence segment of the first operation, and the electronic device performs intent recognition on the first text to obtain a first user intent, comprising: The electronic device performs intent recognition on the first sentence segment in the first text to obtain the first user intent.
10. The method according to any one of claims 1-8, characterized in that, The first text comprises a plurality of sentence segments, the plurality of sentence segments comprise a first sentence segment, the first sentence segment is a latest input sentence segment of the first operation, and a second sentence segment is an input sentence segment before the first sentence segment, and the electronic device performs intent recognition on the first sentence segment in the first text to obtain a first user intent, comprising: The electronic device determines that the content of the first sentence segment lacks an entity; The electronic device performs intent recognition on the first sentence segment and the second sentence segment to obtain the first user intent.
11. The method according to any one of claims 1-10, characterized in that, The method further includes: The electronic device detects a fourth operation of inputting second text in the first input box, and in response to the fourth operation, the electronic device performs intent recognition on the second text to obtain a second user intent; The electronic device provides a second recommendation service, which is determined by the electronic device based on the second user intent.
12. The method of claim 11, wherein, After the electronic device provides the second recommendation service, the method further includes: The electronic device detects a fifth operation of inputting third text in the first input box, and in response to the fifth operation, the electronic device stops providing the second recommendation service.
13. The method of claim 12, wherein, After the electronic device stops providing the second recommendation service, the method further includes: The electronic device detects a sixth operation acting on the second text, and in response to the sixth operation, the electronic device re-provides the second recommendation service.
14. The method of any one of claims 1-13, wherein, The electronic device provides the first recommendation service through a card, or the electronic device provides the first recommendation service through a window, or the electronic device provides the first recommendation service through a jump user interface.
15. An electronic device, comprising: The electronic device includes a memory and a processor coupled to the memory; the memory stores a computer program, and the processor executes the computer program to enable the electronic device to implement the method of any one of claims 1 to 14.
16. A computer readable storage medium storing computer instructions, wherein, When the computer instructions run on the electronic device, the electronic device performs the method of any one of claims 1 to 14.
17. A computer program product comprising computer instructions, characterized in that, The computer instructions are executed by the processor to implement the method of any one of claims 1 to 14.