Interaction method, electronic equipment and readable storage medium

By employing a dual-algorithm model routing mechanism, the appropriate algorithm model is selected based on the category of user input content, thus solving the problems of insufficient speed and accuracy in intent recognition in existing technologies and improving the user interaction experience.

CN121807993APending Publication Date: 2026-04-07HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, electronic devices cannot simultaneously guarantee the accuracy and speed of intent recognition during user interaction, especially in multi-turn dialogue scenarios. Large intent recognition expert models consume high resources and are slow to recognize, while small intent recognition expert models cannot accurately understand ambiguous intents.

Method used

A dual-algorithm model routing mechanism is adopted, which selects the appropriate algorithm model for intent recognition based on the category of user input content: simple intents use the small intent recognition expert model, and fuzzy intents use the large intent recognition expert model. The input content category is determined by combining historical intent clustering and keyword analysis.

Benefits of technology

It improves the user interaction experience, ensuring both the accuracy and speed of intent recognition, and adapts to the complexity of multi-turn dialogue scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807993A_ABST
    Figure CN121807993A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to an interaction method, electronic equipment and a readable storage medium. According to the method, when the electronic equipment interacts with a user, the category of the content input by the user can be determined firstly, then a corresponding algorithm model is selected according to the category of the content input by the user for intention recognition, and finally an instruction corresponding to the intention of the user is executed according to the recognized intention of the user. Thus, in the interaction process with the user, the intention recognition accuracy can be guaranteed, the input content of the user can be quickly responded, and therefore the interaction experience of the user can be guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an interaction method, electronic device, and readable storage medium. Background Technology

[0002] Currently, electronic devices typically include a human-computer interaction (HCI) subsystem. Taking a smart assistant application (APP) as an example, users can interact with electronic devices through the APP, instructing them to perform functions such as querying information, engaging in casual conversation, and controlling the device. To achieve accurate and efficient user interaction, electronic devices need to understand and recognize the user's input (such as text, images, and voice) based on algorithmic models, execute corresponding actions based on the recognized intent, and display corresponding feedback information.

[0003] Electronic devices typically rely solely on algorithmic models to understand and recognize user input, such as large or small expert models for intent recognition. However, in a single user interaction with an electronic device, which can involve multiple turns of dialogue (i.e., the user may input multiple rounds of content), large expert models can accurately identify user intent. However, because these models require significant processing resources (including computing and storage), they can be time-consuming if the terminal device has limited computing power, resulting in slow intent recognition speeds. Conversely, when electronic devices rely on small expert models for intent understanding and recognition, they cannot incorporate the content from multiple turns of dialogue. For input representing ambiguous intents within a single dialogue, they cannot accurately understand and recognize the user's intent. Therefore, it is impossible to simultaneously guarantee both accuracy and speed in intent recognition, thus impacting the user experience. Summary of the Invention

[0004] To address the aforementioned technical problems, embodiments of this application provide an interactive method, an electronic device, and a readable storage medium. The following describes this application from multiple aspects, and the implementation methods and beneficial effects of these aspects can be referenced mutually.

[0005] In a first aspect, embodiments of this application provide an interaction method applied to an electronic device. The electronic device includes a human-computer interaction subsystem, which includes a first algorithm model and a second algorithm model. The method includes: detecting first input content and determining that the first input content belongs to a first category; performing intent recognition on the first input content using the first algorithm model to obtain a first recognition result; detecting second input content and determining that the second input content belongs to a second category; performing intent recognition on the second input content using the second algorithm model to obtain a second recognition result; wherein the second algorithm model can recognize both the first and second categories of input content, the first algorithm model can only recognize the first category of input content, and the processing resources required for the second algorithm model to run are greater than those required for the first algorithm model to run.

[0006] It is understandable that user input is usually in natural language. Electronic devices cannot directly understand natural language, so it is necessary to first perform intent recognition on the user input, and then determine the corresponding instruction based on the intent recognition result, that is, the recognized user intent, and execute the instruction to respond to the user input.

[0007] In this embodiment, the electronic device identifies a user intent based on a single user input. After recognizing the user's intent, the electronic device executes a first instruction based on a first recognition result; and executes a second instruction based on a second recognition result. The first instruction corresponds to the first recognition result, instructing the electronic device to perform a first action and / or display first feedback information. The second instruction corresponds to the second recognition result, instructing the electronic device to perform a second action and / or display second feedback information.

[0008] It is understood that when the user input content is determined to belong to a first category, the electronic device can determine to perform intent recognition using a first algorithm model (e.g., a small intent recognition expert model); when the user input content is determined to belong to a second category, the electronic device can determine to perform intent recognition using a second algorithm model (e.g., a large intent recognition expert model). Thus, the interaction method provided in this application embodiment can determine the algorithm model for intent recognition based on the category of the user input content. In a single user interaction, it can ensure both the accuracy and speed of intent recognition, thereby improving the user interaction experience.

[0009] In one possible implementation of the first aspect, the method further includes: determining the feature vector corresponding to each historical intent among the multiple historical intents obtained by the human-computer interaction subsystem, wherein the historical intents are obtained based on human-computer dialogue data recorded by the human-computer interaction subsystem during historical user interactions; clustering the multiple historical intents to obtain at least one intent set and outlier intents, wherein the similarity between the feature vector corresponding to the outlier intent and the feature vector corresponding to the historical intent in any intent set is less than or equal to a first threshold, or the co-occurrence frequency of the intents between the feature vector corresponding to the outlier intent and the feature vector corresponding to the historical intent in any intent set is less than or equal to a second threshold.

[0010] It is understandable that the human-computer interaction subsystem can record human-computer dialogue data during each user interaction. After performing intent recognition on the recorded human-computer dialogue data, multiple historical intents can be determined. When clustering multiple historical intents, related historical intents can be grouped into one category, resulting in an intent set and outlier intents. Outlier intents are historical intents that are not related to any other historical intents. The correlation of historical intents is usually related to the similarity and co-occurrence frequency between them. When the similarity of the feature vectors corresponding to two historical intents is greater than a first threshold and the co-occurrence frequency of the feature vectors corresponding to these two historical intents is greater than a second threshold, these two historical intents can be considered related. The co-occurrence frequency is the frequency with which two historical intents appear consecutively in a single user interaction. When two historical intents appear in several consecutive rounds of dialogue (e.g., three consecutive rounds) in a single user interaction, these two historical intents can be considered to have appeared consecutively.

[0011] In one possible implementation of the first aspect, the method further includes: determining the intent corpus corresponding to each feature vector in the intent set based on the intent typical corpus, wherein the intent typical corpus includes the intent corpus of each historical intent in multiple historical intents, and the intent corpus includes multiple descriptive contents of the historical intents; and determining the keywords of each intent set based on the intent corpus.

[0012] It can be understood that the intent corpus corresponding to each historical intent is the intent corpus corresponding to the feature vector of each historical intent. Therefore, the intent corpus corresponding to each feature vector in the intent set can be determined based on the typical intent corpus.

[0013] In one possible implementation of the first aspect, the first category of input content includes: the content of the first round of input, the input content whose intent represented by the previous round of input content matches the outlier intent, and the input content containing keywords that do not belong to the intent set represented by the previous round of input content; the second category of input content includes: the input content containing keywords whose keywords all belong to the intent set represented by the previous round of input content.

[0014] It can be understood that the first category of input content represents the user's simple intent, while the second category represents the user's ambiguous intent. The first round of input content typically represents the user's simple intent, therefore it belongs to the first category. When the intent represented by the previous round of input content matches an outlier intent, since the outlier intent is not associated with other intents, the current input content is not related to the previous round's input content, and can be considered to represent the user's simple intent, i.e., it belongs to the first category. When the keywords in the current input content do not belong to the intent set to which the intent represented by the previous round of input content belongs, the current input content can be considered unrelated to the previous round's input content, i.e., it represents the user's simple intent, and therefore belongs to the first category. When all the keywords in the current input content belong to the intent set to which the intent represented by the previous round of input content belongs, the current input content can be considered related to the previous round's input content, i.e., it represents the user's ambiguous intent, and therefore belongs to the second category.

[0015] In one possible implementation of the first aspect, determining that the first input content belongs to the first category includes: determining that the first input content belongs to the first category corresponding to determining that the first input content is the first round of input content; determining whether the intent represented by the previous round of input content of the first input content matches the outlier intent corresponding to determining that the first input content is not the first round of input content; and determining that the first input content belongs to the first category corresponding to the intent represented by the previous round of input content matching the outlier intent.

[0016] It is understandable that the first round of input usually represents the user's simple intent. Therefore, when the first input is from the first round, it can be determined that the first input belongs to the first category. When the first input is not from the first round, and it is determined that the intent represented by the previous round of input matches the outlier intent, it can be considered that the first input represents the user's simple intent, and thus it can be determined that the first input belongs to the first category.

[0017] In one possible implementation of the first aspect, determining whether the intent represented by the previous round of input content matches the outlier intent includes: if the intent represented by the previous round of input content does not match the outlier intent, determining whether all the keywords of the first input content belong to the set of intents to which the intent represented by the previous round of input content belongs; if at least one of the keywords of the first input content does not belong to the set of intents to which the intent represented by the previous round of input content belongs, determining that the first input content belongs to the first category.

[0018] It is understandable that if at least one keyword in the first input content does not belong to the intent set represented by the intent in the previous round of input content, the first input content can be considered to represent the user's simple intent, and thus the first input content can be determined to belong to the first category.

[0019] In one possible implementation of the first aspect, determining that the second input content belongs to the second category includes: corresponding to the second input content being non-first-round input content, and the intent represented by the previous round input content of the second input content not matching the outlier intent, and the keywords of the second input content all belonging to the keywords of the intent set to which the intent represented by the previous round input content belongs, thus determining that the second input content belongs to the second category.

[0020] It is understandable that if the second input content is not the first round of input content, and the intent represented by the previous round of input content does not match the outlier intent, and the keywords of the second input content all belong to the intent set to which the intent represented by the previous round of input content belongs, then the second input content can be considered to represent the user's fuzzy intent, and thus the second input content can be determined to belong to the second category.

[0021] Secondly, embodiments of this application provide an electronic device, which includes: one or more processors and a memory, wherein the memory is used to store instructions executed by the one or more processors of the electronic device; when the processor executes the instructions in the memory, it causes the electronic device to perform the method in any possible implementation of the first aspect described above.

[0022] Thirdly, embodiments of this application provide a readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the method in any possible implementation of the first aspect described above.

[0023] Fourthly, embodiments of this application provide a program product, including a computer program or instructions, which, when executed, cause a computer to perform the method in any possible implementation of the first aspect described above. Attached Figure Description

[0024] Figures 1A-1B According to some embodiments of this application, a schematic diagram of a user interaction scenario is shown;

[0025] Figures 2A-2B According to some embodiments of this application, a schematic diagram of another user interaction scenario is shown;

[0026] Figure 3 According to some embodiments of this application, a schematic diagram of an interactive method flow is shown;

[0027] Figure 4According to some embodiments of this application, a schematic diagram of a method for determining routing rules for an algorithm model is shown;

[0028] Figure 5 According to some embodiments of this application, a schematic diagram of an intentional clustering result is shown;

[0029] Figure 6 According to some embodiments of this application, a schematic diagram of the architecture of an electronic device is shown;

[0030] Figure 7 According to some embodiments of this application, a schematic diagram of another interaction method flow is shown;

[0031] Figure 8 According to some embodiments of this application, a schematic diagram of another interaction method flow is shown;

[0032] Figure 9 According to some embodiments of this application, a schematic diagram of the hardware structure of an electronic device is shown. Detailed Implementation

[0033] The illustrative embodiments of this application include, but are not limited to, an interaction method, an electronic device, and a readable storage medium.

[0034] To better understand the solution of this application, the relevant terms in the field will be explained first.

[0035] Simple intent: This refers to user input that is relatively complete, including the action to be performed and the object of that action, making it easy to understand and interpret. For example, inputting "What's the weather like today?" indicates a user intent to check today's weather, while inputting "Turn on Bluetooth" indicates a user intent to turn on Bluetooth.

[0036] Fuzzy intent refers to user input that is incomplete and requires context for identification. For example, the current input "What about Beijing?" is incomplete and cannot be directly used to identify the user's intent; context is required. For instance, if the user previously input "How's the weather in Shanghai?", then "What about Beijing?" indicates the intent is to check the weather in Beijing. Similarly, if the user previously input "What are some good foods in Shanghai?", then "What about Beijing?" indicates the intent is to check the food in Beijing.

[0037] Large-scale expert models for intent recognition refer to larger-scale, more complex machine learning or deep learning models. These models are typically pre-trained on large corpora, enabling them to understand subtle semantic differences and recognize user intent represented by the input content in conjunction with context (i.e., multiple turns of user input). While these models offer high accuracy in intent recognition, they have a large number of parameters, require significant processing resources, and are relatively slow. For example, running such large-scale expert models on electronic devices requires substantial computing power and storage resources. When user input represents simple and / or ambiguous intents, these models can accurately identify the intent represented by the input.

[0038] For example, if the user's first input is "turn on Bluetooth," the intent recognition expert model can identify the user's intent represented by this input as turning on Bluetooth; if the second input is "turn it off," the intent recognition expert model can combine the previous input to identify the user's intent represented by the second input as turning off Bluetooth. As another example, if the user's first input is "What's the weather like in Shanghai?", the intent recognition expert model can identify the user's intent represented by this input as checking the weather in Shanghai; if the second input is "What about Beijing?", the intent recognition expert model can combine the previous input to identify the user's intent represented by the second input as checking the weather in Beijing.

[0039] Small expert models for intent recognition: These are small-scale, relatively simple machine learning or deep learning models. They are typically pre-trained on a small corpus and have the ability to understand clearly defined intents. However, they can only understand and recognize the user's intent represented by a single turn of input. While their accuracy in intent recognition is lower for diverse input content, they have fewer parameters, require less processing resources, and are faster. For example, running a small expert model for intent recognition on an electronic device requires less computing power and storage resources. When the user input represents a simple intent, the model can accurately recognize it; however, when the user input represents an ambiguous intent, the model may not be able to accurately recognize it.

[0040] For example, if a user's first input is "turn on Bluetooth," the intent recognition expert model can identify the user's intent represented by this input as turning on Bluetooth. However, if the second input is "turn it off," the intent recognition expert model cannot combine this with the previous input and may identify the second input as a general intent to turn off, such as closing the current conversation. As another example, if a user's first input is "What's the weather like in Shanghai?", the intent recognition expert model can identify the user's intent represented by this input as checking the weather in Shanghai. However, if the user's second input is "What about Beijing?", the intent recognition expert model cannot combine this with the previous input and may identify the second input as introducing the city of Beijing.

[0041] The electronic devices in this application embodiment may include any terminal device capable of interacting with a user. Terminal devices may include mobile phones, smart screens, wearable devices, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc. The following description uses a mobile phone 10 as the terminal device and a smart assistant APP as the human-computer interaction subsystem as an example.

[0042] As mentioned earlier, in existing interaction methods, for a single user interaction, the mobile phone typically only uses a single type of algorithm model to understand and recognize the user's current input.

[0043] In some embodiments, refer to Figure 1AWhen the smart assistant app is launched on the phone 10, the interactive interface 100 can be displayed. At this time, the user can click on the input box 11 to input text, voice, or images to interact with the phone 10. For each user interaction, the phone 10 can understand and recognize the user's intent based on the intent recognition expert model. When the phone 10 detects that the user has entered text content 21 (e.g., "Turn on Bluetooth"), it can recognize the user's current intent as turning on Bluetooth, then turn on Bluetooth and display the corresponding feedback information 31, such as "Bluetooth is on". When the phone 10 detects that the user has entered text content 22 (e.g., "Play music"), it can recognize the user's current intent as playing music, then start playing music and display the corresponding feedback information 32, such as "Playing all music randomly".

[0044] Since the text content 21 and text content 22 input by the user only represent simple user intentions, the process of intent understanding and recognition based on the intent recognition expert model on mobile phone 10 requires a lot of unnecessary processing resources. Every time the user inputs content, mobile phone 10 needs to execute the corresponding action or display the corresponding feedback information after a long time, thus affecting the user's interactive experience. Furthermore, the current intent understanding and recognition based on the intent recognition expert model does not take into account the implementation on the mobile device side, which will lead to a significant increase in processing resource consumption, making it generally unusable for industrial systems.

[0045] It's understandable that when the Smart Assistant app is launched once on the phone 10, the content entered by the user on the interaction interface 100 constitutes one user interaction. When the Smart Assistant app is launched again on the phone 10, the content entered by the user on the interaction interface 100 constitutes the next user interaction.

[0046] In some embodiments, for a single user interaction, mobile phone 10 can perform intent understanding and recognition on the user's multi-turn input content based on an intent recognition expert small model. (See reference...) Figure 1B When the phone 10 detects that the user has entered text content 21 (e.g., "Turn on Bluetooth"), it can recognize the user's current intention as turning on Bluetooth, then turn on Bluetooth and display the corresponding feedback information 31, such as "Bluetooth is on". When the phone 10 detects that the user has entered text content 23 (e.g., "Turn it off"), it can recognize the user's current intention as closing the current conversation and display the corresponding feedback information 33, such as "Okay, let's talk again next time".

[0047] Since the text content 23 input by the user represents the user's ambiguous intent, when the mobile phone 10 performs intent understanding and recognition based on the intent recognition expert small model, it can only recognize the intent based on the user's single-round input content. This may result in the inability to accurately recognize the user's intent, thus failing to execute the action corresponding to the user's intent or display the feedback information corresponding to the user's intent. As a result, the accuracy of intent recognition cannot be guaranteed, affecting the user's interactive experience.

[0048] Therefore, in a single user interaction, if the multiple rounds of user input include both simple and ambiguous intents, existing interaction methods cannot simultaneously guarantee the accuracy and speed of intent recognition, which may affect the user's interaction experience.

[0049] To address the aforementioned problems, embodiments of this application provide an interaction method. In this method, for a single user interaction, the electronic device first determines the category of the current input content. The current input content of a first category represents a simple user intent, while the current input content of a second category represents a more ambiguous user intent. Then, based on the category of the current input content, a corresponding algorithm model is selected for intent understanding and recognition. If the current input content belongs to the first category, a small intent recognition expert model is selected for intent understanding and recognition; if the current input content belongs to the second category, a large intent recognition expert model is selected for intent understanding and recognition. Finally, according to the identified user intent, the corresponding instruction is executed, which instructs the electronic device to perform the action corresponding to the user intent and / or display feedback information corresponding to the user intent.

[0050] Taking the mobile phone 10 as an example of an electronic device, for example, such as Figure 2A As shown, when mobile phone 10 detects user input text content 21 (e.g., "turn on Bluetooth"), it can determine that the current input content belongs to the first category. Then, it selects the intent recognition expert small model to understand and recognize the intent of the current input content, determining that the user's intent is to turn on Bluetooth. Then, mobile phone 10 can turn on Bluetooth and display the corresponding feedback information 31, such as "Bluetooth is turned on". When mobile phone 10 detects user input text content 23 (e.g., "turn it off"), it can determine that the current input content belongs to the second category. Then, it selects the intent recognition expert large model to understand and recognize the intent of the current input content, determining that the user's intent is to turn off Bluetooth. Then, mobile phone 10 can turn off Bluetooth and display the corresponding feedback information 34, such as "Bluetooth is turned off".

[0051] For example, such as Figure 2BAs shown, mobile phone 10 detects user input text content 24 (e.g., "How's the weather today?"), determines that the current input content belongs to the first category, and then selects an intent recognition expert small model to understand and recognize the intent of the current input content, determining that the user's intent is to check today's weather. Mobile phone 10 can obtain weather information through the weather application programming interface (API), and then display feedback information 35 including today's weather conditions in the interactive interface 100. For example, feedback information 35 may include weather information summarized from today's weather conditions and a webpage link to view detailed weather information. If the current input content is "What about tomorrow?", mobile phone 10 can determine that the current input content belongs to the second category, and then selects an intent recognition expert large model to understand and recognize the intent of the current input content, determining that the user's intent is to check tomorrow's weather. Mobile phone 10 can obtain and display feedback information 36 including tomorrow's weather conditions. For example, feedback information 36 may include weather information summarized from tomorrow's weather conditions and a webpage link to view detailed weather information.

[0052] Thus, in a single user interaction, the interaction method provided in this application embodiment can ensure both the accuracy and speed of intent recognition, thereby improving the user interaction experience.

[0053] In some embodiments, when the intent represented by the user's input is an instruction to the electronic device to perform an action, such as turning on Bluetooth, the electronic device may not display corresponding feedback information, and this application does not impose any restrictions on this.

[0054] In some embodiments, if the current input content is the content entered in the first round of user interaction, the electronic device determines that the current input content belongs to the first category. It can be understood that if the current input content is the content entered in the first round of user interaction, the user intent represented by the current input content is usually a simple intent, requiring no contextual understanding or recognition of the intent; therefore, the content can be directly determined to belong to the first category.

[0055] In some embodiments, if the current input content is not the first input content in this user interaction, the electronic device determines the relevance between the current input content and the previous input content based on the intent of the previous input content. When it is determined that the current input content is not related to the previous input content, the current input content can be determined to belong to the first category; when it is determined that the current input content is related to the previous input content, the current input content can be determined to belong to the second category.

[0056] It's understandable that when an electronic device determines the category of content input by a user beyond the first round, it must have already determined the intent of the previous round of input through its algorithmic model. If the current input is unrelated to the previous input, it can be assumed that the current input represents a simple intent of the user, requiring no contextual understanding or recognition; therefore, the current input belongs to the first category. If the current input is related to the previous input, it can be assumed that the current input represents a more ambiguous intent of the user, requiring contextual understanding and recognition; therefore, the current input belongs to the second category.

[0057] In some embodiments, after determining the intent of a round of input content, the electronic device can identify multiple keywords corresponding to that intent. When determining the relevance between the current input content and the previous round of input content, if all the keywords of the current input content belong to the keywords corresponding to the intent of the previous round of input content, it can be determined that the current input content is related to the previous round of input content; if at least one keyword of the current input content does not belong to the keywords corresponding to the intent of the previous round of input content, it can be determined that the current input content is not related to the previous round of input content.

[0058] For example, if the intent of the previous input was to check today's weather, then the keywords corresponding to that intent could include words related to checking the weather, such as tomorrow, the day after tomorrow, and next week. If the current input is "What about tomorrow?", then the keyword of the current input is tomorrow, which belongs to the keywords corresponding to the intent of the previous input, so it can be determined that the current input is related to the previous input. If the current input is "Play a song", then the keywords of the current input include play, a song, and not the keywords corresponding to the intent of the previous input, so it can be determined that the current input is not related to the previous input.

[0059] The following is combined with Figure 3 An interactive method provided in an embodiment of this application will be described. For example... Figure 3 As shown, the method includes:

[0060] S201, determine the category of the current input content and determine the algorithm model for intent recognition.

[0061] In some embodiments, during an interaction between a user and an electronic device, when the electronic device detects user input, it first determines the category of the current input content, and then determines the algorithm model for intent recognition based on the category of the current input content. If the current input content belongs to a first category, the algorithm model is determined to be a small expert model for intent recognition (an example of a first algorithm model); if the current input content belongs to a second category, the algorithm model is determined to be a large expert model for intent recognition (an example of a second algorithm model). Details will be explained in more detail later and will not be elaborated here.

[0062] It's understandable that the large and small expert models for intent recognition have different abilities to understand the semantics of user input. The small expert model can only recognize input content of the first category, while the large expert model can recognize both the first and second categories. However, the large model has a larger number of parameters and requires more processing resources than the small model. If the current input content belongs to the first category, using the small expert model can guarantee both speed and accuracy in intent recognition; if the current input content belongs to the second category, only the large expert model can guarantee accuracy.

[0063] S202 uses an algorithm model to identify the intent of the current input content and executes the corresponding user intent instruction.

[0064] In some embodiments, for input content of the first category (i.e., the first input content), intent recognition is performed using a small intent recognition expert model to obtain a first recognition result, and a first instruction is executed based on the first recognition result. For input content of the second category (i.e., the second input content), intent recognition is performed using a large intent recognition expert model to obtain a second recognition result, and a second instruction is executed based on the second recognition result. Here, the first recognition result represents the user intent represented by the first input content, the second recognition result represents the user intent represented by the second input content, the first instruction corresponds to the first recognition result, instructing the electronic device to perform a first action and / or display first feedback information; the second instruction corresponds to the second recognition result, instructing the electronic device to perform a second action and / or display second feedback information.

[0065] It is understandable that user input is usually in natural language. Electronic devices cannot directly understand natural language, so they need to first recognize the user's intent, and then determine and execute the corresponding instruction based on the recognized intent.

[0066] For example, taking a mobile phone as an electronic device, if the user's input represents an intent that instructs the phone to perform a local action, the phone can execute the instruction after determining the corresponding instruction. In this case, the feedback information displayed on the interactive interface can include information that the action corresponding to the instruction has been completed. For example, if the instruction is determined to be to turn on Bluetooth, the phone will turn on its own Bluetooth and can also display information that Bluetooth is turned on on the interactive interface.

[0067] If the user's input indicates an intent that directs the phone to retrieve information through a third-party service, the phone will need to obtain the corresponding information via the API interface of that service. In this case, the feedback displayed on the user interface may include a summary of the retrieved information, or a link to the relevant third-party information. For example, if the intent is determined to be a weather query, the phone will retrieve weather information via a weather API interface and display a summary of that weather information on the user interface, as well as a link to a webpage containing detailed information about that weather.

[0068] If the user's input represents an intent that instructs the phone to engage in open-ended question-and-answer dialogue with the user through a language model, the phone needs to invoke a third-party language model to interact with the user. In this case, the feedback displayed on the interface can include the answer generated based on the user's input. For example, if the user inputs "What are some good movies to watch recently?", the phone can recognize that the intent represented by this input is to engage in open-ended question-and-answer dialogue with the user through a language model. The phone can then invoke the language model to recognize the semantics of the input and generate a corresponding answer, such as, "A sci-fi movie called 'xxx' was recently released and has received good reviews and high ratings. In addition, an animated movie called 'xxxx' is also very popular and suitable for family viewing." This answer will then be displayed on the interface.

[0069] The interaction method provided in this application embodiment can select different algorithm models for intent recognition based on the category of user input content during a single user interaction. This ensures both the speed and accuracy of intent recognition, thereby guaranteeing the user interaction experience.

[0070] The following is combined with Figure 4 and Figure 5 This section introduces the method mentioned in S201 above for determining the category of the current input content and determining the corresponding algorithm model.

[0071] In some embodiments, the routing rules of the algorithm model are predetermined, and then the category of the current input content and the corresponding algorithm model are determined according to the routing rules of the algorithm model.

[0072] Specifically, refer to Figure 4 , Figure 4 A method for determining routing rules for an algorithm model is shown. For example... Figure 4 As shown, the method includes:

[0073] S401 generates detailed descriptions of multiple intents based on a large language model.

[0074] In some embodiments, developers pre-determine multiple intent names based on the intents that may appear in various existing user interaction scenarios, and then generate detailed descriptions of multiple intents corresponding to these intent names based on a large language model (LLM). The intents that may appear in various existing user interaction scenarios (i.e., the historical intents mentioned in this application) can be obtained based on human-computer dialogue data recorded by the human-computer interaction subsystem during historical user interactions.

[0075] It should be understood that a large language model refers to a deep learning model with a large number of parameters, capable of understanding and generating natural language text. In the embodiments of this application, the large language model may be the Qwen-14B model, the ChatGPT-3.5 model, or the GPT-4 model, etc., and this application does not impose any limitations on this. Among them, the Qwen-14B model is a pre-trained language model based on the Transformer architecture.

[0076] It is understandable that a detailed description of intent helps to identify the subtle semantic differences between different intents, thereby helping to determine the relationship between different intents.

[0077] Specifically, developers pre-determine the names of multiple intents based on potential user interaction scenarios, and also identify the corresponding slots for each intent. Then, based on a large language model, they generate detailed descriptions of each intent and its corresponding slot descriptions. The intent name can include both Chinese and English names, and the slot description can include descriptions of the slots corresponding to that intent.

[0078] For example, when the intent is named "Book a flight", the corresponding slots can include "Departure Time", "Arrival Time", "Departure Location", and "Arrival Location". Based on a large language model, a detailed description is generated, including the English name and Chinese name of the intent, explanations of the meaning of each slot, a functional description of the intent, and a detailed description of the intent's application scenario. For example, the generated detailed description of the intent could include: "Provides a flight booking service. Given departure location, destination, departure time, arrival time, flight number, airline, aircraft model, cabin class, and price information, the service executes the flight booking operation by calling the corresponding API, returns the flight booking operation execution status information, and shows whether the flight booking was successful." The slot description could include "Departure time of the flight to be booked, arrival time of the flight to be booked, departure location of the flight to be booked, and arrival location of the flight to be booked."

[0079] It's understandable that intent recognition typically maps user input to a structured semantic representation that machines can understand—namely, intents and slots. This allows electronic devices to determine the instructions corresponding to the user's input, where one intent can correspond to multiple slots. For example, when the user's input represents the intent to "book a flight," combining the slots "departure time," "arrival time," "departure location," and "arrival location" of that intent allows us to determine the specific information of the flight the user wants to book. This, in turn, allows us to determine the instruction corresponding to the user's input and the action to be performed, such as booking a flight departing from location a at time A and arriving at location b at time B. Therefore, the intents that may appear in various existing user interaction scenarios usually have predefined slots.

[0080] Then, the generated intent descriptions and the corresponding slot descriptions are combined into key-value pairs, each containing an intent description and the corresponding slot description. Based on the semantic vector (BAAI general embedding, BGE) model, the obtained key-value pairs are converted into vector form, resulting in multiple intent description vectors (also known as feature vectors).

[0081] It is understandable that multiple intent description vectors correspond one-to-one with multiple intents.

[0082] S402, clustering multiple intent description vectors based on intent co-occurrence frequency and intent semantic similarity.

[0083] In some embodiments, the co-occurrence frequency of intents is determined based on historical user input data, which includes human-computer dialogue data uploaded to a cloud server by electronic devices after a large number of users have interacted with them. Furthermore, the semantic similarity of intents (i.e., the similarity mentioned in this application) is determined based on a typical intent corpus and intent description vectors. The typical intent corpus includes a large number of typical intent corpora, i.e., the intent corpora for each intent description vector, and the intent corpora include multiple descriptive contents of the intent. For example, for the intent "book a flight," its intent corpus may include "Book a flight for me," "Reserve a flight," "Can you book a flight for me?" etc.

[0084] It's understandable that the correlation between different intents is related to both semantic similarity and co-occurrence frequency. Semantic similarity refers to the similarity between two intents in terms of meaning; for example, the intent to turn on Bluetooth and the intent to turn off Bluetooth have high semantic similarity. Co-occurrence frequency refers to the frequency with which two intents appear consecutively in a single user interaction. When two intents appear in several consecutive rounds of dialogue (e.g., three consecutive rounds) in a single user interaction, they can be considered consecutively occurring. For some semantically unrelated intents that are frequently entered consecutively by the user, semantic similarity alone may not be sufficient to determine their correlation, potentially leading to inaccurate intent clustering results.

[0085] For example, the intent to query the weather and the intent to book a flight are semantically unrelated, but users usually enter the content representing the intent to query the weather after entering the content representing the intent to book a flight. It is impossible to determine whether the intent to query the weather and the intent to book a flight are related based solely on the semantic similarity of intent.

[0086] It should be understood that the intent co-occurrence frequency determined based on historical user input data corresponds one-to-one with the multiple intent description vectors determined in S401 above. Furthermore, the determined intent semantic similarity includes the semantic similarity between the intents corresponding to any two intent description vectors among the multiple intent description vectors. Based on the intent co-occurrence frequency and intent semantic similarity, clustering of the multiple intent description vectors yields the intent clustering result.

[0087] Then, based on intent co-occurrence frequency and intent semantic similarity, multiple intent description vectors are clustered to group related intents into one class, resulting in at least one intent set and outlier intents. Specifically, the feature vector corresponding to an outlier intent has a low similarity to the feature vector corresponding to any intent in the intent set (e.g., less than or equal to a first threshold), or the feature vector corresponding to an outlier intent has a low intent co-occurrence frequency with the feature vector corresponding to any intent in the intent set (e.g., less than or equal to a second threshold). It is understood that the first and second thresholds can be set according to actual needs, and this application does not impose any limitations on them.

[0088] Specifically, in some embodiments, the human-computer dialogue data is first segmented based on historical user input data, with a maximum time interval of 2 minutes. Within the segmented dialogue, a sliding window is calculated with a context window length of 3. A context window length of 3 indicates that each context window includes 3 rounds of human-computer dialogue, i.e., 3 user inputs and 3 feedback messages. It is understood that a context window length of 3 is merely an example; in some embodiments, other values ​​may be chosen for the context window length, and this application does not impose any limitations on this.

[0089] It is understandable that historical user input data can include the duration of each human-computer interaction, the content input by the user in each interaction, feedback information, and other data. A user input can represent a user intent; for example, the input "What's the weather like tomorrow?" represents the user intent "Check tomorrow's weather." Therefore, a user intent can be identified based on a single user input. Furthermore, the user intent identified based on the user input corresponds one-to-one with the intent description vector determined in S401 above.

[0090] Then, based on an algorithmic model (e.g., a large-scale expert model for intent recognition), intent recognition is performed on the user input content in each context window to determine the three user intents represented by the three input contents in each context window. Any two of these three user intents are then combined in an unordered manner, and the two intents in each combination are recorded as co-occurring (i.e., appearing together). For example, when a context window is determined to include intent a, intent b, and intent c, intent a and intent b can be recorded as co-occurring, intent a and intent c can be recorded as co-occurring, and intent b and intent c can be recorded as co-occurring.

[0091] It is understandable that the three input contents in the context window are usually three rounds of content entered by the user in succession. Since the three rounds of content entered by the user in succession may be related content, the intent represented by these three rounds of content may also be related intent.

[0092] In this way, based on the multiple co-occurring intents identified in each context window, an intent co-occurrence frequency table can be determined from the historical user input data. For example, the intent co-occurrence frequency table can refer to Table 1 below, which may include: co-occurring intent combination 1 is turning Bluetooth on and turning Bluetooth off, with a co-occurrence frequency of 500; co-occurring intent combination 2 is checking today's weather and booking a flight, with a co-occurrence frequency of 550; co-occurring intent combination 3 is checking today's weather and playing music, with a co-occurrence frequency of 10.

[0093] It is understood that the co-occurrence frequency table shown in Table 1 is merely an example, and the co-occurrence frequency table may include a greater number of co-occurring intent combinations. The number and frequency of co-occurring intent combinations in the co-occurrence frequency table are related to the amount of user input content in the historical user input data used in actual applications, and this application does not impose any limitations on this.

[0094] Table 1:

[0095] Serial Number Co-occurrence of intentional combinations Co-occurrence frequency 1 (Turn Bluetooth on, turn Bluetooth off) 500 2 (Check today's weather, book flights) 550 3 (Check today's weather, play music) 10 …… …… ……

[0096] Then, based on the intent co-occurrence frequency table and the normalization formula, the co-occurrence frequency of the co-occurring intent combinations is normalized to obtain the intent co-occurrence value of each co-occurring intent combination, where the magnitude of the intent co-occurrence value is between 0 and 1. The normalization formula can be the following formula (1):

[0097] X(new)=(x-min) / (max-min) (1)

[0098] Where X(new) is the normalized intention co-occurrence value, min is the minimum co-occurrence frequency in the intention co-occurrence frequency table, and max is the maximum co-occurrence frequency in the standard intention co-occurrence frequency table. It can be understood that the intention co-occurrence value can characterize the intention co-occurrence frequency.

[0099] Subsequently, based on the typical intent corpus, multiple typical intent corpora are converted into intent corpus vectors using the BGE model. It should be understood that each description of an intent is an intent corpus vector, that is, an intent can correspond to multiple intent corpus vectors. Based on all intent corpus vectors and all intent description vectors combined with the following semantic similarity formula, the semantic similarity between intents corresponding to each pair of intent description vectors is determined. The semantic similarity formula can be the following formula (2):

[0100] Semantic_sim(V1,V2,C1,C2)=0.5*cos(V1,V2)+0.5*cos(C1,C2) (2)

[0101] Where V1 and V2 are any two of all intent description vectors, C1 is the average of multiple intent corpus vectors corresponding to V1, C2 is the average of multiple intent corpus vectors corresponding to V2, and Semantic_sim(V1,V2,C1,C2) is the semantic similarity between the intent corresponding to V1 and the intent corresponding to V2.

[0102] Based on this, multiple intent description vectors are traversed to determine the correlation between them, and related intent description vectors are clustered into one class. For ease of description, the number of intent description vectors is defined as N. First, two intent description vectors (e.g., intent description vector 1 and intent description vector 2) are randomly selected from the N intent description vectors. The correlation between intent description vector 1 and intent description vector 2 is determined. When the co-occurrence value of intent description vector 1 and intent description vector 2 is greater than or equal to the third threshold (e.g., 0.5), and the semantic similarity between intent description vector 1 and intent description vector 2 is greater than the fourth threshold, intent description vector 1 and intent description vector 2 are determined to be related, and they are merged into one intent set. When the co-occurrence value of intent description vector 1 and intent description vector 2 is less than the third threshold or the semantic similarity between intent description vector 1 and intent description vector 2 is less than or equal to the fourth threshold, intent description vector 1 and intent description vector 2 are determined to be unrelated, and the correlation between intent description vector 1 and other intent description vectors is further determined. The third threshold can be determined based on historical user input data in actual applications, and the fourth threshold can be determined based on a typical corpus of intents and historical user input data in actual applications. This application does not impose any restrictions on this.

[0103] It's understandable that there is no set of intents before clustering. An intent set can be determined when one intent description vector is first identified as associated with another. When an intent description vector is not associated with any other intent description vector, that intent description vector can be identified as a separate intent set.

[0104] After identifying at least one intent set, when determining the correlation between other intent description vectors, the correlation between other intent description vectors and all intent description vectors in the existing intent set is first assessed. If the average co-occurrence value of the first intent description vector with all intent description vectors in the existing first intent set is greater than or equal to a third threshold, and the average semantic similarity between the first intent description vector and all intent description vectors in the first intent set is greater than a fourth threshold, then the first intent description vector is determined to be associated with all intent description vectors in the first intent set, and is added to the first intent set. If the second intent description vector is not associated with any intent description vectors in the existing intent set, the correlation between the second intent description vector and intent description vectors not in the existing intent set is further assessed. From the intent description vectors not in the existing intent set, M intent description vectors whose co-occurrence value with the second intent description vector is greater than the third threshold are selected. If the semantic similarity between the second intent description vector and a third intent description vector among the M intent description vectors is greater than the fourth threshold, then the second intent description vector and the third intent description vector are determined to be associated, and are merged into one intent set.

[0105] It is understandable that, in order to ensure that all intent description vectors in the intent set are associated, the first intent description vector can be added to the first intent set when it is associated with all intent description vectors in the first intent set. When the first intent description vector is not associated with any intent description vectors in the existing intent set, the first intent description vector can be merged with a third intent description vector that is not in the existing intent set but is associated with the first intent description vector into a single intent set.

[0106] Thus, after traversing all intent description vectors, i.e., after clustering all intent description vectors, multiple intent sets can be identified. The number of intent description vectors in each of the multiple intent sets is checked. When the number of intent description vectors in an intent set is 1, the intent corresponding to that intent description vector is determined to be an outlier intent. Furthermore, the similarity between the feature vector corresponding to any intent in each of the multiple intent sets and the feature vectors corresponding to other intents in that intent set is greater than a first threshold, and the co-occurrence frequency of the feature vector corresponding to any intent in each intent set and the feature vectors corresponding to other intents in that intent set is greater than a second threshold.

[0107] For example, the clustering results can be referenced Figure 5 .like Figure 5As shown, the determined intent set can include intent set G1, intent set G2, intent set G3, intent set G4, etc. Intent set G1, intent set G2, and intent set G3 each include at least two associated intent description vectors, while intent set G4 includes only one outlier intent.

[0108] It should be understood that, for ease of explanation, Figure 5 Only a portion of the intent set and outlier intents are shown in this paper. In practical applications, the number of intent sets and outlier intents are related to the correlation between the multiple intent description vectors identified above, and this application does not impose any limitations on this.

[0109] In some embodiments, after determining multiple intent sets, the intent corpus corresponding to each intent description vector in the intent set can be determined based on a typical intent corpus. Then, based on the intent corpus, the keywords for each intent set can be determined. Specifically, for an intent set, the intent corpus corresponding to the intent set (i.e., the intent corpus of all intent description vectors in the intent set) can be segmented into words, and then the term frequency-inverse document frequency (TF-IDF) value can be calculated. The K words with the highest values ​​are determined as the keywords of the intent set.

[0110] Term frequency (TF) refers to the frequency with which a word appears in the intent corpus corresponding to a particular intent set. Inverse document frequency (IDF) reflects the general importance of a word or phrase; that is, the fewer corpora containing a word or phrase, the higher the IDF value, indicating that the word or phrase has good category discrimination ability. The TF-IDF value is defined as follows: if a word or phrase appears frequently (high TF) in all intent corpora corresponding to one intent set, and rarely appears in intent corpora corresponding to other intent sets (also high IDF), then this word or phrase is considered to have good category discrimination ability and is suitable as a keyword for that intent set.

[0111] It is understandable that, since all intent description vectors in an intent set are related, the keywords of that intent set can be considered as the keywords of the intents corresponding to all intent description vectors in that intent set.

[0112] S403, Determine the routing rules for the algorithm model.

[0113] In some embodiments, routing rules for the algorithm model are determined.

[0114] Specifically, the algorithm model routing rules include: for the first round of input content, determining that the input content belongs to the first category, and determining the algorithm model as an intention recognition expert small model. For input content not in the first round, if the intention represented by the previous round of input content matches the intention of the outlier, then determining that the current input content belongs to the first category, and determining the algorithm model as an intention recognition expert small model.

[0115] It's understandable that the content of the first round of input typically represents a simple user intent, therefore it belongs to the first category. When performing intent recognition on non-first round input, intent recognition must have already been performed on the previous round of input, allowing us to determine which intent set the previous round of input represented. Since outlier intents are usually not associated with other intents, when the intent represented by the previous round of input matches an outlier intent, that input is usually not associated with other input. Therefore, we can determine that the current input is not associated with the previous round of input, and can consider the current input to represent a simple user intent, thus determining that the current input belongs to the first category.

[0116] If the intent represented by the previous input content does not match the intent of the outlier, first determine the keywords of the current input content. If all the keywords of the current input content belong to the keywords corresponding to the intent of the previous input content (i.e., keywords of the intent set to which the intent represented by the previous input content belongs), then the intent represented by the current input content and the intent represented by the previous input content belong to the same intent set. In other words, the current input content is associated with the previous input content, and the current input content belongs to the second category, thus determining the algorithm model as a large-scale intent recognition expert model. If at least one keyword of the current input content does not belong to the keyword corresponding to the intent of the previous input content, then the intent represented by the current input content and the intent represented by the previous input content do not belong to the same intent set. In other words, the current input content is not associated with the previous input content, and the current input content belongs to the first category, thus determining the algorithm model as a small-scale intent recognition expert model.

[0117] It is understandable that when the keywords in the current input content do not belong to the intent set represented by the intent of the previous round of input content, the current input content can be considered unrelated to the previous input content, meaning the current input content represents a simple user intent, and therefore belongs to the first category. When all the keywords in the current input content belong to the intent set represented by the intent of the previous round of input content, the current input content can be considered related to the previous input content, meaning the current input content represents a vague user intent, and therefore belongs to the second category. In this embodiment, when the current input content is related to the previous round of input content, selecting a large-scale intent recognition expert model can ensure the accuracy of intent recognition. When the current input content is unrelated to the previous round of input content, selecting a small-scale intent recognition expert model can ensure the speed of intent recognition.

[0118] In some embodiments, S403 may be executed before S401 and S402, after S401 and S402, or simultaneously with S401 and S402. This application does not limit this.

[0119] Thus, if the electronic device stores the intent clustering results determined in S402 and applies the algorithm model routing rules determined in S403, the electronic device can determine the category of the user's input content and the corresponding algorithm model when interacting with the user.

[0120] The following is combined with Figure 6 This section presents a schematic diagram of the architecture of an electronic device. For example... Figure 6 As shown, the electronic device 20 includes a human-computer interaction subsystem 200 and a central control subsystem 201. The human-computer interaction subsystem 200 includes an algorithm model routing module 2001, a first intent recognition module 2002, and a second intent recognition module 2003.

[0121] The human-computer interaction subsystem 200 is used to perform intent recognition on the user's input content through an algorithm model, send the intent recognition result to the central control subsystem 201, and convert the feedback information returned by the central control subsystem 201 into outputs that the user can understand, such as text, voice, images, and sounds.

[0122] The algorithm model routing module 2001 includes the above. Figure 4 The intention clustering results obtained by the method described above are then applied. Figure 4 The method determines the algorithm model routing rules, which are used to determine the category of user input content and the corresponding algorithm model based on the algorithm model routing rules and intent clustering results. In some embodiments, the intent clustering results can be stored in a cloud server, and the algorithm routing module 2001 can obtain the intent clustering results from the cloud server when determining the algorithm model.

[0123] The first intent recognition module 2002 includes a first algorithm model, such as an intent recognition expert small model, which is used to recognize the intent of the user input content through the intent recognition expert small model.

[0124] The second intent recognition module 2003 includes a second algorithm model, such as an intent recognition expert big model, which is used to recognize the intent of user input content through the intent recognition expert big model.

[0125] The central control subsystem 201 is used to obtain the intent recognition results output by the human-computer interaction subsystem 200, determine the instruction corresponding to the user's input content, execute the corresponding action, and return the feedback information to the human-computer interaction subsystem 200, thereby realizing interaction with the user.

[0126] The following is based on Figure 6 The electronic device architecture shown, combined with Figure 7 This application introduces an interactive method provided by an embodiment.

[0127] like Figure 7 As shown, the method includes:

[0128] S501, the algorithm model routing module 2001 determines whether the current input content is the first round of input content.

[0129] In some embodiments, when the human-computer interaction subsystem 200 detects input content, it first determines whether the current input content is the first round of input content through the algorithm model routing module 2001. If the current input content is the first round of input content, it is determined that the current input content belongs to the first category, and S505 is executed; if the current input content is not the first round of input content, S502 is executed.

[0130] S502, the algorithm model routing module 2001 determines whether the intent represented by the input content in the previous round matches the intent of the outlier.

[0131] In some embodiments, after determining that the current input content is not the first round of input content, the algorithm model routing module 2001, based on the intent clustering results, continues to determine whether the intent represented by the previous round of input content matches the outlier intent. If the intent represented by the previous round of input content matches the outlier intent, then the current input content is determined to belong to the first category, and S505 is executed. If the intent represented by the previous round of input content does not match the outlier intent, then S503 is executed.

[0132] It is understandable that when the intent represented by the previous round of input content matches the intent of the outlier, since the outlier intent is usually not related to other intents, it can be assumed that the current input content is not related to the previous round of input content, and the current input content can be determined to belong to the first category.

[0133] S503, the algorithm model routing module 2001 determines whether the current input content is related to the previous round of input content.

[0134] In some embodiments, when the intent represented by the previous round of input content does not match the intent of outliers, the algorithm model routing module 2001 determines whether the current input content is related to the previous round of input content based on the intent clustering results. Specifically, it determines whether all the keywords of the current input content belong to the keywords corresponding to the intent represented by the previous round of input content. First, it determines the keywords of the current input content. If all the keywords of the current input content belong to the keywords corresponding to the intent of the previous round of input content, it is determined that the current input content is related to the previous round of input content, that is, the current input content belongs to the second category, and S504 is executed; if at least one keyword of the current input content does not belong to the keywords corresponding to the intent of the previous round of input content, it is determined that the current input content is not related to the previous round of input content, that is, the current input content belongs to the first category, and S505 is executed.

[0135] In some embodiments, the first category of input content includes: the content of the first round of input, input content whose intent represented by the previous round of input content matches the outlier intent, and input content containing keywords that do not belong to the intent set represented by the previous round of input content. The second category of input content includes: input content containing keywords whose keywords all belong to the intent set represented by the previous round of input content.

[0136] S504, the second intent recognition module 2003 performs intent recognition through an intent recognition expert model.

[0137] In some embodiments, after the algorithm routing module 2001 determines that the current input content belongs to the second category, it determines that the algorithm model is the intent recognition expert big model. Then, the second intent recognition module 2003 performs intent recognition through the intent recognition expert big model to obtain the second recognition result.

[0138] S505, the first intent recognition module 2002 performs intent recognition through an intent recognition expert small model.

[0139] In some embodiments, after the algorithm routing module 2001 determines that the current input content belongs to the first category, it determines that the algorithm model is the intention recognition expert small model, and then the first intention recognition module 2002 performs intention recognition through the intention recognition expert small model to obtain the first recognition result.

[0140] In some embodiments, after the human-computer interaction subsystem 200 completes the intent recognition of the user's input, the central control subsystem 201 can obtain the intent recognition result. Specifically, when the central control subsystem 201 obtains a first recognition result, it executes a first instruction based on the first recognition result, wherein the first instruction corresponds to the first recognition result, and the first instruction instructs the electronic device 20 to perform a first action and / or display first feedback information. When the central control subsystem 201 obtains a second recognition result, it executes a second instruction based on the second recognition result, wherein the second instruction corresponds to the second recognition result, and the second instruction instructs the electronic device 20 to perform a second action and / or display second feedback information.

[0141] Based on this, the interaction method provided in this application, in a single user interaction, performs intent recognition using a small intent recognition expert model when the user input content belongs to the first category, and performs intent recognition using a large intent recognition expert model when the user input content belongs to the second category. This ensures both the speed and accuracy of intent recognition, thereby guaranteeing a positive user experience.

[0142] The following is combined with Figure 8 This application introduces an interactive method provided by an embodiment. Figure 8 A flowchart of another interaction method is shown, such as Figure 8 As shown, the method includes:

[0143] S601, the first input content is detected, it is determined that the first input content belongs to the first category, and the first input content is subjected to intent recognition through the first algorithm model to obtain the first recognition result.

[0144] In some embodiments, when the electronic device detects the first input content, it determines that the first input content belongs to a first category, and performs intent recognition on the first input content using a first algorithm model to obtain a first recognition result. The first algorithm model can only recognize input content of the first category. For details, please refer to the preceding descriptions of S501 to S503 and S505; they will not be repeated here.

[0145] S602, the second input content is detected, it is determined that the second input content belongs to the second category, and the second algorithm model is used to perform intent recognition on the second input content to obtain the second recognition result.

[0146] In some embodiments, when the electronic device detects the second input content, it determines that the second input content belongs to a second category, and performs intent recognition on the second input content using a second algorithm model to obtain a second recognition result. The second algorithm model is capable of recognizing both the first and second categories of input content, and the processing resources required for the second algorithm model to run are greater than those required for the first algorithm model. For details, please refer to the preceding descriptions of S503 and S504; they will not be repeated here.

[0147] It is understandable that since the second algorithm model requires more processing resources than the first algorithm model, using the first algorithm model to perform intent recognition on the first input content can yield a more accurate recognition result, avoiding the use of excessive processing resources and thus ensuring the speed of intent recognition, thereby guaranteeing the user's interactive experience. Using the second algorithm model to perform intent recognition on the second input content ensures the accuracy of intent recognition. In this way, in a single user interaction, both the speed and accuracy of intent recognition can be guaranteed, thus ensuring a good user experience.

[0148] S603, based on the first identification result, execute the first instruction, or based on the second identification result, execute the second instruction.

[0149] In some embodiments, the electronic device executes a first instruction based on a first identification result, or executes a second instruction based on a second identification result. The first instruction corresponds to the first identification result and instructs the electronic device to perform a first action and / or display first feedback information; the second instruction corresponds to the second identification result and instructs the electronic device to perform a second action and / or display second feedback information.

[0150] It is understandable that electronic devices can perform actions corresponding to the intent recognition results and display corresponding feedback information based on the intent recognition results, thereby completing the interaction with the user and ensuring the user's interactive experience.

[0151] In some embodiments, existing interaction methods include multiple algorithm models in a cascaded structure in the electronic device. If the multiple algorithm models include a large intent recognition expert model and a small intent recognition expert model, the electronic device needs to perform intent recognition on the user input content through the multiple algorithm models in the cascaded structure. That is, each algorithm model needs to perform intent recognition, which results in relatively low intent recognition efficiency. Even if the accuracy of intent recognition can be guaranteed, the speed of intent recognition cannot be guaranteed, which may affect the user interaction experience.

[0152] The interaction method provided in this application can determine the algorithm model according to the category of the user input content. When the user input content belongs to the first category, the intention recognition is performed by the small model of the intention recognition expert. When the user input content belongs to the second category, the intention recognition is performed by the large model of the intention recognition expert. In this way, both the speed and accuracy of intention recognition can be guaranteed, thereby ensuring the user's interactive experience.

[0153] In some embodiments, this application also provides a readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the interaction method described in the above embodiments.

[0154] In some embodiments, this application also provides a program product, which includes a computer program or instructions that, when executed, cause a computer to perform the interactive method described in the above embodiments.

[0155] In some embodiments, this application also provides an electronic device, which includes one or more processors and a memory, the memory being used to store instructions executed by the one or more processors of the electronic device; when the processor executes the instructions in the memory, it causes the electronic device to perform the interactive method described in the above embodiments. The following is in conjunction with... Figure 9 This application describes the hardware structure of an electronic device provided in an embodiment.

[0156] Figure 9 A schematic diagram of the hardware structure of electronic device 00 is shown. (For example...) Figure 9 As shown, the electronic device 00 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a touch sensor 180K, etc.

[0157] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 00. In other embodiments of this application, the electronic device 00 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0158] The processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors. In this embodiment, when the processor 110 detects that a smart assistant application is open, it can execute the interaction method provided in this embodiment.

[0159] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.

[0160] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, display 194, camera 193, and wireless communication module 160, etc.

[0161] The wireless communication function of electronic device 00 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0162] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0163] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on the electronic device 00. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0164] A modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.

[0165] The wireless communication module 160 can provide solutions for wireless communication applications on electronic devices 00, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.

[0166] Electronic device 00 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting 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.

[0167] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 00 may include one or N display screens 194, where N is a positive integer greater than 1. In this embodiment, the electronic device 00 can interact with the user through the display screens 194.

[0168] Electronic device 00 can achieve shooting function through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0169] The ISP is used to process data fed back by the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing. In some embodiments, the ISP may be located in the camera 193.

[0170] Camera 193 is used to capture still images or videos. In some embodiments, electronic device 00 may include one or N cameras 193, where N is a positive integer greater than 1.

[0171] A digital signal processor (DSP) is used to process digital signals; in addition to digital image signals, it can also process other digital signals. A video codec is used to compress or decompress digital video.

[0172] 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 enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0173] 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 00. 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.

[0174] Internal memory 121 can be used to store computer executable program code, which includes instructions.

[0175] Electronic device 00 can implement audio functions through audio module 170 and application processor, such as music playback and recording. Audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. Audio module 170 can also be used for encoding and decoding audio signals.

[0176] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects 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. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 00, in a different position than display screen 194.

[0177] Buttons 190 include a power button, volume buttons, etc. A motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. An indicator 192 can be an indicator light used to indicate charging status. A SIM card interface 195 is used to connect a SIM card.

[0178] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0179] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.

[0180] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0181] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, optical discs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other forms of propagated signals. Therefore, machine-readable media includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.

[0182] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.

[0183] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.

[0184] It should be noted that in the examples and description of this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0185] Although this application has been illustrated and described with reference to certain embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.

Claims

1. An interaction method, characterized in that, Applied to electronic devices, the electronic devices include a human-computer interaction subsystem, the human-computer interaction subsystem includes a first algorithm model and a second algorithm model, and, The method includes: The first input content was detected, and it was determined that the first input content belonged to the first category; The first algorithm model is used to perform intent recognition on the first input content to obtain a first recognition result; The second input content was detected, and it was determined that the second input content belongs to the second category; The second algorithm model is used to perform intent recognition on the second input content to obtain the second recognition result; The second algorithm model can recognize input content of both the first and second categories, while the first algorithm model can only recognize input content of the first category. The second algorithm model requires more processing resources to run than the first algorithm model.

2. The method according to claim 1, characterized in that, Also includes: Based on the multiple historical intents obtained by the human-computer interaction subsystem, the feature vector corresponding to each historical intent is determined. The historical intents are obtained based on the human-computer dialogue data recorded by the human-computer interaction subsystem during historical user interactions. Clustering the multiple historical intents yields at least one intent set and outlier intents, wherein... The similarity between the feature vector corresponding to the outlier intent and the feature vector corresponding to the historical intent in any intent set is less than or equal to a first threshold, or... The co-occurrence frequency of the feature vector corresponding to the outlier intent and the feature vector corresponding to the historical intent in any intent set is less than or equal to the second threshold.

3. The method according to claim 2, characterized in that, Also includes: Based on the typical intent corpus, the intent corpus corresponding to each feature vector in the intent set is determined. The typical intent corpus includes the intent corpus of each historical intent in the plurality of historical intents. The intent corpus includes multiple descriptive contents of the historical intents. Based on the intent corpus, the keywords of each intent set are determined.

4. The method according to claim 3, characterized in that, The first category of input content includes: the content of the first round of input, the input content whose intent represented by the previous round of input content matches the intent of the outlier, and the input content whose keywords do not belong to the intent set represented by the previous round of input content. The second category of input content includes: input content whose keywords belong to the intent set represented by the intent in the previous round of input content.

5. The method according to claim 3, characterized in that, Determining that the first input content belongs to the first category includes: Corresponding to determining that the first input content is the first round of input content, it is determined that the first input content belongs to the first category; Corresponding to determining that the first input content is not the first round of input content, it is determined whether the intent represented by the previous round of input content of the first input content matches the intent of the outlier point; The intent represented by the input content in the previous round is matched with the intent of the outlier, and the first input content is determined to belong to the first category.

6. The method according to claim 5, characterized in that, The step of determining whether the intent represented by the previous round of input content of the first input content matches the intent of the outlier includes: If the intent represented by the previous round of input content does not match the intent of the outlier, determine whether the keywords of the first input content all belong to the keywords of the intent set to which the intent represented by the previous round of input content belongs; If at least one keyword in the first input content does not belong to the intent set represented by the intent in the previous round of input content, the first input content is determined to belong to the first category.

7. The method according to claim 3, characterized in that, Determining that the second input content belongs to the second category includes: If the second input content is not the first round of input content, and the intent represented by the previous round of input content does not match the outlier intent, and the keywords of the second input content all belong to the keywords of the intent set to which the intent represented by the previous round of input content belongs, then the second input content is determined to belong to the second category.

8. An electronic device, characterized in that, include: One or more processors and a memory, the memory being used to store instructions executed by one or more processors of the electronic device; When the processor executes the instructions in the memory, the electronic device performs the method of any one of claims 1 to 7.

9. A readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 7.

10. A program product, characterized in that, The program product includes a computer program or instructions that, when executed, cause a computer to perform the method as described in any one of claims 1 to 7.