Voice command execution method and device, electronic equipment and storage medium

By defining common command parameters and multiple command processing methods, the problem of high development and maintenance costs of voice control in voice assistants is solved, and the flexibility and scope of application of voice control functions are improved.

CN119028349APending Publication Date: 2024-11-26ZHONGKE FANGDE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310603524.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

When implementing voice control, existing voice assistants need to create and maintain a large number of semantic instructions and system command correspondence, resulting in high development and maintenance costs.

Method used

By defining common instruction parameters, converting voice commands into semantic text instructions, and determining target instruction parameters based on preset instruction parameters, using a variety of instruction processing methods to perform system operations, reducing dependence on the corresponding relationship between semantic instructions and system commands .

Benefits of technology

It reduces development and maintenance costs, improves the scope of application and flexibility of voice control functions, reduces the overall development volume, and avoids the overhead caused by only executing system commands.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119028349A_ABST
    Figure CN119028349A_ABST
Patent Text Reader

Abstract

The invention provides a voice command execution method and device. The method comprises the following steps: acquiring a voice command; converting the voice command into a semantic text instruction, and determining a target instruction parameter corresponding to the semantic text instruction from a plurality of preset instruction parameters; the instruction parameter has a corresponding instruction processing mode; and executing the semantic text instruction according to a target instruction processing mode corresponding to the target instruction parameter so as to complete corresponding system operation. According to the method, the semantic text instruction is executed according to the instruction parameter, so that the voice control function can be completed only by using the universal instruction parameter, the development and maintenance cost for configuring the corresponding relationship between the semantic instruction and the system command is saved, and the purposes of decoupling and saving the development and maintenance cost are achieved; according to the embodiment of the invention, the voice control function is not limited by the development and maintenance of the corresponding relation between a large number of semantic instructions and system commands any more, the overall development amount is reduced, and the application range of the scheme is greatly expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a voice command execution method, device, electronic device and computer-readable storage medium. Background Art

[0002] A voice assistant is an application that operates the system by speaking.

[0003] At present, the way voice assistants implement voice control is to bind a semantic instruction to a corresponding system command in the voice assistant, and when the voice command spoken by the user is obtained, the voice command is converted into a semantic instruction, and then the system command corresponding to the current semantic instruction is determined through the correspondence between the semantic instruction and the system command for execution, thereby realizing system operation.

[0004] However, in the current solution, the voice assistant needs to create and maintain a large number of correspondences between semantic instructions and system commands, resulting in high development and maintenance costs. Summary of the invention

[0005] The embodiments of the present application provide a voice command execution method and device to solve the problem of high development and maintenance costs in the prior art.

[0006] In a first aspect, an embodiment of the present application provides a method for executing a voice command, the method comprising:

[0007] Get voice commands;

[0008] Converting the voice command into a semantic text command, and determining a target command parameter corresponding to the semantic text command from a plurality of preset command parameters; the command parameter having a corresponding command processing mode;

[0009] The semantic text instruction is executed according to the target instruction processing mode corresponding to the target instruction parameter, thereby completing the corresponding system operation.

[0010] In a second aspect, an embodiment of the present application provides a voice command execution device, the device comprising:

[0011] An acquisition module, used to acquire voice commands;

[0012] A conversion module, used to convert the voice command into a semantic text instruction, and determine a target instruction parameter corresponding to the semantic text instruction from a plurality of preset instruction parameters; the instruction parameter has a corresponding instruction processing mode;

[0013] The execution module is used to execute the semantic text instruction according to the target instruction processing mode corresponding to the target instruction parameter, so as to complete the corresponding system operation.

[0014] In a third aspect, an embodiment of the present application further provides an electronic device, including a processor;

[0015] a memory for storing instructions executable by the processor;

[0016] The processor is configured to execute the instructions to implement the method of the first aspect.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute the method of the first aspect.

[0018] The embodiment of the present application defines common instruction parameters and implements the execution of semantic text instructions according to the instruction parameters, so that the voice control function can be completed by using only common instruction parameters, eliminating the development and maintenance costs of configuring the correspondence between semantic instructions and system commands, achieving the purpose of decoupling and saving development and maintenance costs. The embodiment of the present application makes the voice control function no longer limited by the development and maintenance of a large number of correspondences between semantic instructions and system commands, reducing the overall development volume and greatly improving the scope of application of the solution. In addition, the embodiment of the present application adopts a variety of instruction processing methods, and selects a suitable solution from a variety of instruction processing methods according to actual needs. The selection is more flexible and the scope of application is wider, reducing the development and maintenance overhead caused by the instruction processing method of only executing system commands in the related art.

[0019] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is an implementation scenario diagram provided by an embodiment of the present application;

[0021] Figure 2 is a flowchart of a method for executing a voice command provided by an embodiment of the present application;

[0022] Figure 3 It is a flowchart of the specific steps of a voice command execution method provided in an embodiment of the present application;

[0023] Figure 4 This is a schematic diagram of an instruction execution method provided in an embodiment of the present application;

[0024] Figure 5is a block diagram of a voice command execution device provided in an embodiment of the present application;

[0025] Figure 6 is a block diagram of an apparatus of the present application;

[0026] Figure 7 It is a schematic diagram of the structure of the server in some embodiments of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, the term "and / or" in the specification and claims is used to describe the association relationship of associated objects, indicating that three kinds of relationships can exist, for example, A and / or B can be represented: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the front and back associated objects are a kind of "or" relationship. In the embodiment of the present application, the term "multiple" refers to two or more, and other quantifiers are similar.

[0029] Reference Figure 1 , Figure 1 This is an implementation scenario diagram provided in an embodiment of the present application. An electronic device that implements a voice control function includes a voice assistant application, a command execution service, and a desktop system.

[0030] Among them, the function of the voice assistant application is to convert the voice command spoken by the user into a semantic text instruction. For example, if the user says "increase the volume", the electronic device can convert the voice command into a semantic text instruction in the form of characters that represents the meaning of "increase the volume" after collecting the voice command. In addition, multiple instruction parameters can be preset in the voice assistant application, and different instruction parameters can correspond to different system operations, such as instruction parameter 1 corresponding to system operation 1 for adjusting the volume, and instruction parameter 2 corresponding to the system operation for setting the wallpaper... Based on the preset instruction parameters, the voice assistant application can also determine the target instruction parameter corresponding to the function implemented by the semantic text instruction after obtaining the semantic text instruction, and send the target instruction parameter to the command execution service.

[0031] The function of the command execution service is to process and execute semantic text instructions. Specifically, the command execution service also presets multiple instruction parameters, and each instruction parameter has a corresponding instruction processing method. After the command execution service obtains the target instruction parameter corresponding to the semantic text instruction implementation function, it can execute the semantic text instruction according to the target instruction processing method corresponding to the target instruction parameter, thereby completing the corresponding system operation in the desktop system.

[0032] The desktop system is the desktop operating environment of the operating system. It provides an environment for the normal operation of desktop components such as the desktop background, launcher, taskbar, control center, and clipboard. The implementation of operations such as setting wallpaper, adjusting volume, and adjusting screen brightness in voice control are all completed in the desktop system by calling the corresponding desktop components.

[0033] The embodiment of the present application achieves the purpose of decoupling the desktop system and the voice assistant application and saving development and maintenance costs by setting a command execution service between the desktop system and the voice assistant application of the electronic device, and the command execution service defines the common command parameters for the desktop system and the voice assistant application. The embodiment of the present application can make the voice assistant application no longer limited by the development and maintenance of a large number of semantic instructions and the corresponding relationship between the system commands. This is because the system commands are limited by the architecture of the current desktop system. If the architecture of the desktop system corresponding to the voice assistant application is changed, it is necessary to redevelop the corresponding relationship between the semantic instructions and the system commands of the new architecture, which will generate large development and maintenance costs. The embodiment of the present application realizes the execution of semantic text instructions through common command parameters, so that the desktop system and the voice assistant application only need to dock and use common command parameters to cooperate with the command execution service to complete the voice control function, reducing the overall development amount, greatly improving the scope of application of the solution, and eliminating the development and maintenance costs of configuring the corresponding relationship between semantic instructions and system commands.

[0034] Figure 2 , is a flowchart of a method for executing a voice command provided in an embodiment of the present application, such as Figure 2 As shown, the method may include:

[0035] Step 101: Get voice command.

[0036] In the embodiments of this application, refer to Figure 1 A voice command can be a voice spoken by a user, such as "increase the volume". After the voice is collected by an electronic device, an audio file will be obtained, and the audio file is the voice command.

[0037] Step 102: convert the voice command into a semantic text command, and determine a target command parameter corresponding to the semantic text command from a plurality of preset command parameters; the command parameter has a corresponding command processing method.

[0038] In the embodiment of the present application, the data dimension of the voice command in audio form is relatively high, and it is difficult for the electronic device to process it directly. In order to realize the voice control function, the electronic device first needs to convert the voice command in audio form into a semantic text instruction in character form. For example, for a voice command with the content of "increase the volume", a semantic text instruction in character form representing the meaning of "increase the volume" will be obtained after conversion. The electronic device can quickly identify and understand the semantic text instruction in character form.

[0039] Furthermore, the embodiments of the present application can preset multiple common command parameters in the electronic device, such as open-fcc (open system settings), set-password (change login password), set-display (adjust screen resolution), etc. Different command parameters can correspond to different system operations, so that after the electronic device obtains the semantic text instruction, it can determine the corresponding target command parameter according to the meaning of the semantic text instruction (referring to the system operation triggered by the semantic text instruction). For example, assuming that the system operation corresponding to the semantic text instruction is to open system settings, the target command parameter corresponding to the semantic text instruction can be open-fcc; the system operation corresponding to the semantic text instruction is to change the login password, then the target command parameter corresponding to the semantic text instruction can be set-password.

[0040] In addition, by analyzing the methods of implementing system operations in the desktop system of the electronic device, a variety of instruction processing methods for implementing system operations in the desktop system can be obtained, and a correspondence between instruction parameters and instruction processing methods can be established based on the type of system operation implemented by the instruction parameters.

[0041] It should be noted that the various instruction processing methods obtained through analysis include various other instruction processing methods in addition to executing system commands, such as calling a message bus system interface method, calling a desktop system interface method, sending a message bus system event signal method, etc. These other instruction processing methods have certain versatility and can be applied to a variety of application scenarios and system architectures. Therefore, the embodiments of the present application use various other instruction processing methods in addition to executing system commands to implement instruction execution, and select a suitable solution from a variety of instruction processing methods according to actual needs, which is more flexible in selection and has a wider scope of application.

[0042] Step 103: Execute the semantic text instruction according to the target instruction processing mode corresponding to the target instruction parameter, thereby completing the corresponding system operation.

[0043] In an embodiment of the present application, after determining the target instruction processing method corresponding to the target instruction parameters of the current semantic text instruction, the semantic text instruction can be executed through the target instruction processing method, and the corresponding system operation can be completed by calling the desktop component of the desktop system to realize the voice control function.

[0044] In summary, the embodiment of the present application defines common instruction parameters and implements the execution of semantic text instructions according to the instruction parameters, so that the voice control function can be completed using only common instruction parameters, eliminating the development and maintenance costs of configuring the correspondence between semantic instructions and system commands, and achieving the purpose of decoupling and saving development and maintenance costs. The embodiment of the present application makes the voice control function no longer limited by the development and maintenance of a large number of correspondences between semantic instructions and system commands, reduces the overall development volume, and greatly improves the scope of application of the solution. In addition, the embodiment of the present application adopts a variety of instruction processing methods, and selects a suitable solution from a variety of instruction processing methods according to actual needs. The selection is more flexible and the scope of application is wider, which reduces the development and maintenance overhead caused by the instruction processing method of only executing system commands in the related art.

[0045] Figure 3 is a flowchart of the specific steps of a voice command execution method provided in an embodiment of the present application, such as Figure 3 As shown, the method may include:

[0046] Step 201: Get voice command.

[0047] This step may refer to the above step 101 and will not be described again here.

[0048] Step 202: Convert the voice command into a semantic text instruction through a voice assistant application, wherein the voice assistant application is configured with a plurality of preset instruction parameters.

[0049] In the embodiments of this application, refer to Figure 2 , a voice assistant application can be installed in the electronic device. The voice assistant application can be a process running in the foreground of the electronic device or in the background of the electronic device. The function of the voice assistant application is to obtain the voice commands collected by the electronic device, respond to the voice commands, and convert the voice commands into semantic text instructions in character form. In addition, these instruction parameters can be configured in the voice assistant application, so that the voice assistant application can easily access the command execution service in the electronic device, so that the voice assistant application and the command execution service can collaborate based on the instruction parameters.

[0050] As shown in Table 1 below, it shows the correspondence between semantic text instructions and instruction parameters. It can be seen that each semantic text instruction may correspond to an instruction parameter according to the actual system operation to be performed:

[0051] Semantic Text Instructions Command parameters Open System Settings open-fcc I want to change my login password set-password Adjust screen resolution set-display I want to change the default program set-default-apps Change the system theme set-theme Change the font set-font I want to adjust the output volume set-sound Turn up the volume set-volume-up I want to set the system time set-datetime Help me switch the time zone to East 8 set-datetime Help me turn on energy saving mode set-powersave-mode

[0052] Table 1

[0053] Step 203: Determine the target command parameter from multiple command parameters through the voice assistant application, and send the target command parameter to the command execution service; the command execution service is configured with the command parameter.

[0054] In an embodiment of the present application, referring to Table 1 above, it is shown that the voice assistant application can be pre-set with multiple instruction parameters, and the system operation executed according to the instruction parameters will correspond to a semantic text instruction. The system operation executed by the instruction parameters is the semantic meaning expressed by the corresponding semantic text instruction. Based on this, the voice assistant application can determine the target instruction parameter corresponding to the current semantic text instruction from the preset multiple instruction parameters, and send the target instruction parameter to the command execution service for subsequent execution operations.

[0055] Optionally, step 203 may specifically include:

[0056] Sub-step 2031: Determine the semantic content of the semantic text instruction.

[0057] Sub-step 2032: taking the instruction parameter that matches the semantic content among the multiple instruction parameters as the target instruction parameter.

[0058] In an embodiment of the present application, for sub-steps 2031-2032, the voice assistant application of the electronic device can specifically analyze the semantic content of the semantic text instruction, which can specifically represent the system operation to be performed by the semantic text instruction, and the instruction parameter can correspond to such semantic content, that is, as shown in Table 1 above, the voice assistant application can specifically use the instruction parameter among multiple instruction parameters that matches the semantic content of the current semantic text instruction as the target instruction parameter.

[0059] For example, referring to Table 1 above, if the semantic meaning of a semantic text instruction is "turn up the volume", then its corresponding target instruction parameter may be set-volume-up.

[0060] Step 204: Convert the target instruction parameters into target semantic execution instructions through the command execution service.

[0061] In an embodiment of the present application, in order to execute the semantic text instruction, the command execution service can first determine the target instruction parameters corresponding to the semantic text instruction, and then call the execution command: ai-assistant inside the command execution service to convert the target instruction parameters into a target semantic execution instruction key for execution. That is, the command execution service does not need to pay attention to the specific operation implementation, but the command ai-assistant is used to complete the specific instruction content. The existence of the command execution service greatly reduces the coupling between the voice assistant application and the desktop environment.

[0062] Refer to the following Table 2, which further provides the correspondence between the semantic text instructions and the semantic execution instructions based on the semantic text instructions provided in Table 1:

[0063]

[0064]

[0065] Table 2

[0066] Step 205: Execute the target semantic execution instruction according to the target instruction processing mode corresponding to the target instruction parameter, thereby completing the corresponding system operation.

[0067] In the embodiments of this application, refer to Figure 4 , which shows a schematic diagram of the correspondence between semantic text instructions and instruction processing methods, and specifically shows how to determine the multiple instruction processing methods supported by the semantic text instructions used to execute system operations according to the method class when the system operation is executed. After receiving the semantic instruction (referring to the semantic text instruction), the method class of the system operation corresponding to the semantic text instruction can be identified when it is executed, so as to determine the corresponding instruction processing method according to the method class. The instruction processing methods supported by the semantic text instructions in the embodiment of the present application include but are not limited to: executing system command method (calling system command), calling message bus system interface method (calling DBus method), calling desktop system interface method, sending message bus system event signal method (sending signal to desktop DBus), and command execution service internal implementation method (developing and processing in assistant service).

[0068] The various instruction processing methods supported by the embodiments of the present application have a certain degree of versatility and can be applied to a variety of application scenarios and system architectures. Therefore, the embodiments of the present application can adopt a variety of other instruction processing methods in addition to executing system commands to implement instruction execution. According to actual needs, a suitable solution can be selected from a variety of instruction processing methods, which is more flexible in selection and has a wider scope of application.

[0069] Referring to the following Table 3, which provides the correspondence between instruction parameters, instruction processing methods and operating principles based on Tables 1 and 2, it can be seen that for a variety of instruction parameters, each instruction parameter has a corresponding instruction processing method, and the embodiment of the present application supports at least 5 instruction processing methods, which greatly improves the scope of application of the solution.

[0070]

[0071]

[0072] Table 3

[0073] Optionally, in one implementation, the target instruction processing method includes: executing a system command method; the instruction parameter has a corresponding system command; step 205 may specifically include:

[0074] Sub-step 2051: Execute the semantic text instruction by executing the target system command corresponding to the target instruction parameter, thereby completing the corresponding system operation.

[0075] Specifically, for the execution of semantic text instructions, one method can be to implement the execution of corresponding instruction parameters based on executing system commands. The desktop system of the electronic device can have system commands under the system architecture based on its own system architecture. The system commands can be directly called by the desktop system to implement system operations. The electronic device can configure corresponding system commands for the instruction parameters using the system command method, thereby implementing the execution of the semantic text instructions by executing the target system commands corresponding to the target instruction parameters, thereby completing the corresponding system operation.

[0076] Refer to the following Table 4, which shows the correspondence between semantic text instructions and system commands:

[0077]

[0078]

[0079] Table 4

[0080] Optionally, in another implementation, the target instruction processing method includes: calling a message bus system interface method; step 205 may specifically include:

[0081] Sub-step 2052: According to the target instruction parameters, the target message bus system interface provided by the desktop system is called to execute the semantic text instruction, thereby completing the corresponding system operation. The target message bus system interface is used to implement the function corresponding to the target instruction parameters.

[0082] Specifically, for the execution of semantic text instructions, another way is to implement the execution of corresponding instruction parameters based on the message bus (DBus, Daemon bus) system interface provided by the desktop system. The DBus system is an efficient inter-process communication mechanism. Each process can be connected to the DBus system. The connected process can receive or transmit messages through the DBus system, and the process can also wait for the response of kernel events. Specifically, the DBus system provided by the desktop system can provide an instruction parameter corresponding DBus system interface for implementing instruction parameter corresponding instruction operation. For example, when an electronic device executes an instruction parameter for setting the screen resolution, it can control the corresponding desktop component process of the desktop system (the desktop component process is connected to the DBus system) by calling the DBus system interface for implementing instruction parameter corresponding instruction operation provided by the DBus system to complete the system operation of setting the screen resolution.

[0083] Optionally, in another implementation, the target instruction processing method includes: calling the desktop system interface method; step 205 may specifically include:

[0084] Sub-step 2053, according to the target instruction parameters, the execution of the semantic text instruction is realized by calling the target desktop interface in the development library of the desktop system, thereby completing the corresponding system operation. The target desktop interface is used to implement the function corresponding to the target instruction parameters.

[0085] Specifically, for the execution of semantic text instructions, another way is to implement the execution of corresponding instruction parameters by calling the desktop system interface. The desktop system is the desktop operating environment of the operating system, which provides an environment for the normal operation of desktop components such as desktop background, launcher, taskbar, control center, clipboard, etc. The implementation of operations such as setting wallpaper, adjusting volume, and adjusting screen brightness in voice control are all completed in the desktop system by calling the corresponding desktop components. The desktop system may have a development library, and the development library may define a desktop interface for implementing system operations, so that the execution of some semantic text instructions (such as setting desktop themes) can be specifically achieved by calling the target desktop interface used to implement the corresponding system operation in the development library of the desktop system, and the method defined in the target desktop interface can automatically control the desktop components of the desktop system, thereby implementing the execution of system operations.

[0086] Optionally, in another implementation, the target instruction processing method includes: sending a message bus system event signal method; step 205 may specifically include:

[0087] Sub-step 2054: according to the target instruction parameters, a target message bus system event signal is sent to the target program of the desktop system, so that the target program can respond to the target message bus system event signal to execute the semantic text instruction, thereby completing the corresponding system operation. The target program is a program for implementing the function corresponding to the target instruction parameters, and the target message bus system event signal is a signal for triggering the execution of the target program.

[0088] Specifically, for the execution of semantic text instructions, another way is to implement the execution of corresponding instruction parameters by sending a message bus system (DBus) event signal. The DBus system is an efficient inter-process communication mechanism. Each process can be connected to the DBus system to achieve overall control. Specifically, the DBus system can send event information to the desktop component process connected thereto, thereby triggering the desktop component process to run to perform the corresponding system operation, thereby executing some semantic text instructions (such as setting sound). Specifically, the message bus system event signal for triggering the setting of sound can be sent to the sound control desktop component of the desktop system. The sound control desktop component responds to the message bus system event signal to implement the execution of the semantic text instruction, thereby completing the system operation corresponding to the setting of sound.

[0089] Optionally, in another implementation, the target instruction processing method includes: an internal implementation method of the command execution service; step 205 may specifically include:

[0090] Sub-step 2055: According to the target instruction parameters, the command execution service that executes the semantic text instruction calls the target plug-in in the development library of the command execution service to execute the semantic text instruction, thereby completing the corresponding system operation. The target plug-in is used to implement the function corresponding to the target instruction parameters.

[0091] Specifically, for the execution of semantic text instructions, another way is to implement the execution of corresponding instruction parameters through the internal implementation of the command execution service. The command execution service of the embodiment of the present application can have a built-in development library, and the development library can define plug-ins for implementing system operations, so that the execution of some semantic text instructions (such as turning on the energy-saving operation mode) can be specifically achieved through the target plug-in for implementing the corresponding system operation in the development library built into the command execution service, and the method defined in the target plug-in can automatically control the desktop component of the desktop system, thereby realizing the execution of system operations.

[0092] Optionally, the target instruction processing mode is one of multiple instruction processing modes; before step 205, the method may further include:

[0093] Step 206: Obtain the correspondence between the instruction parameters and the instruction processing method.

[0094] Step 207: Determine the target instruction processing method corresponding to the target instruction parameter according to the corresponding relationship.

[0095] In the embodiment of the present application, for steps 206-207, the correspondence between the instruction parameters and the instruction processing method can be preset within the command execution service, so that the command execution service can determine the target instruction processing method corresponding to the current target instruction parameters based on the correspondence.

[0096] In summary, the embodiment of the present application defines common instruction parameters and implements the execution of semantic text instructions according to the instruction parameters, so that the voice control function can be completed using only common instruction parameters, eliminating the development and maintenance costs of configuring the correspondence between semantic instructions and system commands, achieving the purpose of decoupling and saving development and maintenance costs. The embodiment of the present application makes the voice control function no longer limited to the development and maintenance of a large number of correspondences between semantic instructions and system commands, reducing the overall development volume and greatly improving the scope of application of the solution. In addition, the embodiment of the present application adopts a variety of instruction processing methods, and selects a suitable solution from a variety of instruction processing methods according to actual needs. The selection is more flexible and the scope of application is wider, reducing the development and maintenance overhead brought by the instruction processing method of only executing system commands in the related art.

[0097] Figure 5 : is a block diagram of a voice command execution device provided in an embodiment of the present application, the device comprising:

[0098] An acquisition module 301 is used to acquire a voice command;

[0099] The conversion module 302 is used to convert the voice command into a semantic text instruction, and determine a target instruction parameter corresponding to the semantic text instruction from a plurality of preset instruction parameters; the instruction parameter has a corresponding instruction processing mode;

[0100] The execution module 303 is used to execute the semantic text instruction according to the target instruction processing mode corresponding to the target instruction parameter, so as to complete the corresponding system operation.

[0101] Optionally, the conversion module 302 includes:

[0102] A first conversion submodule, configured to convert the voice command into a semantic text instruction through a voice assistant application, wherein the voice assistant application is configured with a plurality of preset instruction parameters;

[0103] A sending submodule, used for determining the target instruction parameter from a plurality of instruction parameters through a voice assistant application, and sending the target instruction parameter to a command execution service; the command execution service is configured with the instruction parameter;

[0104] The execution module 303 includes:

[0105] A second conversion submodule, used for converting the target instruction parameter into a target semantic execution instruction through the command execution service;

[0106] The execution submodule is used to execute the target semantic execution instruction according to the target instruction processing mode corresponding to the target instruction parameter, so as to complete the corresponding system operation.

[0107] Optionally, the sending submodule includes:

[0108] A content identification submodule, used to determine the semantic content of the semantic text instruction;

[0109] The matching submodule is used to use the instruction parameter that matches the semantic content among the multiple instruction parameters as the target instruction parameter.

[0110] Optionally, the target instruction processing mode is one of multiple instruction processing modes;

[0111] The device also includes:

[0112] A corresponding relationship module, used for obtaining the corresponding relationship between the instruction parameters and the instruction processing mode;

[0113] The matching module is used to determine the target instruction processing mode corresponding to the target instruction parameter according to the corresponding relationship.

[0114] Optionally, the target instruction processing method includes: executing a system command method; the instruction parameter has a corresponding system command;

[0115] The execution module 303 includes:

[0116] The first processing submodule is used to execute the semantic text instruction by executing the target system command corresponding to the target instruction parameter, thereby completing the corresponding system operation.

[0117] Optionally, the target instruction processing method includes: calling a message bus system interface method;

[0118] The execution module 303 includes:

[0119] The second processing sub-module is used to execute the semantic text instruction according to the target instruction parameters by calling the target message bus system interface provided by the desktop system, thereby completing the corresponding system operation. The target message bus system interface is used to implement the function corresponding to the target instruction parameters.

[0120] Optionally, the target instruction processing method includes: calling a desktop system interface method;

[0121] The execution module 303 includes:

[0122] The third processing sub-module is used to execute the semantic text instruction according to the target instruction parameters by calling the target desktop interface in the development library of the desktop system, thereby completing the corresponding system operation. The target desktop interface is used to implement the function corresponding to the target instruction parameters.

[0123] Optionally, the target instruction processing method includes: sending a message bus system event signal method;

[0124] The execution module 303 includes:

[0125] The fourth processing submodule is used to send a target message bus system event signal to the target program of the desktop system according to the target instruction parameters, so that the target program responds to the target message bus system event signal to execute the semantic text instruction, thereby completing the corresponding system operation. The target program is a program for implementing the function corresponding to the target instruction parameters, and the target message bus system event signal is a signal for triggering the execution of the target program.

[0126] Optionally, the target instruction processing method includes: an internal implementation method of a command execution service;

[0127] The execution module 303 includes:

[0128] The fifth processing sub-module is used to call the target plug-in in the development library of the command execution service that executes the semantic text instruction according to the target instruction parameters, so as to implement the execution of the semantic text instruction and complete the corresponding system operation. The target plug-in is used to implement the function corresponding to the target instruction parameter.

[0129] In summary, the embodiment of the present application defines common instruction parameters and implements the execution of semantic text instructions according to the instruction parameters, so that the voice control function can be completed using only common instruction parameters, eliminating the development and maintenance costs of configuring the correspondence between semantic instructions and system commands, achieving the purpose of decoupling and saving development and maintenance costs. The embodiment of the present application makes the voice control function no longer limited to the development and maintenance of a large number of correspondences between semantic instructions and system commands, reducing the overall development volume and greatly improving the scope of application of the solution. In addition, the embodiment of the present application adopts a variety of instruction processing methods, and selects a suitable solution from a variety of instruction processing methods according to actual needs. The selection is more flexible and the scope of application is wider, reducing the development and maintenance overhead brought by the instruction processing method of only executing system commands in the related art.

[0130] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0131] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0132] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0133] An embodiment of the present application provides a voice command execution device, including a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors to include methods for performing one or more of the above embodiments.

[0134] Figure 6 8 is a block diagram of a voice command execution device 800 according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0135] Reference Figure 6 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0136] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0137] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0138] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0139] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0140] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a voice information processing mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0141] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0142] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also search for changes in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0143] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency information processing (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0144] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0145] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0146] Figure 7 1 is a schematic diagram of the structure of the server in some embodiments of the present application. The server 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1922 (for example, one or more processors) and memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944. Among them, the memory 1932 and the storage medium 1930 can be short-term storage or permanent storage. The program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1922 can be configured to communicate with the storage medium 1930 and execute a series of instruction operations in the storage medium 1930 on the server 1900.

[0147] The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and / or, one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0148] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device (server or terminal), enables the device to execute the above-mentioned embodiment method.

[0149] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the device (server or terminal), enables the device to perform the description of the method of the above embodiment, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0150] In addition, it should be noted that: the embodiment of the present application also provides a computer program product or a computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions so that the computer device performs the description of the method of the above embodiment, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0151] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0152] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

[0153] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

[0154] The above is a detailed introduction to a voice command execution method, device, electronic device and computer-readable storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A voice command execution method, characterized in that: The method comprises: Get voice commands; Converting the voice command into a semantic text command, and determining a target command parameter corresponding to the semantic text command from a plurality of preset command parameters; the command parameter having a corresponding command processing mode; The semantic text instruction is executed according to the target instruction processing mode corresponding to the target instruction parameter, thereby completing the corresponding system operation.

2. The voice command execution method according to claim 1, characterized in that: The converting the voice command into a semantic text instruction and determining a target instruction parameter corresponding to the semantic text instruction from a plurality of preset instruction parameters includes: Converting the voice command into a semantic text instruction through a voice assistant application, wherein the voice assistant application is configured with a plurality of preset instruction parameters; Determine the target command parameter from a plurality of command parameters through a voice assistant application, and send the target command parameter to a command execution service; the command execution service is configured with the command parameter; The executing the semantic text instruction according to the target instruction processing mode corresponding to the target instruction parameter, thereby completing the corresponding system operation, includes: Converting the target instruction parameter into a target semantic execution instruction through the command execution service; The target semantic execution instruction is executed according to the target instruction processing mode corresponding to the target instruction parameter, thereby completing the corresponding system operation.

3. The voice command execution method according to claim 1, characterized in that: The step of determining a target instruction parameter corresponding to the semantic text instruction from a plurality of preset instruction parameters includes: Determining the semantic content of the semantic text instruction; The instruction parameter that matches the semantic content among the multiple instruction parameters is used as the target instruction parameter.

4. The voice command execution method according to claim 1, characterized in that: The target instruction processing method includes: executing a system command method; the instruction parameter has a corresponding system command; The executing the semantic text instruction according to the target instruction processing mode corresponding to the target instruction parameter, thereby completing the corresponding system operation, includes: The semantic text instruction is executed by executing the target system command corresponding to the target instruction parameter, thereby completing the corresponding system operation.

5. The voice command execution method according to claim 1, characterized in that: The target instruction processing method includes: calling the message bus system interface method; The executing the semantic text instruction according to the target instruction processing mode corresponding to the target instruction parameter, thereby completing the corresponding system operation, includes: According to the target instruction parameters, the semantic text instruction is executed by calling the target message bus system interface provided by the desktop system, thereby completing the corresponding system operation; the target message bus system interface is used to implement the function corresponding to the target instruction parameters.

6. The voice command execution method according to claim 1, characterized in that: The target instruction processing method includes: calling the desktop system interface method; The executing the semantic text instruction according to the target instruction processing mode corresponding to the target instruction parameter, thereby completing the corresponding system operation, includes: According to the target instruction parameters, the semantic text instruction is executed by calling the target desktop interface in the development library of the desktop system, thereby completing the corresponding system operation; the target desktop interface is used to implement the function corresponding to the target instruction parameters.

7. The voice command execution method according to claim 1, characterized in that: The target instruction processing method includes: sending a message bus system event signal method; The executing the semantic text instruction according to the target instruction processing mode corresponding to the target instruction parameter, thereby completing the corresponding system operation, includes: According to the target instruction parameters, a target message bus system event signal is sent to the target program of the desktop system, so that the target program responds to the target message bus system event signal to execute the semantic text instruction, thereby completing the corresponding system operation; the target program is a program used to implement the function corresponding to the target instruction parameters, and the target message bus system event signal is a signal used to trigger the execution of the target program.

8. The voice command execution method according to claim 1, characterized in that: The target instruction processing method includes: command execution service internal implementation method; The executing the semantic text instruction according to the target instruction processing mode corresponding to the target instruction parameter, thereby completing the corresponding system operation, includes: According to the target instruction parameters, the command execution service that executes the semantic text instruction calls the target plug-in in the development library of the command execution service to execute the semantic text instruction, thereby completing the corresponding system operation; the target plug-in is used to implement the function corresponding to the target instruction parameters.

9. A voice command execution device, characterized in that: The device comprises: An acquisition module, used to acquire voice commands; A conversion module, used to convert the voice command into a semantic text instruction, and determine a target instruction parameter corresponding to the semantic text instruction from a plurality of preset instruction parameters; the instruction parameter has a corresponding instruction processing mode; The execution module is used to execute the semantic text instruction according to the target instruction processing mode corresponding to the target instruction parameter, so as to complete the corresponding system operation.

10. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method as claimed in any one of claims 1 to 8.