Local session round closure method upon session link disruption and related apparatus

By receiving device plugin execution requests and generating local feedback based on the link impact policy table, the problem of dialogue round waiting caused by device actions is solved, and readable user feedback and state switching are realized when the remote backhaul link is interrupted.

CN123185250APending Publication Date: 2026-11-27SHENZHEN G WORLD TECH INC CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611684954.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-29
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

When device actions cause the remote backhaul link or session bearer to be interrupted, the existing dialogue system is unable to generate effective local feedback, resulting in a long wait for the dialogue round and affecting subsequent input or session switching.

Method used

By receiving the device plugin execution request, the closing strategy is determined according to the pre-configured link impact strategy table, a local result message is generated, and the local completed state is switched when the closing condition is met, blocking and waiting for the remote reply.

Benefits of technology

When the remote backhaul link fails, a readable feedback is generated and the dialogue round ends to avoid long waiting times. The system distinguishes between actions performed by ordinary devices and those performed by devices with broken links, ensuring that users receive timely feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185250A_ABST
    Figure CN123185250A_ABST
Patent Text Reader

Abstract

The application discloses a local dialogue round closing method when a dialogue link is interrupted and a related device, relates to the technical field of information processing, and comprises the following steps: receiving a device plug-in execution request; determining a closing strategy from a link influence strategy table according to an operation type and an operation target in the request; executing a device action corresponding to the device plug-in execution request to obtain an execution result; determining whether a current dialogue round meets a local round closing condition according to a link influence category, a closing trigger condition and the execution result; when the condition is met, generating a helper side result message of the current dialogue round according to a local result message template and the execution result and writing the message into a local message system; executing a closing action, and marking a network interruption event or a session interface leaving event caused by the device action as an expected interruption of the current dialogue round. When the device action itself causes an interruption of a current remote backhaul link or a session bearer, the application can realize local dialogue round closing and avoid a long-term suspension of a dialogue round.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information processing technology, and more specifically, to a method and related apparatus for closing a local dialogue round when a dialogue link is interrupted. Background Technology

[0002] With the integration of intelligent voice assistants and terminal device control capabilities, an increasing number of dialogue systems support users triggering local device operations via natural language. However, in some device control scenarios, the device action requested by the user can cause the current remote backhaul link or session to be interrupted. Existing dialogue systems, after executing a device action, need to wait for a remote response to conclude the current conversation. However, because the executed device action has disrupted the current communication link, the remote response cannot actually be returned, causing the current conversation to remain in a waiting state for an extended period, affecting subsequent input or session switching. Summary of the Invention

[0003] In view of the above problems, this application proposes a method and related apparatus for closing a local dialogue round when the dialogue link is interrupted, so as to improve the above problems.

[0004] Firstly, this application provides a method for closing a local dialogue round when the dialogue link is interrupted, including: Receive a device plugin execution request associated with the current dialogue round, the device plugin execution request including at least an operation type and an operation target; Based on the operation type and the operation objective, a closing strategy is determined from a pre-configured link impact strategy table; the closing strategy includes at least the link impact category, closure trigger condition, closing action, and local result message template. The device action corresponding to the device plugin execution request is executed, and the execution result is obtained; Based on the link impact category, the closure trigger condition, and the execution result, determine whether the current dialogue round meets the local round closure condition; When the local round closure condition is met in the current dialogue round, the assistant-side result message for the current dialogue round is generated according to the local result message template and the execution result, and the assistant-side result message is written into the local message system. Perform the closing action and mark the network interruption event or session interface departure event caused by the device action as the expected interruption of the current dialogue round; the closing action includes switching the current dialogue round from the waiting for remote reply state to the local completed state, marking the remote round as ended with the reason for the end being local closure, and stopping waiting for the remote dialogue service to generate a final assistant reply for the current dialogue round.

[0005] Optionally, determining whether the current dialogue round meets the local round closure condition based on the link impact category, the closure trigger condition, and the execution result includes: If the link impact category is network backhaul interruption, or the closure trigger condition is local closure regardless of success or failure, then regardless of whether the execution result is success or failure, the current dialogue round is determined to meet the local round closure condition. If the link impact category is session bearer interruption, and the closure trigger condition is local closure only upon success, then if the execution result is successful, it is determined that the current dialogue round meets the local round closure condition; if the execution result is unsuccessful, it is determined that the current dialogue round does not meet the local round closure condition. If the link impact category is no link impact, or the closure trigger condition is closure by a remote end, then it is determined that the current dialogue round does not meet the local round closure condition.

[0006] Optionally, the method further includes: If the link impact category of the device plugin execution request is not determined to be network backhaul interruption or session bearer interruption, and within a preset time window after the execution of the device action, it is detected that the network changes from an available state to an unavailable state, the disconnected network interface is consistent with the operation target, no other device action that changes the network interface is executed within the preset time window, and the execution result includes user-readable result text, or the device plugin execution request is a request to allow the use of a fallback template, then the current dialogue round is determined to meet the local round closure condition.

[0007] Optionally, before executing the device action corresponding to the device plugin execution request and obtaining the execution result, the process further includes: Obtain the operation identifier and request fingerprint of the device plugin execution request, wherein the request fingerprint is a summary of the request content that normalizes the device plugin execution request; When it is determined that the device action corresponding to the operation identifier and the request fingerprint has been executed, the device action will not be executed again, and the completed execution result will be reused as the execution result corresponding to the device plugin execution request.

[0008] Optionally, the step of determining whether the current dialogue round meets the local round closure condition based on the link impact category, the closure triggering condition, and the execution result further includes: Determine if the current session is in progress; If so, determine whether the round identifier carried by the execution result is consistent with the current dialogue round identifier of the current session, whether the local session identifier carried by the execution result is consistent with the session identifier of the current session, and if the current session has already recorded the operation identifier, determine whether the recorded operation identifier is consistent with the operation identifier carried by the execution result. If any inconsistency exists, the execution result of the current dialogue round is discarded, the current dialogue round is not closed, and the new dialogue round is not rewritten.

[0009] Optionally, the execution result includes an execution result identifier and user-readable result text. The step of generating an assistant-side result message for the current dialogue round based on the local result message template and the execution result when the local round closure condition is met includes: When the local round closure condition is met in the current dialogue round, if the execution result identifier is a success identifier and the readable result text is non-empty text, then the success template in the local result message template is selected, and the result text is filled into the success template as the assistant-side result message for the current dialogue round. If the execution result identifier is a failure identifier and the readable result text is non-empty text, then select the failure template in the local result message template and fill in the result text in the failure template as the assistant-side result message for the current dialogue round. If the result text is empty, then the fallback template in the local result message template is selected as the assistant-side result message for the current dialogue round.

[0010] Optionally, switching the current dialogue round from the waiting for a remote response state to the local completed state includes: Clear the waiting for remote first packet and waiting for remote reply states in the current conversation round, so that the current conversation round can be listened to again; Stop and clear this round of playback, and mute any remaining remote audio that has not yet been played in the current conversation round; Cancel the timeout for this round of voice activity detection and the voice idle timer.

[0011] Optionally, the closing strategy further includes late return packet handling rules, and the method further includes: When the remote dialogue service returns a remote message after the current dialogue round is in the local completed state, the remote message is rejected and downgraded according to the late return packet handling rules.

[0012] Secondly, this application provides a local dialogue round closure device when a dialogue link is interrupted, comprising: A request receiving unit is configured to receive a device plugin execution request associated with the current dialogue round, wherein the device plugin execution request includes at least an operation type and an operation target; The strategy determination unit is used to determine a closing strategy from a pre-configured link impact strategy table based on the operation type and the operation objective; the closing strategy includes at least the link impact category, closure trigger condition, closing action, and local result message template. An action execution unit is used to execute the device action corresponding to the device plug-in execution request and obtain the execution result; The closure determination unit is used to determine whether the current dialogue round meets the local round closure condition based on the link influence category, the closure triggering condition, and the execution result. The local result generation unit is used to generate an assistant-side result message for the current dialogue round based on the local result message template and the execution result when the local round closure condition is met in the current dialogue round, and write the assistant-side result message into the local message system; A state closing unit is used to perform the closing action; the closing action includes switching the current dialogue round from the waiting for remote reply state to the local completed state, marking the remote round as ended with the reason for ending as local closure, and stopping waiting for the remote dialogue service to generate a final assistant reply for the current dialogue round. An expected interruption marking unit is used to mark a network interruption event or session interface departure event caused by the device action as an expected interruption of the current session.

[0013] Thirdly, this application provides an electronic device, including one or more processors and a memory; One or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the methods described above.

[0014] Fourthly, this application provides a computer-readable storage medium storing program code, wherein the above-described method is executed when the program code is run by a processor.

[0015] Upon receiving a device plugin execution request, this application determines the link impact category, closure trigger condition, closing action, and local result information template from a pre-configured link impact strategy table based on the operation type and objective. After executing the device action, it determines whether the current dialogue round meets the local round closure condition based on the link impact category, closure trigger condition, and execution result, thereby effectively distinguishing between ordinary device execution and link interruption-type device execution. When the local round closure condition is met, it generates an assistant-side result message for the current dialogue round based on the local result message template and execution result, and writes it to the local message system to achieve... When the remote backhaul link fails, readable feedback is still provided to the user. A series of closing actions are executed, including switching the current dialogue round from the waiting for remote reply to the local completed state, marking the remote round as ended with the reason of local closure, and stopping the waiting for the remote dialogue service to generate a final assistant reply for the current dialogue round. This is to prevent the current dialogue round from remaining in the waiting state for a long time. Subsequently, network interruption or session bearer interruption caused by this action is handled as expected to distinguish the link disconnection caused by this action from unexpected network outages, so that the current dialogue round will not re-transmit or recover. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A flowchart of a local dialogue round closure method proposed in an embodiment of this application is shown. Figure 2 An example of a link impact strategy table provided in this application is shown; Figure 3 A flowchart of a local dialogue round closure method according to another embodiment of this application is shown; Figure 4 A schematic diagram of the local closed-loop process provided in an embodiment of this application is shown; Figure 5 A schematic diagram of the remote closed loop process provided in an embodiment of this application is shown; Figure 6 This application illustrates a state transition diagram provided in an embodiment. Figure 7 This paper shows a structural block diagram of a local dialogue round closure device when a dialogue link is interrupted, according to an embodiment of this application. Figure 8This paper shows a structural block diagram of an electronic device according to an embodiment of the present application; Figure 9 This is a storage unit in this application embodiment for storing or carrying program code that implements the local dialogue round closure method when the dialogue link is interrupted according to this application embodiment. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0019] Voice assistants typically understand user statements through a remote dialogue service. When a user requests to operate the device, the remote dialogue service sends an execution request to the client. After the client executes the device action, it sends the execution result back to the remote service. The remote service then generates the final assistant response for this round based on the success or failure of the execution result and sends it back to the client, thus closing the current dialogue round.

[0020] This closed loop relies on two paths being available simultaneously: one is the network backhaul path, used to send back execution results and receive remote responses; the other is the session bearer path, i.e., the current dialog interface, used to present the response to the user. However, in some device control scenarios, certain device actions can directly or indirectly disrupt one of these paths, for example: 1. Turn off the wireless network, making the current network connection unavailable immediately, so that the execution result or remote reply can no longer be transmitted; 2. Turn on airplane mode or turn off mobile data to disable the wireless connection that is currently handling the remote conversation link; 3. Locking the screen, shutting down, restarting, or opening the factory reset page will cause the current conversation interface to leave, the screen to turn off, or be covered by the system interface, preventing remote replies from being displayed in the current conversation.

[0021] Since the final response must indicate whether the execution result was successful or not, and the remote end does not yet have the execution result when it sends the plugin execution request, the final response cannot be written in advance. Once the device action removes the return path or session interface, the remote response cannot return to the current conversation round, and the current conversation round will remain in the waiting state for the remote response.

[0022] To address the above problems, the commonly used approach in existing technologies is as follows: 1. Continue waiting for a remote response to close this round. The return path or session interface has been disrupted by this action, so the response cannot actually reach the target, and the conversation round is suspended indefinitely.

[0023] 2. After disconnecting from the network, switch to local identification and local broadcasting. This method is suitable when the device is already offline and cannot resolve dialogue rounds where "this round has been handed over to the remote end, and the remote end is still waiting for the plugin execution result".

[0024] 3. A fixed response is given along with the device command. This fixed response does not reflect the success or failure of this execution, nor can it distinguish a subsequent link disconnection from an unexpected network outage. The client may still resend or restore the current connection.

[0025] 4. The action is executed locally only, without writing the current round of assistant results or ending the waiting state for a remote response. The user cannot see the current round's results, and subsequent input is still affected by this waiting state.

[0026] To address the aforementioned issues, this application provides a method and related apparatus for closing a local dialogue round when the dialogue link is interrupted. Upon receiving a device plug-in execution request, the method determines the link impact category, closure trigger condition, closing action, and local result information template from a pre-configured link impact strategy table based on the operation type and operation objective. After executing the device action, the method determines whether the current dialogue round meets the local round closure condition based on the link impact category, closure trigger condition, and execution result, thereby effectively distinguishing between normal device execution and link-interrupted device execution. When the local round closure condition is met, the method generates the assistant-side result for the current dialogue round based on the local result message template and the execution result. The message is written to the local messaging system to provide readable feedback to the user even when the remote backhaul link fails. A series of closing actions are executed: switching the current conversation from a state of waiting for a remote reply to a local completed state; marking the remote conversation as ended with the reason of local closure; and stopping the waiting for the remote conversation service to generate a final assistant reply for the current conversation. This prevents the current conversation from remaining in a waiting state for an extended period. Subsequently, any network interruption or session bearer interruption caused by these actions is handled as expected to distinguish the link disconnection caused by these actions from unexpected network outages, ensuring that the current conversation does not re-transmit or resume.

[0027] The following section will introduce one application scenario involved in the embodiments of this application.

[0028] One application scenario described in this application includes a client with a voice assistant, a local messaging system, and a remote dialogue service. The client communicates with the remote dialogue service via a remote dialogue link. Before receiving the device plugin execution result from the client, the remote dialogue service does not generate a final assistant response for the current round that depends on the success or failure of the execution result. The client receives a device plugin execution request, which includes at least an operation type and an operation target. Based on a pre-configured local link impact policy table, the client determines the link impact category, closure trigger condition, closing action, and local result message template according to the operation type and operation target. The client executes the local device action corresponding to the request and obtains the execution result. Then, based on the link impact category, closure trigger condition, and execution result, the client determines whether the current dialogue round meets the local round closure condition. If it does, the client generates a final result message for the assistant side of the current round based on the local result message template and the execution result, and writes it to the local messaging system. Finally, the client executes the closing action and identifies the network disconnection event or session interface departure event caused by the local device action as an expected interruption of the current dialogue round, without performing user speech retransmission, session recovery, or voice / text degradation for the current dialogue round.

[0029] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0030] Please see Figure 1 This application provides a method for closing a local dialogue round when the dialogue link is interrupted, which specifically includes the following steps: S100: Receive a device plugin execution request associated with the current dialogue round.

[0031] The client receives a device plugin execution request and binds it to the current dialogue round. The source of this device plugin execution request can be a tool call issued by a remote dialogue service or a structured request after local semantic parsing. The device plugin execution request includes at least the operation type (such as close, trigger, etc.) and the operation target (such as wireless network, mobile data, etc.), and may also include parameter information (which can provide the data required for the operation type), the session identifier associated with the current dialogue round, the local session identifier, the tool call identifier, and the operation identifier, etc.

[0032] S110. Determine the termination strategy from the pre-configured link impact strategy table based on the operation type and operation objective.

[0033] The client uses the operation type and operation target to look up the link impact policy table to obtain the closing policy for this operation. The link impact policy table is pre-configured and stored on the client. The closing policy includes at least the link impact category, closure trigger condition, closing action, and local result message template.

[0034] Please refer to Figure 2, Figure 2 An exemplary link impact policy table is provided (some content is not shown, such as closing actions). In this link impact policy table, when the operation type is "shutdown" and the operation target is the wireless network, the link impact category is network backhaul interruption, and the closing trigger condition is local closure regardless of execution success or failure; when the operation type is "trigger" and the operation target is screen lock, power off, restart, or factory reset, the link impact category is session bearer interruption (i.e., after the action succeeds, the current dialog interface leaves, the screen turns off, or enters the system power menu or factory reset page, causing the remote reply to not be presented to the user in the current dialog interface), and the closing trigger condition is local closure only upon successful execution; the link impact category for other device control requests is no link impact (the action neither causes network backhaul interruption nor session bearer interruption), and the closing trigger condition is remote closure. Among them, the local message template, except for Figure 2 In addition to the example success template and failure template, a fallback template, such as "Operation completed," may also be included.

[0035] It should be noted that step S110 can be executed before or after step S120, and no specific limitation is made here.

[0036] S120. Execute the device action corresponding to the device plugin execution request and obtain the execution result.

[0037] The client executes the device action corresponding to the device plugin execution request, obtains the execution result, and the execution result includes at least an execution result identifier (success or failure identifier) ​​and user-readable result text.

[0038] If the same operation identifier and request fingerprint have already been executed, the device action will not be executed again; the completed execution result will be reused directly. Specifically, after receiving a device plugin execution request, the client obtains the request fingerprint and operation identifier of the request content (such as operation type, operation target, parameter information, etc.), and then checks whether the operation identifier and request fingerprint already exist locally and have been completed. If so, the completed execution result is reused as the execution result of the current dialogue round. If not, the device action corresponding to the request is executed, the execution result is obtained, and the operation identifier, request fingerprint, and corresponding execution result are saved locally.

[0039] The request fingerprint is a digest of the normalized request content. Normalization of the request content eliminates semantically inconsistencies, such as standardizing field order, removing extraneous whitespace, and standardizing case sensitivity or time formats. A hash is then calculated on the normalized request content to obtain a fixed-length request fingerprint. The purpose of normalization is to ensure that requests with the same semantics but different bytes produce the same fingerprint, preventing identical requests from being calculated with different fingerprints due to formatting issues. The client saves the request fingerprint but not the normalized plaintext request. This ensures that even if local storage is accessed, the original request content cannot be reconstructed from the digest, effectively protecting privacy and saving storage costs.

[0040] The remote dialogue service may repeatedly send the same device plugin execution request with a new tool call identifier due to network retries, timeout retransmissions, or other reasons. In this case, although the device action is not executed repeatedly, the execution result can still be sent back to the new tool call identifier because the remote end waits for a corresponding call identifier for each send. If it did not send back the result due to deduplication, the remote end would be suspended and waiting indefinitely. Furthermore, local closure is executed only once for the same operation identifier.

[0041] S130. Based on the link impact category, closure triggering condition, and execution result, determine whether the current dialogue round meets the local round closure condition.

[0042] If the link impact category is network backhaul interruption, or the closure trigger condition is local closure regardless of success or failure, then regardless of whether the execution result is successful or unsuccessful, the current dialogue round is determined to meet the local round closure condition. If the link impact category is session bearer interruption, and the closure trigger condition is local closure only upon success, then if the execution result is successful, it is determined that the current session meets the local session closure condition; if the execution result is unsuccessful, it is determined that the current session does not meet the local session closure condition. If the link impact category is no link impact, or the closure trigger condition is closure from a remote end, then the current dialogue round is determined not to meet the local round closure condition.

[0043] Before determining whether the current dialogue round meets the local round closure condition, the client checks whether the current session is in progress. If so, it further checks whether the round identifier carried by the current execution result is consistent with the current dialogue round identifier of the current session, whether the local session identifier carried by the current execution result is consistent with the session identifier of the current session, and if the current session has already recorded the operation identifier, whether the recorded operation identifier is consistent with the operation identifier carried by the current execution result. If any of these are inconsistent, the current execution result is discarded, the current dialogue round is not closed, and the new dialogue round is not rewritten. Discarding the current execution result ensures that the mismatched execution result itself does not enter any processing flow; not closing the current dialogue round ensures that the state machine of the currently ongoing dialogue round is not incorrectly advanced. In asynchronous scenarios, when the late result of the old dialogue round arrives, the user has often started a new dialogue round. If the aforementioned checks are not performed and the result is processed directly, the old result may be appended to the message list of the new dialogue round, or even trigger the closure of the new dialogue round. Not rewriting the new dialogue round ensures that the late result does not affect the new dialogue round.

[0044] S140. When the local round closure condition is met in the current dialogue round, generate the assistant-side result message for the current dialogue round based on the local result message template and the execution result, and write the assistant-side result message into the local message system.

[0045] When the local round closure condition is met in the current dialogue round, if the execution result identifier is a success identifier and the readable result text is non-empty text, then the success template in the local result message template is selected, and the result text is filled into the success template as the assistant side result message for the current dialogue round. If the execution result is marked as a failure and the readable result text is not empty, then select the failure template from the local result message template and fill in the result text in the failure template as the assistant-side result message for the current dialogue round. If the result text is empty, the fallback template in the local result message template will be selected as the assistant-side result message for the current dialogue round.

[0046] The client selects the appropriate message template from the local result message templates based on the execution result identifier. Even if the readable result text contains affirmative statements, the execution result identifier still applies. For example, if opening the factory reset page fails, the readable result text might be "OK," the execution result identifier might be a failure identifier, and the closure trigger condition might be local closure only upon success. In this case, local closure is not performed, and no final local assistant-side result message is generated.

[0047] In one embodiment, the client can also determine whether there is an assistant message that is being streamed and has not yet been completed in the current dialogue round. If so, the client replaces the content of the assistant message with the readable result text in the execution result and marks the assistant message as completed. If not, the client determines whether the last received message in the current dialogue round is a user message, or whether there is no replaceable streaming assistant message in the current dialogue round. If so, a new assistant-side final result message is appended to the end of the message list.

[0048] The final generated assistant-side result message is written to the message list and message cache under the current session identifier, and then written to the database, disk or other local persistent media according to the local session identifier.

[0049] S150, perform the closing action and mark the network interruption event or session interface departure event caused by the device action as the expected interruption of the current session.

[0050] After generating the assistant-side result message and writing it to the local messaging system, the client executes the closing actions in the closing strategy, including: Switch the current conversation round from the waiting for remote response state to the local completed state. Specifically, clear the waiting for remote first packet state and the waiting for remote response state of the current conversation round, so that the current conversation round can be listened to again; stop and clear the current round of streaming playback, and block any remaining remote audio that has not yet been played in the current conversation round; cancel the timeout for the current round of voice activity detection and the voice idle timer, and end the current round of voice input occupation; Mark the remote round as ended with the reason for ending as local closure, and record the identifier of the corresponding local assistant-side result message; Stop waiting for the remote dialogue service to generate the final assistant response for the current dialogue round.

[0051] Even if the execution result successfully reaches the remote dialogue service thereafter, the local completed status will not be revoked, and the local final assistant-side result message will not be replaced by a remote reply.

[0052] Local closure is not contingent on the remote end successfully receiving the aforementioned execution result. The client can execute S140 and S150 during or after attempting a return transmission; local closure is still executed even if the return transmission fails.

[0053] After executing the closing action, the client marks the network disconnection or session interface exit event caused by the device action as an expected interruption of the current dialogue round, and can set a flag indicating that a visible assistant-side result message has been generated in this round. When the flag indicating that a visible assistant-side result message has been generated in this round is valid, the user's speech is not retransmitted, session recovery is not initiated, and the speech recognition text of this round is not downgraded to an assistant reply for the current dialogue round. In this embodiment, marking the network disconnection or session interface exit event caused by the device action as an expected interruption of the current dialogue round effectively avoids treating network disconnection caused by the device action as an unexpected network disconnection and retransmitting or resuming the session.

[0054] With the above scheme, even if the device action itself disrupts the backhaul path or session bearer, the current session can still generate a final result consistent with the execution result on the client side and end the waiting. Subsequent network interruptions or session bearer interruptions caused by this action are handled as expected, and the current session will not re-transmit or resume. Closed session sessions will not be rewritten by subsequent remote response packets.

[0055] Upon receiving a device plugin execution request, this embodiment determines the link impact category, closure trigger condition, closing action, and local result information template from a pre-configured link impact strategy table based on the operation type and operation objective. After executing the device action, it determines whether the current dialogue round meets the local round closure condition based on the link impact category, closure trigger condition, and execution result, thereby effectively distinguishing between ordinary device execution and link interruption-type device execution. When the local round closure condition is met, it generates an assistant-side result message for the current dialogue round based on the local result message template and execution result, and writes it to the local message system for implementation. Even when the remote backhaul link fails, readable feedback is still provided to the user. A series of closing actions are executed, including switching the current conversation round from the waiting for remote reply to the local completed state, marking the remote round as ended with the reason of local closure, and stopping the waiting for the remote conversation service to generate a final assistant reply for the current conversation round. This prevents the current conversation round from remaining in the waiting state for an extended period. Subsequently, any network interruption or session bearer interruption caused by these actions is handled as expected to distinguish the link disconnection caused by these actions from unexpected network outages, ensuring that the current conversation round does not re-transmit or resume.

[0056] Please see Figure 3 , Figure 3 This illustration shows a flowchart of a local dialogue round closure method provided in another embodiment of this application when a dialogue link is interrupted. The method specifically includes: S300: Receive a device plugin execution request associated with the current dialogue round.

[0057] S310. Determine the termination strategy from the pre-configured link impact strategy table based on the operation type and operation objective.

[0058] S320: Execute the device action corresponding to the device plugin execution request and obtain the execution result.

[0059] S330. Based on the link impact category, closure triggering condition, and execution result, determine whether the current dialogue round meets the local round closure condition.

[0060] S340. When the local round closure condition is met in the current dialogue round, generate the assistant-side result message for the current dialogue round based on the local result message template and the execution result, and write the assistant-side result message into the local message system.

[0061] S350, perform the closing action and mark the network interruption event or session interface departure event caused by the device action as the expected interruption of the current session.

[0062] The specific details of steps S300-S350 can be found in the aforementioned steps S100-S150, and will not be repeated here.

[0063] S360. When the remote dialogue service returns a remote message after the current dialogue round is in the local completed state, the remote message is rejected and downgraded according to the late return packet handling rules.

[0064] In this embodiment, the closing strategy also includes a late response handling rule. After the current dialogue round has switched to the local completed state, when the remote dialogue service returns a remote message, the remote message is processed according to the late response handling rule, including: the client rejects the remote message, does not write the remote message into the message stream of the current session, and records it as a diagnostic event to prevent old reply packets from polluting the current message stream; late failure events do not present error messages to the user; late completion events retain the existing local closure result, do not rewrite it as remote completion, and do not replace the local result text with an empty remote reply.

[0065] For a conversation round that has been successfully completed locally and whose session has been interrupted, subsequent screen shutdown or exit from the conversation interface will keep the conversation round in the locally completed state, without changing it to the incomplete state or the user-cancelled state.

[0066] In one embodiment, if the link impact category of the device plugin execution request is not determined to be network backhaul interruption or session bearer interruption, and within a preset time window after the device action is executed, it is detected that the network changes from an available state to an unavailable state, the disconnected network interface is consistent with the operation target, no other device action that changes the network interface is executed within the preset time window, and the execution result includes user-readable result text, or the device plugin execution request is a request to allow the use of a fallback template, then it is determined that the current dialogue round meets the local round closure condition.

[0067] If the link impact policy table has not yet marked the current device plugin execution request as a network backhaul interruption or session bearer interruption, the client will detect the remote link within a preset time window (e.g., 2 seconds) after the local device action begins execution. If the following four target conditions are met within this preset time window, the current execution request will be upgraded to meet the local round-trip closure condition, and the process will proceed to step S340. The target conditions include: (1) The network changes from an available state to an unavailable state; (2) The disconnected network interface is consistent with the operation target; for example, when the operation target is wireless network, the wireless interface is disconnected; when the operation target is mobile data, the cellular data interface is disconnected; when the operation target is airplane mode, neither the wireless interface nor the cellular data interface is available. (3) No other device action that changes the network interface was performed within the preset time window; (4) The execution result includes user-readable result text, or a request for the device plugin to execute as a fallback template in the local result message template.

[0068] If the above objective conditions cannot be met simultaneously, this network interruption or session bearer interruption will not be regarded as an expected interruption caused by the device action, and the current dialogue round will be handed over to the remote closure. If the network is already unavailable at this time and is unrelated to the current device action, it will be handled as a normal network anomaly, and the local closure processing method of the embodiments of this application will not be used.

[0069] In one embodiment, when it is determined that the current dialogue round does not meet the local round closure condition, the execution result is sent back to the remote dialogue service, and the state of waiting for remote response is maintained; when the final assistant-side response of this round generated by the remote dialogue service based on the execution result is received, the current dialogue round is switched from the state of waiting for remote response to the state of remote completion.

[0070] If the local round closure condition is not met in the current round, the execution result is sent back to the remote round service, and the current round waits for a remote response. Upon receiving the execution result, the remote round service generates a final assistant response for this round and sends it back to the client. After receiving the final assistant response from the remote round service, the client switches the current round from the waiting-for-reply state to the remote-completed state, thus closing the current round. For a better comparison of remote closure and local closure, please refer to [link to relevant documentation]. Figure 4 The provided flowchart of the local closed loop and Figure 5 The provided flowchart illustrates the process of a remote closed loop.

[0071] It should be noted that the system maintains a round state machine, which specifically includes the following states: waiting for plugin execution, plugin in execution, pending judgment, local completion, waiting for remote reply, and remote completion.

[0072] The state transitions of the round state machine include: waiting for plugin execution state → plugin execution state → pending judgment state → local completed state, or, waiting for plugin execution state → plugin execution state → pending judgment state → waiting for remote reply state → remote completed state.

[0073] Please refer to Figure 6 The state transition relationship is as follows: (1) After the device plugin execution request is issued, it enters the waiting state for plugin execution; (2) Upon receiving a device plugin execution request, the device enters the plugin execution state; (3) After obtaining the execution result, it enters the pending judgment state; (4) If the local round closure condition is met, or the escalation request is confirmed after the action is executed, then enter the local completed state; otherwise, enter the waiting for remote reply state; after receiving the valid remote final reply for this round, enter the remote completed state. If a remote message from the same round is received after the local completion status, the status remains the same as the local completion status.

[0074] Upon receiving a device plugin execution request, this embodiment determines the link impact category, closure trigger condition, closing action, and local result information template from a pre-configured link impact strategy table based on the operation type and operation objective. After executing the device action, it determines whether the current dialogue round meets the local round closure condition based on the link impact category, closure trigger condition, and execution result, thereby effectively distinguishing between ordinary device execution and link interruption-type device execution. When the local round closure condition is met, it generates an assistant-side result message for the current dialogue round based on the local result message template and execution result, and writes it to the local message system to provide readable feedback to the user even when the remote feedback link fails. The execution switches the current dialogue round from the waiting for remote reply state to the local completed state, marks the remote round as ended with the reason for ending as local closure, and stops the process. The system executes a series of closing actions while waiting for the remote dialogue service to generate a final assistant response for the current dialogue round. This prevents the current dialogue round from remaining in a waiting state for an extended period. Subsequently, any network or session interruption caused by these actions is handled as expected, distinguishing the link disconnection from unexpected network outages and preventing the current dialogue round from retransmitting or recovering. Furthermore, when the remote end returns a message after the current dialogue round is in a locally completed state, the client rejects and downgrades the remote message record, not writing it into the current session's message stream to prevent old response packets from contaminating the current message stream. Additionally, for cases where the link impact policy table has not yet marked the current device plugin execution request as a network return interruption or session interruption, a request confirmation upgrade judgment is performed after the device action to avoid missed or incorrect judgments during local round closure.

[0075] The following are some specific embodiments to illustrate the local dialogue round closure method proposed in this application when the dialogue link is interrupted.

[0076] Example 1: Turn off the wireless network The user requests to turn off the wireless network. At this time, the remote device plugin sends an operation request with the operation type being "turn off" and the operation target being the wireless network.

[0077] The client determines the closing strategy: the link impact category is network backhaul interruption, the closing trigger condition is local closure regardless of success or failure, the success template is "WiFi is turned off", the failure template is "WiFi turning off failed", and the fallback template is "Operation completed".

[0078] The client shuts down the wireless network. On success, the result text is "WiFi is off"; on failure, the result text is "Failed to shut down WiFi". Both results satisfy the local round-closing condition. The client writes the corresponding text to the local messaging system, performs the closing action, and marks the subsequent network disconnection as an expected interruption.

[0079] When the close action call fails, it is still closed locally because the connection may have been broken after the call was sent, and the remote reply is no longer reliable. In this case, a failure template is written, and the failure will not be displayed as "WiFi is off".

[0080] Example 2: Session Bearer Interruption The user requests to trigger screen lock, power off, restart, or open the factory reset page; the remotely issued operation type is trigger, and the operation target is the device plugin execution request that locks the screen, powers off, restarts, or opens the factory reset page; Based on the link impact policy table, the client can determine that the link impact category for screen lock, power off, restart, and opening the factory reset page is session bearer interruption, and the closure trigger condition is local closure only upon successful execution.

[0081] The client executes the device operation corresponding to the request and obtains the execution result; When the screen is successfully locked, the message template is "Screen locked". After successful locking, the screen turns off, and the current conversation ends. When the shutdown is successful, the message template is "The system power menu has popped up. Please select shutdown from the menu." When the restart is successful, the message template is "The system power menu has popped up. Please select restart from the menu." When the factory reset page is successfully opened, the message template will be "OK"; If the power menu fails to pop up during shutdown or restart, the execution result is considered a failure, the local closure is not performed, and the execution result is still sent back to the remote end. If opening the factory reset page fails, even if the result text is "OK", the execution result will still be a failure, and local closure will not be performed.

[0082] Upon successful execution, an assistant-side result message for the current conversation round is generated based on the local result message template and the execution result, and written to the local messaging system. A closing action is performed, and the conversation interface exit event caused by the device action is marked as an expected interruption of the current conversation round. Subsequent exits due to screen locking or system interface overlay retain the locally completed state for that round.

[0083] If execution fails, the client sends the execution result back to the remote end and remains in a state of waiting for a response from the remote end. The remote end then generates the final assistant response for this round based on the execution result. At this time, the dialog interface is still active, and the remote end can still send back the final response.

[0084] Example 3: Enabling Flight Mode and Disabling Mobile Data In this embodiment, enabling flight mode and disabling mobile data are determined as follows.

[0085] (1) Activate flight mode: The client sets flight mode to enabled and sends the corresponding system status change.

[0086] If execution is successful, and wireless network and mobile data are unavailable within a preset time window (preferably 2 seconds): the link impact category is determined to be network backhaul interruption, and local closure is performed regardless of the success or failure flag. The success template is "Airplane mode is on".

[0087] If the execution fails and the wireless network or mobile data can still support the remote backhaul link when the preset time window ends: the local closure is not performed, the execution result is sent back to the remote end, the failure template "failed to turn on airplane mode" is used by the remote end to generate a reply, or if backhaul is no longer possible, it is then determined whether the request should be upgraded to meet the local round closure conditions.

[0088] If the execution fails, but wireless networks and mobile data are already unavailable within the preset time window and can be attributed to this action, i.e., this request is upgraded to meet the local round closure condition, then the message uses the failure template "Failed to turn on airplane mode"; if the result text is empty, the fallback template "Operation completed" is used.

[0089] (2) Turn off mobile data: Before execution, the client records the current carrier of the remote backhaul link: mobile data only, wireless network only, or both.

[0090] The current remote link is solely carried by mobile data. If mobile data is successfully turned off, or if the cellular data interface becomes unavailable within a preset time window and this is attributable to this action, the local round closure condition is deemed met. The success template is "Mobile data turned off," and if the failure occurs and the network is disconnected, the "Failed to turn off mobile data" or fallback template is used.

[0091] The wireless network can still support remote links: if the current dialogue round does not meet the local round closure condition, the execution result is sent back to the remote end, and the remote end generates the final reply.

[0092] Example 4: No Link Impact Requests such as turning on the flashlight, adjusting the volume, and turning on Bluetooth, which do not disrupt network backhaul and session carrying, are classified as having no link impact, and the closure trigger condition is that the closure is handled by the remote end. After the client executes the action, it sends the execution result back to the remote dialogue service, waiting for the remote dialogue service to generate the final response for this round based on the execution result. This response is not written to the local final result, nor is a subsequent accidental network outage marked as an expected interruption of the action.

[0093] Please refer to Figure 7 , Figure 7 A local dialogue round closure device is provided when a dialogue link is interrupted. The device specifically includes: The request receiving unit 710 is used to receive a device plugin execution request associated with the current dialogue round. The device plugin execution request includes at least the operation type and the operation target. The strategy determination unit 720 is used to determine the closing strategy from a pre-configured link impact strategy table based on the operation type and operation objective; the closing strategy includes at least the link impact category, closure trigger condition, closing action, and local result message template. The action execution unit 730 is used to execute the device action corresponding to the device plug-in execution request and obtain the execution result; The closure determination unit 740 is used to determine whether the current dialogue round meets the local round closure condition based on the link impact category, closure triggering condition, and execution result. The local result generation unit 750 is used to generate the assistant-side result message of the current dialogue round according to the local result message template and the execution result when the local round closure condition is met in the current dialogue round, and write the assistant-side result message into the local message system. The state closing unit 760 is used to perform closing actions; the closing actions include switching the current dialogue round from the waiting for remote reply state to the local completed state, marking the remote round as ended with the reason for ending as local closure, and stopping waiting for the remote dialogue service to generate the final assistant reply for the current dialogue round. The expected interruption marking unit 770 is used to mark a network interruption event or session interface departure event caused by device action as an expected interruption of the current session.

[0094] In one embodiment, the closure determination unit 740 is specifically used to determine that the current dialogue round meets the local round closure condition, regardless of whether the execution result is success or failure, if the link impact category is network backhaul interruption or the closure trigger condition is local closure regardless of success or failure. If the link impact category is session bearer interruption, and the closure trigger condition is local closure only upon success, then if the execution result is successful, it is determined that the current session meets the local session closure condition; if the execution result is unsuccessful, it is determined that the current session does not meet the local session closure condition. If the link impact category is no link impact, or the closure trigger condition is closure from a remote end, then the current dialogue round is determined not to meet the local round closure condition.

[0095] In one embodiment, the apparatus further includes: a request confirmation upgrade unit, configured to determine that the current dialogue round meets the local round closure condition if the link impact category of the device plug-in execution request is not determined to be network backhaul interruption or session bearer interruption, and within a preset time window after the execution of the device action, it is detected that the network changes from an available state to an unavailable state, the disconnected network interface is consistent with the operation target, no other device action to change the network interface is executed within the preset time window, and the execution result includes user-readable result text, or the device plug-in execution request is a request to allow the use of a fallback template.

[0096] In one embodiment, the apparatus further includes: The first verification unit is used to obtain the operation identifier and request fingerprint of the device plugin execution request. The request fingerprint is a summary of the request content of the standardized device plugin execution request. When it is determined that the device action corresponding to the operation identifier and request fingerprint has been executed, the device action will not be executed again, and the completed execution result will be reused as the execution result corresponding to the device plugin execution request.

[0097] In one embodiment, the apparatus further includes: The second verification unit is used to determine whether the current session is in progress; if so, it determines whether the round identifier carried by the execution result is consistent with the current dialogue round identifier of the current session, whether the local session identifier carried by the execution result is consistent with the session identifier of the current session, and if the current session has recorded the operation identifier, it determines whether the recorded operation identifier is consistent with the operation identifier carried by the execution result; if any of these are inconsistent, the execution result is discarded, the current dialogue round is not closed, and the new session round is not rewritten.

[0098] In one embodiment, the execution result includes an execution result identifier and user-readable result text. The local result generation unit 750 is specifically used to select the success template in the local result message template and fill the result text into the success template as the assistant-side result message of the current dialogue round when the local round closure condition is met. If the execution result is marked as a failure and the readable result text is not empty, then select the failure template from the local result message template and fill in the result text in the failure template as the assistant-side result message for the current dialogue round. If the result text is empty, the fallback template in the local result message template will be selected as the assistant-side result message for the current dialogue round. Write the assistant-side result message to the local messaging system.

[0099] In one embodiment, the closing strategy further includes a late response processing rule, and the device further includes a late response processing unit, which is used to reject and downgrade the remote message when the remote dialogue service returns a remote message after the current dialogue round is in the local completed state.

[0100] Upon receiving a device plugin execution request, this embodiment determines the link impact category, closure trigger condition, closing action, and local result information template from a pre-configured link impact strategy table based on the operation type and operation objective. After executing the device action, it determines whether the current dialogue round meets the local round closure condition based on the link impact category, closure trigger condition, and execution result, thereby effectively distinguishing between ordinary device execution and link interruption-type device execution. When the local round closure condition is met, it generates an assistant-side result message for the current dialogue round based on the local result message template and execution result, and writes it to the local message system for implementation. Even when the remote backhaul link fails, readable feedback is still provided to the user. A series of closing actions are executed, including switching the current conversation round from the waiting for remote reply to the local completed state, marking the remote round as ended with the reason of local closure, and stopping the waiting for the remote conversation service to generate a final assistant reply for the current conversation round. This prevents the current conversation round from remaining in the waiting state for an extended period. Subsequently, any network interruption or session bearer interruption caused by these actions is handled as expected to distinguish the link disconnection caused by these actions from unexpected network outages, ensuring that the current conversation round does not re-transmit or resume.

[0101] The following will combine Figure 8 This application describes an electronic device.

[0102] Please see Figure 8 This application also provides an electronic device 800 capable of executing the aforementioned local dialogue round closure method when the dialogue link is interrupted. The electronic device 800 includes one or more (only one is shown in the figure) processors 802 and a memory 801 coupled together. The memory 801 stores programs capable of executing the content described in the aforementioned embodiments, and the processors 802 can execute the programs stored in the memory 801.

[0103] Processor 802 may include one or more processing cores. Processor 802 connects to various parts within the electronic device 800 using various interfaces and lines, and performs various functions and processes data of the electronic device 800 by running or executing instructions, programs, code sets, or instruction sets stored in memory 801, and by calling data stored in memory 801. Optionally, processor 802 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 802 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 802 and may be implemented separately using a communication chip.

[0104] The memory 801 may include random access memory (RAM) or read-only memory (ROM). The memory 801 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 801 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described above.

[0105] Please refer to Figure 9 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable storage medium 900 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0106] The computer-readable storage medium 900 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 900 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 900 has storage space for program code 910 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 910 may, for example, be compressed in a suitable form.

[0107] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.

[0108] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0109] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0110] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0111] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for closing a local dialogue round when the dialogue link is interrupted, characterized in that, include: Receive a device plugin execution request associated with the current dialogue round, the device plugin execution request including at least an operation type and an operation target; Based on the operation type and the operation objective, a closing strategy is determined from a pre-configured link impact strategy table; the closing strategy includes at least the link impact category, closure trigger condition, closing action, and local result message template. The device action corresponding to the device plugin execution request is executed, and the execution result is obtained; Based on the link impact category, the closure trigger condition, and the execution result, determine whether the current dialogue round meets the local round closure condition; When the local round closure condition is met in the current dialogue round, the assistant-side result message for the current dialogue round is generated according to the local result message template and the execution result, and the assistant-side result message is written into the local message system. Perform the closing action and mark the network interruption event or session interface departure event caused by the device action as the expected interruption of the current dialogue round; the closing action includes switching the current dialogue round from the waiting for remote reply state to the local completed state, marking the remote round as ended with the reason for the end being local closure, and stopping waiting for the remote dialogue service to generate a final assistant reply for the current dialogue round.

2. The method according to claim 1, characterized in that, The step of determining whether the current dialogue round meets the local round closure condition based on the link impact category, the closure trigger condition, and the execution result includes: If the link impact category is network backhaul interruption, or the closure trigger condition is local closure regardless of success or failure, then regardless of whether the execution result is success or failure, the current dialogue round is determined to meet the local round closure condition. If the link impact category is session bearer interruption, and the closure trigger condition is local closure only upon success, then if the execution result is successful, it is determined that the current dialogue round meets the local round closure condition; if the execution result is unsuccessful, it is determined that the current dialogue round does not meet the local round closure condition. If the link impact category is no link impact, or the closure trigger condition is closure by a remote end, then it is determined that the current dialogue round does not meet the local round closure condition.

3. The method according to claim 2, characterized in that, The method further includes: If the link impact category of the device plugin execution request is not determined to be network backhaul interruption or session bearer interruption, and within a preset time window after the execution of the device action, it is detected that the network changes from an available state to an unavailable state, the disconnected network interface is consistent with the operation target, no other device action that changes the network interface is executed within the preset time window, and the execution result includes user-readable result text, or the device plugin execution request is a request to allow the use of a fallback template, then the current dialogue round is determined to meet the local round closure condition.

4. The method according to claim 1, characterized in that, Before executing the device action corresponding to the device plugin execution request and obtaining the execution result, the process also includes: Obtain the operation identifier and request fingerprint of the device plugin execution request, wherein the request fingerprint is a summary of the request content that normalizes the device plugin execution request; When it is determined that the device action corresponding to the operation identifier and the request fingerprint has been executed, the device action will not be executed again, and the completed execution result will be reused as the execution result corresponding to the device plugin execution request.

5. The method according to claim 1, characterized in that, The step of determining whether the current dialogue round meets the local round closure condition based on the link impact category, the closure trigger condition, and the execution result also includes: Determine if the current session is in progress; If so, determine whether the round identifier carried by the execution result is consistent with the current dialogue round identifier of the current session, whether the local session identifier carried by the execution result is consistent with the session identifier of the current session, and if the current session has already recorded the operation identifier, determine whether the recorded operation identifier is consistent with the operation identifier carried by the execution result. If any inconsistency exists, the execution result of the current dialogue round is discarded, the current dialogue round is not closed, and the new dialogue round is not rewritten.

6. The method according to claim 1, characterized in that, The execution result includes an execution result identifier and user-readable result text. The step of generating an assistant-side result message for the current dialogue round based on the local result message template and the execution result when the local round closure condition is met includes: When the local round closure condition is met in the current dialogue round, if the execution result identifier is a success identifier and the readable result text is non-empty text, then the success template in the local result message template is selected, and the result text is filled into the success template as the assistant-side result message for the current dialogue round. If the execution result identifier is a failure identifier and the readable result text is non-empty text, then select the failure template in the local result message template and fill in the result text in the failure template as the assistant-side result message for the current dialogue round. If the result text is empty, then the fallback template in the local result message template is selected as the assistant-side result message for the current dialogue round.

7. The method according to claim 1, characterized in that, The step of switching the current dialogue round from the waiting for a remote reply state to the local completed state includes: Clear the waiting for remote first packet and waiting for remote reply states in the current conversation round, so that the current conversation round can be listened to again; Stop and clear this round of playback, and mute any remaining remote audio that has not yet been played in the current conversation round; Cancel the timeout for this round of voice activity detection and the voice idle timer.

8. The method according to claim 1, characterized in that, The closing strategy also includes rules for handling late return packets, and the method further includes: When the remote dialogue service returns a remote message after the current dialogue round is in the local completed state, the remote message is rejected and downgraded according to the late return packet handling rules.

9. A local dialogue round-closing device when a dialogue link is interrupted, characterized in that, include: A request receiving unit is configured to receive a device plugin execution request associated with the current dialogue round, wherein the device plugin execution request includes at least an operation type and an operation target; The strategy determination unit is used to determine a closing strategy from a pre-configured link impact strategy table based on the operation type and the operation objective; the closing strategy includes at least the link impact category, closure trigger condition, closing action, and local result message template. An action execution unit is used to execute the device action corresponding to the device plug-in execution request and obtain the execution result; The closure determination unit is used to determine whether the current dialogue round meets the local round closure condition based on the link influence category, the closure triggering condition, and the execution result. The local result generation unit is used to generate an assistant-side result message for the current dialogue round based on the local result message template and the execution result when the local round closure condition is met in the current dialogue round, and write the assistant-side result message into the local message system; A state closing unit is used to perform the closing action; the closing action includes switching the current dialogue round from the waiting for remote reply state to the local completed state, marking the remote round as ended with the reason for ending as local closure, and stopping waiting for the remote dialogue service to generate a final assistant reply for the current dialogue round. An expected interruption marking unit is used to mark a network interruption event or session interface departure event caused by the device action as an expected interruption of the current session.

10. An electronic device, characterized in that, Includes one or more processors and memory; One or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the method of any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, wherein the program code, when executed by a processor, performs the method according to any one of claims 1-8.