WO2022199596A1 - 意图决策方法及设备、计算机可读存储介质 - Google Patents

意图决策方法及设备、计算机可读存储介质 Download PDF

Info

Publication number
WO2022199596A1
WO2022199596A1 PCT/CN2022/082424 CN2022082424W WO2022199596A1 WO 2022199596 A1 WO2022199596 A1 WO 2022199596A1 CN 2022082424 W CN2022082424 W CN 2022082424W WO 2022199596 A1 WO2022199596 A1 WO 2022199596A1
Authority
WO
WIPO (PCT)
Prior art keywords
intent
user
usage data
application
voice
Prior art date
Application number
PCT/CN2022/082424
Other languages
English (en)
French (fr)
Inventor
黄益贵
夏潘斌
乔登龙
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022199596A1 publication Critical patent/WO2022199596A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/26Speech to text systems

Definitions

  • the present application relates to human-machine dialogue technology in the field of artificial intelligence, and in particular, to an intention decision-making method and device, and a computer-readable storage medium.
  • NLU Natural Language Understanding
  • the present application provides an intention decision-making method and device, and a computer-readable storage medium, which can accurately and efficiently infer the user's intention when the voice input by the user is incomplete, and effectively avoid misjudgment, Improve user experience.
  • a first aspect of the present application provides an intention decision-making method, which is applied to an electronic device, and the method includes:
  • an intent decision is made on the abstract intent, and an instantiated intent of the first voice is obtained, where the instantiated intent includes the required slot information missing in the abstract intent, and the user usage data
  • historical usage data for the application is included.
  • the embodiment of the present application can accurately and efficiently infer the user's intention in the case of incomplete speech, so as to give the user a timely and accurate response, effectively avoid misjudgment caused by inappropriate intention-assisted decision-making, and improve the user experience of the voice assistant. experience.
  • the required slot information missing in the abstract intent includes an application name; the intent decision is made on the abstract intent according to user usage data to obtain the first
  • the instantiated intent of a speech including:
  • the abstract intent is completed by using the application name to obtain the instantiated intent of the first voice.
  • the user's intention can be accurately and efficiently inferred so as to control the corresponding application to give the user a timely and accurate response, thereby improving the user experience.
  • the determining the application name according to the user usage data specifically includes: determining the application program name according to several preset types of the user usage data and their corresponding priorities. the application name.
  • determining the application program name according to several preset types of the user usage data and their corresponding priorities specifically includes:
  • the Nth priority is higher than the Mth priority.
  • determining the application program name according to several preset types of the user usage data and their corresponding priorities specifically includes:
  • the application name is determined according to the user usage data of the Nth priority
  • the Nth priority is higher than the Mth priority.
  • the user usage data includes one or more of the following types:
  • the historical usage data of the application and the data of the running state of the application can be comprehensively applied to the intent decision, thereby improving the accuracy and precision of the intent decision.
  • the priority of several types of the user usage data is:
  • the first priority the skill currently in progress
  • the second priority the front-end package name
  • the third priority the player package name currently occupying the MediaSession
  • the sixth priority the list of installed applications.
  • the historical usage data of the application and the data of the running state of the application can be comprehensively applied to the intent decision according to the pre-configured priority, thereby improving the accuracy and precision of the intent decision.
  • the first voice is a voice control instruction for media content
  • the recognized text of the voice control instruction is one or more of the following: search, play, pause, switch, continue, exit.
  • the media content is one or more of the following: music, video, audiobook, podcast, radio station, and comic dialogue.
  • the voice assistant can accurately respond to the user's voice instructions for various types of media content in various applications.
  • the method further includes: performing an operation in response to the first speech according to the instantiated intent.
  • the response of the first voice may be generated by the voice assistant to satisfy the user's intent.
  • a second aspect of the present application provides an electronic device, comprising:
  • At least one memory that stores program instructions that, when executed by the at least one processor, cause the at least one processor to perform the above-described intent decision method.
  • a third aspect of the present application provides a computer-readable storage medium on which program instructions are stored, the program instructions, when executed by a computer, cause the computer to execute the above-mentioned intention decision-making method.
  • FIG. 1 is a schematic structural diagram of an exemplary system and environment to which the embodiments of the present application are applicable.
  • FIG. 2 is a schematic flowchart of an intention decision-making method according to an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of an exemplary flow of making an intention decision according to user usage data according to an embodiment of the present application.
  • FIG. 4 is another exemplary schematic flowchart of an intention decision based on user usage data according to an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of an exemplary process of performing an operation in response to a first speech according to an instantiated intent according to an embodiment of the present application.
  • Intent which provides user expectations obtained by parsing user input.
  • intents can be thought of as sub-functions under skills, such as making and hanging up calls are intents of telephony skills.
  • skills can also be thought of as intention-related functional items.
  • Slots are additional parameters required to complete the action corresponding to the intent, such as calling a contact.
  • the contact is a slot that needs to be parsed together with the intent.
  • Skills, intentions, and slots are usually designed based on experience, without objective criteria, and generally correspond to the functions of entities in daily life.
  • Service to start an application, you need to find the service corresponding to the application, so as to start the application or execute the control operation in the application by the service.
  • the fulfillment result (fulfilment), the process of calling the program (for example, the application's API) to execute the implementation logic of the intent is called fulfillment.
  • the fulfillment result usually includes the result obtained by the program executing the implementation logic of the intent, which can be an instruction, a presentation data set , web page data, etc.
  • the fulfillment result may include the Hou Baolin cross talk list, the Uniform Resource Locator (URL) of the playback interface, and other data required by Huawei Music to present the corresponding interface.
  • Another example is the intent of "querying the weather in Beijing today", and its fulfillment results include data indicating today's weather in Beijing and voice commands for the query results and other data that the voice assistant needs to present the weather query results.
  • GUI graphical user interface
  • the existing technology 1 has the following defects: simply judging based on the foreground package name is only applicable to the scenario where the application program runs in the foreground. For example, if the user opens Huawei Music to listen to a song, and then opens the browser, the user enters the voice: "I want to listen to the boy", because "Huawei Music” is no longer running in the foreground, and the front-end package name is not Huawei Music but browser, the dialog management service will not be able to accurately infer the user's true intent.
  • the application can make an auxiliary judgment based on the MediaSession channel occupancy. For example, the user's voice: "pause”, “pause playback”, if the current MediaSession channel is occupied by Huawei Music, the dialog management service can infer that the user's true intention is to pause the playback of the content being played by Huawei Music.
  • the defects existing in the second prior art are as follows: it can only be applied to a multimedia playback application that uses the MediaSession mechanism and is currently using the MediaSession, and is invalid for applications that do not support the MediaSession mechanism or support the MediaSession mechanism but are not currently using the MediaSession. .
  • the above two related technologies can only infer the real intention of the user through the status data such as the front-end package name and the MediaSession being used.
  • the present application provides an intention decision-making method and device, and a computer-readable storage medium, which, when receiving an incomplete voice input by a user, correct the missing required slots according to user usage data
  • the abstract intention of the information is used to make decisions, and the instantiated intention containing the required slot information is obtained, and the instantiated intention can be directly executed. Therefore, the embodiment of the present application can accurately and efficiently infer the user’s intention in the case of incomplete speech, so as to Give users a timely and accurate response, which can be used as an important supplement to the existing direct semantic intent parsing and multi-round dialog intent parsing using dialogue context, effectively avoid misjudgments caused by inappropriate intent-assisted decision-making, and improve the voice assistant’s performance. user experience.
  • the embodiments of the present application can be applied to various human-computer interaction scenarios, such as human-computer dialogue scenarios, scenarios in which applications or system functions in electronic devices are controlled through natural language, and scenarios in which electronic devices are controlled to provide content through natural language.
  • FIG. 1 shows a schematic structural diagram of a voice assistant system 100 and its environment to which the embodiments of the present application are applied.
  • the voice assistant system 100 may be any information processing system that determines the user's intent by parsing natural language speech input by the user, and performs actions or tasks based on the user's intent to control the application to provide the user with a response that matches his or her intent.
  • the voice assistant system 100 may include: a voice assistant 110 , a voice recognition module 120 , a dialogue management service module 130 , and a semantic analysis service module 140 .
  • the voice assistant 110 may be configured to be awakened in response to a preset sentence, receive the voice input by the user and report the voice to the voice recognition module 120, and perform actions or complete tasks to control the application program or be controlled by the dialogue management service module 130 according to the feedback from the dialogue management service module 130. Provides itself to the user with a response that matches their intent.
  • the speech recognition module 120 provides the user's speech-to-text capability, and can be configured to perform speech recognition and forward the recognized text to the dialogue management service module 130 .
  • the dialog management service module 130 provides the ability to organize and contextualize the user's speech intent, and it can be configured to forward the text to the semantic analysis service module 140 when semantic recognition of the text is required, and according to the intent returned by the semantic analysis service module 140 Find the related service with the slot information and obtain the fulfillment result, and return the related service and fulfillment result to the voice assistant 110 .
  • the voice assistant 110 may perform actions or complete tasks based on the relevant services and fulfillment results.
  • the semantic parsing service module 140 provides the ability to parse intent and slots according to the user's speech text, and can be configured to perform semantic parsing on the text recognized by the speech recognition module 120 to obtain intent and slot information and send it to the dialog management service module 130.
  • the voice assistant 110 can be configured on the electronic device 101, and the electronic device 101 can also be configured with a variety of applications that support voice control, including but not limited to media content providing applications, instant messaging applications, and mobile payment. apps, app stores, etc.
  • the media content providing application is an application that can be woken up, triggered and executed by voice and/or exited.
  • the voice control application may include a music playing application, an audio APP for providing audiobooks, a mobile payment APP, a browser APP, and the like.
  • Electronic device 101 may be any suitable electronic device.
  • the electronic device may be a portable multifunction device (eg, the electronic device described in FIG. 8 below) or a personal electronic device.
  • Portable multifunction devices may be mobile phones, laptops, tablets, AR glasses, smart bracelets, screen speakers, etc. that include functions such as music player functions, information query functions, wireless communication functions, and/or image capture functions.
  • electronic device 101 may be a non-portable multifunction device.
  • the electronic device 101 may be a desktop computer, an all-in-one computer, a game console, a television, or a television set-top box.
  • the operating system of the electronic device 101 has the ability to manage the user's application usage history.
  • Communication between the electronic device 101 , the server 102 , and various services may be performed through a network.
  • the dialog management service module 130 needs to find the corresponding service after receiving the instantiated intent, and communicate with the corresponding service through the network to perform the processing related to the intent, such as launching the application or performing in-application control operations, etc. , and get fulfillment results from the corresponding service.
  • FIG. 2 shows an exemplary flow of the intention decision method in the embodiment of the present application, which is applied to the above-mentioned electronic device 101, and the exemplary flow of the method may include the following steps:
  • Step S202 obtaining the abstract intention of the first voice, where the abstract intention is the intention of missing at least one required slot information;
  • Step S203 make an intention decision on the abstract intention according to the user usage data, and obtain the instantiated intention of the first voice, the instantiated intention includes the required slot information missing in the abstract intention, and the user usage data at least includes: Historical usage data for the application.
  • the first voice refers to the natural language voice input by the user.
  • the voice assistant 110 can receive the first voice when it is in the background running state, is in the Nth round (N is an integer greater than or equal to 1) conversation with the user, or any other state capable of receiving or responding to user input. If the voice assistant 110 is in a dormant state or in an inactive state, the first voice can also be received, as long as the first voice contains words or sentences that can trigger the voice assistant.
  • the voice assistant 110 can input the following first voice "Xiao e, Xiao e, search for Hou Baolin's cross talk" to wake up/start the voice assistant, and then the electronic device executes The methods of the embodiments of the present application. If the voice assistant 110 has been awakened, the user can directly input the following first voice "Search for Hou Baolin's cross talk".
  • the first speech may be speech from which an executable intent cannot be obtained.
  • the first speech may be a sentence or word or single word lacking key information.
  • the executable intent cannot be obtained by parsing the first speech. For example, if the voice input by the user is "Searching for Hou Baolin's cross talk", it contains the key information "intent: search for cross talk” and “performer: Hou Baolin", but the key information "application name” is missing, semantic analysis
  • the service module 140 cannot obtain the executable intent by parsing the text corresponding to the speech, so the speech "searching for Hou Baolin's cross talk" belongs to the "first speech” in this embodiment of the present application.
  • the intents " ⁇ pause ⁇ ”, “ ⁇ play ⁇ ”, “ ⁇ search ⁇ ”, “ ⁇ search for song boy” from the first speech “pause”, “play”, “continue”, “search song boy” song ⁇ ”, the required slots ⁇ singer ⁇ and ⁇ application name ⁇ are all missing, and these intents are abstract intents.
  • the user inputs the voice "how is the weather today", although the information of the required slot ⁇ location ⁇ in the weather search intent obtained by semantic analysis of the recognized text of the voice is missing, but the information of the required slot ⁇ location ⁇ in the weather search intent obtained by semantic analysis of the voice is missing.
  • the pre-configured default location, etc. can determine that the value of the required slot ⁇ location ⁇ is "Shenzhen", indicating that the required slot ⁇ location ⁇ of the intent can be completed by default or preset, such an intent can be used as needed. Set to belong to abstract intent or not to abstract intent.
  • the instantiated intent (also known as the executable intent) refers to the intent that the program can give a clear implementation logic, and its required slot information is complete, or all its required slot information is not missing, that is, it contains Required slot information missing from abstract intent.
  • the instantiated intent may be obtained by the semantic parsing service module 140 by parsing the recognized text of the speech containing complete information, or may be obtained by the semantic parsing service module 140 by parsing the recognized text of the first speech, and further by the voice assistant 110 to make an intent decision .
  • Such an intent is an instantiated intent.
  • User usage data includes a variety of user data that can be used for intent decisions.
  • User usage data may include historical usage data for the application.
  • the historical usage data may include various types, for example, application usage records generated by the user using the application, skill usage records generated by the user using the voice assistant, intent usage records generated by the user using the voice assistant 110 , and the like. These usage records are collectively stored in the electronic device 101, and can be recorded and stored locally by the operating system of the electronic device 101 or related application programs.
  • the user usage data may also include application running status data of the electronic device.
  • the application running status data of the electronic device may include, but not limited to, the foreground package name, the player package name currently occupying the MediaSession, the skills currently in progress in the voice assistant 110, and the like.
  • the user usage data may include data related to the user's usage of each application program, each client (eg, voice assistant, mail), module (eg, video playback module, communication module, photo module) and the like in the electronic device.
  • the user's usage data may include, but is not limited to, application-related data, intent data of the voice assistant 110 , and/or skill data of the voice assistant 110 .
  • the application-related data may include the current running state of the application, usage records, etc.
  • the intent data of the voice assistant 110 may include the user's intent-usage record, where the intent-usage record includes information about the user's used intent (for example, the intent type).
  • the skill data in the voice assistant 110 includes the user's skill usage record, and the skill usage record may include information such as skill identification. Usage data may be obtained in various applicable ways. For example, the voice assistant 110 can directly read application usage records, application running status, etc. from the relevant logs of the operating system of the electronic device, and the intent data and skill data of the voice assistant 110 can be directly obtained from the preconfigured storage space of the voice assistant 110 read in.
  • intent decisions may be made through multiple classes of usage data with different priorities. Still taking the abstract intent missing the required slot ⁇ application name ⁇ as an example, the steps of determining the application name in the intent decision may include: determining the application according to several preset types of user usage data and their corresponding priorities. program name. Here, the type, specific content and priority of the data used by the user may be pre-agreed or pre-configured as required.
  • the following exemplarily describes the implementation process of using data for multiple types of users with different priorities to make an intention decision.
  • An exemplary implementation of intent decision may include the following steps:
  • Step 1) set the type of user data and its priority
  • the priorities of several types of user usage data are as follows:
  • the first priority the skill currently in progress
  • the second priority the front-end package name
  • voice assistant 110 Fourth priority, skill and intent usage records of voice assistant 110 (may be sorted by time from recent to distant or various other applicable ways);
  • the fifth priority is the application usage records (which can be sorted according to time from recent to distant or various other applicable ways).
  • the sixth priority the list of installed applications.
  • the first priority is the highest
  • the sixth priority is the lowest
  • the first to sixth priorities decrease step by step.
  • a first implementation manner of this step may include: judging whether the user usage data of the Nth priority exists in the electronic device. If the user usage data of the Nth priority exists in the electronic device, the application name is determined according to the user usage data of the Nth priority. If the user usage data of the Nth priority does not exist in the electronic device, it is determined whether the user usage data of the Mth priority exists in the electronic device. Wherein, the Nth priority is higher than the Mth priority.
  • FIG. 3 shows an exemplary specific implementation flow of the first implementation manner.
  • This embodiment not only realizes the instantiation of the abstract intent by synthesizing various types of user usage data and combining with the configuration of the priority, but also uses the application name for determining the abstract intent only when the user usage data matches the abstract intent.
  • Flexible configuration of data priorities and types and can effectively improve the accuracy and precision of intent decision-making.
  • Application names that use user usage data to determine abstract intent can include the following two:
  • the application name recorded in the information can be directly used as the application name of the abstract intent.
  • the currently in-progress skill, the foreground package name, and the player package name currently occupying the MediaSession all contain only one piece of information containing the application name, and the application name in the information can be directly used as the application name of the abstract intent.
  • the method of this embodiment of the present application further includes: performing an operation in response to the first speech according to the instantiated intent.
  • the voice assistant 110 can upload the obtained instantiated intent to the dialog management service module 130, and the dialog management service module 130 finds the relevant service according to the instantiated intent and returns the fulfillment result of the instantiated intent to the voice assistant 110, and the voice assistant 110 according to the instantiated intent
  • the fulfillment result controls the associated application or itself ultimately generates the response of the first speech (ie, output to the user or completes the task) to satisfy the user's intent.
  • Step S505 the dialog management service module 130 finds the relevant service according to the instantiated intent and returns the fulfillment result of the intent to the voice assistant 110 .
  • Step S507 the dialog management service module 130 returns a default result to the voice assistant 110, where the default result is pre-configured and used to respond to the unexecuted intent.
  • the voice assistant 110 uses the default result to generate a default response, which indicates that the voice assistant 110 cannot parse the user's intent, for example, outputs a prompt that the first voice cannot be responded, and the prompt can be a voice in natural language (for example, "I I can't understand what you mean, please say it again"), a page prompt, or a text answer in a fixed pattern.
  • a default response which indicates that the voice assistant 110 cannot parse the user's intent, for example, outputs a prompt that the first voice cannot be responded, and the prompt can be a voice in natural language (for example, "I I can't understand what you mean, please say it again"), a page prompt, or a text answer in a fixed pattern.
  • the voice assistant 110 uses the fulfillment result to control the application "Huawei Music" in the electronic device to start and present the search result GUI including the Hou Baolin cross talk list.
  • the user has manually searched for audio content in the audiobook APP.
  • Table 2 there is data in the user's APP usage record and the list of installed APPs, but there is no record of other users' usage data.
  • the intent decision can be made according to the user's APP usage record, that is, the application name of the abstract intent is determined.
  • the voice assistant 110 receives the data of the abstract intention, and judges that there is data in the APP usage record, but the application “Voice Assistant” ranked first in the APP usage record does not support the action or task of playing cross talk, but ranks second. If the application "Audio APP2" supports the action or task of playing cross talk, then the application name "Audio APP2" ranked second in the APP usage record is determined as the application name of the abstract intent, and the instantiated intent is obtained.
  • the voice assistant 110 uses the fulfillment result to control the application "Sound APP2" in the electronic device to start and display the playing interface and play Hou Baolin's cross talk.
  • the "use record of skills and intents in voice assistants" will contain multiple pieces of information, which are ordered according to a predetermined strategy.
  • the manner of determining the application name of the abstract intent by using the information in the "use record of skills and intents in the voice assistant” is the same as that of the first embodiment, and will not be repeated here.
  • the information in the "Use Records of Skills and Intentions in Voice Assistants” can be classified according to usage time (time from recent to far), usage duration (from long to short), usage times (from more to less), usage frequency ( From high to low), the user's use comments (from the number of negative comments to the most, the number of positive comments from the most to the least), etc., one or more sorting.
  • the user inputs a voice to the voice assistant 110 on the electronic device 101: "play the song boy", the voice assistant 110 collects the user's voice stream and uploads it to the ASR module 120, and the ASR module 120 performs voice recognition to obtain the recognized text of the voice and forwards it To the dialog management service module 130.
  • the voice assistant 110 receives the data of the above-mentioned abstract intentions, and judges that there is a record of "use records of skills and intentions in the voice assistant", but the first record “check the weather” in the "use records of skills and intentions in the voice assistant” is the same as The current abstract intent does not match, and the second-ranked record “Listening to a song using Huawei Music” matches the current abstract intent, then the second-ranked information in the "Use records of skills and intents in voice assistants"
  • the dialog management service module 130 finds a related service (for example, Huawei Music's music service) according to the data of the instantiated intent and returns the fulfillment result of the instantiated intent (for example, the song list of Huawei Music's song titled "Youth", the play GUI related data, etc.) to the voice assistant 110.
  • a related service for example, Huawei Music's music service
  • the voice assistant 110 uses the fulfillment result to control the application "Huawei Music” in the electronic device to start and display the play interface, and simultaneously play the song with the first or default song name "Youth” in the song list.
  • the user is using APP2 to play a sound program, and the voice assistant is in the foreground and performs intentions such as checking the weather and searching Wikipedia.
  • the user inputs a voice to the voice assistant 110 on the electronic device 101: "pause playback", the voice assistant 110 collects the user voice stream and uploads it to the ASR module 120, and the ASR module 120 performs voice recognition to obtain the recognized text of the voice and forwards it to the ASR module 120.
  • Dialog management service module 130 The user inputs a voice to the voice assistant 110 on the electronic device 101: "pause playback", the voice assistant 110 collects the user voice stream and uploads it to the ASR module 120, and the ASR module 120 performs voice recognition to obtain the recognized text of the voice and forwards it to the ASR module 120.
  • Dialog management service module 130 The user inputs a voice to the voice assistant 110 on the electronic device 101: "pause playback"
  • application name ⁇ returned by the semantic analysis service module 140
  • the information in the required slot ⁇ application name ⁇ of the data is missing, the dialog management service module 130 determines that this is an abstract intent, and sends the data of the abstract intent to the voice assistant 110 .
  • the voice assistant 110 receives the data of the above-mentioned abstract intent, finds that there is data in the "foreground package name" of the second priority, but it does not match the current abstract intent ⁇ pause playback ⁇ , and continues to judge the "currently occupying the playback of the MediaSession" of the third priority.
  • the dialog management service module 130 finds a related service (eg, the music service of APP2 with sound) according to the data of the instantiated intent, and returns the fulfillment result of the instantiated intent (eg, the content currently being played by APP2 with sound, the relevant data of the playing GUI, and paused) play instructions, etc.) to the voice assistant 110.
  • a related service eg, the music service of APP2 with sound
  • the fulfillment result of the instantiated intent eg, the content currently being played by APP2 with sound, the relevant data of the playing GUI, and paused
  • the voice assistant 110 uses the fulfillment result to control the application "Sound APP2" in the electronic device to pause the content currently being played and display the corresponding pause GUI.
  • the current user is manually opening the sound APP2 to play the sound, and the sound APP2 is in the foreground.
  • the user inputs a voice to the voice assistant 110 on the electronic device 101: "Search for Hou Baolin's cross talk", the voice assistant 110 collects the user's voice stream and uploads it to the ASR module 120, and the ASR module 120 performs voice recognition to obtain the recognized text of the voice. Will be forwarded to the dialog management service module 130 .
  • the dialogue management service module 130 finds related services (for example, the cross talk service of the voice APP2) according to the data of the instantiated intent, and returns the fulfillment result of the instantiated intent (for example, the Hou Baolin cross talk list, the relevant data of the search result GUI, etc.) to the voice Assistant 110.
  • related services for example, the cross talk service of the voice APP2
  • the fulfillment result of the instantiated intent for example, the Hou Baolin cross talk list, the relevant data of the search result GUI, etc.
  • the voice assistant 110 uses the fulfillment result to control the application "Sound APP2" in the electronic device to start and present the search result GUI including the Hou Baolin cross talk list.
  • the user is currently using the voice assistant to control the voiced APP2 to perform voiced intentions, such as searching for content and performing broadcast control operations.
  • the user inputs a voice to the voice assistant 110 on the electronic device 101: "Search for Hou Baolin's cross talk", the voice assistant 110 collects the user's voice stream and uploads it to the ASR module 120, and the ASR module 120 performs voice recognition to obtain the recognized text of the voice. Will be forwarded to the dialog management service module 130 .
  • the voice assistant 110 receives the data of the abstract intent, finds that the “currently in-progress skill” of the first priority exists and matches the current abstract intent ⁇ crosstalk search ⁇ , then directly assigns the name of the application recorded in the “currently in-progress skill”.
  • the dialogue management service module 130 finds related services (for example, the cross talk service of the voice APP2) according to the data of the instantiated intent, and returns the fulfillment result of the instantiated intent (for example, the Hou Baolin cross talk list, the relevant data of the search result GUI, etc.) to the voice Assistant 110.
  • related services for example, the cross talk service of the voice APP2
  • the fulfillment result of the instantiated intent for example, the Hou Baolin cross talk list, the relevant data of the search result GUI, etc.
  • the voice assistant 110 uses the fulfillment result to control the application "Sound APP2" in the electronic device to start and present the search result GUI including the Hou Baolin cross talk list.
  • the user inputs a voice to the voice assistant 110 on the electronic device 101: "continue", the voice assistant 110 collects the user voice stream and uploads it to the ASR module 120, and the ASR module 120 performs voice recognition to obtain the recognized text of the voice and forwards it to the dialogue Manage service module 130 .
  • application name ⁇ returned by the semantic analysis service module 140
  • the information in the required slot ⁇ application name ⁇ of the data is missing, the dialog management service module 130 determines that this is an abstract intent, and sends the data of the abstract intent to the voice assistant 110 .
  • the semantic parsing service module 140 can perform semantic parsing according to the context to determine that the user's intention is to ⁇ continue playing ⁇ .
  • the dialog management service module 130 finds the relevant service (for example, the service of Huawei Music) according to the data of the instantiated intent, and returns the fulfillment result of the instantiated intent (for example, the name of the currently paused media content and the instruction to continue playing, etc.) to the voice Assistant 110.
  • relevant service for example, the service of Huawei Music
  • fulfillment result of the instantiated intent for example, the name of the currently paused media content and the instruction to continue playing, etc.
  • the voice assistant 110 uses the fulfillment result to control the application "Huawei Music" in the electronic device to continue playing the currently paused media content.
  • the user inputs a voice to the voice assistant 110 on the electronic device 101: "pause", the voice assistant 110 collects the user voice stream and uploads it to the ASR module 120, and the ASR module 120 performs voice recognition to obtain the recognized text of the voice and forwards it to the dialogue Manage service module 130 .
  • application name ⁇ returned by the semantic analysis service module 140
  • the information in the required slot ⁇ application name ⁇ of the data is missing, the dialog management service module 130 determines that this is an abstract intent, and sends the data of the abstract intent to the voice assistant 110 .
  • the semantic parsing service module 140 may perform semantic parsing according to the context to determine that the user's intention is ⁇ pause play ⁇ .
  • the dialog management service module 130 finds a related service (for example, a service of Huawei Music) according to the data of the instantiated intent and returns the fulfillment result of the instantiated intent (for example, the name of the currently playing media content, the related data of the pause GUI and the pause playback instructions, etc.) to the voice assistant 110.
  • a related service for example, a service of Huawei Music
  • the fulfillment result of the instantiated intent for example, the name of the currently playing media content, the related data of the pause GUI and the pause playback instructions, etc.
  • the voice assistant 110 uses the fulfillment result to control the application "Huawei Music" in the electronic device to pause the playback of the current media content and display the corresponding pause GUI.
  • the user usage data is shown in Table 9 below.
  • the application name of the abstract intent can be determined according to the user usage data with the highest priority among the multiple types of user usage data matching the current abstract intent.
  • the user inputs a voice to the voice assistant 110 on the electronic device 101: "pause", same as the eighth embodiment, in this embodiment, the voice assistant 110 finally uses the fulfillment result to control the application "Huawei Music” in the electronic device. "Pause the current media content and display the corresponding pause GUI.
  • the user uses the wake-up word to open the third-party skill in the voice assistant: Xiaojing Baiwen. After the interaction of the skill is completed, the user voice input "exit”.
  • the user usage data is shown in Table 10 below.
  • the application name of the abstract intent can be determined according to the user usage data with the highest priority among the multiple types of user usage data matching the current abstract intent.
  • the user inputs a voice to the voice assistant 110 on the electronic device 101: "Exit”, the voice assistant 110 collects the user's voice stream and uploads it to the ASR module 120, and the ASR module 120 performs voice recognition to obtain the recognized text of the voice and forwards it to the dialogue Manage service module 130 .
  • the voice assistant 110 receives the data of the abstract intention, and finds that the "currently in-progress skill" of the first priority exists, and because the currently in-progress skill is the Xiaojing Hundred Questions skill and the skill is a multi-round dialogue skill (belonging to the executable skill).
  • Exit operation skill which matches the current abstract intent ⁇ exit ⁇ , then directly determine the application name "Xiaojing Baiwen” recorded in "Currently In Progress" as the application name of the current abstract intent, and get the instance
  • the data of the translation intention ⁇ exit: application name Xiaojing Baiqing of the voice assistant ⁇ and reported to the dialogue management service module 130 .
  • the dialog management service module 130 finds a related service (eg, knowledge service) according to the data of the instantiated intent, and returns the fulfillment result (eg, skill name, etc.) of the instantiated intent to the voice assistant 110 .
  • a related service eg, knowledge service
  • the voice assistant 110 uses the fulfillment result to control the exit of the third-party skill "Xiaojing Hundred Questions", that is, closes the interface of the skill "Xiaojing Hundred Questions”.
  • the user uses the voice assistant to open Huawei Music to listen to songs, and then asks the weather by voice, and then manually switches the Huawei Music APP to the foreground. At this time, the user enters the voice "exit".
  • the user usage data is shown in Table 11 below.
  • the application name of the abstract intent can be determined according to the user usage data with the highest priority among the multiple types of user usage data matching the current abstract intent.
  • the user inputs a voice to the voice assistant 110 on the electronic device 101: "Exit”, the voice assistant 110 collects the user's voice stream and uploads it to the ASR module 120, and the ASR module 120 performs voice recognition to obtain the recognized text of the voice and forwards it to the dialogue Manage service module 130 .
  • the voice assistant 110 receives the data of the abstract intention and finds that the "currently in-progress skill" of the first priority exists, but because the currently in-progress skill is Search Encyclopedia and the skill is a single-round dialogue skill (which is a non-executable exit operation).
  • the dialog management service module 130 finds a related service (eg, Huawei Music's service) according to the data of the instantiated intent, and returns the fulfillment result (eg, exit instruction, etc.) of the instantiated intent to the voice assistant 110 .
  • a related service eg, Huawei Music's service
  • the voice assistant 110 uses the fulfillment result to control the exit of the application "Huawei Music", and at the same time closes the interface of "Huawei Music”.
  • the user uses the voice assistant to open Huawei Music to listen to a song, and then asks the weather by voice, then manually kills the voice assistant process, and then says "exit" to the electronic device.
  • the user usage data is shown in Table 12 below.
  • the application name of the abstract intent can be determined according to the user usage data with the highest priority among the multiple types of user usage data matching the current abstract intent.
  • the user inputs a voice to the voice assistant 110 on the electronic device 101: "Exit”, the voice assistant 110 collects the user's voice stream and uploads it to the ASR module 120, and the ASR module 120 performs voice recognition to obtain the recognized text of the voice and forwards it to the dialogue Manage service module 130 .
  • the dialog management service module 130 finds a related service (eg, exit service of the voice assistant) according to the data of the instantiated intent, and returns the fulfillment result (eg, exit instruction, etc.) of the instantiated intent to the voice assistant 110 .
  • a related service eg, exit service of the voice assistant
  • the voice assistant 110 uses the fulfillment result to control itself to exit, and at the same time closes its own interface.
  • FIG. 6 shows an exemplary structure of an intention decision apparatus 600 provided by an embodiment of the present application.
  • the intention decision apparatus 600 of the embodiment of the present application may be applied to an electronic device, and may include:
  • a voice receiving unit 601 configured to receive a first voice input by a user that lacks key information
  • An abstract intent acquiring unit 602 configured to acquire an abstract intent of the first voice, where the abstract intent is an intent of missing at least one required slot information;
  • An intent decision unit 603 configured to make an intent decision on the abstract intent according to user usage data, and obtain an instantiated intent of the first voice, where the instantiated intent includes the required slot that is missing in the abstract intent information, and the user usage data includes at least historical usage data of the application.
  • the required slot information missing from the abstract intent includes an application name.
  • an intent decision unit configured to perform an intent decision on the abstract intent according to the user usage data to obtain the instantiated intent of the first voice, specifically including: determining the application name according to the user usage data; and, The abstract intent is completed by using the application name to obtain the instantiated intent of the first voice.
  • the intention decision unit 603 is configured to determine the application program name according to the user usage data, which specifically includes: determining the application program according to several preset types of the user usage data and their corresponding priorities. program name.
  • the intent decision unit 603 is configured to determine the application program name according to several preset types of the user usage data and their corresponding priorities, which specifically includes: judging whether there is a user usage of the Nth priority. data; if there is the user usage data of the Nth priority, determine the application name according to the user usage data of the Nth priority; if there is no user usage data of the Nth priority, determine whether it exists
  • the user of the Mth priority uses data; wherein, the Nth priority is higher than the Mth priority.
  • the user usage data includes one or more of the following types:
  • the priority of several types of the user usage data is:
  • the first priority the skill currently in progress
  • the second priority the front-end package name
  • the third priority the player package name currently occupying the MediaSession
  • the sixth priority the list of installed applications.
  • the first voice is a voice control instruction for media content
  • the recognized text of the voice control instruction is one or more of the following: search, play, pause, switch, continue, and exit.
  • the media content is one or more of the following: music, video, audiobooks, podcasts, radio stations, cross talk.
  • the intent decision apparatus 600 may further include: an intent execution unit 604, which may be configured to perform an operation in response to the first speech according to the instantiated intent.
  • FIG. 7 is a schematic structural diagram of an electronic device 700 provided by an embodiment of the present application.
  • the electronic device 700 includes: a processor 710 and a memory 720 .
  • the processor 710 can be connected with the memory 720 .
  • the memory 720 may be used to store the program codes and data. Therefore, the memory 720 may be an internal storage unit of the processor 710 , or may be an external storage unit independent of the processor 710 , or may include an internal storage unit of the processor 710 and an external storage unit independent of the processor 710 . part.
  • the electronic device 700 may further include a communication interface 730 and a bus 740 .
  • the memory 720 and the communication interface 730 may be connected to the processor 710 through the bus 740 .
  • the bus 740 For ease of representation, only one line is shown in FIG. 7, but it does not mean that there is only one bus or one type of bus. It should be understood that the communication interface 730 in the electronic device 700 shown in FIG. 7 can be used to communicate with other devices.
  • the processor 710 may adopt one or more central processing units (central processing units, CPU).
  • the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGAs off-the-shelf programmable gate arrays
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the processor 710 uses one or more integrated circuits to execute related programs, so as to implement the technical solutions provided by the embodiments of the present application.
  • the memory 720 which may include read-only memory and random access memory, provides instructions and data to the processor 710 .
  • a portion of processor 710 may also include non-volatile random access memory.
  • the processor 710 may also store device type information.
  • the processor 710 executes the computer-executed instructions in the memory 720 to execute the operation steps of the above method.
  • the electronic device 700 may correspond to corresponding subjects in executing the methods according to the various embodiments of the present application, and the above-mentioned and other operations and/or functions of the various modules in the electronic device 700 are respectively for the purpose of realizing the present application.
  • the corresponding processes of each method in the embodiment will not be repeated here.
  • FIG. 8 shows an example of the electronic device 700 , that is, the structure of the electronic device 800 .
  • the related structure of the electronic device 800 will be described below with reference to FIG. 8 .
  • the electronic device 800 has a processor 810 and an internal memory 890, and also has a wireless communication module 820, a speaker 831, a receiver 832, a microphone 833, a display screen 840, a camera 850, a physical button 860, and a gyro sensor 871 , acceleration sensor 872 , magnetic sensor 873 , touch sensor 874 , positioning device 880 .
  • the electronic device 800 includes other structural elements in addition to these structural elements, but the description thereof is omitted here.
  • Processor 810 may include one or more processing units.
  • the processor 810 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a flight controller, One or any combination of a video codec, a digital signal processor (DSP), a baseband processor, or a neural-network processing unit (NPU).
  • AP application processor
  • GPU graphics processing unit
  • ISP image signal processor
  • flight controller One or any combination of a video codec
  • DSP digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • different processing units may be independent devices, or may be integrated in one or more processors.
  • a memory may also be provided in the processor 810 for storing instructions and data.
  • the memory in processor 810 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 810 . If the processor 810 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided, and the waiting time of the processor 810 is reduced, thereby increasing the efficiency of the system.
  • the processor 810 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface or general-purpose One or any combination of serial bus (universal serial bus, USB) interfaces, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • Internal memory 890 may be used to store computer executable program code, which includes instructions.
  • the internal memory 890 may include a stored program area and a stored data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area can store data (such as audio data, phone book, etc.) created during the use of the portable device.
  • the internal memory 890 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 810 executes various functional applications and data processing of the electronic device 800 by executing instructions stored in the internal memory 890 and/or instructions stored in a memory provided in the processor.
  • the wireless communication module 820 is used to implement the wireless communication function of the electronic device 800, and the wireless communication function may typically include wireless communication functions such as 2G/3G/4G/5G, and may also include wireless local area networks (WLAN) (such as Wi-Fi network), ultra-wideband (Ultra Wide Band, UWB), Bluetooth (registered trademark), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), short-range wireless communication technology ( Near field communication, NFC), infrared technology (infrared, IR) and other wireless communication functions.
  • WLAN wireless local area networks
  • the speaker 831, the receiver 832 and the microphone 833 belong to the audio module, wherein the speaker 831 is used to provide the function of sound reproducing, the receiver 832 is also called the earpiece, and is used to provide the sound playback function in most cases, and the microphone 833 is used to receive the user's voice.
  • the display screen 840 is used to provide an image or video display function.
  • the display screen 840 is configured as a touch screen, that is, a touch sensor 874 is integrated therein, so that the user can perform desired operations by touching the display screen 840 .
  • the camera 850 is used to provide the function of capturing images or videos, and typically may include a front camera and a rear camera.
  • the physical keys 860 include, for example, an on/off key, a volume adjustment key, and the like.
  • the gyroscope sensor 871 may be used to determine the posture during the movement of the electronic device 800 .
  • the angular velocity of the portable device in the preset coordinate system can be determined by the gyro sensor 871 .
  • the acceleration sensor 872 can detect the movement direction and movement acceleration of the portable device.
  • the magnitude and direction of gravity can be detected when the portable device is stationary. It can also be used to recognize the posture of portable devices, and be used in applications such as pedometers.
  • the magnetic sensor 873 is used to convert the change of the magnetic properties of the sensitive element caused by external factors such as magnetic field, current, stress and strain, temperature, light, etc., into an electrical signal, and detect the corresponding physical quantity in this way.
  • the angle between the portable device and the four directions of the south, east, west and north can be measured by the magnetic sensor.
  • the positioning device 880 may provide a positioning function for the electronic device 800 by receiving signals of the global navigation satellite system.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
  • Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, is used to execute an intention decision-making method, and the method includes any of the solutions described in the foregoing embodiments. at least one of.
  • the computer storage medium of the embodiments of the present application may adopt any combination of one or more computer-readable media.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for performing the operations of the present application may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, but also conventional Procedural programming language - such as the "C" language or similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (eg, through the Internet using an Internet service provider) connect).
  • LAN local area network
  • WAN wide area network
  • Internet service provider an external computer

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种意图决策方法及设备、计算机可读存储介质。意图决策方法包括:接收用户输入的缺失关键信息的第一语音(S201);获得所述第一语音的抽象意图(S202),所述抽象意图是缺失至少一项必填槽位信息的意图;根据用户使用数据对所述抽象意图进行意图决策,获得所述第一语音的实例化意图(S203),所述实例化意图包含所述抽象意图中缺失的所述必填槽位信息,所述用户使用数据中至少包括应用程序的历史使用数据。该方法能够在用户输入的语音不完整的情况下准确高效地推断出用户意图,有效避免误判,提升用户体验。

Description

意图决策方法及设备、计算机可读存储介质 技术领域
本申请涉及人工智能领域中的人机对话技术,特别是指一种意图决策方法及设备、计算机可读存储介质。
背景技术
自然语言理解的语义分析过程中,意图识别最大的难点是如何准确的获取用户的真实意图。如果用户输入的语音文本不是完整的语句,自然语言理解(Natural Language Understanding,NLU)技术将很难解析出用户意图。
发明内容
鉴于现有技术的以上问题,本申请提供一种意图决策方法及设备、计算机可读存储介质,其能够在用户输入的语音不完整的情况下准确高效地推断出用户意图,有效避免误判,提升用户体验。
为达到上述目的,本申请第一方面提供了一种意图决策方法,应用于电子设备,所述方法包括:
接收用户输入的缺失关键信息的第一语音;
获得所述第一语音的抽象意图,所述抽象意图是缺失至少一项必填槽位信息的意图;
根据用户使用数据对所述抽象意图进行意图决策,获得所述第一语音的实例化意图,所述实例化意图包含所述抽象意图中缺失的所述必填槽位信息,所述用户使用数据中至少包括应用程序的历史使用数据。
由此,本申请实施例能够在语音不完整的情况下准确高效地推断用户意图以便给予用户及时准确地响应,有效避免因不合适的意图辅助决策而带来的误判,提升语音助手的用户体验。
作为第一方面的一种可能的实现方式,所述抽象意图中缺失的所述必填槽位信息包括应用程序名;所述根据用户使用数据对所述抽象意图进行意图决策,获得所述第一语音的实例化意图,具体包括:
根据所述用户使用数据确定所述应用程序名;
采用所述应用程序名补全所述抽象意图,获得所述第一语音的实例化意图。
由此,可在用户语音不包含应用程序相关信息的情况下,准确高效地推断用户意图以便控制相应应用程序给予用户及时准确地响应,从而提升用户体验。
作为第一方面的一种可能的实现方式,所述根据所述用户使用数据确定所述应用程序名,具体包括:根据预设的若干类型的所述用户使用数据及其对应的优先级,确定所述应用程序名。由此,可综合多种用户使用数据实现抽象意图的实例化,从而有 效提高意图决策的准确性和精准度。
作为第一方面的一种可能的实现方式,所述根据预设的若干类型的所述用户使用数据及其对应的优先级,确定所述应用程序名,具体包括:
判断是否存在第N优先级的用户使用数据;
若存在所述第N优先级的用户使用数据,根据所述第N优先级的用户使用数据确定所述应用程序名;
若不存在所述第N优先级的用户使用数据,判断是否存在第M优先级的用户使用数据;
其中,所述第N优先级高于所述第M优先级。
由此,可综合各类用户使用数据并结合优先级的配置实现抽象意图的实例化,进而有效提高意图决策的准确性和精准度。
作为第一方面的一种可能的实现方式,所述根据预设的若干类型的所述用户使用数据及其对应的优先级,确定所述应用程序名,具体包括:
判断是否存在第N优先级的用户使用数据;
若存在所述第N优先级的用户使用数据,判断所述第N优先级的用户使用数据是否与所述抽象意图匹配,在所述第N优先级的用户使用数据与所述抽象意图匹配时,根据所述第N优先级的用户使用数据确定所述应用程序名;
若不存在所述第N优先级的用户使用数据或者所述第N优先级的用户使用数据与所述抽象意图不匹配,判断是否存在第M优先级的用户使用数据;
其中,所述第N优先级高于所述第M优先级。
由此,可综合各类用户使用数据并结合优先级的配置及其与抽象意图的匹配情况,实现抽象意图的实例化,进一步有效提高意图决策的准确性和精准度。
作为第一方面的一种可能的实现方式,所述用户使用数据包括如下之一或多个类型:
当前进行中的技能;
前台包名;
当前占用MediaSession的播放器包名;
语音助手中技能和意图的使用记录;
应用程序使用记录;
已安装应用程序的列表。
由此,可将应用程序的历史使用数据和应用程序运行状态数据综合应用于意图决策中,进而提高意图决策的准确性和精准度。
作为第一方面的一种可能的实现方式,若干类型的所述用户使用数据的优先级为:
第一优先级,当前进行中的技能;
第二优先级,前台包名;
第三优先级,当前占用MediaSession的播放器包名;
第四优先级,语音助手中技能和意图的使用记录;
第五优先级,应用程序使用记录;
第六优先级,已安装应用程序的列表。
由此,可将应用程序的历史使用数据和应用程序运行状态数据按照预先配置的优先级综合应用于意图决策中,进而提高意图决策的准确性和精准度。
作为第一方面的一种可能的实现方式,所述第一语音是针对媒体内容的语音控制指令,所述语音控制指令的识别文字为如下之一或多项:搜索、播放、暂停、切换、继续、退出。由此,可通过语音助手精准响应针对各类应用程序中媒体内容的用户语音指示。
作为第一方面的一种可能的实现方式,所述媒体内容为如下之一或多项:音乐、视频、有声读物、播客、电台、相声。由此,可通过语音助手精准响应针对各类应用程序中各种类型媒体内容的用户语音指示。
作为第一方面的一种可能的实现方式,所述方法还包括:根据所述实例化意图执行响应于所述第一语音的操作。由此,可通过语音助手生成第一语音的响应以满足用户的意图。
本申请第二方面提供了一种电子设备,包括:
至少一个处理器;以及
至少一个存储器,其存储有程序指令,所述程序指令当被所述至少一个处理器执行时使得所述至少一个处理器执行上述的意图决策方法。
本申请第三方面提供了一种计算机可读存储介质,其上存储有程序指令,所述程序指令当被计算机执行时使得所述计算机执行上述的意图决策方法。
本发明的这些和其它方面在以下(多个)实施例的描述中会更加简明易懂。
附图说明
以下参照附图来进一步说明本申请的各个特征和各个特征之间的联系。附图均为示例性的,一些特征并不以实际比例示出,并且一些附图中可能省略了本申请所涉及领域的惯常的且对于本申请非必要的特征,或是额外示出了对于本申请非必要的特征,附图所示的各个特征的组合并不用以限制本申请。另外,在本说明书全文中,相同的附图标记所指代的内容也是相同的。具体的附图说明如下:
图1是本申请实施例所适用的示例性系统和环境的结构示意图。
图2是本申请实施例意图决策方法的流程示意图。
图3是本申请实施例根据用户使用数据进行意图决策的一示例性流程示意图。
图4是本申请实施例根据用户使用数据进行意图决策的另一示例性流程示意图。
图5是本申请实施例根据实例化意图执行响应于第一语音的操作的示例性流程示意图。
图6是本申请实施例意图决策装置的结构示意图。
图7是本申请实施例电子设备的结构示意图。
图8是本申请实施例电子设备的一种示例设备的结构示意图。
具体实施方式
说明书和权利要求书中的词语“第一、第二、第三等”或模块A、模块B、模块C 等类似用语,仅用于区别类似的对象,不代表针对对象的特定排序,可以理解地,在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。
在以下的描述中,所涉及的表示步骤的标号,如S201、S202……等,并不表示一定会按此步骤执行,在允许的情况下可以互换前后步骤的顺序,或同时执行。
说明书和权利要求书中使用的术语“包括”不应解释为限制于其后列出的内容;它不排除其它的元件或步骤。因此,其应当诠释为指定所提到的所述特征、整体、步骤或部件的存在,但并不排除存在或添加一个或更多其它特征、整体、步骤或部件及其组群。因此,表述“包括装置A和B的设备”不应局限为仅由部件A和B组成的设备。
本说明书中提到的“一个实施例”或“实施例”意味着与该实施例结合描述的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在本说明书各处出现的用语“在一个实施例中”或“在实施例中”并不一定都指同一实施例,但可以指同一实施例。此外,在一个或多个实施例中,能够以任何适当的方式组合各特定特征、结构或特性,如从本公开对本领域的普通技术人员显而易见的那样。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。如有不一致,以本说明书中所说明的含义或者根据本说明书中记载的内容得出的含义为准。另外,本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
为了准确地对本申请中的技术内容进行叙述,以及为了准确地理解本申请,在对具体实施方式进行说明之前先对本说明书中所使用的术语给出如下的解释说明或定义。
自然语言理解(Natural Language Understanding,NLU),一种使计算机理解人的自然语言的技术。
自动语音识别(Automatic Speech Recognition,ASR),一种将包含人声的语音转换为文本的技术。
MediaSession,安卓系统提供的一种媒体播放控制机制。
技能(skill),对应着现实生活中的实体,能够完成人能够感知的某项功能,可由第三方在已有平台、系统或应用程序(例如,语音助手平台)中开发。比如,电话技能对应着生活中电话的功能,查天气技能对应着生活中查询天气的功能。
意图,提供解析用户输入而获得的用户期望。通常,可以认为意图是技能下面的子功能,比如打电话、挂断电话是电话技能的意图。此外,也可以认为技能是意图相关的功能项。
槽位,是额外完成意图对应的动作所需的参数,比如打电话给联系人,联系人是一个槽位,需要和意图一起解析。技能、意图、槽位通常是基于经验设计的,没有客观的标准,一般对应日常生活中实体的功能。
服务(Service),启动应用程序需要找到该应用程序对应的服务,以便借由该服务启动应用程序或执行应用程序内的控制操作。
履行结果(fulfilment),调用程序(例如,应用程序的API)执行意图的实现逻辑的过程称为履行,履行结果通常包含了程序执行意图的实现逻辑所获得的结果,可 以是指令、呈现数据集、网页数据等。比如,“使用华为音乐播放侯宝林的相声”这一意图,其履行结果可包括侯宝林相声列表、播放界面的统一资源定位器(Uniform Resource Locator,URL)等华为音乐呈现相应界面所需的数据。再比如,“查询北京今天的天气”这一意图,其履行结果包括指示北京今天天气的数据和查询结果的语音指令等语音助手需要呈现天气查询结果的数据。
下面,首先对现有技术进行分析:
现有技术一:
1)直接根据用户语音的识别文本基于NLU的语义分析能力决策出用户的真实意图,如用户语音对应的识别文本为:“查询南京今天的天气”,则NLU可以准确的获取用户的真实意图是查天气意图,并能够提取出槽位{位置:南京}、{时间:今天}。
2)支持多轮对话的技能,在对话管理服务中维护对话的上下文信息,在对话进行过程中可以基于对话的上下文信息推导出用户的真实意图。如用户语音的识别文本为:“查询南京今天的天气”,返回响应给电子设备后,用户接着输入语音:“上海呢”,则对话管理服务可以推断出用户的真实意图是查天气意图,并能够提取出槽位{位置:上海}、{时间:今天}。
3)根据前台包名进行辅助判断。如用户语音的识别文本为:“我想听歌曲少年”,如果当前华为音乐应用程序在前台,则对话管理服务可以推断出用户的真实意图是播放音乐,并能够提取出必填槽位{歌曲名:少年}、{应用名:华为音乐}。上述应用程序在前台,通常可以理解为应用程序在前台运行,用户可通过用户图形界面(GUI)与应用程序进行交互,是一种与应用程序在后台运行相对的状态。通常,同一时刻下至多有一个应用程序在前台运行,可以有零至多个应用程序在后台运行。
现有技术一所存在的缺陷如下:简单根据前台包名判断只能适用于应用程序在前台运行的场景。比如,如果用户打开了华为音乐在听歌,然后又打开了浏览器,这时用户输入语音:“我要听少年”,由于“华为音乐”已不在前台运行、前台包名不是华为音乐而是浏览器,此时对话管理服务将不能准确推断出用户的真实意图。
现有技术二:
在音视频场景下,如果应用程序有使用MediaSession的能力,则可以根据MediaSession通道占用进行辅助判断。比如用户语音:“暂停”、“暂停播放”,如果当前MediaSession通道被华为音乐占用,则对话管理服务可以推断出用户的真实意图是暂停播放华为音乐正在播放的内容。
现有技术二所存在的缺陷如下:只能适用于使用了MediaSession机制且当前正在使用MediaSession的多媒体播放应用程序,针对不支持MediaSession机制或者支持MediaSession机制但当前没有在使用MediaSession的应用程序是无效的。
上述两种相关技术,仅能够通过前台包名、正在使用MediaSession等状态数据来推断用户的真实意图。
基于现有技术所存在的缺陷,本申请提供了一种意图决策方法及设备、计算机可读存储介质,其在接收到用户输入的不完整语音时,根据用户使用数据对缺失了必填槽位信息的抽象意图进行决策,获得包含该必填槽位信息的实例化意图,该实例化意图可直接执行,由此,本申请实施例能够在语音不完整的情况下准确高效地推断用户 意图以便给予用户及时准确地响应,可作为现有的直接语义意图解析和使用对话上下文进行多轮对话意图解析的重要补充,有效避免因不合适的意图辅助决策而带来的误判,提升语音助手的用户体验。
本申请实施例可应用于各类人机交互场景,例如人机对话场景、通过自然语言控制电子设备中应用程序或系统功能的场景、通过自然语言控制电子设备提供内容的场景等。
图1示出了本申请实施例所适用的语音助理系统100及其环境的架构示意图。该语音助理系统100可以是通过解析用户输入的自然语言语音确定用户意图,并且基于用户意图执行动作或任务以控制应用程序向用户提供符合其意图的响应的任何信息处理系统。
参见图1所示,语音助理系统100可包括:语音助手110、语音识别模块120、对话管理服务模块130、语义解析服务模块140。
语音助手110可配置为响应于预设语句被唤醒,接收用户输入的语音并将该语音上报给语音识别模块120,以及根据对话管理服务模块130的反馈执行动作或完成任务以控制应用程序或由自身向用户提供符合其意图的响应。
语音识别模块120提供用户语音转文本的能力,可配置为进行语音识别并将识别获得的文本转发给对话管理服务模块130。
对话管理服务模块130提供对用户语音意图进行编排和上下文管理的能力,其可配置为在需要对文本进行语义识别时将文本转发给语义解析服务模块140,以及根据语义解析服务模块140返回的意图和槽位信息找到相关服务并获得履行结果,将相关服务和履行结果返回语音助手110。语音助手110进而可根据相关服务和履行结果,执行动作或完成任务。
语义解析服务模块140提供根据用户语音文本解析意图和槽位的能力,可配置为对语音识别模块120识别获得的文本进行语义解析,以获得意图和槽位信息并将其发送给对话管理服务模块130。
一些示例中,语音助手110可配置在电子设备101上,同时电子设备101上还可配置有多种支持语音控制的应用程序,包括但不限于媒体内容提供类应用、即时消息类应用、移动支付类应用、应用商店等。其中,媒体内容提供类应用是可通过语音唤醒、触发并执行某项功能和/或退出的应用程序。参见图1所示,语音控制类应用可包括音乐播放应用程序、提供有声读物的有声APP、移动支付APP、浏览器APP等。
一些示例中,语音识别模块120、对话管理服务模块130、语义解析服务模块140可配置于服务器102中。语音识别模块120可通过具备语音识别能力的机器学习模型(例如,ASR模型)来实现,语义解析服务模块140可支持NLU等语义解析技术。其他示例中,语音识别模块120、对话管理服务模块130、语义解析服务模块140中之一或多项也可配置于电子设备101中或分别配置于不同的服务器102中。对此,本申请实施例不作限制。
电子设备101可为任何合适的电子设备。例如,电子设备可为便携式多功能设备(例如,下面图8所描述的电子设备)或个人电子设备。便携式多功能设备可为包含诸如音乐播放器功能、信息查询功能、无线通信功能和/或图像采集功能的移动电话、笔 记本电脑、平板电脑、AR眼镜、智能手环、带屏音响等。一些示例中,电子设备101可为非便携式多功能设备。例如,电子设备101可为台式计算机、一体机、游戏机、电视或电视机顶盒。电子设备101的操作系统具有管理用户的应用程序使用历史的能力。电子设备101、服务器102以及各类服务(例如,音乐服务、有声内容服务等)之间可通过网络进行通信。若意图涉及应用程序,对话管理服务模块130需要在收到实例化意图之后找到相应的服务,并通过网络与相应服务通信以履行意图相关的处理,例如启动应用程序或执行应用程序内控制操作等,并获得来自相应服务的履行结果。
关于电子设备101的具体实现方式参见下文相关描述,此处不再赘述。
图2示出了本申请实施例中意图决策方法的示例性流程,应用于上述的电子设备101,该方法的示例性流程可包括如下步骤:
步骤S201,接收用户输入的缺失关键信息的第一语音;
步骤S202,获得第一语音的抽象意图,所述抽象意图是缺失至少一项必填槽位信息的意图;
步骤S203,根据用户使用数据对所述抽象意图进行意图决策,获得第一语音的实例化意图,实例化意图包含所述抽象意图中缺失的所述必填槽位信息,用户使用数据中至少包括应用程序的历史使用数据。
第一语音是指用户输入的自然语言语音。语音助手110处于后台运行状态、正在与用户进行第N轮(N为大于或等于1的整数)对话或者其他任何能够接收或响应用户输入的状态时,均可接收第一语音。若语音助手110处于休眠状态或未启动状态,也可接收第一语音,只需在第一语音中带有能够触发语音助手的词语或语句即可。举例来说,若语音助手110处于休眠状态或未启动状态,用户可输入如下的第一语音“小e,小e,搜索侯宝林的相声”,即可唤醒/启动语音助手,进而电子设备执行本申请实施例的方法。若语音助手110已被唤醒,用户可直接输入如下的第一语音“搜索侯宝林的相声”。
第一语音可以是无法从中获得可执行意图的语音。一些示例中,第一语音可以是缺失了关键信息的语句或词语或单字,此时,无法通过解析第一语音得到可执行意图。例如,如果用户输入的语音是“搜索侯宝林的相声”,其包含了关键信息“意图:搜索相声”和“表演者:侯宝林”,但关键信息“应用程序名”是缺失的,语义解析服务模块140无法通过解析该语音对应的文本获得可执行意图,因此该语音“搜索侯宝林的相声”属于本申请实施例的“第一语音”。如果用户输入的语音是“使用华为音乐搜索侯宝林的相声”,其包含了关键信息“意图:搜索相声”、“表演者:侯宝林”和“应用程序名:华为音乐”,语义解析服务模块140可以通过解析该语音的识别文本获得可执行的实例化意图{搜索相声:表演者=侯宝林、应用程序名=华为音乐},因此该语音“使用华为音乐搜索侯宝林的相声”不属于本申请实施例的“第一语音”。类似的,语音“播放许巍的蓝莲花”、“暂停”、“播放”、“继续”、“退出”、“切”、“切换到下一首”、“返回到上一个节目”、“重播”,均属于所述“第一语音”。
第一语音可以是针对应用程序或语音助手110中技能的语音控制指令,该语音控制指令可用于控制应用程序的启动或退出、应用程序中内容的控制(例如,继续、播放、暂停、切换)、语音助手110中技能的启动或退出、语音助手110中技能的内容 控制(例如,查天气、知识问答等技能的暂停或切换)。这里,应用程序可以是任何支持语音控制的应用程序。例如,应用程序可以是但不限于音乐播放应用程序、视频播放应用程序、有声读物应用程序、播客、电台或其他任何支持语音控制的应用程序。语音助手110中技能可以是但不限于知识问答、查天气等。
第一语音可以是针对媒体内容的语音控制指令,这些媒体内容的控制需要相关应用程序或语音助手110中相关技能的参与。一些示例中,第一语音可以是媒体的如下语音控制指令中之一或多项:搜索、播放、暂停、切换、继续、退出。一些示例中,媒体内容可以是但不限于音乐、视频、有声读物、电台、播客、相声或其他类似的内容。例如,一媒体内容可以是一首歌曲、一首曲子、一本有声书或其段落、一段相声、一档电台节目或其某一集、一集播客等等,诸如此类。媒体内容的信息可包括媒体内容的名称、发布者、创作者、表演者、时长、文件格式(例如,MP4)等。
抽象意图(也可称为模糊意图)是指程序无法给出明确实现逻辑的意图,可由语义解析服务模块140通过解析第一语音的识别文本而获得。抽象意图中至少一项必填槽位信息缺失。一些示例中,抽象意图可以是至少一项槽位信息缺失的意图且缺失的必填槽位信息中至少一项无法通过预先设置的默认值补全。其他示例中,抽象意图可以是至少一项槽位信息缺失的意图但该缺失的必填槽位信息可通过预先设置的默认值补全。特别地,抽象意图可以是意图执行程序(例如,应用程序或语音助手的技能)无法通过例如默认设置等合理方式进行确认的意图。抽象意图的具体定义可根据需要自由设定,其可以是上述的各种意图,只要其至少一项必填槽位信息是缺失的,即可认为是抽象意图。
举例来说,从第一语音“暂停”、“播放”、“继续”、“搜索歌曲少年”中获得的意图“{暂停}”、“{播放}”、“{搜索}”、“{搜索歌曲}”,其必填槽位{歌手}、{应用程序名}均是缺失的,这些意图就属于抽象意图。再例如,用户输入语音“今天天气怎么样”,尽管通过对该语音的识别文本进行语义解析所得到的查天气意图中必填槽位{位置}的信息是缺失的,但通过诸如GPS定位或者预先配置的默认位置等可以确定必填槽位{位置}的值是“深圳”,说明该意图的必填槽位{位置}可以通过默认值或预设方式补全,这样的意图可根据需要设置为属于抽象意图或不属于抽象意图。
实例化意图(也可称为可执行意图)是指程序能够给出明确实现逻辑的意图,其必填槽位信息完整,或者说其所有的必填槽位信息都不缺失,也即其包含了抽象意图中缺失的必填槽位信息。实例化意图可由语义解析服务模块140通过解析包含有完整信息的语音的识别文本获得,或者,可由语义解析服务模块140通过解析第一语音的识别文本、并进一步由语音助手110进行意图决策而获得。例如,从语音“使用华为音乐播放许巍的蓝莲花”中获得的意图{播放音乐:歌手=许巍;歌曲名=蓝莲花;应用程序名=华为音乐},该意图中包含了所有的必填槽位信息,该意图的实现逻辑清晰明确,可直接执行,这样的意图就属于实例化意图。
意图决策是指实例化抽象意图的过程。若抽象意图中某个或某些必填槽位信息缺失且,意图决策可以包括补全该必填槽位信息的过程,即根据用户使用数据确定必填槽位信息并补全抽象意图。例如,若抽象意图中的必填槽位{应用程序名}缺失,意图决策可以包括:根据用户使用数据确定抽象意图的应用程序名;以及,采用所述应用 程序名补全所述抽象意图,获得第一语音的实例化意图。可以理解,实例化抽象意图的任何方法或过程均应包含在本文的“意图决策”中,不限于这些示例。
意图决策可以获得实例化意图。若通过意图决策获得了实例化意图,可以直接将该实例化意图的数据交由对话管理服务模块130进行后续处理(例如,查询服务等)以执行相应的动作或任务,进而向用户提供对应第一语音的响应。若通过意图决策未获得实例化意图,可以通过例如发起下一轮对话、交由对话管理服务模块130进行处理等各种方式来继续实例化抽象意图或者直接向用户提供默认响应。例如,用户输入的第一语音是“搜索侯宝林的相声”,其抽象意图为:{搜索相声:表演者=侯宝林;应用程序名=?},该抽象意图的必填槽位{应用程序名}的信息缺失。经语音助手110意图决策后获得的实例化意图为{搜索相声:表演者=侯宝林;应用程序名=华为音乐},语音助手110将该实例化意图上传给对话管理服务模块130,对话管理服务模块130查询“华为音乐”的相关服务并向语音助手110返回“搜索侯宝林相声”的履行结果,语音助手110基于“搜索侯宝林相声”的履行结果启动应用程序“华为音乐”并显示包含侯宝林相声搜索结果的“华为音乐”界面。
用户使用数据包括各种可用于意图决策的用户数据。用户使用数据可以包括应用程序的历史使用数据。这里,历史使用数据可包括多种类型,例如,用户使用应用程序而产生的应用程序使用记录、用户使用语音助手而产生的技能使用记录、用户使用语音助手110而产生的意图使用记录等。这些使用记录统称存储在电子设备101中,可由电子设备101的操作系统或相关应用程序记录并存储到本地。此外,用户使用数据还可包括电子设备的应用程序运行状态数据。例如,电子设备的应用程序运行状态数据可包括但不限于前台包名、当前占用MediaSession的播放器包名、语音助手110中当前进行中的技能等。
用户使用数据可包括与用户使用电子设备中各应用程序、各客户端(例如,语音助手、邮件)、模块(例如,视频播放模块、通信模块、照片模块)等的相关数据。一些实施例中,用户的使用数据可包括但不限于应用程序相关数据、语音助手110的意图数据、和/或语音助手110的技能数据。其中,应用程序相关数据可以包括应用程序的当前运行状态、使用记录等,语音助手110的意图数据可以包括用户的意图使用记录,该意图使用记录中包含用户已使用意图的相关信息(例如,意图类型)。语音助手110中的技能数据包括用户的技能使用记录,该技能使用记录可包括技能标识等信息。使用数据可通过各种可适用的方式来获取。例如,语音助手110可直接从电子设备的操作系统的相关日志中读取应用程序使用记录、应用程序运行状态等,语音助手110的意图数据和技能数据可直接从语音助手110的预配置存储空间中读取。
一些示例中,用户使用数据可包括如下之一或多个类型:当前进行中的技能、前台包名、当前占用MediaSession的播放器包名、语音助手中技能和意图的使用记录、应用程序使用记录、已安装应用程序的列表。可以理解,用户使用数据的具体类型及其具体内容均可根据需要适应性调整,对于用户使用数据的具体内容及其获取方式,本申请不作限制。
根据用户的使用数据进行意图决策的具体实现方法可以有多种。一些实施例中,可以通过优先级不同的多类使用数据来进行意图决策。仍以缺失必填槽位{应用程序 名}的抽象意图为例,其意图决策中确定应用程序名的步骤可包括:根据预设的若干类型的用户使用数据及其对应的优先级,确定应用程序名。这里,用户使用数据的类型、具体内容及其优先级可根据需要事先约定或预先配置。
下面示例性地说明通过优先级不同的多类用户使用数据进行意图决策的实现过程。
意图决策的示例性实现过程可包括如下步骤:
步骤1),设定用户使用数据的类型及其优先级;
例如,本步骤中,若干类型的用户使用数据的优先级为如下:
第一优先级,当前进行中的技能;
第二优先级,前台包名;
第三优先级,当前占用MediaSession的播放器包名;
第四优先级,语音助手110的技能和意图使用记录(可以按照时间从近到远或其他各种适用的方式排序);
第五优先级,应用程序使用记录(可按照时间从近到远或者其他各种适用的方式排序)。
第六优先级,已安装应用程序的列表。
其中,第一优先级最高,第六优先级最低,第一优先级~第六优先级逐级降低。
步骤2),根据当前的用户使用数据及其类型、优先级进行意图决策,例如,确定抽象意图中缺失的必填槽位{应用程序名}。
本步骤的第一种实现方式中可包括:判断电子设备中是否存在第N优先级的用户使用数据。若电子设备中存在所述第N优先级的用户使用数据,根据所述第N优先级的用户使用数据确定所述应用程序名。若电子设备中不存在所述第N优先级的用户使用数据,判断所述电子设备中是否存在第M优先级的用户使用数据。其中,第N优先级高于所述第M优先级。
图3示出了第一种实现方式的示例性具体实现流程。参见图3,先判断第一优先级的用户使用数据“当前进行中的技能”是否存在(即其中是否有数据),若存在,则使用“当前进行中的技能”确定抽象意图的应用程序名(也即,决策出实例化意图);若第一优先级的用户使用数据不存在,则继续判断第二优先级的用户使用数据“前台包名”是否存在,若存在,则使用“前台包名”确定抽象意图的应用程序名,若第二优先级的用户使用数据不存在,则继续判断第三优先级的用户使用数据“当前占用MediaSession的播放器包名”是否存在。如此类推,直到第六优先级的用户使用数据“已安装应用程序(APP)的列表”,判断“已安装应用程序的列表”是否存在,若存在,则使用“已安装应用程序的列表”确定抽象意图的应用程序名,若第六优先级的用户使用数据仍不存在,则表明无法获得该抽象意图的应用程序名,也即无法决策出实例化意图。
一些实现方式中,通过优先级不同的若干类型用户使用数据确定抽象意图的应用程序名时,还需判断该用户使用数据与抽象意图是否匹配,也即该用户使用数据确定的应用程序是否支持抽象意图的动作或任务。具体地,本步骤的第二种实现方式可包括:判断电子设备中是否存在第N优先级的用户使用数据。若所述电子设备中存在第 N优先级的用户使用数据,判断第N优先级的用户使用数据是否与抽象意图匹配,在第N优先级的用户使用数据与抽象意图匹配时,根据第N优先级的用户使用数据确定应用程序名。若电子设备中不存在第N优先级的用户使用数据或者第N优先级的用户使用数据与抽象意图不匹配,判断电子设备中是否存在第M优先级的用户使用数据;其中,第N优先级高于第M优先级。
图4示出了本步骤第二种实现方式的示例性实现流程。参见图4,先判断第一优先级的用户使用数据“当前进行中的技能”是否存在(即其中是否有数据),若存在,则继续判断“当前进行中的技能”中的信息与抽象意图是否匹配,即“当前进行中的技能”的信息中记录的应用程序是否支持抽象意图的动作或任务,匹配(即其记录的应用程序支持抽象意图的动作或任务)则使用“当前进行中的技能”确定抽象意图的应用程序名(也即,决策出实例化意图),不匹配(即其记录的应用程序不支持抽象意图的动作或任务)或者“当前进行中的技能”不存在则继续下一优先级的用户使用数据“前台保密”的判断,如此类推,直到第六优先级的用户使用数据“已安装应用程序的列表”,判断“已安装应用程序的列表”是否存在,若存在,则继续判断“已安装应用程序的列表”与抽象意图是否匹配,即使用“已安装应用程序的列表”中的信息确定的应用程序是否支持抽象意图的动作或任务,匹配则使用“已安装应用程序的列表”中的该条信息确定抽象意图的应用程序名,若“已安装应用程序的列表”仍不存在或者与抽象意图不匹配(即“已安装应用程序的列表”中包含的所有信息对应的应用程序均不支持抽象意图的动作或任务),则表明无法获得该抽象意图的应用程序名,也即无法决策出实例化意图。
本实施例不仅综合各类用户使用数据并结合优先级的配置实现了抽象意图的实例化,而且在用户使用数据与抽象意图匹配时才将使用其确定抽象意图的应用程序名,不仅支持用户使用数据的优先级、类型的灵活配置,而且可有效提高意图决策的准确性和精准度。
使用用户使用数据确定抽象意图的应用程序名可以包括如下两种:
1)若某一类用户使用数据仅包含一条包含应用程序名的信息,可直接使用该信息中记录的应用程序名作为抽象意图的应用程序名。例如,当前进行中的技能、前台包名、当前占用MediaSession的播放器包名,均仅包含一条包含应用程序名的信息,可直接使用该信息中的应用程序名作为抽象意图的应用程序名。
2)若某一类用户使用数据中包含多条包含应用程序名的信息,可按照其中信息的排序选择一条信息并使用所选择的信息中记录的应用程序名作为抽象意图的应用程序名。例如,语音助手中技能和意图的使用记录、应用程序使用记录、已安装应用程序的列表一般都会包含多条包含应用程序名的信息,此时就需要从中选择一条信息来用于确定抽象意图的应用程序名。举例来说,“语音助手中技能和意图的使用记录”中包含了多条信息,这些信息按照时间从近到远排序,可以选择排序最靠前的一条信息来确定抽象意图的应用程序名。对于其他包含多条信息的用户应用数据而言,其处理方法与此类似,不再赘述。此外,还可采用随机选择、根据默认值等多种方式进行信息的选择,以用于确定抽象意图的应用程序名。
一些示例中,若用户使用数据中包含多条包含应用程序名的信息,可选择应用程 序与抽象意图匹配的各条信息中排序最靠前的一条信息,以该信息中记录的应用程序名作为抽象意图的应用程序名。实际应用中,可通过各种可适用的方法来实现此处信息的选择。例如,假若用户使用数据中的信息已排序,可以从排序最靠前的信息开始逐条执行应用程序与抽象意图的匹配判断。再例如,若用户使用数据中的信息尚未排序,可先按照预定策略(将在下文实施例中详述)对其中的信息进行排序,再从排序最靠前的信息开始逐条执行应用程序与抽象意图的匹配判断。由此,可高效快速并准确地决策出抽象意图中缺失的应用程序名,进而获得符合用户期望的实例化意图。
本申请实施例中,步骤S201~步骤S203可通过语音助手110执行。步骤S202中,语音助手110可将第一语音上传给系统100中的语音识别模块120,依次经过语音识别模块120的语音识别、对话管理服务模块130的判定、语义解析服务模块140的语义解析,得到第一语音的抽象意图,对话管理服务模块130将该抽象意图返回给语音助手110。
一些实施例中,在步骤S203之后,本申请实施例方法还包括:根据实例化意图执行响应于第一语音的操作。具体地,语音助手110可将获得的实例化意图上传给对话管理服务模块130,对话管理服务模块130根据实例化意图找到相关服务并返回实例化意图的履行结果给语音助手110,语音助手110根据该履行结果控制相关的应用程序或自身最终生成第一语音的响应(即,输出至用户或完成任务)以满足用户的意图。
这里,第一语音的响应可以包括音频、视觉和/或触觉形式的输出,该输出由语音助手110直接提供或者由语音助手110控制相关应用程序(例如,华为音乐、有声APP)提供。例如,可将输出提供为语音、声音、警报、文本消息、菜单、图形、视频、动画、振动、和/或以上两者或更多者的组合。
具体地,图5示出了步骤S203之后系统100的示例性执行流程,其包括:
步骤S501,语音助手110对抽象意图进行意图决策,判断是否获得了实例化意图,若获得实例化意图,则继续步骤S502,若未获得实例化意图,则继续步骤S503。
步骤S502,语音助手110发送实例化意图给对话管理服务模块130,继续步骤S505。
步骤S503,语音助手110发送抽象意图给对话管理服务模块130,表示无法决策。
步骤S504,若对话管理服务模块130收到的是抽象意图,对话管理服务模块130可根据预先设定的配置值使用默认值实例化该抽象意图以获得其实例化意图,并判断是否获得了实例化意图,若获得实例化意图则继续步骤S505,若没有获得实例化意图则继续步骤S507。
步骤S505,对话管理服务模块130根据实例化意图找到相关服务并返回意图的履行结果给语音助手110。
步骤S506,语音助手110利用该履行结果控制自身或相关应用程序生成第一语音的响应,以满足用户意图。
步骤S507,对话管理服务模块130向语音助手110返回默认结果,该默认结果预先配置,用于响应无法执行的意图。
步骤S508,语音助手110利用默认结果生成默认响应,该默认响应表示语音助 手110无法解析用户意图,例如,输出无法响应第一语音的提示,该提示可以是自然语言形式的语音(例如,“我无法理解您的意思,请再说一遍”)、页面提示或固定模式的文字回答。
本申请实施例的方法可适用于各种支持语音控制的场景。例如,应用程序的控制、应用程序所提供内容的控制等,详细细节可参见下文实施例。
下面举例说明本申请实施例方法的实现过程。以用户对着电子设备上的语音助手说“暂停播放”为例:
语音助手110收集用户语音,将用户语音上传给语音识别模块120。语音识别模块120进行语音转文本,然后将识别出来的文本转发给对话管理服务模块130。对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140。对话管理服务模块130根据语义解析服务模块140返回的意图数据{暂停播放:应用程序名=?},判断该意图中必填槽位{应用程序名}缺失,确定该意图是抽象意图,则将意图的数据下发给语音助手110。语音助手110结合电子设备101中用户的使用数据对抽象意图进行意图决策。
若语音助手110经意图决策能够得到实例化意图{暂停播放}和槽位({应用名:华为音乐}),则将该实例化意图和槽位上报给对话管理服务模块130。对话管理服务模块130根据实例化意图找到相关服务并返回意图的履行结果给语音助手110。
若语音助手110经意图决策未能得到实例化意图,则可直接返回抽象意图给对话管理服务模块130,表示无法决策。对话管理服务模块130则根据预先设定的配置值使用默认值(例如,听音乐场景下,使用华为音乐APP作为默认值)实例化抽象意图以获得实例化意图,进而根据实例化的意图找到相关服务并返回意图的履行结果给语音助手110。
最后,语音助手110利用对话管理服务模块130返回的履行结果控制“华为音乐”应用程序暂停其正在播放的媒体内容。
下面结合具体应用场景对本申请实施例方法的各种示例性实现方式进行详细说明。
第一实施例
用户首次使用语音助手或者首次使用有声应用,如下表1所示,除“已安装应用程序的列表”之外的所有类型的用户使用数据均无记录。
通常,已安装应用程序的列表中会包含多条应用程序信息,这些应用程序信息按照预定策略排序。可按照排序从前到后的顺序逐条判断其应用程序是否支持抽象意图的动作或任务(即其应用程序与抽象意图是否匹配),以找到其应用程序支持抽象意图的动作或任务中排序最靠前的应用程序信息,使用该应用程序信息中包含的应用程序名作为抽象意图的应用程序名。当然,还可采用其他策略,例如从已安装应用程序的列表中支持抽象意图的动作或任务的所有应用程序信息中选默认值、随机选择。对此,本实施例不作限制。这里,已安装应用程序的列表中的应用程序信息可按照使用时间、使用时长、使用次数、使用频率、用户的使用评论等之一或多项排序。
表1
Figure PCTCN2022082424-appb-000001
Figure PCTCN2022082424-appb-000002
用户对着电子设备101上的语音助手110输入一条语音:“搜索侯宝林的相声”,语音助手110收集用户语音流上传给ASR模块120,ASR模块120进行语音识别获得该条语音的识别文本并将转发给对话管理服务模块130。
对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140,对话管理服务模块130根据语义解析服务模块140返回的意图数据{相声搜索:作者=侯宝林;应用程序名=},识别该意图数据的必填槽位{应用程序名}中的信息缺失,对话管理服务模块130确定这属于抽象意图,将该抽象意图的数据下发给语音助手110。
语音助手110接收抽象意图的数据,将已安装APP的列表中排在首位的应用程序名“华为音乐”确定为该抽象意图的应用程序名,得到实例化意图的数据{相声搜索:表演者=侯宝林;应用程序名=华为音乐}并上报给对话管理服务模块130。
对话管理服务模块130根据实例化意图的数据找到相关服务(例如,相声服务)并返回该实例化意图的履行结果(例如,侯宝林相声列表、搜索结果GUI的相关数据等)给语音助手110。
语音助手110利用该履行结果控制电子设备中的应用程序“华为音乐”启动并呈现包含有侯宝林相声列表的搜索结果GUI。
第二实施例
用户手动在有声读物APP搜索过有声内容。此时,如下表2所示,用户的APP使用记录和已安装APP的列表中均有数据,但其他用户使用数据均无记录。此时,因用户的APP使用记录优先级高于已安装APP的列表,可根据用户的APP使用记录进行意图决策,即确定抽象意图的应用程序名。
通常,APP使用记录中会包含多条应用程序信息,这些应用程序信息按照预定策略排序。使用APP使用记录确定抽象意图的应用程序名的方式与第一实施例中的方式相同,不再赘述。同样地,APP使用记录中的APP信息可以按照使用时间、使用时长、使用次数、使用频率、用户的使用评论等之一或多项排序。
表2
Figure PCTCN2022082424-appb-000003
Figure PCTCN2022082424-appb-000004
用户对着电子设备101上的语音助手110输入一条语音:“播放侯宝林的相声”,语音助手110收集用户语音流上传给ASR模块120,ASR模块120进行语音识别获得该条语音的识别文本并将转发给对话管理服务模块130。
对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140,对话管理服务模块130根据语义解析服务模块140返回的意图数据{相声播放:表演者=侯宝林;应用程序名=},识别该意图数据的必填槽位{应用程序名}中的信息缺失,对话管理服务模块130确定这属于抽象意图,将抽象意图的数据下发给语音助手110。
语音助手110接收抽象意图的数据,判断APP使用记录中存在数据,但APP使用记录中排在第一位的应用程序“语音助手”不支持相声播放这一动作或任务,而排在第二位的应用程序“有声APP2”支持相声播放这一动作或任务,则将APP使用记录中排在第二位的应用程序名“有声APP2”确定为该抽象意图的应用程序名,得到实例化意图的数据{相声播放:表演者=侯宝林;应用程序名=有声APP2}并上报给对话管理服务模块130。
对话管理服务模块130根据实例化意图的数据找到相关服务(例如,有声APP2的相声服务)并返回该实例化意图的履行结果(例如,有声APP2的侯宝林相声列表、播放GUI的相关数据等)给语音助手110。
语音助手110利用该履行结果控制电子设备中的应用程序“有声APP2”启动并显示播放界面同时播放侯宝林的相声。
第三实施例
用户利用语音助手唤醒华为音乐并使用华为音乐听过音乐。此时,如下表3所示,用户的“语音助手中技能和意图的使用记录”、“APP使用记录”和“已安装APP的列表”中均有数据,但其他用户使用数据中无数据。此时,用户的“语音助手中技能和意图的使用记录”优先级最高,可根据用户的“语音助手中技能和意图的使用记录”进行意图决策,即确定抽象意图的应用程序名。
通常,“语音助手中技能和意图的使用记录”中会包含多条信息,这些信息按照预定策略排序。使用“语音助手中技能和意图的使用记录”中的信息确定抽象意图的应用程序名的方式与第一实施例的方式相同,不再赘述。同样地,“语音助手中技能和意 图的使用记录”中的信息可以按照使用时间(时间由近到远)、使用时长(由长到短)、使用次数(由多到少)、使用频率(由高到低)、用户的使用评论(由差评数量少到多、好评数量由多到少)等之一或多项排序。
表3
Figure PCTCN2022082424-appb-000005
用户对着电子设备101上的语音助手110输入一条语音:“播放歌曲少年”,语音助手110收集用户语音流上传给ASR模块120,ASR模块120进行语音识别获得该条语音的识别文本并将转发给对话管理服务模块130。
对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140,对话管理服务模块130根据语义解析服务模块140返回的意图数据{歌曲播放:歌名=少年;应用程序名=},识别该意图数据的必填槽位{应用程序名}中的信息缺失,对话管理服务模块130确定这属于抽象意图,将抽象意图的数据下发给语音助手110。
语音助手110接收上述抽象意图的数据,判断“语音助手中技能和意图的使用记录”存在记录,但“语音助手中技能和意图的使用记录”中排在第一位的记录“查天气”与当前抽象意图不匹配,而排在第二位的记录“使用华为音乐听歌曲”与当前的抽象意图匹配,则将“语音助手中技能和意图的使用记录”中排在第二位的信息“使用华为音乐听歌曲”中记录的应用程序名“华为音乐”确定为当前抽象意图的应用程序名,得到实例化意图的数据{歌曲播放:歌名=少年;应用程序名=华为音乐}并上报给对话管理服务模块130。
对话管理服务模块130根据实例化意图的数据找到相关服务(例如,华为音乐的音乐服务)并返回该实例化意图的履行结果(例如,华为音乐的歌名为“少年”的歌曲列表、播放GUI的相关数据等)给语音助手110。
语音助手110利用该履行结果控制电子设备中的应用程序“华为音乐”启动并显示 播放界面同时播放歌曲列表中排在首位或默认的歌名为“少年”的歌曲。
第四实施例
用户正在使用APP2播放有声节目,语音助手处于前台并执行了查天气、搜百科等意图。
此时,如下表4所示,用户的“前台包名”、“当前占用MediaSession的播放器包名”、“语音助手中技能和意图的使用记录”、“APP使用记录”和“已安装APP的列表”中均有数据,但其他用户使用数据中无数据。此时,尽管“前台包名”的优先级最高,但其与当前抽象意图不匹配,因此,使用“当前占用MediaSession的播放器包名”来确定抽象意图的应用程序名。
表4
Figure PCTCN2022082424-appb-000006
用户对着电子设备101上的语音助手110输入一条语音:“暂停播放”,语音助手110收集用户语音流上传给ASR模块120,ASR模块120进行语音识别获得该条语音的识别文本并将转发给对话管理服务模块130。
对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140,对话管理服务模块130根据语义解析服务模块140返回的意图数据{暂停播放:应用程序名=},识别该意图数据的必填槽位{应用程序名}中的信息缺失,对话管理服务模块130确定这属于抽象意图,将抽象意图的数据下发给语音助手110。
语音助手110接收上述抽象意图的数据,发现第二优先级的“前台包名”存在数据,但其与当前抽象意图{暂停播放}不匹配,继续判断第三优先级的“当前占用MediaSession的播放器包名”是否存在数据、及其是否与当前抽象意图匹配,发现“当前占用MediaSession的播放器包名”存在且与当前抽象意图匹配,则将当前占用 MediaSession的播放器包名”记录的应用程序名“有声APP2”确定为当前抽象意图的应用程序名,得到实例化意图的数据{暂停播放:应用程序名=有声APP2}并上报给对话管理服务模块130。
对话管理服务模块130根据实例化意图的数据找到相关服务(例如,有声APP2的音乐服务)并返回该实例化意图的履行结果(例如,有声APP2当前正在播放的内容、播放GUI的相关数据以及暂停播放指令等)给语音助手110。
语音助手110利用该履行结果控制电子设备中的应用程序“有声APP2”暂停其当前正在播放的内容同时显示相应的暂停播放GUI。
第五实施例
当前用户正在手动打开有声APP2播放有声,有声APP2处于前台。
此时,如下表5所示,用户的“前台包名”、“当前占用MediaSession的播放器包名”、“语音助手中技能和意图的使用记录”、“APP使用记录”和“已安装APP的列表”中均有数据。此时,因用户的“前台包名”优先级最高且其与当前抽象意图匹配,因此,根据“前台包名”确定抽象意图的应用程序名。
表5
Figure PCTCN2022082424-appb-000007
用户对着电子设备101上的语音助手110输入一条语音:“搜索侯宝林的相声”,语音助手110收集用户语音流上传给ASR模块120,ASR模块120进行语音识别获得该条语音的识别文本并将转发给对话管理服务模块130。
对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140,对话管理服务模块130根据语义解析服务模块140返回的意图数据{相声搜索:表演者=侯宝林;应用程序名=},识别该意图数据的必填槽位{应用程序名}中的信息缺失,对话管理服务模块130确定这属于抽象意图,将抽象意图的数据下发给语音助手110。
语音助手110接收抽象意图的数据,发现第二优先级的“前台包名”存在且与当前抽象意图{相声搜索}匹配,则直接将“前台包名”中记录的应用程序名“有声APP2”确定为该抽象意图的应用程序名,得到实例化意图的数据{相声搜索:表演者=侯宝林;应用程序名=有声APP2}并上报给对话管理服务模块130。
对话管理服务模块130根据实例化意图的数据找到相关服务(例如,有声APP2的相声服务)并返回该实例化意图的履行结果(例如,侯宝林相声列表、搜索结果GUI的相关数据等)给语音助手110。
语音助手110利用该履行结果控制电子设备中的应用程序“有声APP2”启动并呈现包含有侯宝林相声列表的搜索结果GUI。
第六实施例
用户当前正使用语音助手控制有声APP2执行有声意图,如搜内容,执行播控操作。
此时,如下表6所示,用户的“当前进行中的技能”、“前台包名”、“当前占用MediaSession的播放器包名”、“语音助手中技能和意图的使用记录”、“APP使用记录”和“已安装APP的列表”中均有数据。此时,因用户的“当前进行中的技能”优先级最高且与抽象意图匹配,因此,可根据“当前进行中的技能”确定抽象意图的应用程序名。
用户对着电子设备101上的语音助手110输入一条语音:“搜索侯宝林的相声”,语音助手110收集用户语音流上传给ASR模块120,ASR模块120进行语音识别获得该条语音的识别文本并将转发给对话管理服务模块130。
对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140,对话管理服务模块130根据语义解析服务模块140返回的意图数据{相声搜索:表演者=侯宝林;应用程序名=},识别该意图数据的必填槽位{应用程序名}中的信息缺失,对话管理服务模块130确定这属于抽象意图,将抽象意图的数据下发给语音助手110。
语音助手110接收抽象意图的数据,发现第一优先级的“当前进行中的技能”存在且与当前抽象意图{相声搜索}匹配,则直接将“当前进行中的技能”中记录的应用程序名“有声APP2”确定为该抽象意图的应用程序名,得到实例化意图的数据{相声搜索:表演者=侯宝林;应用程序名=有声APP2}并上报给对话管理服务模块130。
对话管理服务模块130根据实例化意图的数据找到相关服务(例如,有声APP2的相声服务)并返回该实例化意图的履行结果(例如,侯宝林相声列表、搜索结果GUI的相关数据等)给语音助手110。
语音助手110利用该履行结果控制电子设备中的应用程序“有声APP2”启动并呈现包含有侯宝林相声列表的搜索结果GUI。
表6
Figure PCTCN2022082424-appb-000008
Figure PCTCN2022082424-appb-000009
第七实施例
华为音乐当前已经暂停播放,用户打开浏览器正在浏览新闻,此时用户对着电子设备说“继续”。此时,用户使用数据如下表7所示。其中,用户的“当前进行中的技能”、“前台包名”、“当前占用MediaSession的播放器包名”、“语音助手中技能和意图的使用记录”、“APP使用记录”和“已安装APP的列表”中均有数据。此时,可以根据与当前抽象意图相匹配的多类用户使用数据中优先级最高的用户使用数据来确定抽象意图的应用程序名。
用户对着电子设备101上的语音助手110输入一条语音:“继续”,语音助手110收集用户语音流上传给ASR模块120,ASR模块120进行语音识别获得该条语音的识别文本并将转发给对话管理服务模块130。
对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140,对话管理服务模块130根据语义解析服务模块140返回的意图数据{继续播放:应用程序名=},识别该意图数据的必填槽位{应用程序名}中的信息缺失,对话管理服务模块130确定这属于抽象意图,将抽象意图的数据下发给语音助手110。这里,虽然文本中只有“继续”,但语义解析服务模块140可根据上下文进行语义解析可以确定用户意图是{继续播放}。
语音助手110接收抽象意图的数据,发现第一优先级的“当前进行中的技能”和第二优先级的“前台包名”都存在且均与当前抽象意图{继续播放}不匹配,继续判断第三优先级的“当前占用MediaSession的播放器包名”是否存在数据及其是否与当前抽象意图匹配,发现“当前占用MediaSession的播放器包名”存在且其与当前抽象意图匹配,则将“当前占用MediaSession的播放器包名”记录的应用程序名“华为音乐”确定为当前抽象意图的应用程序名,得到实例化意图的数据{继续播放:应用程序名=华为音乐}并上报给对话管理服务模块130。
对话管理服务模块130根据实例化意图的数据找到相关服务(例如,华为音乐的服务)并返回该实例化意图的履行结果(例如,当前被暂停播放媒体内容的名称和继 续播放指令等)给语音助手110。
语音助手110利用该履行结果控制电子设备中的应用程序“华为音乐”继续播放当前暂停的媒体内容。
表7
Figure PCTCN2022082424-appb-000010
第八实施例
华为音乐当前在前台播放,用户此时输入语音“暂停”。此时,用户使用数据如下表8所示。其中,用户的“当前进行中的技能”、“前台包名”、“当前占用MediaSession的播放器包名”、“语音助手中技能和意图的使用记录”、“APP使用记录”和“已安装APP的列表”中均有数据。此时,可以根据与当前抽象意图相匹配的多类用户使用数据中优先级最高的用户使用数据来确定抽象意图的应用程序名。
表8
Figure PCTCN2022082424-appb-000011
Figure PCTCN2022082424-appb-000012
用户对着电子设备101上的语音助手110输入一条语音:“暂停”,语音助手110收集用户语音流上传给ASR模块120,ASR模块120进行语音识别获得该条语音的识别文本并将转发给对话管理服务模块130。
对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140,对话管理服务模块130根据语义解析服务模块140返回的意图数据{暂停播放:应用程序名=},识别该意图数据的必填槽位{应用程序名}中的信息缺失,对话管理服务模块130确定这属于抽象意图,将抽象意图的数据下发给语音助手110。这里,虽然文本中只有“暂停”,但语义解析服务模块140可根据上下文进行语义解析来确定用户意图是{暂停播放}。
语音助手110接收抽象意图的数据,发现第一优先级的“当前进行中的技能”存在且与当前抽象意图{暂停播放}匹配,则直接将“当前进行中的技能”中记录的应用程序名“华为音乐”确定为当前抽象意图的应用程序名,得到实例化意图的数据{暂停播放:应用程序名=华为音乐}并上报给对话管理服务模块130。
对话管理服务模块130根据实例化意图的数据找到相关服务(例如,华为音乐的服务)并返回该实例化意图的履行结果(例如,当前正在播放的媒体内容的名称、暂停播放GUI的相关数据和暂停播放指令等)给语音助手110。
语音助手110利用该履行结果控制电子设备中的应用程序“华为音乐”暂停播放当前媒体内容同时显示相应的暂停播放GUI。
第九实施例
华为音乐当前手工被拉起在前台,电子设备的播放器当前在使用有声APP2播放有声节目。用户此时输入语音:”暂停”。
此时,用户使用数据如下表9所示。其中,用户的“当前进行中的技能”、“前台包名”、“当前占用MediaSession的播放器包名”、“语音助手中技能和意图的使用记录”、“APP使用记录”和“已安装APP的列表”中均有数据。此时,可以根据与当前抽象意图相匹配的多类用户使用数据中优先级最高的用户使用数据来确定抽象意图的应用程序名。
表9
Figure PCTCN2022082424-appb-000013
Figure PCTCN2022082424-appb-000014
用户对着电子设备101上的语音助手110输入一条语音:“暂停”,与第八实施例相同地,本实施例最终也是由语音助手110利用该履行结果控制电子设备中的应用程序“华为音乐”暂停播放当前媒体内容同时显示相应的暂停播放GUI。
需要说明的是,当前实际是有声APP2在占用MediaSession通道,用户很可能是期望暂停有声APP2中正在播放的有声节目,尽管本实施例的决策结果可能存在误判,但符合预期。
第十实施例
用户使用唤醒词打开语音助手中的第三方技能:晓鲸百问,在该技能交互完成后,用户语音输入“退出”。
此时,用户使用数据如下表10所示。其中,用户的“当前进行中的技能”、“前台包名”、“当前占用MediaSession的播放器包名”、“语音助手中技能和意图的使用记录”、“APP使用记录”和“已安装APP的列表”中均有数据。此时,可以根据与当前抽象意图相匹配的多类用户使用数据中优先级最高的用户使用数据来确定抽象意图的应用程序名。
表10
Figure PCTCN2022082424-appb-000015
Figure PCTCN2022082424-appb-000016
用户对着电子设备101上的语音助手110输入一条语音:“退出”,语音助手110收集用户语音流上传给ASR模块120,ASR模块120进行语音识别获得该条语音的识别文本并将转发给对话管理服务模块130。
对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140,对话管理服务模块130根据语义解析服务模块140返回的意图数据{退出:应用程序名=},识别该意图数据的必填槽位{应用程序名}中的信息缺失,对话管理服务模块130确定这属于抽象意图,将抽象意图的数据下发给语音助手110。
语音助手110接收该抽象意图的数据,发现第一优先级的“当前进行中的技能”存在,且由于当前进行中的技能为晓鲸百问技能且该技能是多轮对话技能(属于可执行退出操作的技能),其与当前抽象意图{退出}匹配,则直接将“当前进行中的技能”中记录的应用程序名“晓鲸百问”确定为当前抽象意图的应用程序名,得到实例化意图的数据{退出:应用程序名=语音助手的晓鲸百问}并上报给对话管理服务模块130。
对话管理服务模块130根据实例化意图的数据找到相关服务(例如,知识服务)并返回该实例化意图的履行结果(例如,技能名称等)给语音助手110。
语音助手110利用该履行结果控制自身的第三方技能“晓鲸百问”退出,即关闭技能“晓鲸百问”的界面。
第十一实施例
用户使用语音助手打开华为音乐在听歌,然后又语音问天气,之后手工将华为音乐APP切换到前台,此时,用户输入语音“退出”。
此时,用户使用数据如下表11所示。其中,用户的“当前进行中的技能”、“前台包名”、“当前占用MediaSession的播放器包名”、“语音助手中技能和意图的使用记录”、“APP使用记录”和“已安装APP的列表”中均有数据。此时,可以根据与当前抽象意图相匹配的多类用户使用数据中优先级最高的用户使用数据来确定抽象意图的应用程序名。
表11
Figure PCTCN2022082424-appb-000017
Figure PCTCN2022082424-appb-000018
用户对着电子设备101上的语音助手110输入一条语音:“退出”,语音助手110收集用户语音流上传给ASR模块120,ASR模块120进行语音识别获得该条语音的识别文本并将转发给对话管理服务模块130。
对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140,对话管理服务模块130根据语义解析服务模块140返回的意图数据{退出:应用程序名=},识别该意图数据的必填槽位{应用程序名}中的信息缺失,对话管理服务模块130确定这属于抽象意图,将抽象意图的数据下发给语音助手110。
语音助手110接收该抽象意图的数据,发现第一优先级的“当前进行中的技能”存在,但由于当前进行中的技能为搜百科且该技能是单轮对话技能(属于不可执行退出操作的技能),其与当前抽象意图{退出}不匹配,继续第二优先级“前台包名”是否存在数据、及其是否与当前抽象意图匹配,发现“前台包名”存在数据且与当前抽象意图匹配,则将“前台包名”记录的应用程序名“华为音乐”确定为当前抽象意图的应用程序名,得到实例化意图的数据{退出:应用程序名=华为音乐}并上报给对话管理服务模块130。
对话管理服务模块130根据实例化意图的数据找到相关服务(例如,华为音乐的服务)并返回该实例化意图的履行结果(例如,退出指令等)给语音助手110。
语音助手110利用该履行结果控制应用程序“华为音乐”退出,同时关闭“华为音乐”的界面。
第十二实施例
用户使用语音助手打开华为音乐在听歌,然后又语音问天气,然后手动杀死语音助手进程,然后对着电子设备说“退出”。
此时,用户使用数据如下表12所示。其中,用户的“前台包名”、“当前占用MediaSession的播放器包名”、“语音助手中技能和意图的使用记录”、“APP使用记录”和“已安装APP的列表”中均有数据。此时,可以根据与当前抽象意图相匹配的多类用户使用数据中优先级最高的用户使用数据来确定抽象意图的应用程序名。
表12
Figure PCTCN2022082424-appb-000019
Figure PCTCN2022082424-appb-000020
用户对着电子设备101上的语音助手110输入一条语音:“退出”,语音助手110收集用户语音流上传给ASR模块120,ASR模块120进行语音识别获得该条语音的识别文本并将转发给对话管理服务模块130。
对话管理服务模块130判定需要进行语义识别,则将文本转发给语义解析服务模块140,对话管理服务模块130根据语义解析服务模块140返回的意图数据{退出:应用程序名=},识别该意图数据的必填槽位{应用程序名}中的信息缺失,对话管理服务模块130确定这属于抽象意图,将抽象意图的数据下发给语音助手110。
语音助手110接收该抽象意图的数据,发现第二优先级的“前台包名”存在且其与当前抽象意图{退出}匹配,则将“前台包名”记录的应用程序名“语音助手”确定为当前抽象意图的应用程序名,得到实例化意图的数据{退出:应用程序名=语音助手}并上报给对话管理服务模块130。
对话管理服务模块130根据实例化意图的数据找到相关服务(例如,语音助手的退出服务)并返回该实例化意图的履行结果(例如,退出指令等)给语音助手110。
语音助手110利用该履行结果控制自身退出,同时关闭自身界面。
图6示出了本申请实施例提供的意图决策装置600的示例性结构。参见图6所示,本申请实施例的意图决策装置600可应用于电子设备,其可包括:
语音接收单元601,配置为接收用户输入的缺失关键信息的第一语音;
抽象意图获取单元602,配置为获得第一语音的抽象意图,所述抽象意图是缺失至少一项必填槽位信息的意图;
意图决策单元603,配置为根据用户使用数据对所述抽象意图进行意图决策,获得所述第一语音的实例化意图,所述实例化意图包含所述抽象意图中缺失的所述必填槽位信息,所述用户使用数据中至少包括应用程序的历史使用数据。
一些示例中,所述抽象意图中缺失的所述必填槽位信息包括应用程序名。意图决策单元,配置为所述根据用户使用数据对所述抽象意图进行意图决策,获得所述第一语音的实例化意图,具体包括:根据所述用户使用数据确定所述应用程序名;以及,采用所述应用程序名补全所述抽象意图,获得所述第一语音的实例化意图。
一些示例中,意图决策单元603是配置为根据所述用户使用数据确定所述应用程序名,具体包括:根据预设的若干类型的所述用户使用数据及其对应的优先级,确定所述应用程序名。
一些示例中,意图决策单元603是配置为根据预设的若干类型的所述用户使用数据及其对应的优先级,确定所述应用程序名,具体包括:判断是否存在第N优先级的用户使用数据;若存在所述第N优先级的用户使用数据,根据所述第N优先级的用户使用数据确定所述应用程序名;若不存在所述第N优先级的用户使用数据,判断是否存在第M优先级的用户使用数据;其中,所述第N优先级高于所述第M优先级。
一些示例中,意图决策单元603是配置为根据预设的若干类型的所述用户使用数据及其对应的优先级,确定所述应用程序名,具体包括:判断是否存在第N优先级的用户使用数据;若存在所述第N优先级的用户使用数据,判断所述第N优先级的用户使用数据是否与所述抽象意图匹配,在所述第N优先级的用户使用数据与所述抽象意图匹配时,根据所述第N优先级的用户使用数据确定所述应用程序名;若不存在所述第N优先级的用户使用数据或者所述第N优先级的用户使用数据与所述抽象意图不匹配,判断是否存在第M优先级的用户使用数据;其中,所述第N优先级高于所述第M优先级。
一些示例中,所述用户使用数据包括如下之一或多个类型:
当前进行中的技能;
前台包名;
当前占用MediaSession的播放器包名;
语音助手中技能和意图的使用记录;
应用程序使用记录;
已安装应用程序的列表。
一些示例中,若干类型的所述用户使用数据的优先级为:
第一优先级,当前进行中的技能;
第二优先级,前台包名;
第三优先级,当前占用MediaSession的播放器包名;
第四优先级,语音助手中技能和意图的使用记录;
第五优先级,应用程序使用记录;
第六优先级,已安装应用程序的列表。
一些示例中,第一语音是针对媒体内容的语音控制指令,所述语音控制指令的识别文字为如下之一或多项:搜索、播放、暂停、切换、继续、退出。
一些示例中,媒体内容为如下之一或多项:音乐、视频、有声读物、播客、电台、相声。
一些示例中,所述意图决策装置600还可包括:意图执行单元604,可配置为根据实例化意图执行响应于所述第一语音的操作。
图7是本申请实施例提供的一种电子设备700的结构性示意性图。该电子设备700包括:处理器710、存储器720。其中,该处理器710可以与存储器720连接。该存储器720可以用于存储该程序代码和数据。因此,该存储器720可以是处理器710 内部的存储单元,也可以是与处理器710独立的外部存储单元,还可以是包括处理器710内部的存储单元和与处理器710独立的外部存储单元的部件。
可选的,电子设备700还可以包括通信接口730和总线740。其中,存储器720、通信接口730可以通过总线740与处理器710连接。为便于表示,图7中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。应理解,图7所示的电子设备700中的通信接口730可以用于与其他设备之间进行通信。
应理解,在本申请实施例中,处理器710可以采用一个或多个中央处理单元(central processing unit,CPU)。该处理器还可以是其它通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate Array,FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。或者该处理器710采用一个或多个集成电路,用于执行相关程序,以实现本申请实施例所提供的技术方案。
该存储器720可以包括只读存储器和随机存取存储器,并向处理器710提供指令和数据。处理器710的一部分还可以包括非易失性随机存取存储器。例如,处理器710还可以存储设备类型的信息。
在电子设备700运行时,所述处理器710执行所述存储器720中的计算机执行指令执行上述方法的操作步骤。
应理解,根据本申请实施例的电子设备700可以对应于执行根据本申请各实施例的方法中的相应主体,并且电子设备700中的各个模块的上述和其它操作和/或功能分别为了实现本实施例各方法的相应流程,为了简洁,在此不再赘述。
图8示出了电子设备700的一种示例即电子设备800的结构。下面参照图8对电子设备800的相关结构进行说明。
如图7所示,电子设备800具有处理器810与内部存储器890,另外,还具有无线通信模块820、扬声器831、受话器832、麦克风833、显示屏840、摄像头850、物理按键860、陀螺仪传感器871、加速度传感器872、磁传感器873、触摸传感器874、定位装置880。另外,除了这些结构要素之外,电子设备800还包括其他结构要素,但在这里省略了对其的说明。
处理器810可以包括一个或多个处理单元。例如:处理器810可以包括应用处理器(application processor,AP)、调制解调处理器、图形处理器(graphics processing unit,GPU)、图像信号处理器(image signal processor,ISP)、飞行控制器、视频编解码器、数字信号处理器(digital signal processor,DSP)、基带处理器或神经网络处理器(neural-network processing unit,NPU)等中的一个或任意组合。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
处理器810中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器810中的存储器为高速缓冲存储器。该存储器可以保存处理器810刚用过或循环使用的指令或数据。如果处理器810需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器810的等待时间,因而提高了系统的效率。
作为一个实施例,处理器810可以包括一个或多个接口。接口可以包括集成电路 (inter-integrated circuit,I2C)接口、集成电路内置音频(inter-integrated circuit sound,I2S)接口、脉冲编码调制(pulse code modulation,PCM)接口、通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口、移动产业处理器接口(mobile industry processor interface,MIPI)、通用输入输出(general-purpose input/output,GPIO)接口、用户标识模块(subscriber identity module,SIM)接口或通用串行总线(universal serial bus,USB)接口等中的一个或任意组合。
内部存储器890可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器890可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储便携设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器890可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、通用闪存存储器(universal flash storage,UFS)等。处理器810通过运行存储在内部存储器890中的指令和/或存储在设置于处理器中的存储器的指令,执行电子设备800的各种功能应用以及数据处理。
无线通信模块820用于实现电子设备800的无线通信功能,该无线通信功能典型地可以包括2G/3G/4G/5G等无线通信功能,此外还可以包括无线局域网(wireless local area networks、WLAN)(如Wi-Fi网络)、超宽带(Ultra Wide Band、UWB)、蓝牙(注册商标)、全球导航卫星系统(global navigation satellite system、GNSS)、调频(frequency modulation、FM)、近距离无线通信技术(near field communication、NFC)、红外技术(infrared、IR)等无线通信功能。
扬声器831、受话器832和麦克风833属于音频模块,其中,扬声器831用于提供声音外放功能,受话器832也叫听筒,用于在多数情况下提供声音播放功能,麦克风833用于接收用户的语音。
显示屏840用于提供图像或视频显示功能,另外,作为一个典型的例子,显示屏840构成为触摸屏,即其中集成了触摸传感器874,使用户可以通过触摸显示屏840而执行所需的操作。
摄像头850用于提供拍摄图像或视频的功能,典型地可以包括前置摄像头和后置摄像头。
物理按键860例如包括开关机键、音量调节键等。
陀螺仪传感器871可以用于确定电子设备800的运动过程中的姿态。在一些实施例中,可以通过陀螺仪传感器871确定便携设备在预设坐标系中的角速度。
加速度传感器872可检测便携设备的运动方向和运动加速度。当便携设备静止时可检测出重力的大小及方向。还可以用于识别便携设备的姿态,应用于计步器等应用。
磁传感器873用于把磁场、电流、应力应变、温度、光等外界因素引起敏感元件磁性能变化转换成电信号,以这种方式来检测相应物理量的器件。在一些实施例中,通过磁传感器可以测量出便携设备与东南西北四个方向的夹角。
定位装置880可以通过接收全球导航卫星系统的信号来为电子设备800提供定位功能。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单 元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时用于执行一种意图决策方法,该方法包括上述各个实施例所描述的方案中的至少之一。
本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是,但不限于,电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号, 其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括、但不限于无线、电线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,均属于本申请保护范畴。

Claims (12)

  1. 一种意图决策方法,应用于电子设备,其特征在于,所述方法包括:
    接收用户输入的缺失关键信息的第一语音;
    获得所述第一语音的抽象意图,所述抽象意图是缺失至少一项必填槽位信息的意图;
    根据用户使用数据对所述抽象意图进行意图决策,获得所述第一语音的实例化意图,所述实例化意图包含所述抽象意图中缺失的所述必填槽位信息,所述用户使用数据中至少包括应用程序的历史使用数据。
  2. 根据权利要求1所述的方法,其特征在于,所述抽象意图中缺失的所述必填槽位信息包括应用程序名;所述根据用户使用数据对所述抽象意图进行意图决策,获得所述第一语音的实例化意图,具体包括:
    根据所述用户使用数据确定所述应用程序名;
    采用所述应用程序名补全所述抽象意图,获得所述第一语音的实例化意图。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述用户使用数据确定所述应用程序名,具体包括:根据预设的若干类型的所述用户使用数据及其对应的优先级,确定所述应用程序名。
  4. 根据权利要求3所述的方法,其特征在于,所述根据预设的若干类型的所述用户使用数据及其对应的优先级,确定所述应用程序名,具体包括:
    判断是否存在第N优先级的用户使用数据;
    若存在所述第N优先级的用户使用数据,根据所述第N优先级的用户使用数据确定所述应用程序名;
    若不存在所述第N优先级的用户使用数据,判断是否存在第M优先级的用户使用数据;
    其中,所述第N优先级高于所述第M优先级。
  5. 根据权利要求3所述的方法,其特征在于,所述根据预设的若干类型的所述用户使用数据及其对应的优先级,确定所述应用程序名,具体包括:
    判断是否存在第N优先级的用户使用数据;
    若存在所述第N优先级的用户使用数据,判断所述第N优先级的用户使用数据是否与所述抽象意图匹配,在所述第N优先级的用户使用数据与所述抽象意图匹配时,根据所述第N优先级的用户使用数据确定所述应用程序名;
    若不存在所述第N优先级的用户使用数据或者所述第N优先级的用户使用数据与所述抽象意图不匹配,判断是否存在第M优先级的用户使用数据;
    其中,所述第N优先级高于所述第M优先级。
  6. 根据权利要求3-5中任一项所述的方法,其特征在于,所述用户使用数据包括如下之一或多个类型:
    当前进行中的技能;
    前台包名;
    当前占用MediaSession的播放器包名;
    语音助手中技能和意图的使用记录;
    应用程序使用记录;
    已安装应用程序的列表。
  7. 根据权利要求3-5中任一项所述的方法,其特征在于,若干类型的所述用户使用数据的优先级为:
    第一优先级,当前进行中的技能;
    第二优先级,前台包名;
    第三优先级,当前占用MediaSession的播放器包名;
    第四优先级,语音助手中技能和意图的使用记录;
    第五优先级,应用程序使用记录;
    第六优先级,已安装应用程序的列表。
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述第一语音是针对媒体内容的语音控制指令,所述语音控制指令的识别文字为如下之一或多项:
    搜索、播放、暂停、切换、继续、退出。
  9. 根据权利要求8所述的方法,其特征在于,所述媒体内容为如下之一或多项:
    音乐、视频、有声读物、播客、电台、相声。
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述方法还包括:
    根据所述实例化意图执行响应于所述第一语音的操作。
  11. 一种电子设备,其特征在于,包括:
    至少一个处理器;以及
    至少一个存储器,其存储有程序指令,所述程序指令当被所述至少一个处理器执行时使得所述至少一个处理器执行权利要求1至10任一所述的方法。
  12. 一种计算机可读存储介质,其上存储有程序指令,其特征在于,所述程序指令当被计算机执行时使得所述计算机执行权利要求1至10任一所述的方法。
PCT/CN2022/082424 2021-03-25 2022-03-23 意图决策方法及设备、计算机可读存储介质 WO2022199596A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110321702.XA CN115130478A (zh) 2021-03-25 2021-03-25 意图决策方法及设备、计算机可读存储介质
CN202110321702.X 2021-03-25

Publications (1)

Publication Number Publication Date
WO2022199596A1 true WO2022199596A1 (zh) 2022-09-29

Family

ID=83374003

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/082424 WO2022199596A1 (zh) 2021-03-25 2022-03-23 意图决策方法及设备、计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN115130478A (zh)
WO (1) WO2022199596A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107492374A (zh) * 2017-10-11 2017-12-19 深圳市汉普电子技术开发有限公司 一种语音控制方法、智能设备及存储介质
US20200005772A1 (en) * 2018-06-28 2020-01-02 Beijing Baidu Netcom Science And Technology Co., Ltd. Interactive method and device of robot, and device
CN110704641A (zh) * 2019-10-11 2020-01-17 零犀(北京)科技有限公司 一种万级意图分类方法、装置、存储介质及电子设备
CN111508482A (zh) * 2019-01-11 2020-08-07 阿里巴巴集团控股有限公司 语义理解及语音交互方法、装置、设备及存储介质
CN112185379A (zh) * 2020-09-29 2021-01-05 珠海格力电器股份有限公司 一种语音交互的方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107492374A (zh) * 2017-10-11 2017-12-19 深圳市汉普电子技术开发有限公司 一种语音控制方法、智能设备及存储介质
US20200005772A1 (en) * 2018-06-28 2020-01-02 Beijing Baidu Netcom Science And Technology Co., Ltd. Interactive method and device of robot, and device
CN111508482A (zh) * 2019-01-11 2020-08-07 阿里巴巴集团控股有限公司 语义理解及语音交互方法、装置、设备及存储介质
CN110704641A (zh) * 2019-10-11 2020-01-17 零犀(北京)科技有限公司 一种万级意图分类方法、装置、存储介质及电子设备
CN112185379A (zh) * 2020-09-29 2021-01-05 珠海格力电器股份有限公司 一种语音交互的方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN115130478A (zh) 2022-09-30

Similar Documents

Publication Publication Date Title
US10475464B2 (en) Method and apparatus for connecting service between user devices using voice
JP6666920B2 (ja) デジタルパーソナルアシスタント内のヘッドレスタスクの完了
CN110634483B (zh) 人机交互方法、装置、电子设备及存储介质
US10748531B2 (en) Management layer for multiple intelligent personal assistant services
CN107209781B (zh) 使用自然语言的上下文搜索
US9111538B2 (en) Genius button secondary commands
US20190013025A1 (en) Providing an ambient assist mode for computing devices
CN105378708B (zh) 环境感知对话策略和响应生成
US20190196779A1 (en) Intelligent personal assistant interface system
US9661133B2 (en) Electronic device and method for extracting incoming/outgoing information and managing contacts
US11264027B2 (en) Method and apparatus for determining target audio data during application waking-up
US11907316B2 (en) Processor-implemented method, computing system and computer program for invoking a search
CN111696553B (zh) 一种语音处理方法、装置及可读介质
US20190205338A1 (en) Audio Processing Method and Device
US9275034B1 (en) Exceptions to action invocation from parsing rules
KR20150104930A (ko) 통신 단말기에서 음성 인식 서비스의 멀티태스킹을 지원하는 방법 및 시스템
WO2022199596A1 (zh) 意图决策方法及设备、计算机可读存储介质
CN113449068A (zh) 一种语音交互方法及电子设备
CN112837668B (zh) 一种语音处理方法、装置和用于处理语音的装置
WO2018170992A1 (zh) 一种控制通话的方法及装置
EP3502868A1 (en) Intelligent personal assistant interface system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22774252

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22774252

Country of ref document: EP

Kind code of ref document: A1