Voice control method, device, electronic device and storage medium
By using blacklist and whitelist strategies in smart cars to optimize the matching process of voice assistants, the problem that smart car voice assistants cannot control the entire scene is solved, and higher voice control accuracy and user experience are achieved, reducing driving risks.
Patent Information
- Application Number
- CN202310610732.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-26
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-05-26
AI Technical Summary
Existing smart car voice assistants are difficult to achieve full-scene voice control of vehicle functions, resulting in drivers needing to operate through touch, increasing safety risks, and fuzzy matching strategies lead to frequent error operations and poor user experience.
The matching strategy of blacklist and whitelist is adopted to intercept vehicle control instructions, filter unsupported action instructions, and the exact match between the speech recognition results and the page element text is determined, the target element is simulated, and clicks are simulated, and the over-recall problem of fuzzy matching is optimized.
It improves the accuracy and user experience of voice control, ensures the correct execution of vehicle control commands, reduces errors, and improves driving safety.
Smart Images

Figure CN116416990B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of speech processing technology, and in particular to the fields of speech recognition, speech interaction, and natural language processing technology. More specifically, the present disclosure provides a speech control method, apparatus, electronic device, and storage medium. Background Art
[0002] Smart cars are becoming increasingly popular, and most smart cars include voice assistants, allowing users to control the vehicle through voice, such as opening and closing windows, controlling navigation, and controlling various in-vehicle applications. Summary of the Invention
[0003] The present disclosure provides a voice control method, apparatus, device, and storage medium.
[0004] According to a first aspect, a voice control method is provided, which includes: in response to receiving an input voice, matching an input text corresponding to the input voice with a first instruction text set; in response to the input text not being successfully matched with the first instruction text set, determining the element text of at least one element on the current page; for each element text, matching the input text with a second instruction text set based on the common text between the input text and the element text to obtain a matching result for the element; determining a target element from at least one element based on the matching result of at least one element; and performing a control operation on the target element.
[0005] According to a second aspect, a voice control device is provided, which includes: a first matching module for matching an input text corresponding to the input voice with a first instruction text set in response to receiving an input voice; an element text determination module for determining the element text of at least one element on the current page in response to the input text not being successfully matched with the first instruction text set; a second matching module for matching the input text with the second instruction text set for each element text based on the common text between the input text and the element text to obtain a matching result for the element; a target element determination module for determining a target element from at least one element based on the matching result of at least one element; and a control module for performing a control operation on the target element.
[0006] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method provided according to the present disclosure.
[0007] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method provided according to the present disclosure.
[0008] According to a fifth aspect, a computer program product is provided, comprising a computer program stored on at least one of a readable storage medium and an electronic device, wherein the computer program implements the method provided according to the present disclosure when executed by a processor.
[0009] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0011] Figure 1 is a schematic diagram of a scenario of a voice control method according to an embodiment of the present disclosure;
[0012] Figure 2 is a flow chart of a voice control method according to an embodiment of the present disclosure;
[0013] Figure 3 is a flowchart of a method for determining candidate elements according to one embodiment of the present disclosure;
[0014] Figure 4 is a flowchart of a method for determining a candidate element according to another embodiment of the present disclosure;
[0015] Figure 5 is a block diagram of a voice control device according to an embodiment of the present disclosure;
[0016] Figure 6 FIG. 4 is a block diagram of an electronic device according to a voice control method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0018] As smart cars become increasingly common, smart cockpits offer users an increasingly diverse range of functions. Drivers are increasingly using the smart cockpit's central control system while driving. For example, navigation apps allow users to control the current route; multimedia apps allow users to switch and play multimedia content according to their preferences; vehicle controls include climate control, window / sunroof / sunshade controls, and Bluetooth phone functions allow users to dial specific contacts.
[0019] While most smart cars now include voice assistants, enabling voice control of the central control system, their capabilities are quite limited, often making it difficult to fully control all functions. For example, almost all voice assistants cannot fully cover voice control intent for the vehicle. Many functions still require the driver to access them through touch, significantly increasing safety risks.
[0020] Therefore, the demand for full-scene voice touch screens has emerged. Specifically, voice touch screens refer to the use of "voice" instead of "touch screen" by the driver to achieve the operation of the central control system. What you see is what you can say means that as long as there are functions on the screen, they can be controlled by voice, which is an effective solution for full-scene voice touch screens. The specific implementation can be to scan the elements on the page and obtain the page element text. When the user initiates a voice, the text is obtained through voice recognition, and the text obtained by voice recognition is matched with the scanned page element text. If a match is found, it simulates clicking the position of the element on the screen to achieve voice control.
[0021] In the "What You See Is What You Say" approach, a fuzzy matching strategy can be used to match speech recognition results with page elements. Fuzzy matching means that if the length of the common text between the user's speech recognition text and the page element text is greater than a preset value (for example, 3), the user's speech is considered to have hit the page element. In practice, the fuzzy matching strategy still has a serious over-recall problem, resulting in recognition results that should not have hit the voice touch screen but have mistakenly hit it.
[0022] Table 1 below shows several cases of false hits in fuzzy matching.
[0023] Table 1
[0024]
[0025]
[0026] As shown in Table 1, for example, a page element is a text control containing the text "Ambient Light." Clicking this text control opens the ambient light settings page. The user's voice recognition result is "Turn on ambient light." Based on the "what you see is what you say" fuzzy matching strategy, the voice recognition result is successfully matched with the text control, indicating that the user's voice has hit the ambient light control. This simulates a click on the ambient light control, opening the ambient light settings page. This does not match the user's actual intention to turn on the ambient light.
[0027] For example, a page element is a switch control that is off, and the text content of the switch control is "Silent Mode." The user's voice recognition result is "Turn off silent mode." Based on the fuzzy matching strategy, the user's voice hits the silent mode switch control, performing a simulated click operation, turning silent mode back on. This does not match the user's actual intention to turn off silent mode.
[0028] For example, a page element is an app icon, and the text content is "XXX" (the name of the app icon, for example, containing three characters). The user's voice recognition result is "Don't open XXX." Based on the fuzzy matching strategy, the user's voice hits the app icon, executing a simulated click operation to open the app. This does not match the user's actual intention of not opening XXX.
[0029] Therefore, the excessive recall problem of fuzzy matching will result in more erroneous operations that are inconsistent with the user's true intentions, resulting in a poor user experience.
[0030] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0031] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0032] Figure 1 Schematic diagram of a scenario of a voice control method according to an embodiment of the present disclosure.
[0033] like Figure 1 As shown, this embodiment may be a display screen of a vehicle-mounted terminal, and a page in the display screen may include multiple page elements, and the page elements may include text controls, switch controls, and application icons, etc.
[0034] For example, element 101 is a text control containing the text "Home." Clicking element 101 displays multiple application icons. These icons include, for example, element 104, element 105, and element 106. Element 104 could be an application icon for a video player, element 105 could be an application icon for a music player, and element 106 could be an application icon for a navigation app.
[0035] Element 102 is a text control, and the text content of element 102 is "air conditioner". Clicking element 102 can open the setting page of the air conditioner, such as setting the operating mode, setting the temperature, etc.
[0036] Element 103 is a switch control, and the text content of element 103 is "silent mode". Clicking element 103 can turn silent mode on or off.
[0037] The voice control method of this embodiment can replace the user's touch operation with voice, recognize the user's input voice as input text, match the input text with the text content of each element, and in response to a successful match between the input text and the target element, simulate clicking the position of the target element on the screen to achieve voice control.
[0038] It should be noted that Figure 1 The examples shown are merely scenarios in which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0039] Figure 2 is a flow chart of a voice control method according to an embodiment of the present disclosure.
[0040] like Figure 2 As shown, the voice control method 200 includes operations S210 to S250.
[0041] In operation S210 , in response to receiving an input voice, an input text corresponding to the input voice is matched with a first instruction text set.
[0042] For example, a user's input voice is received, and voice recognition is performed on the input voice to obtain input text.
[0043] The first set of command texts may include vehicle control commands, such as turning on ambient lighting, closing windows, turning on wipers, turning off interior lights, enabling Bluetooth mode, and turning on the HUD (Head Up Display). These commands take precedence over touch commands. In other words, the user's intention in issuing these vehicle control commands is to control specific devices on the vehicle (such as windows, wipers, Bluetooth phone, etc.), not to touch the screen.
[0044] Since the full-scene voice touch screen in the WYSIWYG scenario can include elements such as ambient lights, windows, and Bluetooth, in order to avoid the situation in which vehicle control commands are hit by elements on the screen in the WYSIWYG scenario, resulting in the inability to execute these vehicle control commands correctly, a blacklist can be set to intercept these vehicle control commands.
[0045] The blacklist can contain the text content of the aforementioned vehicle control commands, specifically the verb and noun text of various vehicle control commands. Verb text can include "open," "open once," "open," "close," "close once," and "turn off." Noun text can include "window," "ambience light," "Bluetooth mode," and so on.
[0046] After receiving the user's voice, before matching it with the WYSIWYG page elements, the input text recognized by the voice can be matched with the first instruction text set. During the matching process, various gerund combinations in the blacklist can be matched one by one. Once a gerund combination in the blacklist is hit, the WYSIWYG module can discard the matching result and send the user's input text to the vehicle control module to execute the corresponding vehicle control instruction.
[0047] Using a blacklist to intercept vehicle control commands can prevent vehicle control commands from being hit as soon as they are seen, thereby ensuring the correct execution of vehicle control commands.
[0048] In operation S220 , in response to the input text not being successfully matched with the first instruction text set, element text of each of at least one element on the current page is determined.
[0049] If the input text does not successfully match the blacklist, the input text can be matched against page elements.
[0050] Page elements may include text controls, switch controls, application icons, and the like. Text controls include text content, such as a control for setting the color of the ambient light, where the text content of the control is "ambience light." A control for setting the temperature or mode of the air conditioner, where the text content of the control is "air conditioner." Switch controls may include text content, buttons, or icons indicating "on or off." For example, a switch control for turning silent mode on or off, where the text content of the switch control is "silent mode." Application controls may include text content and application icons. For example, an application control for playing videos, where the text content may be the name of the video software.
[0051] In response to receiving the user's input voice, the elements on the current page may be scanned to obtain the text content of each element as the element text.
[0052] In operation S230 , for each element text, the input text is matched with the second instruction text set based on the common text between the input text and the element text to obtain a matching result for the element.
[0053] For each element text, the common text between the input text and the element text can be determined. Common text refers to characters shared by the input text and the element text. The common text can be the longest common string shared by both. For example, the input text can be "Open TV Series" and the element text can be "TV Series". The common text between the two is "TV Series".
[0054] If the length of the common text is greater than a threshold (e.g., 3), the fuzzy match succeeds. Next, we need to optimize the over-recall problem of fuzzy matching. We can use a preset whitelist for further filtering.
[0055] The whitelist may include a second set of instruction texts, wherein the second set of instruction texts includes verb texts other than the longest common text with the page element in the allowed instruction texts, for example, "open", "close", "open", "turn off", "open for a moment", "close for a moment", "open on", "closed", etc.
[0056] Therefore, when matching the input text against the whitelist, you can remove the common text from the input text and split the input text into at least one subtext at intervals, using the common text as the interval. Then, use the subtext to match the whitelist. If the subtext is in the whitelist, the match is successful. Elements that successfully match the whitelist can be used as candidate elements.
[0057] For example, the input text is "Don't open XXX, close", and the common text with the element text "XXX" is "XXX". After deleting "XXX" from the input text, the remaining text is "Don't open, close". The remaining text can be split into two sub-texts, "Don't open" and "Close", separated by the position of the common text "XXX". These two sub-texts are matched against the whitelist. For example, if the sub-text "Close" is in the whitelist, the match is successful, and the page element corresponding to the element text "XXX" can be determined as a candidate element.
[0058] Use a whitelist to save the action commands allowed in the scene. Matching the whitelist can avoid the execution of incorrect commands caused by fuzzy matching and improve the user experience.
[0059] In operation S240 , a target element is determined from the at least one element according to the respective matching results of the at least one element.
[0060] In operation S250 , a control operation with respect to a target element is performed.
[0061] For example, after matching the input text with all elements on the page, at least one successfully matched candidate element can be obtained, and the target element that best matches the current scenario and user intention can be determined from the at least one element based on the current application scenario, the semantics of the input text, etc.
[0062] After determining the target element, you can simulate clicking the position of the target element on the current screen to achieve the effect of voice-controlled clicking on the target element.
[0063] The embodiment of the present disclosure uses a first instruction text set (blacklist) to intercept vehicle control instructions, and uses a second instruction text set (whitelist) to filter action instructions that are not allowed in the scene. By matching the blacklist and the whitelist, the excessive recall problem of fuzzy matching can be optimized, the execution of erroneous instructions caused by excessive recall matching can be avoided, and the user experience can be improved.
[0064] Figure 3 is a flowchart of a method for determining candidate elements according to one embodiment of the present disclosure.
[0065] like Figure 3 As shown, the voice control method includes operations S310 to S390.
[0066] In operation S310 , an input voice is received, and voice recognition is performed on the input voice to obtain an input text.
[0067] In operation S320, the input text is matched with the blacklist.
[0068] The blacklist contains vehicle control commands with higher priority, and can include a verb blacklist and a noun blacklist of vehicle control commands. During matching, all blacklisted gerund-noun combinations can be matched one by one.
[0069] In operation S330, it is determined whether the input text hits the blacklist. If not, operation S340 is performed, and if yes, operation S390 is performed.
[0070] The blacklist can be used to intercept vehicle control commands to prevent them from being hit as soon as they are seen, thereby ensuring the correct execution of vehicle control commands.
[0071] In operation S340 , the longest common text between the input text and the page element is determined, and the input text is split according to the longest common text to obtain at least one subtext.
[0072] For example, the longest common text in the input text may be replaced by a special symbol, and the remaining text in the input text excluding the characteristic symbol may be split using the special symbol as an interval to obtain at least one subtext.
[0073] In operation S350 , it is determined whether there is any subtext that has not been matched with the current whitelist. If so, operation S360 is executed; otherwise, the matching is completed and the process ends.
[0074] In operation S360 , the unmatched subtext is matched with the whitelist.
[0075] In operation S370 , it is determined whether the current subtext hits the whitelist, and if so, operation S380 is performed, otherwise, the process returns to operation S350 .
[0076] The sub-text can be some verbs, such as open, close, etc. If the sub-text hits the whitelist, it means that the action instruction in the input text is allowed.
[0077] In operation S380, the current element is determined as a candidate element.
[0078] In operation S390 , the input text is sent to the vehicle control module so that the vehicle control module performs a vehicle control operation.
[0079] This embodiment is a process of matching input text with a current page element. The current page may contain multiple page elements, so the input text needs to be matched with multiple page elements one by one.
[0080] Figure 4 is a flowchart of a method for determining a candidate element according to another embodiment of the present disclosure.
[0081] like Figure 4 As shown, the voice control method includes operations S401 to S416.
[0082] In operation S401 , an input voice is received, and voice recognition is performed on the input voice to obtain an input text Q1 .
[0083] In operation S402, it is determined whether the input text Q1 is equal to a combination of a blacklist verb and a blacklist noun. If so, it means that the input text Q1 hits the blacklist, and operation S416 is executed. Otherwise, operation S403 is executed.
[0084] In operation S403, it is determined whether the input text Q1 is equal to a combination of a blacklist noun and a blacklist verb. If so, it means that the input text Q1 hits the blacklist, and operation S416 is executed. Otherwise, operation S404 is executed.
[0085] Operations S402 to S403 are steps for matching the input text Q1 with a blacklist. The blacklist may include a set of vehicle control instructions. Specifically, the blacklist may include a blacklist noun subset (i.e., a noun text subset) and a blacklist verb subset (i.e., a verb text subset). Nouns for vehicle control instructions may be added to the blacklist noun subset, and verbs for vehicle control instructions may be added to the blacklist verb subset.
[0086] Table 2 shows some noun texts in the blacklist noun subset.
[0087] Table 2
[0088]
[0089] Table 3 shows some verb texts in the blacklist verb subset.
[0090] Table 3
[0091]
[0092]
[0093] The text content in the blacklist noun subset shown in Table 2 and the blacklist verb subset shown in Table 3 can be updated in real time.
[0094] When performing blacklist matching, you can first take out the verb to be matched from the blacklist verb subset, and then combine the verb to be matched with the nouns in the blacklist noun subset one by one to obtain a gerund-noun combination text set with the verb in front and the noun in the back. For example, "turn on the ambient light", "turn on the HUD", "turn on the ambient light", "turn on the HUD", and so on. Match the input text Q1 with all the gerund-noun combination texts with the verb in front and the noun in the back one by one. If the input text Q1 hits any gerund-noun combination text with the verb in front and the noun in the back, it can be determined that the input text Q1 hits the blacklist.
[0095] In the case that the input text Q1 does not hit any gerund combination text with the verb in front and the noun in the back, the noun to be matched can be taken out from the blacklist noun subset, and then the noun to be matched is combined with the verbs in the blacklist verb subset one by one to obtain a gerund combination text set with the noun in front and the verb in the back. For example, "atmosphere light turns on", "HUD turns on", "atmosphere light turns on", "HUD turns on", etc. Match the input text Q1 with all gerund combination texts with the noun in front and the verb in the back one by one. If the input text Q1 hits any gerund combination text with the noun in front and the verb in the back, it can be determined that the input text Q1 hits the blacklist.
[0096] If the input text Q1 does not match any gerund combination text with the verb preceding the noun, and does not match any gerund combination text with the noun preceding the verb, it can be determined that the input text Q1 does not match the blacklist.
[0097] In operation S414, it is determined whether there are any page elements that have not been matched with the input text Q1. If so, operation S405 is executed. Otherwise, it indicates that all page elements have been matched with the input text Q1, and the process ends; or there are no page elements on the current page that need to be matched with the input text Q1, and the process ends.
[0098] If it is determined that the input text Q1 does not hit the blacklist, the input text Q1 is matched with a page element. Since there can be one or more page elements, the input text Q1 needs to be matched with at least one page element one by one.
[0099] In operation S405 , the page element that has not been matched with the input text Q1 is retrieved, the text content of the page element is used as the current element text T1 , and the longest common text between the input text Q1 and the current element text T1 is determined.
[0100] If the length of the longest common text is greater than a threshold (eg, 3), it can be determined that the input text Q1 and the element text T1 have successfully fuzzy matched.
[0101] In operation S406 , the input text Q1 is split into at least one subtext T2 according to the longest common text.
[0102] For example, in response to the length of the longest common text being greater than a threshold, the longest common text in the input text Q1 may be replaced with a special symbol, and then the remaining text excluding the special symbol is split with the special symbol as an interval to obtain subtext T2. There may be one or more subtexts T2.
[0103] In operation S407, it is determined whether the subtext T2 is empty. If so, operation S415 is executed. Otherwise, operation S408 is executed.
[0104] If subtext T2 is empty, it means that the input text Q1 is the same as the longest common text, the input text Q1 is completely contained in the element text, or is the same as the element text, which is a full match. It can be determined that the input text Q1 hits the current page element.
[0105] In operation S408, it is determined whether there are any unmatched subtexts T2. If so, operation S409 is executed. Otherwise, it indicates that all subtexts T2 have been matched with the whitelist, and the process returns to operation S404 to match the next page element.
[0106] When it is determined that the subtext T2 is not empty, the subtext T2 is matched with the whitelist. Since there can be one or more subtexts T2, it is necessary to determine whether there are any unmatched subtexts T2.
[0107] In operation S409 , the unmatched current subtext T2 is matched with the selection class whitelist.
[0108] The whitelist may include a selection whitelist (a selection instruction text subset), an open whitelist (an open instruction text subset), and a close whitelist (a close instruction text subset). The unmatched subtext T2 is taken out and used as the current subtext T2. The current subtext T2 may be matched with the selection whitelist.
[0109] The selection whitelist includes, for example, verbs such as "select", "choose", "select", and "select".
[0110] In operation S410, it is determined whether the current subtext T2 hits the selected category whitelist. If yes, operation S415 is executed, otherwise operation S411 is executed.
[0111] For example, if the input text Q1 is "Select TV Series", "TV Series" is the longest common text that matches the page element, "Select" is the subtext T2, and "Select" is in the selection class whitelist, then it can be determined that the selection class whitelist is hit. The current element can be determined as a candidate element as a matching result (operation S415).
[0112] In the case that the current subtext T2 does not hit the selected class whitelist, operation S411 is performed.
[0113] In operation S411 , the current subtext T2 is matched with the open class whitelist.
[0114] The open action whitelist can include verbs such as "open," "open," and "open for a moment." Open actions are not limited to switch elements and can be applied to any scenario, such as opening application elements (such as the XXX application icon) or text control elements (such as the ambient light text control) on the desktop.
[0115] In operation S412, it is determined whether the current subtext T2 hits the open class whitelist. If yes, operation S415 is executed, otherwise operation S413 is executed.
[0116] In the case where subtext T2 hits the open class whitelist, it is necessary to further determine the matching result based on the element type and state (operation S415). For example, in the case where the current element is a switch type, in response to the switch state being off, the current element is determined to be a candidate element as the matching result. In response to the switch state being on, it is determined that this matching is unsuccessful, the matching result is empty, and no candidate element is returned.
[0117] For example, the current element is a switch control for "silent mode" and is in the off state, and the subtext T2 is "on". The subtext T2 hits the open class whitelist, so it can be determined that this match is successful, and the current element is determined as a candidate element as the matching result.
[0118] For another example, the current element is a switch control for "Silent Mode" and is in the on state, and the sub-text T2 is "On". Although the open type whitelist is hit, the simulated click on the "Silent Mode" switch control will cause the "Silent Mode" to be incorrectly closed. Therefore, when the sub-text T2 is "On", if the current element is a switch type and is in the on state, it is determined that the match is unsuccessful, and no candidate element is returned, which can avoid this incorrect closing situation.
[0119] When sub-text T2 hits the open class whitelist, if the current element is not a switch type, since the open class instruction can support all types of elements (such as switches, icons, etc.), it can be determined that the match is successful and the current element is determined as a candidate element as the matching result (operation S415).
[0120] In the case that the subtext T2 does not hit the open class whitelist, operation S413 is performed.
[0121] In operation S413 , the current subtext T2 is matched with the closed class whitelist.
[0122] The closing whitelist may include verbs such as "close", "turn off", and "turn it off".
[0123] In operation S414, it is determined whether the current subtext T2 hits the closed class whitelist. If so, operation S415 is executed, otherwise, the process returns to operation S408.
[0124] In the case where subtext T2 hits the closed class whitelist, it is necessary to further determine the matching result based on the switch type and state (operation S415). For example, in the case where the current element is a switch type, in response to the switch state being on, the element is determined to be a candidate element as a matching result. In response to the switch state being off, it is determined that this match is unsuccessful and no matching result is returned.
[0125] For example, the current element is a switch control for "silent mode" and is in the on state, and the subtext T2 is "off". The subtext T2 hits the off-class whitelist, so it can be determined that this match is successful, and the element is determined as a candidate element as the matching result.
[0126] For another example, the current element is a switch control for "Silent Mode" and is in the off state, and the subtext T2 is "Off". Although it hits the off-type whitelist, simulating a click on the "Silent Mode" switch control will cause the "Silent Mode" to be turned on incorrectly. Therefore, in this case, it is determined that the match is unsuccessful and no matching result is returned, which can avoid this incorrect opening situation.
[0127] If the subtext T2 does not hit the closed class whitelist, or hits the closed class whitelist but the switch state is off, the matching of the current subtext T2 ends. Returning to operation S408, it is determined whether there is a next subtext T2 to be matched.
[0128] In operation S416 , the input text Q1 is sent to the vehicle control module, so that the vehicle control module performs a vehicle control operation.
[0129] This step is executed if the input text Q1 successfully matches the blacklist. A successful match indicates that the command corresponding to the input text is a vehicle control command, and the user's intention is to control the vehicle, not touch the screen. Therefore, the input text is sent to the vehicle control module to prevent the vehicle control command from being considered a hit by simply seeing it, thereby ensuring its correct execution.
[0130] This embodiment matches the input text with at least one page element on the current page one by one, and determines at least one candidate element that is successfully matched from the current page, thereby avoiding the risk of missed calls.
[0131] This embodiment uses a blacklist to intercept vehicle control instructions and uses a whitelist to recall at least one candidate element, which can solve the problem of excessive recall in fuzzy matching.
[0132] Compared with the false hits of fuzzy matching, the hit results of this embodiment are shown in Table 4 below.
[0133] Table 4
[0134]
[0135]
[0136] As shown in Table 4, the voice command "Turn on the ambient light" is blocked by the blacklist. The voice command "Turn off silent mode" is blocked because the switch is off. The voice command "Don't turn on XXX" is blocked because "don't" is not in the whitelist.
[0137] Figure 5 is a block diagram of a voice control device according to an embodiment of the present disclosure.
[0138] like Figure 5 As shown, the voice control device 500 includes a first matching module 501 , an element text determination module 502 , a second matching module 503 , a target element determination module 504 and a control module 505 .
[0139] The first matching module 501 is configured to, in response to receiving an input voice, match an input text corresponding to the input voice with a first instruction text set.
[0140] The element text determination module 502 is configured to determine the element text of each of at least one element on the current page in response to the input text failing to successfully match the first instruction text set.
[0141] The second matching module 503 is used to match the input text with the second instruction text set for each element text according to the common text between the input text and the element text, and obtain a matching result for the element.
[0142] The target element determination module 504 is configured to determine a target element from at least one element according to the matching result of each of the at least one element.
[0143] The control module 505 is used to perform control operations on the target element.
[0144] The second matching module 503 includes a splitting submodule and a first matching submodule.
[0145] The splitting submodule is used for splitting the remaining text in the input text except the common text with the common text as an interval for each element text, in response to the length of the common text being greater than a threshold, to obtain at least one subtext.
[0146] The first matching submodule is used to match each subtext with the second instruction text set, and in response to a successful match between the subtext and the second instruction text set, determine the element corresponding to the element text as a candidate element as a matching result.
[0147] According to an embodiment of the present disclosure, the second instruction text set includes a selection class instruction text subset, an opening class instruction text subset, and a closing class instruction text subset. The first matching submodule includes a matching unit, a first matching result determining unit, a second matching result determining unit, and a third matching result determining unit.
[0148] The matching unit is used to match each subtext with the selection-type instruction text subset, the opening-type instruction text subset and the closing-type instruction text subset respectively.
[0149] The first matching result determining unit is configured to determine an element corresponding to the element text as a candidate element as a matching result in response to a successful matching between the subtext and the selection-type instruction text.
[0150] The second matching result determination unit is configured to determine a matching result based on a type and a state of an element corresponding to the element text in response to a successful matching between the subtext and the open-class instruction text subset.
[0151] The third matching result determination unit is configured to determine a matching result according to a type and a state of an element corresponding to the element text in response to a successful matching between the subtext and the closing instruction text subset.
[0152] The second matching result determination unit includes a first type determination subunit, a first matching result determination subunit, and a second matching result determination subunit.
[0153] The first type determination subunit is used to determine the type of the element corresponding to the element text.
[0154] The first matching result determination subunit is configured to determine a matching result according to the switch state of the element in response to the type of the element being a switch type.
[0155] The second matching result determination subunit is configured to determine the element as a candidate element as a matching result in response to the type of the element being a non-switch type.
[0156] The first matching result determination subunit is configured to determine the switch state of the element; in response to the switch state being off, determine the element as a candidate element as a matching result.
[0157] The third matching result determination unit includes a second type determination subunit and a third matching result determination subunit.
[0158] The second type determination subunit is used to determine the type of the element corresponding to the element text.
[0159] The third matching result determination subunit is configured to determine a matching result according to the switch state of the element in response to the type of the element being a switch type.
[0160] The third matching result determination subunit is configured to determine the switch state of the element; in response to the switch state being on, determine the element as a candidate element as a matching result.
[0161] The voice control device 500 further includes a third matching module.
[0162] The third matching module is configured to, for each element text, determine an element corresponding to the element text as a candidate element as a matching result in response to the length of the common text being greater than a threshold and the input text being the same as the common text.
[0163] The target element determination module 504 includes a candidate element determination submodule and a target element determination submodule.
[0164] The candidate element determination submodule is used to determine at least one candidate element from the matching results.
[0165] The target element determination submodule is used to determine a target element from at least one candidate element.
[0166] The first instruction text set includes a verb text subset and a noun text subset. The first matching module 501 includes a gerund-noun combination text set determination submodule and a second matching submodule.
[0167] The gerund-noun combination text set determination submodule is used to determine the gerund-noun combination text set according to the verb text subset and the noun text subset.
[0168] The second matching submodule is used to match the input text with the gerund combination text set.
[0169] According to an embodiment of the present disclosure, the gerund combination text set includes at least one of a combination text in which the verb comes first and the noun comes second, and a combination text in which the noun comes first and the verb comes second.
[0170] The first instruction text set includes vehicle control instruction texts, and the second instruction text set includes operation instructions associated with elements on the current page. The vehicle control instructions have a higher priority than the operation instructions associated with elements on the current page.
[0171] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0172] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0173] like Figure 6As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0174] Various components in device 900 are connected to I / O interface 605, including: input unit 606, such as a keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as a magnetic disk, optical disk, etc.; and communication unit 609, such as a network card, modem, wireless communication transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0175] The computing unit 601 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as the voice control method. For example, in some embodiments, the voice control method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the voice control method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the voice control method by any other appropriate means (e.g., by means of firmware).
[0176] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0177] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0178] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0179] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0180] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0181] Computer systems may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The client and server relationship arises through computer programs running on the respective computers and having a client-server relationship to each other.
[0182] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0183] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A voice control method, comprising: In response to receiving an input voice, matching an input text corresponding to the input voice with a first set of instruction texts; In response to the input text not being successfully matched with the first instruction text set, determining element text of each of at least one element on the current page; For each element text, matching the input text with a second instruction text set based on common text between the input text and the element text to obtain a matching result for the element; determining a target element from the at least one element according to the respective matching results of the at least one element; as well as Executing a control operation on the target element; Among them, the first instruction text set includes vehicle control instruction texts, and the second instruction text set includes operation instructions associated with the elements on the current page. The vehicle control instructions have a higher priority than the operation instructions associated with the elements on the current page.
2. The method according to claim 1, wherein For each element text, matching the input text with a second instruction text set based on the common text between the input text and the element text to obtain a matching result for the element includes: for each element text, In response to the length of the common text being greater than a threshold, the remaining text in the input text except the common text is split with the common text as an interval to obtain at least one subtext; and For each subtext, the subtext is matched with the second instruction text set. In response to the subtext successfully matching the second instruction text set, the element corresponding to the element text is determined as a candidate element as the matching result.
3. The method according to claim 2, wherein: The second instruction text set includes a selection class instruction text subset, an opening class instruction text subset, and a closing class instruction text subset; for each subtext, the subtext is matched with the second instruction text set, and in response to the subtext successfully matching the second instruction text set, the element corresponding to the element text is determined as a candidate element, as the matching result includes: for each subtext, Matching the subtext with the selection class instruction text subset, the opening class instruction text subset, and the closing class instruction text subset respectively; In response to the subtext successfully matching the selection-type instruction text, determining the element corresponding to the element text as a candidate element as the matching result; In response to the subtext successfully matching the open-class instruction text subset, determining the matching result according to the type and state of the element corresponding to the element text; and In response to the subtext successfully matching the closing instruction text subset, the matching result is determined according to the type and status of the element corresponding to the element text.
4. The method according to claim 3, wherein: In response to the subtext successfully matching the open-class instruction text subset, determining the matching result according to the type and state of the element corresponding to the element text includes: Determining the type of element corresponding to the element text; In response to the type of the element being a switch type, determining the matching result according to the switch state of the element; and In response to the type of the element being a non-switch type, the element is determined as a candidate element as the matching result.
5. The method according to claim 4, wherein In response to the type of the element being a switch type, determining the matching result according to the switch state of the element includes: determining the switch state of the element; and In response to the switch state being off, the element is determined as a candidate element as the matching result.
6. The method according to claim 3, wherein: In response to the subtext successfully matching the closing instruction text subset, determining the matching result according to the type and status of the element corresponding to the element text includes: determining the type of element corresponding to the element text; and In response to the type of the element being a switch type, the matching result is determined according to the switch state of the element.
7. The method according to claim 6, wherein: In response to the type of the element being a switch type, determining the matching result according to the switch state of the element includes: Determining the switch state of the element; and In response to the switch state being on, the element is determined as a candidate element as the matching result.
8. The method according to claim 1, further comprising: For each element text, in response to the length of the common text being greater than a threshold and the input text being identical to the common text, an element corresponding to the element text is determined as a candidate element as the matching result.
9. The method according to any one of claims 2 to 8, wherein Determining the target element from the at least one element according to the matching result of each of the at least one element includes: determining at least one candidate element from the matching results; and The target element is determined from the at least one candidate element.
10. The method according to claim 1, wherein The first instruction text set includes a verb text subset and a noun text subset; and in response to receiving an input speech, matching the input text corresponding to the input speech with the first instruction text set includes: Determining a gerund-noun combination text set based on the verb text subset and the noun text subset; and The input text is matched with the gerund combination text set.
11. The method according to claim 10, wherein: The gerund-noun combination text set includes at least one of a combination text in which the verb comes first and the noun comes second, and a combination text in which the noun comes first and the verb comes second.
12. A voice control device comprising: a first matching module, configured to, in response to receiving an input voice, match an input text corresponding to the input voice with a first instruction text set; an element text determination module, configured to determine the element text of each of at least one element on the current page in response to the input text failing to successfully match the first instruction text set; A second matching module is configured to match each element text with a second instruction text set based on common text between the input text and the element text, to obtain a matching result for the element; a target element determination module, configured to determine a target element from the at least one element according to the respective matching results of the at least one element; as well as A control module, configured to execute a control operation on the target element; Among them, the first instruction text set includes vehicle control instruction texts, and the second instruction text set includes operation instructions associated with the elements on the current page. The vehicle control instructions have a higher priority than the operation instructions associated with the elements on the current page.
13. The device according to claim 12, wherein The second matching module includes: a splitting submodule configured to, for each element text, split the remaining text in the input text except the common text with the common text as an interval in response to the length of the common text being greater than a threshold, to obtain at least one subtext; and The first matching submodule is used to match each subtext with the second instruction text set, and in response to the subtext successfully matching the second instruction text set, determine the element corresponding to the element text as a candidate element as the matching result.
14. The device according to claim 13, wherein The second instruction text set includes a selection-type instruction text subset, an opening-type instruction text subset, and a closing-type instruction text subset; the first matching submodule includes: a matching unit, configured to match each subtext with the selection instruction text subset, the opening instruction text subset, and the closing instruction text subset, respectively; a first matching result determining unit, configured to determine, in response to a successful match between the subtext and the selection-type instruction text, an element corresponding to the element text as a candidate element as the matching result; a second matching result determining unit configured to determine the matching result according to the type and state of the element corresponding to the element text in response to the subtext successfully matching the subtext with the open-class instruction text subset; and The third matching result determining unit is configured to determine the matching result according to the type and status of the element corresponding to the element text in response to the subtext successfully matching the closing instruction text subset.
15. The device according to claim 14, wherein The second matching result determining unit includes: A first type determination subunit, configured to determine the type of the element corresponding to the element text; a first matching result determining subunit, configured to, in response to the type of the element being a switch type, determine the matching result according to the switch state of the element; and The second matching result determining subunit is configured to, in response to the type of the element being a non-switch type, determine the element as a candidate element as the matching result.
16. The device according to claim 15, wherein The first matching result determination subunit is configured to determine the switch state of the element; in response to the switch state being off, determine the element as a candidate element as the matching result.
17. The device according to claim 14, wherein The third matching result determination unit includes: A second type determination subunit is configured to determine the type of the element corresponding to the element text; and The third matching result determining subunit is configured to determine the matching result according to the switch state of the element in response to the type of the element being a switch type.
18. The device according to claim 17, wherein The third matching result determination subunit is configured to determine the switch state of the element; in response to the switch state being on, determine the element as a candidate element as the matching result.
19. The apparatus according to claim 12, further comprising: The third matching module is configured to, for each element text, determine an element corresponding to the element text as a candidate element as the matching result in response to the length of the common text being greater than a threshold and the input text being the same as the common text.
20. The apparatus according to any one of claims 13 to 19, wherein the target element determination module comprises: a candidate element determination submodule, configured to determine at least one candidate element from the matching results; as well as The target element determination submodule is configured to determine the target element from the at least one candidate element.
21. The device according to claim 12, wherein The first instruction text set includes a verb text subset and a noun text subset; the first matching module includes: a gerund-noun combination text set determining submodule, configured to determine a gerund-noun combination text set based on the verb text subset and the noun text subset; and The second matching submodule is configured to match the input text with the gerund combination text set.
22. The device according to claim 21, wherein The gerund-noun combination text set includes at least one of a combination text in which the verb comes first and the noun comes second, and a combination text in which the noun comes first and the verb comes second.
23. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 11.
24. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 11.
25. A computer program product, comprising a computer program, wherein the computer program is stored on at least one of a readable storage medium and an electronic device, and when the computer program is executed by a processor, implements the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Page control method and device
CN107919129A
Voice control method and device, electronic equipment and readable storage medium
CN112581945A