Terminal, application program control method and device
By introducing an intermediate service layer between the speech recognition module and the multimedia application, registering the session object and obtaining the active target session object, the problem of high integration complexity of the speech recognition module is solved, and efficient control of the multimedia application is achieved.
Patent Information
- Application Number
- CN202210985348.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-17
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2042-08-17
AI Technical Summary
When the speech recognition module integrates the control SDK of multimedia applications, it results in greater integration complexity and workload, making it difficult to effectively control multimedia applications.
An intermediate service layer is introduced, and each application registers a session object on the intermediate service layer. The speech recognition module obtains the activated target session object through the intermediate service layer to control the target application and avoid directly integrating the control SDK of each application.
It reduces the integration complexity and workload of the speech recognition module, simplifies the control process of multimedia applications, and improves the efficiency and flexibility of integration.
Smart Images

Figure CN115484310B
Abstract
Description
Technical Field
[0001] The present application relates to the field of speech recognition technology, and in particular to a method and device for controlling a terminal and an application program. Background Art
[0002] At present, when implementing voice control of various applications, such as implementing voice control of multimedia applications to play multimedia data, each multimedia application needs to define a communication interface with a voice recognition module, and needs to provide a playback control SDK (Software Development Kit) of the multimedia application. The playback control SDK of each multimedia application needs to be integrated into the voice recognition module, and the voice recognition module implements playback control of the multimedia application through the playback control SDK of each multimedia application.
[0003] However, since the control SDK of each application is integrated into the speech recognition module, the integration of the speech recognition module is relatively complex and the integration workload is relatively large. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a terminal, an application control method and a device to solve the problem that the integration of the speech recognition module is complex and the integration workload is large. The specific technical solution is as follows:
[0005] In a first aspect of the implementation of the present application, a terminal is provided, wherein an intermediate service layer, a speech recognition module and a plurality of applications are integrated on the terminal, wherein the speech recognition module is connected to the intermediate service layer, the intermediate service layer is connected to each application, and a session object corresponding to each application is registered in the intermediate service layer;
[0006] The speech recognition module is used to convert the speech signal into a control instruction according to a preset control protocol; obtain the target session object in the activated state in the intermediate service layer; and send the control instruction to the intermediate service layer based on the target session object;
[0007] The intermediate service layer is used to send the target session object in an activated state to the voice recognition module; receive the control instruction sent by the voice recognition module; and send the control instruction to the target application corresponding to the target session object, so that the target application receives the control instruction according to the preset control protocol and controls the operation of the target application according to the control instruction.
[0008] Optionally, the terminal is connected to a controller;
[0009] The controller is used to collect voice signals and send the voice signals to the voice recognition module of the terminal.
[0010] Optionally, the application is used to send registration information to the intermediate service layer;
[0011] The intermediate service layer is further used to generate a session object corresponding to the application based on the registration information.
[0012] Optionally, the intermediate service layer is further used for:
[0013] For each application, detect the running status of the application;
[0014] When it is detected that the running state of the application is the foreground running state, the session object corresponding to the application is set to the active state;
[0015] When it is detected that the running state of the application is the background running state, the session object corresponding to the application is set to an inactive state.
[0016] Optionally, the intermediate service layer is specifically used for:
[0017] Receiving, through a preset framework interface, a control instruction sent by the speech recognition module based on the target conversation object;
[0018] Searching for the target session object based on the identifier of the target session object carried by the control instruction;
[0019] When the target session object is found, based on the target session object, the preset framework interface implemented by the target application corresponding to the target session object is called back to send the control instruction to the target application.
[0020] Optionally, there are multiple target session objects;
[0021] The speech recognition module is specifically used for:
[0022] Determine, from among the plurality of target conversation objects, a target conversation object having the greatest relevance to the control instruction;
[0023] Based on the determined target session object, the control instruction is sent to the intermediate service layer.
[0024] Optionally, the voice recognition module is also used to receive the control protocols sent by the various applications through the intermediate service layer before converting the voice signal into a control instruction according to the preset control protocol; if a control protocol is received, the control protocol is determined to be the preset control protocol; if multiple control protocols are received, a control protocol is randomly selected from the multiple control protocols as the preset control protocol.
[0025] In a second aspect of the implementation of the present application, a method for controlling an application is also provided, which is applied to an intermediate service layer, wherein the intermediate service layer is connected to a speech recognition module, and the intermediate service layer is connected to each application, and a session object corresponding to each application is registered in the intermediate service layer, and the method includes:
[0026] Sending the target conversation object in an activated state to the speech recognition module;
[0027] receiving a control instruction sent by the speech recognition module based on the target conversation object, wherein the control instruction is an instruction obtained by the speech recognition module converting a speech signal according to a preset control protocol;
[0028] The control instruction is sent to a target application corresponding to the target session object, so that the target application controls the operation of the target application according to the control instruction.
[0029] Optionally, the method further includes:
[0030] For each application, detect the running status of the application;
[0031] When it is detected that the running state of the application is the foreground running state, the session object corresponding to the application is set to the active state;
[0032] When it is detected that the running state of the application is the background running state, the session object corresponding to the application is set to an inactive state.
[0033] Optionally, the step of receiving a control instruction sent by the speech recognition module based on the target conversation object includes:
[0034] Receiving, through a preset framework interface, a control instruction sent by the speech recognition module based on the target conversation object;
[0035] The step of sending the control instruction to the target application corresponding to the target session object includes:
[0036] Searching for the target session object based on the identifier of the target session object carried by the control instruction;
[0037] When the target session object is found, based on the target session object, the preset framework interface implemented by the target application corresponding to the target session object is called back to send the control instruction to the target application.
[0038] In a third aspect of the implementation of the present application, a method for controlling an application is also provided, which is applied to a speech recognition module, wherein the speech recognition module is connected to an intermediate service layer, and the intermediate service layer is connected to each application, and a session object corresponding to each application is registered in the intermediate service layer, and the method includes:
[0039] According to the preset control protocol, the voice signal is converted into a control instruction;
[0040] Acquire the target session object in the activated state in the intermediate service layer;
[0041] Based on the target session object, the control instruction is sent to the intermediate service layer, so that the intermediate service layer sends the control instruction to the target application corresponding to the target session object, and enables the target application to control the operation of the target application according to the control instruction.
[0042] Optionally, there are multiple target session objects;
[0043] The step of sending the control instruction to the intermediate service layer based on the target session object comprises:
[0044] Determine, from among the plurality of target conversation objects, a target conversation object having the greatest relevance to the control instruction;
[0045] Based on the determined target session object, the control instruction is sent to the intermediate service layer.
[0046] Optionally, before converting the voice signal into a control instruction according to a preset control protocol, the method further includes:
[0047] The control protocols sent by each application are received through the intermediate service layer; if one control protocol is received, the control protocol is determined to be the preset control protocol; if multiple control protocols are received, a control protocol is randomly selected from the multiple control protocols as the preset control protocol.
[0048] In a fourth aspect of the implementation of the present application, there is also provided an application control device, which is applied to an intermediate service layer, wherein the intermediate service layer is connected to a speech recognition module, and the intermediate service layer is connected to each application, and a session object corresponding to each application is registered in the intermediate service layer, and the device comprises:
[0049] A first sending unit, configured to send the target conversation object in an activated state to the speech recognition module;
[0050] A receiving unit, configured to receive a control instruction sent by the speech recognition module based on the target conversation object, wherein the control instruction is an instruction obtained by the speech recognition module converting a speech signal according to a preset control protocol;
[0051] The second sending unit is used to send the control instruction to the target application corresponding to the target session object, so that the target application controls the operation of the target application according to the control instruction.
[0052] Optionally, the device further comprises:
[0053] A detection unit, used for detecting the running status of each application program;
[0054] The setting unit is used to set the session object corresponding to the application to an activated state when it is detected that the running state of the application is a foreground running state; when it is detected that the running state of the application is a background running state, the session object corresponding to the application is set to an inactivated state.
[0055] Optionally, the receiving unit is specifically configured to receive, through a preset framework interface, a control instruction sent by the speech recognition module based on the target conversation object;
[0056] The second sending unit is specifically used to search for the target session object based on the identifier of the target session object carried by the control instruction; when the target session object is found, based on the target session object, call back the preset framework interface implemented by the target application corresponding to the target session object to send the control instruction to the target application.
[0057] In a fifth aspect of the implementation of the present application, there is also provided a control device for an application program, which is applied to a speech recognition module, wherein the speech recognition module is connected to an intermediate service layer, wherein the intermediate service layer is connected to each application program, wherein a session object corresponding to each application program is registered in the intermediate service layer, and wherein the device comprises:
[0058] A conversion unit, used to convert the voice signal into a control instruction according to a preset control protocol;
[0059] A first acquisition unit, used to acquire a target session object in an activated state in the intermediate service layer;
[0060] The third sending unit is used to send the control instruction to the intermediate service layer based on the target session object, so that the intermediate service layer sends the control instruction to the target application corresponding to the target session object, and enables the target application to control the operation of the target application according to the control instruction.
[0061] Optionally, there are multiple target session objects;
[0062] The third sending unit is specifically configured to determine, from among a plurality of target session objects, a target session object that has the greatest correlation with the control instruction; and send the control instruction to the intermediate service layer based on the determined target session object.
[0063] Optionally, the device further comprises:
[0064] The second acquisition unit is used to receive the control protocols sent by each application through the intermediate service layer before converting the voice signal into a control instruction according to the preset control protocol; if a control protocol is received, the control protocol is determined to be the preset control protocol; if multiple control protocols are received, a control protocol is randomly selected from the multiple control protocols as the preset control protocol.
[0065] In the technical solution provided by the embodiment of the present application, an intermediate service layer is added between the speech recognition module and the application. Each application registers a corresponding session object on the intermediate service layer, and the session object stores the information required for the application session. When the speech recognition module needs to control an application (i.e., the target application), the activated target session object (i.e., the session object corresponding to the target application) is obtained from the intermediate service layer. Since the target session object stores the information required for the target application session, the speech recognition module can control the operation of the target application by using the target session object. It can be seen that in the technical solution provided by the embodiment of the present application, there is no need to integrate the control SDK of each application in the speech recognition module, and it is no longer dependent on the specific implementation of each multimedia application, which reduces the integration complexity and integration workload of the speech recognition module, and solves the problem of large integration complexity and large integration workload of the speech recognition module. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0067] Figure 1 A control system block diagram of a multimedia application in the related art;
[0068] Figure 2A schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0069] Figure 3 Based on Figure 2 A schematic diagram of a structure of a network architecture of the terminal shown;
[0070] Figure 4 A first flow chart of a method for controlling an application program provided in an embodiment of the present application;
[0071] Figure 5 A second flow chart of a method for controlling an application program provided in an embodiment of the present application;
[0072] Figure 6 A third flow chart of a method for controlling an application program provided in an embodiment of the present application;
[0073] Figure 7 A block diagram of a control system for a multimedia application provided in an embodiment of the present application;
[0074] Figure 8 A first structural schematic diagram of a control device for an application provided in an embodiment of the present application;
[0075] Fig. 9 A second structural schematic diagram of a control device for an application provided in an embodiment of the present application. DETAILED DESCRIPTION
[0076] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0077] The following is an explanation of the terms that appear in the embodiments of the present application.
[0078] An application is a computer program that completes one or more specific tasks. In the embodiment of the present application, the application may include: multimedia application, instant messaging and presentation, etc.
[0079] The intermediate service layer is used to realize the transfer of content and information between the speech recognition module and the application. The presentation form of the intermediate service layer can be set according to the application layer program and the operating system. For example, in the Android system, when realizing the transfer of content and information between the speech recognition module and the multimedia application, the intermediate service layer can be the MediaSession (multimedia session) media framework.
[0080] The Session object is used to store information required for a specific user session. In the embodiment of the present application, the specific user is the application.
[0081] At present, when implementing voice control of various applications, such as implementing voice control of multimedia applications to play multimedia data, each multimedia application needs to define the communication interface between the voice recognition module and provide the playback control SDK of the multimedia application. The playback control SDK of each multimedia application needs to be integrated on the voice recognition module, such as Figure 1 As shown, the playback control SDKs AC of the multimedia applications AC are integrated on the voice recognition module. Through the playback control SDKs of the multimedia applications, the voice recognition module realizes playback control of the multimedia applications.
[0082] However, since the control SDK of each application is integrated into the speech recognition module, the integration of the speech recognition module is relatively complex and the integration workload is relatively large.
[0083] In order to solve the problem that the integration of the speech recognition module is relatively complex and the integration workload is relatively large, the embodiment of the present application provides a terminal such as Figure 2 As shown, it includes: a speech recognition module 21, an intermediate service layer 22 and multiple applications 23. The speech recognition module 21 is connected to the intermediate service layer 22, and the intermediate service layer 22 is connected to each application 23. The intermediate service layer 22 has session objects corresponding to each application 23 registered therein.
[0084] The speech recognition module 21 is used to convert the speech signal into a control instruction according to a preset control protocol; obtain the target session object in the activated state in the intermediate service layer 22; and send the control instruction to the intermediate service layer 22 based on the target session object;
[0085] The intermediate service layer 22 is used to send the target conversation object in the activated state to the voice recognition module 21; receive the control instruction sent by the voice recognition module 21; send the control instruction to the target application corresponding to the target conversation object, so that the target application receives the control instruction according to the preset control protocol and controls the operation of the target application according to the control instruction.
[0086] In the technical solution provided by the embodiment of the present application, an intermediate service layer 22 is added between the speech recognition module 21 and the application 23. Each application 23 registers a corresponding session object on the intermediate service layer 22, and the session object stores the information required for the session of the application 23. When the speech recognition module 21 needs to control an application 23 (i.e., the target application), the activated target session object (i.e., the session object corresponding to the target application) is obtained from the intermediate service layer 22. Since the target session object stores the information required for the session of the target application, the speech recognition module 21 can control the operation of the target application by using the target session object. It can be seen that in the technical solution provided by the embodiment of the present application, there is no need to integrate the control SDK of each application 23 in the speech recognition module 21, and it no longer depends on the specific implementation of each multimedia application, which reduces the integration complexity and integration workload of the speech recognition module 21, and solves the problem of large integration complexity and large integration workload of the speech recognition module 21.
[0087] In the embodiment of the present application, the terminal may be a mobile phone, a tablet computer, a personal computer, a television, a projector, etc. In the embodiment of the present application, the speech recognition module 21, the intermediate service layer 22 and the application 23 may be integrated into an application control system, which may be applied to any terminal.
[0088] In some embodiments, the terminal 100 is connected to the controller 200, such as a terminal with a remote controller (ie, the controller 200) such as a TV or a projector. The specific network architecture is as follows: Figure 3 In this case, the controller 200 is used to collect the voice signal and send the voice signal to the voice recognition module 21 of the terminal 100.
[0089] The voice recognition module 21 of the terminal 100 interacts with the intermediate service layer 22 and the application 23 based on the voice signal sent by the controller 200 to remotely control the operation of the target application, thereby improving the convenience of the solution application.
[0090] In some embodiments, the application 23 is used to send registration information to the intermediate service layer 22, wherein the registration information includes information required for the session of the application 23. In this case, the intermediate service layer 22 can also be used to generate a session object corresponding to the application 23 based on the registration information.
[0091] In an embodiment of the present application, if an application 23 includes multiple pages, the application 23 can register the session objects corresponding to each page in the intermediate service layer 22 respectively, that is, the page and the session object correspond one to one, and an application 23 registers multiple session objects. The speech recognition module 21 can control a page of an application 23 through a session object.
[0092] If an application 23 includes multiple pages, the application 23 may also register only one session object, and the speech recognition module 21 may control multiple pages of the application 23 through one session object.
[0093] Based on the control system of the above application program, the embodiment of the present application further provides a control method of the application program. The control method of the application program provided by the embodiment of the present application is described in detail below in conjunction with a specific embodiment.
[0094] like Figure 4 As shown, a control method for an application is provided, which is applied to a speech recognition module 21, wherein the speech recognition module 21 is connected to an intermediate service layer 22, and the intermediate service layer 22 is connected to each application 23, wherein a session object corresponding to each application 23 is registered in the intermediate service layer 22. The control method for the application comprises the following steps:
[0095] Step S41, converting the voice signal into a control instruction according to a preset control protocol;
[0096] Step S42, obtaining the target session object in the activated state in the intermediate service layer 22;
[0097] Step S43, based on the target session object, a control instruction is sent to the intermediate service layer 22, so that the intermediate service layer 22 sends the control instruction to the target application corresponding to the target session object, and the target application controls the operation of the target application according to the control instruction.
[0098] In the technical solution provided by the embodiment of the present application, an intermediate service layer 22 is added between the speech recognition module 21 and the application 23. Each application 23 registers a corresponding session object on the intermediate service layer 22, and the session object stores the information required for the session of the application 23. When the speech recognition module 21 needs to control an application 23 (i.e., the target application), the activated target session object (i.e., the session object corresponding to the target application) is obtained from the intermediate service layer 22. Since the target session object stores the information required for the session of the target application, the speech recognition module 21 can control the operation of the target application by using the target session object. It can be seen that in the technical solution provided by the embodiment of the present application, there is no need to integrate the control SDK of each application 23 in the speech recognition module 21, and it no longer depends on the specific implementation of each multimedia application, which reduces the integration complexity and integration workload of the speech recognition module 21, and solves the problem of large integration complexity and large integration workload of the speech recognition module 21.
[0099] In the above step S41, a preset control protocol is set in the voice recognition module 21, and the preset control protocol may include: user behavior, control information parameters, and the use of user behavior and control information parameters. Taking the application 23 as a multimedia player as an example, the preset control protocol is a playback control protocol, and the user behavior in the playback control protocol may include "fast forward", "rewind", "pause", "continue", "jump" and "switch"; the control information parameters in the playback control protocol are parameters required to control the operation of the application 23, and may include playback speed multiples, duration and bitstream format, etc. For example, the playback speed multiple may be 1.5 times, 2 times, 3 times, etc., the duration may be 3 seconds, 5 seconds, etc., and the bitstream format may include smooth, standard definition, high definition and ultra-high definition, etc.; the user behavior and the use of the control information parameters in the playback control protocol are the use of the user behavior and the control information parameters in combination, such as the user behavior is "fast forward" and the control information parameter is "2 times", then the use of the user behavior and the control information parameters is "playing the multimedia video at 2 times the default playback speed".
[0100] In some embodiments, the preset control protocol may be pre-set by the user in the voice recognition module 21 , and the preset control protocol in the voice recognition module 21 is the same as the control protocol in the application 23 .
[0101] In other embodiments, the preset control protocol can be determined by negotiation between the speech recognition module 21 and the application 23, that is, the speech recognition module 21 negotiates with each application 23 through the intermediate service layer 22 to obtain the preset control protocol. For example, the application 23 sends the control protocol pre-stored in the application 23 to the speech recognition module 21 through the intermediate service layer 22, and the speech recognition module 21 receives and stores the control protocol sent by the application 23 through the intermediate service layer 22; if a control protocol is received, the control protocol is determined to be the preset control protocol; if multiple control protocols are received, a control protocol is randomly selected from the multiple control protocols as the preset control protocol. Here, the speech recognition module 21 can support various control protocols.
[0102] If the voice recognition module 21 supports one or more control protocols, after receiving multiple control protocols, the voice recognition module 21 randomly selects a control protocol supported by both the application 23 and the voice recognition module 21 from the multiple control protocols as the preset control protocol.
[0103] After the voice recognition module 21 obtains the voice signal, it recognizes the user semantics in the voice signal and converts the user semantics into control instructions according to the preset control protocol. Figure 3The controller 200 shown in FIG. 1 sends the voice recognition module 21 , or the terminal 100 collects the voice itself, which is not limited to this.
[0104] In the above step S42, the session objects in the intermediate service layer 22 include session objects in an activated state and session objects in an inactivated state. There may be one or more session objects in an activated state, and there may be one or more session objects in an inactivated state. The session objects in an activated state are the session objects corresponding to the application 23 that can be controlled by the current speech recognition module 21.
[0105] The speech recognition module 21 obtains an active session object, ie, a target session object, from the intermediate service layer 22. If the intermediate service layer 22 stores multiple active session objects, the speech recognition module 21 can obtain multiple active session objects.
[0106] In some embodiments, after acquiring the voice signal, the speech recognition module 21 may send an acquisition instruction to the intermediate service layer 22. After receiving the acquisition instruction sent by the speech recognition module 21, the intermediate service layer 22 sends the activated target conversation object to the speech recognition module 21.
[0107] In other embodiments, the intermediate service layer 22 may monitor the speech recognition module 21 in real time. After monitoring that the speech recognition module 21 acquires the speech signal, the target conversation object in the activated state is sent to the speech recognition module 21 .
[0108] In the above step S43, the target session object corresponds to the target application, that is, the target session object stores the information required for the target application session. Based on this, the speech recognition module 21 can send a control instruction to the intermediate service layer 22 based on the target session object, and then the intermediate service layer 22 sends the control instruction to the target application to achieve control of the target application.
[0109] In some embodiments, there are multiple target conversation objects, that is, multiple target conversation objects in an activated state. The speech recognition module 21 can determine the target conversation object with the greatest correlation with the control instruction from the multiple target conversation objects, and send the control instruction to the intermediate service layer 22 based on the determined target conversation object.
[0110] In the embodiment of the present application, the speech recognition module 21 may pre-set an association rule, and use the association rule to determine the association between the target conversation object and the control instruction.
[0111] The association rule can be to determine the association between the target session object and the control instruction by whether the application 23 includes the control instruction, and determine the session object with the greatest association with the control instruction. For example: the session object 1 of the presentation application and the session object 2 of the multimedia application are both in an activated state, and the speech recognition module 21 obtains the session objects 1 and 2; in this case, if the control instruction obtained by the speech recognition module 21 is "play slides", "play slides" is a control instruction in the presentation application, and the multimedia application does not include the control instruction of "play slides", therefore, it can be determined that the association between session object 1 and the control instruction is 1, and the association between session object 2 and the control instruction is 0, that is, the session object with the greatest association with the control instruction is session object 1.
[0112] The association rule can also determine the association between the target session object and the control instruction for the application identifier recognized by the voice signal, and determine the session object with the greatest association with the control instruction. For example: the session object 1 of the presentation application and the session object 2 of the multimedia application are both in the activated state, and the voice recognition module 21 obtains the session objects 1 and 2; in this case, if the application identifier recognized by the voice recognition module 21 through the voice signal is the identifier of the presentation application, it can be determined that the association between the session object 1 and the control instruction is 1, and the association between the session object 2 and the control instruction is 0, that is, the session object with the greatest association with the control instruction is the session object 1.
[0113] The association rule may also be in other forms, which are not limited thereto.
[0114] like Figure 5 As shown, a control method for an application is also provided, which is applied to the intermediate service layer 22, the intermediate service layer 22 is connected to the speech recognition module 21, and the intermediate service layer 22 is connected to each application 23, and the intermediate service layer 22 has a session object corresponding to each application 23 registered therein. The control method for the application includes the following steps:
[0115] Step S51 : sending the target conversation object in the activated state to the speech recognition module 21 .
[0116] Step S52, receiving a control instruction sent by the speech recognition module 21 based on the target conversation object, where the control instruction is an instruction obtained by the speech recognition module 21 converting the speech signal according to a preset control protocol.
[0117] Step S53: sending the control instruction to the target application corresponding to the target session object, so that the target application controls the operation of the target application according to the control instruction.
[0118] In the technical solution provided by the embodiment of the present application, an intermediate service layer 22 is added between the speech recognition module 21 and the application 23. Each application 23 registers a corresponding session object on the intermediate service layer 22, and the session object stores the information required for the session of the application 23. When the speech recognition module 21 needs to control an application 23 (i.e., the target application), the activated target session object (i.e., the session object corresponding to the target application) is obtained from the intermediate service layer 22. Since the target session object stores the information required for the session of the target application, the speech recognition module 21 can control the operation of the target application by using the target session object. It can be seen that in the technical solution provided by the embodiment of the present application, there is no need to integrate the control SDK of each application 23 in the speech recognition module 21, and it no longer depends on the specific implementation of each multimedia application, which reduces the integration complexity and integration workload of the speech recognition module 21, and solves the problem of large integration complexity and large integration workload of the speech recognition module 21.
[0119] For the above step S51, reference may be made to the relevant description of the above step S42, which will not be repeated here.
[0120] In some embodiments, for each application 23, the intermediate service layer 22 can periodically detect the running status of the application 23; when it is detected that the running status of the application 23 is the foreground running status, the session object corresponding to the application 23 is set to the activated state; when it is detected that the running status of the application 23 is the background running state, the session object corresponding to the application 23 is set to the inactivated state.
[0121] In the embodiment of the present application, the application 23 running in the foreground is visible on the desktop taskbar, runs in a window, and can interact with the user. The application 23 running in the background is not visible on the desktop taskbar, runs in the resource manager, but cannot interact with the user.
[0122] In some embodiments, after the application 23 registers the corresponding session object in the intermediate service layer 22, the state of the session object is set to the activated state; subsequently, when the running state of the application 23 changes, such as when it changes from the foreground running state to the background running state, the application 23 sends a running state report to the intermediate service layer 22. If the running state report indicates that the running state of the application 23 changes to the background running state, the intermediate service layer 22 sets the session object corresponding to the application 23 to the inactivated state; if the running state report indicates that the running state of the application 23 changes to the foreground running state, the intermediate service layer 22 sets the session object corresponding to the application 23 to the activated state.
[0123] In the above step S52, the speech recognition module 21 sends a control instruction to the intermediate service layer 22 based on the target session object. The intermediate service layer 22 receives the control instruction sent by the speech recognition module 21. Then, step S53 is executed to send the control instruction to the target application corresponding to the target session object. The target application receives the control instruction and parses the control instruction according to the preset control protocol, and then controls the operation of the target application according to the parsed control instruction to realize voice control.
[0124] based on Figure 5 The control method of the application shown in the figure also provides a control method of the application, such as Figure 6 As shown, the following steps may be included.
[0125] Step S61, sending the target conversation object in the activated state to the speech recognition module 21. The same as step S51.
[0126] Step S62, receiving a control instruction sent by the speech recognition module 21 based on the target conversation object through a preset framework interface, where the control instruction is an instruction obtained by the speech recognition module 21 converting the speech signal according to a preset control protocol.
[0127] In the embodiment of the present application, a framework interface, namely a preset framework interface, is pre-set in the speech recognition module 21 . The preset framework interface is a unified and standardized interface. The intermediate service layer 22 calls the preset framework interface and receives the control instruction sent by the speech recognition module 21 .
[0128] Step S63: searching for the target session object based on the identifier of the target session object carried in the control instruction.
[0129] In the embodiment of the present application, the control instruction carries the identifier of the session object with which it is used, that is, the control instruction carries the identifier of the target session object. The intermediate service layer 22 obtains the identifier of the target session object from the control instruction, and based on the identifier of the target session object, searches for the target session object including the identifier from the registered session objects.
[0130] If the target session object is found, step S64 is executed; if the target session object is not found, the intermediate service layer 22 may not perform any processing, may discard the control instruction, or may output a prompt message of an operation error.
[0131] Step S64, when the target session object is found, based on the target session object, the preset framework interface implemented by the target application corresponding to the target session object is called back to send the control instruction to the target application, so that the target application controls the operation of the target application according to the control instruction.
[0132] In the embodiment of the present application, the interface of the preset framework interface implemented on the application 23 is referred to as the preset framework interface implemented by the application 23. When the target session object is found, the intermediate service layer 22 calls back the preset framework interface implemented by the target application based on the target session object, thereby sending the control instruction to the target application.
[0133] The target application receives the control instruction through the preset framework interface implemented by itself, and parses the control instruction according to the preset control protocol, and then controls the operation of the target application according to the parsed control instruction.
[0134] In the technical solution provided in the embodiment of the present application, a unified standardized interface is used to realize the transmission of control commands, which is convenient for compatibility with various application programs 23 and improves the scalability of the application control system.
[0135] like Figure 7 As shown in the figure, the operating system is Android system, and the intermediate service layer is Media Session media framework. Figure 7 The control system of the application shown in the figure describes in detail the control method of the application provided in the embodiment of the present application. Figure 7 Only three multimedia applications (ie, multimedia applications A to C) are used as examples, which are not limiting. Among them, session object C is an activated session object.
[0136] The Media Session media framework is located between the speech recognition module and the multimedia application AC, and the session objects corresponding to the multimedia application AC are registered in the Media Session media framework, such as the session object AC. The speech recognition module can negotiate with the multimedia application AC through the Media Session media framework to obtain the preset playback control protocol. When the speech recognition module obtains the speech signal, it identifies the user semantics in the speech signal and converts the user semantics into playback control instructions 1 according to the preset playback control protocol.
[0137] The speech recognition module obtains the activated session object C from the Media Session media framework. Based on the session object C, the speech recognition module sends a playback control instruction 1 to the Media Session media framework.
[0138] The Media Session media framework calls the framework interface, receives the playback control instruction 1 sent by the speech recognition module, and searches for the session object C. When the session object C is found, the Media Session media framework calls back the above framework interface implemented by the multimedia application C through the found session object C to send the playback control instruction 1 to the multimedia application C. Here, the found session object C can be understood as a proxy object.
[0139] The multimedia application C receives the playback control instruction through the above-mentioned framework interface, and parses the playback control instruction 1 according to the preset playback control protocol, and then responds to the parsed playback control instruction to realize the control of the multimedia application C, that is, control the operation of the multimedia application C.
[0140] Above Figure 7 The description of the part is relatively simple. For details, please refer to the above Figure 2-Figure 6 The relevant description of some parts will not be repeated here.
[0141] Corresponding to the above-mentioned application control method, the embodiment of the present application also provides an application control device, which is applied to the intermediate service layer 22, the intermediate service layer 22 is connected to the speech recognition module 21, and the intermediate service layer 22 is connected to each application 23, and the intermediate service layer 22 is registered with the session object corresponding to each application, such as Figure 8 As shown, the device comprises:
[0142] A first sending unit 81, configured to send the target conversation object in an activated state to the speech recognition module 21;
[0143] A receiving unit 82, configured to receive a control instruction sent by the speech recognition module 21 based on a target conversation object, wherein the control instruction is an instruction obtained by the speech recognition module 21 converting a speech signal according to a preset control protocol;
[0144] The second sending unit 83 is used to send the control instruction to the target application corresponding to the target session object, so that the target application controls the operation of the target application according to the control instruction.
[0145] In the technical solution provided by the embodiment of the present application, an intermediate service layer 22 is added between the speech recognition module 21 and the application 23. Each application 23 registers a corresponding session object on the intermediate service layer 22, and the session object stores the information required for the session of the application 23. When the speech recognition module 21 needs to control an application 23 (i.e., the target application), the activated target session object (i.e., the session object corresponding to the target application) is obtained from the intermediate service layer 22. Since the target session object stores the information required for the session of the target application, the speech recognition module 21 can control the operation of the target application by using the target session object. It can be seen that in the technical solution provided by the embodiment of the present application, there is no need to integrate the control SDK of each application 23 in the speech recognition module 21, and it no longer depends on the specific implementation of each multimedia application, which reduces the integration complexity and integration workload of the speech recognition module 21, and solves the problem of large integration complexity and large integration workload of the speech recognition module 21.
[0146] Optionally, the control device of the above application may further include:
[0147] A detection unit, used for detecting the running status of each application 23;
[0148] The setting unit is used to set the session object corresponding to the application 23 to an activated state when it is detected that the running state of the application 23 is a foreground running state; when it is detected that the running state of the application 23 is a background running state, the session object corresponding to the application 23 is set to an inactivated state.
[0149] Optionally, the receiving unit 82 may be specifically used for:
[0150] Receiving, through a preset framework interface, a control instruction sent by the speech recognition module 21 based on the target conversation object;
[0151] The second sending unit 83 may be specifically used for:
[0152] Find the target session object based on the identifier of the target session object carried in the control instruction;
[0153] When the target session object is found, based on the target session object, a preset framework interface implemented by the target application corresponding to the target session object is called back to send the control instruction to the target application.
[0154] Corresponding to the above-mentioned application control method, the embodiment of the present application also provides an application control device, which is applied to the speech recognition module 21, the speech recognition module 21 is connected to the intermediate service layer 22, the intermediate service layer 22 is connected to each application, and the intermediate service layer 22 is registered with the session object corresponding to each application, such as Fig. 9 As shown, the device comprises:
[0155] The conversion unit 91 is used to convert the voice signal into a control instruction according to a preset control protocol;
[0156] A first acquisition unit 92 is used to acquire a target session object in an activated state in the intermediate service layer 22;
[0157] The third sending unit 93 is used to send a control instruction to the intermediate service layer 22 based on the target session object, so that the intermediate service layer 22 sends the control instruction to the target application corresponding to the target session object, and enables the target application to control the operation of the target application according to the control instruction.
[0158] In the technical solution provided by the embodiment of the present application, an intermediate service layer 22 is added between the speech recognition module 21 and the application 23. Each application 23 registers a corresponding session object on the intermediate service layer 22, and the session object stores the information required for the session of the application 23. When the speech recognition module 21 needs to control an application 23 (i.e., the target application), the activated target session object (i.e., the session object corresponding to the target application) is obtained from the intermediate service layer 22. Since the target session object stores the information required for the session of the target application, the speech recognition module 21 can control the operation of the target application by using the target session object. It can be seen that in the technical solution provided by the embodiment of the present application, there is no need to integrate the control SDK of each application 23 in the speech recognition module 21, and it no longer depends on the specific implementation of each multimedia application, which reduces the integration complexity and integration workload of the speech recognition module 21, and solves the problem of large integration complexity and large integration workload of the speech recognition module 21.
[0159] Optionally, the target session object is multiple;
[0160] The third sending unit 93 may be specifically used for:
[0161] Determine, from among the multiple target conversation objects, a target conversation object having the greatest relevance to the control instruction;
[0162] The control instruction is sent to the intermediate service layer 22 based on the determined target session object.
[0163] Optionally, the control device of the above application may further include:
[0164] The second acquisition unit is used to receive the control protocol sent by each application 23 through the intermediate service layer 22 before converting the voice signal into a control instruction according to the preset control protocol; if a control protocol is received, the control protocol is determined to be the preset control protocol; if multiple control protocols are received, a control protocol is randomly selected from the multiple control protocols as the preset control protocol.
[0165] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0166] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the terminal and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0167] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A terminal, characterized in that: The terminal is integrated with an intermediate service layer, a speech recognition module and multiple applications, the speech recognition module is connected to the intermediate service layer, the intermediate service layer is connected to each application, and the intermediate service layer has session objects corresponding to each application registered therein; The speech recognition module is used to convert the speech signal into a control instruction according to a preset control protocol; obtain the target session object in the activated state in the intermediate service layer; and send the control instruction to the intermediate service layer based on the target session object; The intermediate service layer is used to send the target session object in an activated state to the voice recognition module; receive the control instruction sent by the voice recognition module; and send the control instruction to the target application corresponding to the target session object, so that the target application receives the control instruction according to the preset control protocol and controls the operation of the target application according to the control instruction.
2. The terminal according to claim 1, characterized in that The terminal is connected to the controller; The controller is used to collect voice signals and send the voice signals to the voice recognition module of the terminal.
3. The terminal according to claim 1 or 2, characterized in that: The application is used to send registration information to the intermediate service layer; The intermediate service layer is further used to generate a session object corresponding to the application based on the registration information.
4. The terminal according to claim 1 or 2, characterized in that: The intermediate service layer is also used for: For each application, detect the running status of the application; When it is detected that the running state of the application is the foreground running state, the session object corresponding to the application is set to the active state; When it is detected that the running state of the application is the background running state, the session object corresponding to the application is set to an inactive state.
5. The terminal according to claim 1 or 2, characterized in that: The intermediate service layer is specifically used for: Receiving, through a preset framework interface, a control instruction sent by the speech recognition module based on the target conversation object; Searching for the target session object based on the identifier of the target session object carried by the control instruction; When the target session object is found, based on the target session object, the preset framework interface implemented by the target application corresponding to the target session object is called back to send the control instruction to the target application.
6. The terminal according to claim 1 or 2, characterized in that: There are multiple target conversation objects; The speech recognition module is specifically used for: Determine, from among the plurality of target conversation objects, a target conversation object having the greatest relevance to the control instruction; Based on the determined target session object, the control instruction is sent to the intermediate service layer.
7. The terminal according to claim 1 or 2, characterized in that: The speech recognition module is further used for: Before converting the voice signal into a control instruction according to the preset control protocol, the control protocol sent by each application is received through the intermediate service layer; if a control protocol is received, the control protocol is determined to be the preset control protocol; if multiple control protocols are received, a control protocol is randomly selected from the multiple control protocols as the preset control protocol.
8. A method for controlling an application, characterized in that: Applied to an intermediate service layer, the intermediate service layer is connected to a speech recognition module, and the intermediate service layer is connected to each application program, and a session object corresponding to each application program is registered in the intermediate service layer, and the method includes: Sending the target conversation object in an activated state to the speech recognition module; Receiving a control instruction sent by the speech recognition module based on the target conversation object, wherein the control instruction is an instruction obtained by the speech recognition module converting a speech signal according to a preset control protocol; The control instruction is sent to a target application corresponding to the target session object, so that the target application controls the operation of the target application according to the control instruction.
9. The method according to claim 8, characterized in that The method further comprises: For each application, detect the running status of the application; When it is detected that the running state of the application is the foreground running state, the session object corresponding to the application is set to the active state; When it is detected that the running state of the application is the background running state, the session object corresponding to the application is set to an inactive state.
10. The method according to claim 8 or 9, characterized in that: The step of receiving the control instruction sent by the speech recognition module based on the target conversation object includes: Receiving, through a preset framework interface, a control instruction sent by the speech recognition module based on the target conversation object; The step of sending the control instruction to the target application corresponding to the target session object includes: Searching for the target session object based on the identifier of the target session object carried by the control instruction; When the target session object is found, based on the target session object, the preset framework interface implemented by the target application corresponding to the target session object is called back to send the control instruction to the target application.
11. A method for controlling an application, characterized in that: Applied to a speech recognition module, the speech recognition module is connected to an intermediate service layer, the intermediate service layer is connected to each application, and a session object corresponding to each application is registered in the intermediate service layer. The method includes: According to the preset control protocol, the voice signal is converted into a control instruction; Acquire the target session object in the activated state in the intermediate service layer; Based on the target session object, the control instruction is sent to the intermediate service layer, so that the intermediate service layer sends the control instruction to the target application corresponding to the target session object, and enables the target application to control the operation of the target application according to the control instruction.
12. The method according to claim 11, characterized in that There are multiple target conversation objects; The step of sending the control instruction to the intermediate service layer based on the target session object comprises: Determine, from among the plurality of target conversation objects, a target conversation object having the greatest relevance to the control instruction; Based on the determined target session object, the control instruction is sent to the intermediate service layer.
13. The method according to claim 11 or 12, characterized in that: Before converting the voice signal into a control instruction according to a preset control protocol, the method further includes: The control protocols sent by each application are received through the intermediate service layer; if one control protocol is received, the control protocol is determined to be the preset control protocol; if multiple control protocols are received, a control protocol is randomly selected from the multiple control protocols as the preset control protocol.
14. A control device for an application, characterized in that: Applied to an intermediate service layer, the intermediate service layer is connected to a speech recognition module, and the intermediate service layer is connected to each application program, and a session object corresponding to each application program is registered in the intermediate service layer, and the device comprises: A first sending unit, configured to send the target conversation object in an activated state to the speech recognition module; A receiving unit, configured to receive a control instruction sent by the speech recognition module based on the target conversation object, wherein the control instruction is an instruction obtained by the speech recognition module converting a speech signal according to a preset control protocol; The second sending unit is used to send the control instruction to the target application corresponding to the target session object, so that the target application controls the operation of the target application according to the control instruction.
15. A control device for an application, characterized in that: Applied to a speech recognition module, the speech recognition module is connected to an intermediate service layer, the intermediate service layer is connected to each application, and a session object corresponding to each application is registered in the intermediate service layer. The device includes: A conversion unit, used to convert the voice signal into a control instruction according to a preset control protocol; A first acquisition unit, used to acquire a target session object in an activated state in the intermediate service layer; The third sending unit is used to send the control instruction to the intermediate service layer based on the target session object, so that the intermediate service layer sends the control instruction to the target application corresponding to the target session object, and enables the target application to control the operation of the target application according to the control instruction.
Citation Information
Patent Citations
Bluetooth connection-based speech recognition method, device and system
CN105161110A
Artificial intelligence CNN and LSTM neural network voice recognition system
CN110738984A
