Voice process truncation intervention method and system
By adding intervention modules to the voice system and connecting to third-party services, the problem of closed control of traditional intelligent voice systems has been solved, and dynamic interruption of voice processes by third-party services and recovery control of native processes have been achieved, which has improved the flexibility and controllability of the system.
Patent Information
- Application Number
- CN202510937443.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-09-09
AI Technical Summary
The existing intelligent voice system has tightly coupled process modules and closed control, which makes it impossible for third-party services to dynamically intercept the voice process and reset the original system process, and lacks an external intervention control mechanism.
A new intervention module is added to the voice system to manage the voice process cycle and connect to third-party services. The process-level modular architecture and control reversible interface technology are adopted to achieve deep integration and flexible intervention of third-party services.
It enables dynamic interruption of voice processes by third-party services and recovery control of native processes, breaking the control closure of traditional voice systems and supporting flexible process intervention and execution logic consistency.
Smart Images

Figure CN120612939A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of voice control technology, and more particularly, to a method and system for voice flow interruption and intervention. Background Art
[0002] Current intelligent voice systems generally adopt a rigid serial processing architecture (such as activation → sound pickup → recognition → execution). Although its modular design achieves functional decoupling, it lacks an externally intervened control mechanism between nodes.
[0003] Existing third-party services can only access processing results through pre-set interfaces. They cannot dynamically interrupt specific process nodes (such as semantic parsing and command execution) during the voice link operation, nor can they restore execution control to the native voice system process after completing custom logic. The root cause of this technical flaw is that traditional voice architectures lack execution context preservation and restoration mechanisms and have closed-loop control, making the current voice processing process incapable of supporting dynamic intervention by third-party services. Summary of the Invention
[0004] The present invention overcomes the shortcomings of the prior art voice system control closure and provides a voice process interruption intervention method and system in the hope of solving the problems existing in the prior art.
[0005] In order to solve the above technical problems, one aspect of the present invention provides a method for interrupting and intervening in a speech process.
[0006] A method for interrupting a speech flow includes the following steps:
[0007] S1 adds an intervention module to the voice system, which manages the voice process cycle and sets periodic monitoring points;
[0008] S2 The voice system receives the voice, recognizes the voice and converts it into a command, and the cycle begins;
[0009] Before executing a command, the S3 voice system determines whether the current cycle is monitored:
[0010] If monitored, the current cycle data is called back to the third-party service and S4 is executed;
[0011] If not monitored, execute S4;
[0012] The S4 voice system determines whether the cycle is truncated;
[0013] If it is truncated, the execution of the instruction of that cycle is suspended;
[0014] If not truncated, the instruction for this cycle is executed.
[0015] A further technical solution is that adding a new intervention module to the voice architecture specifically includes the following steps:
[0016] S11 intervention module authorizes third-party service registration;
[0017] The S12 third-party service obtains the permission to monitor and interrupt the voice system process cycle.
[0018] A further technical solution is to perform the following steps after executing S12:
[0019] S13: Third-party services are granted the ability to reverse control and restore the system's native processes after completing custom operations.
[0020] S14 The third-party service obtains permission to trigger the specified process module of the voice system.
[0021] A further technical solution is that S4 is specifically: if the voice system receives a truncation instruction sent by an authorized third-party service, it is determined that the voice is truncated; if no truncation instruction is received, it is determined that the voice is not truncated.
[0022] A further technical solution is to call back the current cycle data to the third-party service after being monitored, and then perform the following steps:
[0023] The third-party service triggers the specified process module of the voice system and / or directly calls to start the system periodic process execution;
[0024] The third-party service sends or does not send a truncation instruction to the voice system based on the triggered designated process module and / or the start of the system cycle process;
[0025] The third-party service sends or does not send instructions to the voice system to reverse control and restore the system's native process based on the triggered designated process module and / or the execution status of the system periodic process.
[0026] A further technical solution is that the intervention module is provided to a third-party service in the form of an SDK.
[0027] A further technical solution is that after pausing the execution of the cycle instruction, the following steps are performed:
[0028] S5 will store the currently interrupted process as a runnable object;
[0029] S6 receives the instruction to resume the original process execution and retrieves the stored executable object;
[0030] S7 executes the runnable object and continues to execute the subsequent steps of the original process.
[0031] Another aspect of the present invention provides a voice flow interruption intervention system.
[0032] A speech process interruption intervention system, comprising a speech system and an intervention module;
[0033] The voice system is used to receive voice, recognize voice and convert it into instructions; the voice system is used to execute instructions, and determine whether the current cycle is monitored, and call back data and execute subsequent steps based on the determination result; determine whether the cycle is truncated, and suspend execution or execute cycle instructions based on the determination result;
[0034] The intervention module is used to manage the voice process cycle and set periodic monitoring points.
[0035] A further technical solution is that the voice process interception and intervention system also includes third-party services;
[0036] The intervention module is used to authorize third-party service registration and grant third-party service permissions;
[0037] The third-party service is used to receive callback data for the current cycle and execute one or more of the following steps based on the data:
[0038] Sending a cut-off command to the voice system;
[0039] Trigger the designated process module of the voice system;
[0040] Directly call to start the system cycle process execution;
[0041] Send instructions to reverse control and restore the system's native process.
[0042] Compared with the existing technology, the present invention adds an intervention module to the voice system and connects to third-party services. It adopts a design that combines a process-level modular architecture with control reversible interface technology. This transforms the traditional intelligent voice system with rigid processes and closed controls into an open and controllable interactive system, ultimately achieving the technical effects of deep integration of third-party services, flexible intervention in the process, and logical coherence of execution. The present invention solves the technical defect of traditional intelligent voice systems, where third-party services cannot dynamically intercept the voice process and reset the original system process due to the tight coupling of process modules and closed control. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a flow chart of the voice flow interruption intervention method provided by the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0045] Example 1
[0046] A method for interrupting speech flow, see Figure 1 , including the following steps:
[0047] S1 adds an intervention module to the voice system, which manages the voice process cycle and sets periodic monitoring points;
[0048] For example, a new intervention module (Module) aiosLifecycle is added for third-party services to register and manage the voice process cycle. This intervention module includes functions such as registration, permission acquisition, monitoring callback, voice process interruption and anti-control recovery, and voice process call. These functions can be called by third parties in the form of interfaces:
[0049] In a preferred embodiment, the adding of an intervention module to the voice architecture specifically includes the following steps:
[0050] S11 intervention module authorizes third-party service registration;
[0051] In a preferred embodiment, the intervention module is provided to third-party service integration in the form of an SDK. After the third-party integration, it is called to perform operations such as initialization, monitoring registration, and periodic truncation control registration:
[0052] S12 third-party services obtain the permission to monitor and interrupt the voice system process cycle;
[0053] S13: Third-party services are granted the ability to reverse control and restore the system's native processes after completing custom operations.
[0054] S14 The third-party service obtains the permission to trigger the designated process module of the voice system;
[0055] Exemplarily, the above steps in this embodiment are specifically as follows:
[0056] The third-party service calls init to initialize the connection service. This method requires passing the Context parameter and the monitoring interface implemented by the application. The SDK is used to transmit cycle information and connection status to the application. The application is then bound to the voice service through Binder to monitor the voice system's process cycle and service status.
[0057] After calling the SDK's initialization interface, the SDK and voice system's connection status will be called back through the onConnectChange interface. ConnectionStage is an enumeration type of connection status, including connecting, connection successful, connection failed, connection rejected, and connection disconnected.
[0058] The third-party service calls registerLifecycleObservation to register the lifecycle observation and interruption with the voice service. The third-party service passes the Bundle parameter to inform the voice service of the lifecycle stage that the service needs to monitor and obtain data, as well as the period that needs to be interrupted:
[0059] In this embodiment, taking the voice activation (SHOW) period as an example, if the third-party service needs to be notified of voice activation in real time, the parameter that requires observation (observation) is filled in as SHOW; if the third-party service needs to intercept the voice SHOW period, the parameter that requires pause (truncation) is filled in as SHOW;
[0060] If a third-party service wants to restore the voice system's process cycle, it can do so through recoverStagePause:
[0061] Specifically, the third-party service calls the recoverStagePause interface and passes the cycle stage that needs to be recovered;
[0062] If a third-party service wants to cancel monitoring or control of the process cycle, it can be removed by unregisterLifecycleObservation;
[0063] S2 The voice system receives the voice, recognizes the voice and converts it into a command, and the cycle begins;
[0064] Before executing a command, the S3 voice system determines whether the current cycle is monitored:
[0065] If monitored, the current cycle data is called back to the third-party service and S3 is executed;
[0066] In a preferred embodiment, after the periodic data is sent to a third-party service, the following steps are performed:
[0067] For example, the is Stage Observed method is used to determine whether the current process cycle has been registered for monitoring by a third-party service. Specifically, registered services and service monitoring cycles are managed using the hash table mObservations. The voice system obtains the service package name by getting mObservations[SHOW]. If the package name matches the current top package name, the cycle is being monitored. If SHOW is detected to be monitored, the current cycle data is called back to the third party through the bundle.
[0068] S31 The third-party service triggers the specified process module of the voice system and / or directly calls to start the system periodic process execution;
[0069] S32 The third-party service sends or does not send a truncation instruction to the voice system according to the triggered designated process module and / or the start of the system cycle process;
[0070] The S33 third-party service sends or does not send instructions to the voice system to reverse control and restore the system's native process based on the triggered designated process module and / or the execution status of the system cycle process.
[0071] In this embodiment, the third-party service can proactively call and start a certain periodic process of the voice system when there is no process being executed or the process is paused in the current voice system. The specific implementation is as follows:
[0072] The third-party service calls the execute(action, data) method in the SDK above, where action is the method to be called, corresponding to the cycle stage to be started, and data is the parameter that can be passed to each method.
[0073] If not monitored, execute S4;
[0074] The S4 voice system determines whether the cycle is truncated;
[0075] In this embodiment, S4 specifically includes: if the voice system receives a truncation instruction sent by the authorized third-party service, it is determined that the voice is truncation; if no truncation instruction is received, it is determined that the voice is not truncation.
[0076] If it is truncated, the execution of the instruction of that cycle is suspended;
[0077] If not truncated, the instruction for this cycle is executed.
[0078] For example, isStagePaused is used to obtain whether the current process cycle is intercepted by a third-party service. For a specific implementation, refer to the above monitoring cycle. The voice system has encapsulated the execution of each process cycle in the form of a runnable object (Runnable).
[0079] If there is no interception, the Runnable is executed normally;
[0080] If interception is detected, the Runnable execution of this module will be suspended. The system will store the Runnable of the currently interrupted process in a list;
[0081] In a preferred embodiment, after pausing execution of the cycle instruction, the following steps are performed:
[0082] S5 will store the currently interrupted process as a runnable object;
[0083] S6 receives the instruction to resume the original process execution and retrieves the stored executable object;
[0084] In this embodiment, when the voice system receives the recovery process sent by the third-party service to execute the recoverStagePause callback, the system retrieves the corresponding Runnable;
[0085] S7 executes the runnable object and continues to execute the subsequent steps of the original process.
[0086] In this embodiment, the voice system retrieves the Runnable and executes it, thereby restoring and continuing the native voice process.
[0087] Example 2
[0088] A voice process interception and intervention system, comprising a voice system, an intervention module, and a third-party service;
[0089] The voice system is used to receive voice, recognize voice and convert it into instructions; the voice system is used to execute instructions, and determine whether the current cycle is monitored, and call back data and execute subsequent steps based on the determination result; determine whether the cycle is truncated, and suspend execution or execute cycle instructions based on the determination result;
[0090] The intervention module is used to manage the voice process cycle, set periodic monitoring points, authorize third-party service registration, and grant third-party service permissions;.
[0091] The third-party service is used to receive callback data for the current cycle and execute one or more of the following steps based on the data:
[0092] Sending a cut-off command to the voice system;
[0093] Trigger the designated process module of the voice system;
[0094] Directly call to start the system cycle process execution;
[0095] Send instructions to reverse control and restore the system's native process.
[0096] Although the present invention has been described herein with reference to illustrative embodiments of the present invention, it will be appreciated that those skilled in the art may devise numerous other modifications and implementations that fall within the scope and spirit of the principles disclosed herein. More specifically, within the scope disclosed herein, various variations and improvements may be made to the components and / or layout of the subject combination layout. In addition to variations and improvements made to the components and / or layout, other uses will be apparent to those skilled in the art.
Claims
1. A method for interrupting and intervening in a speech process, characterized in that: The following steps are involved: S1 adds an intervention module to the voice system, which manages the voice process cycle and sets periodic monitoring points; S2 The voice system receives the voice, recognizes the voice and converts it into a command, and the cycle begins; Before executing a command, the S3 voice system determines whether the current cycle is monitored: If monitored, the current cycle data is called back to the third-party service and S4 is executed; If not monitored, execute S4; The S4 voice system determines whether the cycle is truncated; If it is truncated, the execution of the instruction of that cycle is suspended; If not truncated, the instruction for this cycle is executed.
2. A method for interrupting and intervening in a speech process according to claim 1, characterized in that: The step of adding a new intervention module to the voice architecture specifically includes the following steps: S11 intervention module authorizes third-party service registration; The S12 third-party service obtains the permission to monitor and interrupt the voice system process cycle.
3. A method for interrupting and intervening in a speech process according to claim 2, characterized in that: After executing S12, perform the following steps: S13: Third-party services are granted the ability to reverse control and restore the system's native processes after completing custom operations. S14 The third-party service obtains permission to trigger the specified process module of the voice system.
4. A method for interrupting and intervening in a speech process according to claim 3, characterized in that: Specifically, the step S4 is as follows: if the voice system receives a truncation instruction sent by the authorized third-party service, it is determined that the voice is truncation; if no truncation instruction is received, it is determined that the voice is not truncation.
5. A method for interrupting and intervening in a speech process according to claim 3, characterized in that: When being monitored, the current cycle data is called back to the third-party service and the following steps are performed: The third-party service triggers the specified process module of the voice system and / or directly calls to start the system periodic process execution; The third-party service sends or does not send a truncation instruction to the voice system based on the triggered designated process module and / or the start of the system cycle process; The third-party service sends or does not send instructions to the voice system to reverse control and restore the system's native process based on the triggered designated process module and / or the execution status of the system periodic process.
6. A method for interrupting and intervening in a speech process according to claim 1, characterized in that: The intervention module is provided to third-party services in the form of SDK.
7. A method for interrupting and intervening in a speech process according to claim 1, characterized in that: After pausing the execution of the cycle instruction, the following steps are performed: S5 will store the currently interrupted process as a runnable object; S6 receives the instruction to resume the original process execution and retrieves the stored executable object; S7 executes the runnable object and continues to execute the subsequent steps of the original process.
8. A voice flow interruption intervention system, characterized in that: Including, voice system, intervention module; The voice system is used to receive voice, recognize voice and convert it into instructions; the voice system is used to execute instructions, and determine whether the current cycle is monitored, and call back data and execute subsequent steps based on the determination result; determine whether the cycle is truncated, and suspend execution or execute cycle instructions based on the determination result; The intervention module is used to manage the voice process cycle and set periodic monitoring points.
9. A speech flow interruption intervention system as claimed in claim 8, characterized in that: It also includes third-party services; The intervention module is used to authorize third-party service registration and grant third-party service permissions; The third-party service is used to receive callback data for the current cycle and execute one or more of the following steps based on the data: Sending a cut-off command to the voice system; Trigger the designated process module of the voice system; Directly call to start the system cycle process execution; Send instructions to reverse control and restore the system's native process.