A device control method, system, terminal and medium based on voice commands
By converting the user's voice commands into text commands and recombining the word, determining whether the preset command phrases of the target device are included, the problem of increasing development and maintenance workload caused by the user's language diversity in the prior art is solved, and efficient smart home device control is achieved.
Patent Information
- Application Number
- CN202311337215.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-16
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2043-10-16
AI Technical Summary
Due to the diverse user language expression methods of existing smart home devices, the voice control methods of existing smart home devices need to be expanded, which increases the workload of development and maintenance.
By obtaining the user's voice command, converting it into text commands, and recombining the command words in the text commands to form a plurality of first phrases, determining whether these phrases contain the second phrase after decomposing the target device's preset command, thereby controlling the target device to execute the corresponding preset command.
This method reduces the development workload and maintenance workload in the equipment control process, improves the flexibility of equipment control, and users do not need to be limited by a fixed expression format, realizing the purpose of voice control equipment.
Smart Images

Figure CN117392978B_ABST
Abstract
Claims
1. A device control method based on voice commands, characterized in that, it includes: Obtaining the user's voice command; Converting the voice command into a text command; Recombining the command words in the text command to obtain multiple first word groups; The recombining the command words in the text command to obtain multiple first word groups includes: decomposing the text command to obtain n command words corresponding to the text command; based on the combination number algorithm C(n, m), extracting m command words from the n command words as a word group, starting from C(n, 1) and ending at C(n, n), corresponding to obtaining multiple first word groups, where n and m are both positive integers and m ≤ n; each first word group is a set containing at least one command word, and the command word is an independent element in the first word group without arranging the word order; Judging whether a second word group is included in multiple first word groups; the second word group is a word group obtained after decomposing the preset instruction of the target device, the second word group is a set containing instruction words, and the instruction word is an independent element in the second word group; when judging, comparing whether the elements in the second word group are included in any one of the multiple first word groups without comparing the word order in the set; when comparing, combining the number of command words in the first word group and the number of instruction words in the second word group for word group screening; a control chip is embedded in the target device, and the control chip is used to store the preset instruction and perform offline control on the target device; If the second word group is included in the multiple first word groups, controlling the target device to execute the preset instruction corresponding to the second word group.
2. The method according to claim 1, characterized in that, before obtaining the user's voice command, it further includes: Collecting the wake-up word input by the user; Judging whether the wake-up word is the target wake-up word of the target device; If the wake-up word is the target wake-up word of the target device, controlling the target device to enter the voice command acquisition state.
3. The method according to claim 1, characterized in that, the converting the voice command into a text command includes: Performing feature extraction on the voice command to obtain a voice feature vector; Determining the grapheme probability distribution corresponding to the voice feature vector; Performing grapheme combination based on the grapheme probability distribution to obtain a grapheme sequence; Performing correction processing on the grapheme sequence to obtain the text command.
4. The method according to claim 1, characterized in that, the judging whether a second word group is included in multiple first word groups includes: Judging whether the command words in any one of the multiple first word groups are the same as the instruction words in the second word group until all first word groups are traversed.
5. The method according to claim 1, characterized in that, after judging whether a second word group is included in multiple first word groups, it further includes: If multiple second word groups are included in the multiple first word groups, determining the processing logic of the preset instructions corresponding to the multiple second word groups; According to the processing logic, control the target device to execute the preset instructions corresponding to the multiple second phrases.
6. The method according to claim 1, wherein, after determining whether the multiple first phrases include a second phrase, further comprising: if the multiple first phrases do not include the second phrase, control the target device to issue an invalid acquisition reminder.
7. A device control system based on voice commands, wherein, comprising: an acquisition module, configured to acquire a voice command of a user; a conversion module, configured to convert the voice command into a text command; a recombination module, configured to perform word recombination on the command words in the text command to obtain multiple first phrases; The performing word recombination on the command words in the text command to obtain multiple first phrases includes: decomposing the text command to obtain n command words corresponding to the text command; based on the combination number algorithm C(n, m), extracting m command words from the n command words as a phrase, starting from C(n, 1) and ending at C(n, n), corresponding to obtaining multiple first phrases, where both n and m are positive integers and m ≤ n; each first phrase is a set including at least one command word, and the command word is an independent element in the first phrase without word order arrangement; a judgment module, configured to judge whether the multiple first phrases include a second phrase; the second phrase is a phrase obtained after decomposing the preset instruction of the target device, the second phrase is a set including instruction words, and the instruction word is an independent element in the second phrase; when judging, compare whether the elements in the second phrase are included in any one of the multiple first phrases without comparing the word order in the set; when performing the comparison, perform phrase screening in combination with the number of command words in the first phrase and the number of instruction words in the second phrase; a control chip is embedded in the target device, and the control chip is used to store the preset instruction and perform offline control on the target device; a control module, configured to if the multiple first phrases include the second phrase, control the target device to execute the preset instruction corresponding to the second phrase.
8. A terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, when the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, wherein, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Command generation device, and equipment intelligent control method and system
CN104062910A