Control instruction sending method and device, storage medium and electronic device

CN121963724APending Publication Date: 2026-05-01QINGDAO HAIER TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

[0003]而针对相关技术中,如何高效发送控制指令以提高语音交互的控制效率的技术问题,尚未提出有效的解决方案

Benefits of technology

[0017]In this embodiment, a streaming recognition result is obtained from the Automatic Speech Recognition (ASR) result. The ASR result is obtained by the smart device or the cloud platform performing ASR on the interactive audio. The streaming recognition result includes: a first recognition result and a second recognition result. The first recognition result does not contain a recognition end marker, while the second recognition result does. A first control intent corresponding to the first recognition result is generated, and a first control command generated based on the first control intent is sent to the smart device. The first control command carries an execution time period, used to control the smart device to execute the first control command after the execution time period has elapsed. Natural Language Processing (NLP) is performed on the second recognition result to obtain a second control intent. The first control intent is verified using the second control intent. This application utilizes the streaming output characteristics of ASR to obtain a first control intent based on a portion of the recognition result (first recognition result) in advance. Simultaneously, it performs NLP processing on the complete recognition result (second recognition result) to obtain a second control intent. A first control intent carrying an execution time period is sent to the smart device. Then, the first control intent is verified using the second control intent to determine whether to send a second control instruction based on the second control intent to the smart device. This solves the technical problem of how to efficiently send control instructions to improve the control efficiency of voice interaction, reduces latency accumulation in traditional serial processes, improves the sending efficiency and instantaneous response speed of voice control instructions, and also improves the control efficiency of voice interaction, thereby enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963724A_ABST
    Figure CN121963724A_ABST
Patent Text Reader

Abstract

The invention discloses a control instruction sending method and device, a storage medium and an electronic device, and relates to the technical field of smart home, and the control instruction sending method comprises the steps: obtaining a streaming recognition result from an automatic speech recognition ASR result; a first control intention corresponding to the first recognition result is generated, a first control instruction generated based on the first control intention is sent to the intelligent device, and the first control instruction carries an execution time period and is used for controlling the intelligent device to execute the first control instruction after the execution time period passes. Performing natural language processing (NLP) on the second recognition result to obtain a second control intention; and verifying the first control intention through the second control intention to judge whether to send a second control instruction generated based on the second control intention to the intelligent equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, storage media, and electronic devices for transmitting control commands Technical Field

[0001] This application relates to the field of smart home technology, and more specifically, to a method, apparatus, storage medium, and electronic device for transmitting control commands. Background Technology

[0002] Currently, with the development of smart home technology, voice control has become an important method of human-computer interaction due to its convenience and efficiency. However, the sequential execution logic of Automatic Speech Recognition (ASR) and Natural Language Processing (NLP) in the traditional control process suffers from response delays. After a user issues a voice command to the device, even a simple command such as adjusting lights or setting the air conditioner temperature, the cloud platform must wait for the ASR to convert the audio into text, then the NLP to parse the text to understand the control intent, and finally send the corresponding control command to the device for execution. The accumulated delays in this process lead to low control efficiency in voice interaction, significantly impacting the user experience. Therefore, there is a technical problem in related technologies of how to improve the efficiency of sending control commands to improve the control efficiency of voice interaction.

[0003] However, no effective solution has yet been proposed for the technical problem of how to efficiently send control commands to improve the control efficiency of voice interaction. Summary of the Invention

[0004] This application provides a method, apparatus, storage medium, and electronic device for sending control commands, to at least solve the technical problem in the related art of how to efficiently send control commands to improve the control efficiency of voice interaction.

[0005] According to one embodiment of this application, a method for sending control commands is provided, comprising: obtaining a streaming recognition result from an automatic speech recognition (ASR) result, wherein the ASR result is obtained by the smart device or the cloud platform performing ASR on interactive audio, and the streaming recognition result includes: a first recognition result and a second recognition result, wherein the first recognition result does not contain a recognition end identifier, and the second recognition result contains a recognition end identifier; generating a first control intent corresponding to the first recognition result, and sending a first control command generated based on the first control intent to the smart device, wherein the first control command carries an execution time period, used to control the smart device to execute the first control command after the execution time period has elapsed; performing natural language processing (NLP) on the second recognition result to obtain a second control intent; and verifying the first control intent through the second control intent to determine whether to send a second control command generated based on the second control intent to the smart device.

[0006] In an exemplary embodiment, obtaining the streaming recognition result of the interactive audio from the Automatic Speech Recognition (ASR) result includes: splitting the ASR result according to the sending time to obtain multiple audio packets with a sequential order; monitoring the multiple audio packets sequentially; if the recognition end marker is detected for the first time in one of the multiple audio packets, determining intermediate audio based on the one audio packet and other audio packets whose sending time is earlier than the one audio packet, and obtaining the first recognition result of performing ASR on the intermediate audio; if the recognition end marker is not detected in any of the multiple audio packets, determining the second recognition result based on the result of performing ASR on the multiple audio packets.

[0007] In an exemplary embodiment, before generating the first control intent corresponding to the first identification result, the method further includes: determining that the first identification result passes verification by: determining the interaction corpus corresponding to the first identification result, the device physical address of the smart device, and the current number of the interaction object; and determining that the first identification result passes verification if it is determined that a historical interaction corpus consistent with the interaction corpus, a historical device physical address consistent with the device physical address, and a historical number consistent with the current number are found in the historical interaction records.

[0008] In one exemplary embodiment, the method further includes one of the following: if it is determined that a historical interaction corpus consistent with the interaction corpus, a historical physical address consistent with the device physical address, and a historical number consistent with the current number are found in the historical interaction record, and if it is determined that the first control intent corresponding to the first identification result already exists, then discard the first identification result; if it is determined that at least one of the historical interaction corpus consistent with the interaction corpus, a historical physical address consistent with the device physical address, or a historical number consistent with the current number is not found in the historical interaction record, then determine that the first identification result has failed verification; if it is determined that no historical interaction corpus consistent with the interaction corpus is found in the historical interaction record, then determine that the first identification result has failed verification and discard the first identification result.

[0009] In an exemplary embodiment, generating a first control intent corresponding to the first identification result includes one of the following: searching for historical control intents corresponding to the first identification result from historical interaction records, and determining the first control intent based on the historical control intents; determining the device category of the smart device based on the device information of the smart device, determining a prompt corresponding to the device category, inputting the prompt and the interaction corpus corresponding to the first identification result into an intent model, and obtaining the first control intent output by the intent model, wherein the intent model represents an open-source intelligent big model, and the prompt is used to instruct the intelligent big model to generate the control intent corresponding to the interaction corpus using the prompt.

[0010] In one exemplary embodiment, verifying the first control intent using the second control intent to determine whether to send a second control instruction generated based on the second control intent to the smart device includes: obtaining a verification result of verifying the first control intent using the second control intent; if the verification result indicates that the first control intent has failed verification, sending the second control instruction to the smart device; if the verification result indicates that the first control intent has passed verification, not sending any instruction to the smart device or sending a confirmation execution instruction for the first control instruction to the smart device, so that the smart device immediately executes the first control instruction.

[0011] In an exemplary embodiment, the method further includes: determining a cache result of caching a first control instruction generated based on the first control intent, wherein the cache result includes at least the first control intent; determining a verification result based on the cache result; wherein determining the verification result based on the cache result includes one of the following: if it is determined that there is a control intent consistent with the second control intent in the cache result, determining that the verification result is that the first control intent passes verification; if it is determined that the cache state of the cache result is cached, determining that the verification result is that the first control intent fails verification; if the cache result includes multiple first control intents, and the multiple first control intents satisfy all preset conditions, determining that the verification result is that the first control intent passes verification; if the cache result includes multiple first control intents, and the multiple first control intents satisfy any one of the preset conditions fails, determining that the verification result is that the first control intent fails verification; wherein the preset conditions include: the multiple first control intents include one control intent consistent with the second control intent, the device corresponding to the one control intent is consistent with the smart device, and the corpus corresponding to the one control intent is consistent with the corpus corresponding to the first control intent.

[0012] In one exemplary embodiment, the method further includes: if a verification result of the second control intent and the first control intent is received during the execution time period, sending the first control instruction or a second control instruction corresponding to the second control intent to the smart device according to the verification result; wherein, sending the first control instruction or the second control instruction corresponding to the second control intent to the smart device according to the verification result includes: if it is determined that the verification result indicates that the first control intent has passed the verification, sending a confirmation execution instruction of the first control instruction to the smart device to control the smart device to immediately execute the first control instruction; if it is determined that the verification result indicates that the first control intent has failed the verification, sending the second control instruction to the smart device to control the smart device to immediately execute the second control instruction.

[0013] According to another aspect of the embodiments of this application, a control command sending device is also provided, comprising: a first obtaining module, configured to obtain a streaming recognition result from an automatic speech recognition (ASR) result, wherein the ASR result is obtained by the smart device or the cloud platform performing ASR on interactive audio, and the streaming recognition result includes: a first recognition result and a second recognition result, wherein the first recognition result does not contain a recognition end identifier, and the second recognition result contains a recognition end identifier; a generating module, configured to generate a first control intent corresponding to the first recognition result, and send a first control command generated based on the first control intent to the smart device, wherein the first control command carries an execution time period, configured to control the smart device to execute the first control command after the execution time period has elapsed; a second obtaining module, configured to perform natural language processing (NLP) on the second recognition result to obtain a second control intent; and a sending module, configured to verify the first control intent using the second control intent to determine whether to send a second control command generated based on the second control intent to the smart device.

[0014] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described method for sending control instructions when it is run.

[0015] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described method for sending control instructions through the computer program.

[0016] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the above-described method for sending control instructions.

[0017] In this embodiment, a streaming recognition result is obtained from the Automatic Speech Recognition (ASR) result. The ASR result is obtained by the smart device or the cloud platform performing ASR on the interactive audio. The streaming recognition result includes: a first recognition result and a second recognition result. The first recognition result does not contain a recognition end marker, while the second recognition result does. A first control intent corresponding to the first recognition result is generated, and a first control command generated based on the first control intent is sent to the smart device. The first control command carries an execution time period, used to control the smart device to execute the first control command after the execution time period has elapsed. Natural Language Processing (NLP) is performed on the second recognition result to obtain a second control intent. The first control intent is verified using the second control intent. This application utilizes the streaming output characteristics of ASR to obtain a first control intent based on a portion of the recognition result (first recognition result) in advance. Simultaneously, it performs NLP processing on the complete recognition result (second recognition result) to obtain a second control intent. A first control intent carrying an execution time period is sent to the smart device. Then, the first control intent is verified using the second control intent to determine whether to send a second control instruction based on the second control intent to the smart device. This solves the technical problem of how to efficiently send control instructions to improve the control efficiency of voice interaction, reduces latency accumulation in traditional serial processes, improves the sending efficiency and instantaneous response speed of voice control instructions, and also improves the control efficiency of voice interaction, thereby enhancing the user experience. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 is a schematic diagram of the hardware environment for a method of sending control commands according to an embodiment of this application;

[0021] Figure 2 is a flowchart of a method for sending control commands according to an embodiment of this application;

[0022] Figure 3 is a flowchart illustrating a method for sending control commands according to an embodiment of this application;

[0023] Figure 4 is a schematic flowchart of an intent recognition according to an embodiment of this application;

[0024] Figure 5 is a schematic flowchart of a cloud platform sending control commands according to an embodiment of this application;

[0025] Figure 6 is a structural block diagram of a control command sending device according to an embodiment of this application. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. 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 comprises 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 processes, methods, products, or apparatus.

[0028] According to one aspect of the embodiments of this application, a method for sending control commands is provided. This method is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligence house ecosystems. Optionally, in this embodiment, the above-mentioned method for sending control commands can be applied to a hardware environment consisting of a terminal device 102 and a server 104, as shown in FIG1. ​​As shown in FIG1, the server 104 is connected to the terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services to the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services to the server 104.

[0029] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.

[0030] This embodiment provides a method for sending control commands, applied to the aforementioned terminal device. Figure 2 is a flowchart of the method for sending control commands according to an embodiment of this application. The process includes the following steps:

[0031] Step S202: Obtain streaming recognition results from the Automatic Speech Recognition (ASR) results, wherein the ASR results are obtained by the smart device or the cloud platform performing ASR on the interactive audio, and the streaming recognition results include: a first recognition result and a second recognition result, wherein the first recognition result does not contain a recognition end identifier, and the second recognition result contains a recognition end identifier;

[0032] Step S204: Generate a first control intent corresponding to the first recognition result, and send a first control instruction generated based on the first control intent to the smart device. The first control instruction carries an execution time period, which is used to control the smart device to execute the first control instruction after the execution time period has elapsed.

[0033] Optionally, the control intent for the smart device is obtained based on the first control intent, and then the control field in the existing blank control instruction is filled with this control intent to obtain the first control instruction. The control field may include, but is not limited to, the device identification field, the instruction type field, and the parameter value field.

[0034] The Device Identifier field specifies the smart device receiving the control command, ensuring that the command is accurately sent to the correct device. For example, when the control intent is "lower the living room air conditioner temperature," the Device Identifier field will contain a unique identifier for the "living room air conditioner," such as its MAC address or device ID. The Command Type field describes the specific operation type of the control command, such as on / off operation, temperature adjustment, or volume control. This field ensures that the device can correctly parse the received command and execute the corresponding action. In the example above, the Command Type field will be filled with "temperature adjustment." The Parameter Value field contains the specific values ​​or parameters required for the control command to execute, such as the specific temperature setting or the on / off state. For example, in "lower the living room air conditioner temperature," the Parameter Value field will be filled with the specific value for "lower," such as "lower by 2 degrees." Depending on the control intent, this field can contain a single parameter or a combination of multiple parameters.

[0035] Step S206: Perform Natural Language Processing (NLP) on the second recognition result to obtain the second control intent;

[0036] Step S208: Verify the first control intent using the second control intent to determine whether to send a second control command generated based on the second control intent to the smart device.

[0037] Optionally, the generation process of the second control command is similar to that of the first control command, and will not be described in detail here.

[0038] Through the above embodiments, streaming recognition results are obtained from Automatic Speech Recognition (ASR) results. The ASR results are obtained by the smart device or the cloud platform performing ASR on interactive audio. The streaming recognition results include: a first recognition result and a second recognition result. The first recognition result does not contain a recognition end marker, while the second recognition result does contain a recognition end marker. A first control intent corresponding to the first recognition result is generated, and a first control command generated based on the first control intent is sent to the smart device. The first control command carries an execution time period, used to control the smart device to execute the first control command after the execution time period has elapsed. Natural Language Processing (NLP) is performed on the second recognition result to obtain a second control intent. The first control intent is verified using the second control intent to determine... This application utilizes the streaming output characteristics of ASR to obtain a first control intent based on a portion of the recognition result (first recognition result) in advance. Simultaneously, it performs NLP processing on the complete recognition result (second recognition result) to obtain a second control intent. A first control intent carrying an execution time period is sent to the smart device. Then, the first control intent is verified using the second control intent to determine whether to send a second control instruction generated based on the second control intent to the smart device. This solves the technical problem of how to efficiently send control instructions to improve the control efficiency of voice interaction, reduces the latency accumulation in traditional serial processes, improves the sending efficiency and instantaneous response speed of voice control instructions, and also improves the control efficiency of voice interaction, thereby enhancing the user experience.

[0039] In an exemplary embodiment, the process of obtaining the streaming recognition result of the interactive audio from the Automatic Speech Recognition (ASR) result includes: splitting the ASR result according to the sending time to obtain multiple audio packets with a sequential order; monitoring the multiple audio packets sequentially; if the recognition end marker is detected for the first time in one of the multiple audio packets, determining intermediate audio based on the one audio packet and other audio packets whose sending time is earlier than the one audio packet, and obtaining the first recognition result of ASR on the intermediate audio; if the recognition end marker is not detected in any of the multiple audio packets, determining the second recognition result based on the result of ASR on the multiple audio packets. This embodiment, by splitting the ASR result according to the time sequence, can effectively monitor the end marker in the streaming recognition process and obtain the preliminary recognition result (first recognition result) of the intermediate audio before the recognition is completed. Once the recognition end marker appears, subsequent unnecessary processing can be quickly terminated, thereby significantly accelerating the voice control response speed and improving the user experience. For example, if a user says "turn on the kitchen light", preprocessing can begin immediately after the user says the word "turn on". Once the recognition is complete, the process is immediately confirmed and executed, avoiding the delay of waiting for the entire sentence to be fully recognized.

[0040] In an exemplary embodiment, before generating the first control intent corresponding to the first recognition result, the method further includes: determining that the first recognition result passes verification by: determining the interaction corpus corresponding to the first recognition result, the device physical address of the smart device, and the current number of the interaction object; and determining that the first recognition result passes verification if a historical interaction corpus consistent with the interaction corpus, a historical device physical address consistent with the device physical address, and a historical number consistent with the current number are found in the historical interaction records. This embodiment, by comparing the device physical address, interaction corpus, and number, can verify whether the user command is a common and valid operation, effectively filter out erroneous or invalid commands, improve the security of the recognition result, and thus optimize the accuracy of voice control and user experience. For example, when "turn off the air conditioner" is recognized, and a matching device physical address and number are found in the historical records, the validity of the command can be quickly confirmed, the execution process can be accelerated, thereby realizing the validity verification of the first recognition result and ensuring the consistency of the recognition result with the historical interaction records.

[0041] In an exemplary embodiment, the method further includes one of the following: if it is determined that historical interaction data consistent with the interaction data, a historical physical address consistent with the device physical address, and a historical number consistent with the current number are found in the historical interaction records, and if it is determined that the first control intent corresponding to the first identification result already exists, then the first identification result is discarded; if it is determined that at least one of historical interaction data consistent with the interaction data, a historical physical address consistent with the device physical address, or a historical number consistent with the current number is not found in the historical interaction records, then the first identification result is determined to have failed verification; if it is determined that no historical interaction data consistent with the interaction data is found in the historical interaction records, then the first identification result is determined to have failed verification, and the first identification result is discarded. This embodiment discusses a processing strategy for identification results, specifically including a discarding mechanism for identification results and countermeasures for cases of failure to pass verification. This helps to avoid duplicate processing and resource waste, and improves the processing efficiency of identification results. For example, if a user repeatedly says "turn up the TV volume" and the system detects that the same command has been processed before, the current recognition result will be discarded. This avoids unnecessary retransmission of device control signals, maintains the consistency of device status, and improves the smoothness of user interaction.

[0042] In an exemplary embodiment, generating a first control intent corresponding to the first recognition result includes one of the following schemes: searching for historical control intents corresponding to the first recognition result from historical interaction records, and determining the first control intent based on the historical control intents; determining the device category of the smart device based on the device information of the smart device, determining the prompt corresponding to the device category, inputting the prompt and the interaction corpus corresponding to the first recognition result into an intent model, and obtaining the first control intent output by the intent model, wherein the intent model represents an open-source intelligent big model, and the prompt is used to instruct the intelligent big model to generate the control intent corresponding to the interaction corpus using the prompt. This embodiment provides a solution for efficiently obtaining control intents. Whether searching from historical records or generating using an intent model, it can quickly match appropriate control intents for user commands, reducing the time required for NLP processing and enhancing the immediacy of voice control. For example, when a user says "lower the bedroom temperature," control intents with similar contexts in the historical records can be directly invoked, such as "cool down the bedroom air conditioner," or the user's intent can be analyzed through an intent model to quickly generate and confirm the correct control command, reducing user waiting time and improving interaction efficiency.

[0043] In one exemplary embodiment, verifying the first control intent using the second control intent to determine whether to send a second control instruction generated based on the second control intent to the smart device includes: obtaining a verification result of verifying the first control intent using the second control intent; if the verification result indicates that the first control intent has failed verification, sending the second control instruction to the smart device; if the verification result indicates that the first control intent has passed verification, not sending any instruction to the smart device or sending a confirmation execution instruction for the first control instruction to the smart device, so that the smart device immediately executes the first control instruction.

[0044] Optionally, if the verification result between the second control intent and the first control intent has not been received after the execution time period, a confirmation execution instruction for the first control instruction may be sent to the smart device to control the smart device to immediately execute the first control instruction.

[0045] In an exemplary embodiment, a cache result of caching the first control instruction generated based on the first control intent may also be determined, wherein the cache result includes at least the first control intent; and the verification result may be determined based on the cache result.

[0046] The step of determining the verification result based on the cached result includes one of the following: if the cached result contains a control intent consistent with the second control intent, the verification result is determined to be that the first control intent has passed verification; if the cached state of the cached result is determined to be cached, the verification result is determined to be that the first control intent has failed verification; if the cached result includes multiple first control intents, and all of the multiple first control intents satisfy preset conditions, the verification result is determined to be that the first control intent has passed verification; if the cached result includes multiple first control intents, and any one of the multiple first control intents does not satisfy preset conditions, the verification result is determined to be that the first control intent has failed verification; wherein the preset conditions include: the multiple first control intents include one control intent consistent with the second control intent, the device corresponding to the one control intent is consistent with the smart device, and the corpus corresponding to the one control intent is consistent with the corpus corresponding to the first control intent. This embodiment refines the control instruction caching and arbitration mechanism, enabling immediate response when processing simple instructions, while maintaining accuracy and effectiveness when processing complex instructions. By evaluating cached results to determine the verification outcome, this embodiment can quickly make decisions based on the degree of matching between the second control intent and the cached state. This improves the execution efficiency of simple instructions and achieves accurate execution of complex instructions, comprehensively optimizing the control experience of smart devices. For example, for "open the curtains in the study," if a matching control intent and state exist in the cache, the arbitration process will immediately confirm consistency and execute the preloaded instruction; otherwise, a new instruction will be generated based on the new control intent, thereby improving the timeliness and accuracy of control instruction execution.

[0047] In one exemplary embodiment, sending a second control instruction generated based on the second control intent to the smart device includes: determining the device attributes of the smart device from the device information of the smart device; determining the initial operation instructions supported by the device attributes; and updating the initial operation instructions based on the second control intent to obtain the second control instruction. This embodiment, by determining the device attributes of the smart device and the initial operation instructions it supports, can dynamically update the device's control instructions based on the second control intent, ensuring the flexibility and adaptability of instruction execution. For example, if the instruction "adjust the TV brightness to 50%" is received, the device attributes will be checked to confirm the "brightness adjustment" function, and the initial operation instructions will be updated accordingly to generate a precise control instruction, such as "set the TV brightness to 50%", improving the targeting and execution efficiency of the instruction and further optimizing the user interaction experience.

[0048] Among them, the aforementioned initial operation commands include basic commands such as turning on, turning off, and adjusting the temperature.

[0049] In one exemplary embodiment, if it is determined, based on the verification result of the second control intent and the first control intent, that the first control instruction should be sent to the smart device, a first callback result from the smart device for the first control instruction is received. If it is determined that the first callback result indicates that the smart device has successfully executed the first control instruction, and if the smart device is a single device, the first recognition result and the first control intent are cached. This embodiment emphasizes the importance of processing the device callback result and caching the control instruction when the device executes successfully and it is a single device. By caching successful control instructions, user preferences and habits can be learned, providing faster response and service for future voice control. For example, after the first successful execution of the interactive audio instruction "set the refrigerator temperature to 2℃", the corresponding control intent and result are also cached. Then, when the user issues a similar instruction next time, redundant processing steps can be skipped, and the cached information can be immediately invoked to execute the pre-loaded control instruction, greatly improving user satisfaction and convenience with smart home control.

[0050] Optionally, if the smart device is not a single device, the first identification result and the first control intent are no longer cached.

[0051] Optionally, if the first identification result and the first control intent are cached, and if neither the first identification result nor the first control intent has been cached before, then they are added to the cache. If the first identification result and the first control intent have already been cached, then the cached content is updated asynchronously.

[0052] Optionally, if it is determined, based on the comparison result between the second control intent and the first control intent, that a second control instruction will be sent to the smart device, a second callback result from the smart device for the second control instruction is received, wherein the second control result is generated based on the second control intent. It should be noted that the processing procedure for the second callback result refers to that for the first callback result, and will not be elaborated further in this application.

[0053] In an exemplary embodiment, the method further includes: when a verification result of the second control intent and the first control intent is received during the execution time period, sending the first control instruction or a second control instruction corresponding to the second control intent to the smart device according to the verification result; wherein, sending the first control instruction or the second control instruction corresponding to the second control intent to the smart device according to the verification result includes: when it is determined that the verification result indicates that the first control intent has passed the verification, sending a confirmation execution instruction of the first control instruction to the smart device to control the smart device to immediately execute the first control instruction; when it is determined that the verification result indicates that the first control intent has failed the verification, sending the second control instruction to the smart device to control the smart device to immediately execute the second control instruction. In this embodiment, when a verification result of the second control intent and the first control intent is received during the execution time period, by arbitrating the consistency of the first control intent and the second control intent, it can decide whether to use a pre-loaded first control instruction or a second control instruction generated based on the final ASR recognition result, avoiding device misoperation due to processing ambiguity, improving the reliability of the control process, and increasing the response speed. When the preprocessing result and the final result are consistent, the preloaded command will be executed immediately, such as "lower the brightness of the bedroom light". The ASR part of the streaming is parsed as "lower the brightness of the bedroom light", preprocessed and the corresponding first control command is sent. The subsequent "brightness" part is confirmed by NLP processing and can be executed immediately after being acknowledged, which significantly shortens the execution time and improves the efficiency of voice control.

[0054] Furthermore, if the verification result is determined to indicate that the first control intent has passed the verification, no new control command is sent, and the execution result of the first control command by the smart device is obtained.

[0055] In an exemplary embodiment, the method further includes: if the verification result of the second control intent and the first control intent is received only after the execution time period has elapsed, sending a second control instruction corresponding to the second control intent to the smart device according to the verification result; wherein, sending the second control instruction corresponding to the second control intent to the smart device according to the verification result includes: if it is determined that the verification result indicates that the first control intent has failed verification, sending the second control instruction to the smart device to control the smart device to continue executing the second control instruction and obtain the execution result of the second control instruction by the smart device. In this embodiment, if the verification result is received only after the execution time period has elapsed, and it is confirmed that the first control intent and the second control intent are inconsistent, the second control instruction can be directly sent to the smart device to control the smart device to execute the latest and complete control intent. This allows the smart device to execute the preliminary instructions in the ASR streaming recognition process first, responding to the user's purpose as soon as possible, and at the same time, after the final intent is clear, by timely adjusting and executing the correct control instruction, avoiding device misoperation caused by the inconsistency between the preliminary instructions and the user's true intent. For example, if a user says "open all windows," it is initially recognized as "open windows," but the complete intent is "all windows." So, it first closes one smart device (such as a smart window), and then accurately responds to the "all windows" command, closing all smart windows, thereby improving the accuracy of voice control and user experience.

[0056] In an exemplary embodiment, the method further includes: obtaining the authentication result of the interactive object; wherein obtaining the authentication result of the interactive object includes: determining the object information of the interactive object based on the current number of the interactive object, wherein the object information includes at least the permission information of the interactive object; determining the current device physical address corresponding to the current number from the permission information of the interactive object; if the current device physical address is consistent with the device physical address of the smart device, determining that the interactive object has control permission of the smart device, and then determining that the authentication result is passed; if the current device physical address is inconsistent with the device physical address of the smart device, determining that the interactive object does not have control permission of the smart device, and then determining that the authentication result is failed. This embodiment verifies control permission by comparing the current device physical address of the interactive object with the address of the target smart device, ensuring that only authorized users can operate specific devices, improving the security of the smart home system, preventing unauthorized voice commands from being executed, thereby protecting user privacy and device security. For example, only family members have the permission to control home smart security devices, and similar commands from visitors or external personnel will be rejected, maintaining the security and order of the home network environment. Through this authentication process, this embodiment effectively balances the convenience and security of voice control, providing users with an efficient and secure smart home voice control environment.

[0057] In an exemplary embodiment, as shown in Figure 3, a general voice interaction diagram in the relevant field illustrates that the user collects interactive audio through a terminal device and reports it to the cloud platform. Then, ASR (Automatic Speech Recognition) is performed to obtain text information. After receiving the final recognized text result, the cloud platform processes it into specific control intentions using NLP (Natural Language Processing), converts the control intentions into control commands, and forwards them to the corresponding smart home devices within the user's home to complete the control. Similarly, related response messages or appliance status messages are fed back to the interactive terminal in the opposite direction. However, this serial processing method consumes more recognition time due to the longer interactive voice, and subsequent NLP processing also takes longer. Therefore, the entire control process takes a long time, resulting in a slow overall response, which may exceed the user's tolerable waiting time and affect the user experience.

[0058] To better understand the process of sending the above control commands, the implementation flow of sending the above control commands will be described below in conjunction with optional embodiments, but this is not intended to limit the technical solutions of the embodiments of this application.

[0059] This embodiment provides a method for sending control commands. Figure 4 is a flowchart illustrating the method for sending control commands according to an embodiment of this application. As shown in Figure 4, the specific steps are as follows:

[0060] Step 1: Determine whether it is the final result by using the intermediate packet sequence number of ASR.

[0061] Specifically, when a user interacts via voice, the smart home system receives the user's voice information, uses ASR (Automatic Speech Recognition) to identify the user's interaction data, and submits it to the cloud platform. Alternatively, the smart home system can directly submit the user's voice information to the cloud platform for ASR.

[0062] Before receiving the "Finish" marker, the returned ASR response results are all streaming intermediate results (i.e., the first identification result mentioned above). The streaming intermediate results are then preprocessed using step 2. After receiving the "Finish" marker, the final ASR identification result (i.e., the second identification result) is then processed using NLP.

[0063] The following is an example of ASR's streaming intermediate results:

[0064] sid=s1, index=1, text="I want to open".

[0065] sid=s1, index=2, text="I want to turn on the air conditioner".

[0066] sid=s2, index=1, text="I want to hit".

[0067] sid=s2, index=2, text="I want to turn on the air conditioner".

[0068] The final recognition result of ASR is shown in the following example:

[0069] sid=s1, index=100, text="I want to turn on the air conditioner".

[0070] sid=s2, index=100, text="I want to turn on the air conditioner".

[0071] sid=s3, index=100, text=“I want to turn on the air conditioner in cooling mode”.

[0072] sid=s4, index=100, text=“I want to turn on the air conditioner in cooling mode”.

[0073] Step 2: Verify the intermediate streaming results. Once the verification is successful, perform corpus intent command preprocessing. Preprocessing includes matching valid intents from the cached content based on the user's historical interactions, converting the valid intents to obtain the corresponding device control commands, and caching the corpus, valid intents, and control commands for use in the next step.

[0074] Matching valid intents from user history interactions in cached content, such as "sid=s2, index=2, text='I want to turn on the air conditioner'", will match the cached "u001_d001_I want to turn on the air conditioner".

[0075] The intermediate streaming result verification process verifies whether the user ID, the physical address (MAC address) of the interactive device, and the interactive corpus all exist. If any one of these is missing, the verification fails, and the intermediate streaming result is discarded. During verification, the key is the session ID_current corpus, and the value is the pre-processed corpus, intent, operation command, or broadcast script. The cached key is s2_I want to turn on the air conditioner, and the value is {operate=open..., response='The air conditioner has been turned on for you'}.

[0076] If the interactive corpus itself does not exist, the intermediate streaming result is discarded; if the intermediate streaming result is duplicated, the intermediate streaming result is discarded.

[0077] Step 3: After receiving the final ASR recognition result, the cloud platform uses NLP parallel processing to obtain the control intent. It then determines whether there is a control intent in the cached result that is consistent with this control intent. If not, the result is determined to be inconsistent. If the status of the cached result shows that the operation is still in progress, it will no longer wait and will be determined to be inconsistent. If there are multiple cached results, it will compare whether the corpus is consistent, whether the control intent is consistent, and whether the control device is consistent. If they are consistent, the result is determined to be consistent; otherwise, the result is determined to be inconsistent.

[0078] The following are examples of parallel processing in NLP.

[0079] sid=s1, nlpresult={category=cmd, domain=ac, action=open,...}.

[0080] sid=s1, nlpresult={category=cmd, domain=ac, action=setmode, param=...}.

[0081] Step 4: The cloud platform issues device commands based on the judgment result of step 3.

[0082] If the results are consistent, the control command corresponding to the preprocessing result is sent to the corresponding device for execution; if the results are inconsistent, the NLP control intent is converted into control commands, and then the command is sent for execution.

[0083] The cloud platform can confirm the current valid operation command of the device through user intent and device attributes (model, version, system, etc.). As shown in Figure 5, after performing ASR and uploading recognition information in step 1, in step 2, the cloud platform determines the device category (such as air conditioner) through the device information reported by the device (i.e., predefined category information), then obtains the prompt for this category from the standard intent library, and uses it in conjunction with user corpus to generate control intent by the intent model. Finally, in step 3, the control intent is converted into device instructions and then sent to the device for execution.

[0084] Among them, the category predefined information includes equipment category, large model identity and positioning information, and equipment preset function set.

[0085] Other intentions represent non-control intentions, such as checking the weather, chatting, playing music, etc. Standard intentions refer to executable instructions derived from the differences in control devices. For example, the instructions to turn on central air conditioners, floor-standing air conditioners, wall-mounted air conditioners, and kitchen air conditioners only require modification of the specific device. A corresponding model positioning prompt could be: Fridge=>You are a smart voice-activated refrigerator that supports voice chat. Your name is "XXX". You are young and cheerful, and when chatting, you appropriately praise people to provide emotional value. When working, you use concise language to show reliability, and when chatting, you are talkative and love to bring up new topics. In this way, by defining the LLM's positioning and intelligent control direction for managing home appliances in the smart home through prompts, and combining the home's device list information, the functional control information of the appliance vertical domain, and the smart home knowledge base, the LLM can understand the meaning of the user's prompts and quickly control all smart home appliances. In addition, by using LLM in the smart home control chain, the role of NLP in translating speech and text into user intent is replaced. At the same time, no additional investment in corpus training is needed for general semantic understanding. This reduces the need for corpus training and intent recognition training when new smart home products are connected to smart control. Only the semantics and corresponding intent need to be provided to LLM.

[0086] Step 5: The cloud platform determines whether it needs to add or update the cached corpus or intent by checking whether the callback result of the device's execution command was successful, and then provides it for the next interaction.

[0087] If the execution result control fails, continue to obtain the callback result and analyze the failure result to determine whether it is a device problem or another problem.

[0088] If the execution is successful, it checks if it's a single device. If not, the caching process stops. If it is a single device, the caching process continues: specifically, it checks if the user's interaction device and corpus have already been cached. If not, they are added. If both have been verified and cached, the cache is updated asynchronously. During caching, the user ID, interaction device MAC address, and interaction corpus must all exist. If any one of these is missing, the caching process ends. This ensures that the latest cached record is retrieved for each user interaction.

[0089] The following is a verification example.

[0090] key: User ID_Interactive Device ID_Corpus; value: NLP parsing intent;

[0091] k: u001_d001_I want to turn on the air conditioner; v: nlpResult = {category =cmd, domain = ac, action = ...}.

[0092] Through the above steps, the voice reported to the cloud platform can be processed using streaming ASR. Specifically, preprocessing involves matching the partial recognition results returned by streaming ASR with historical data. If the partial recognition results returned by streaming ASR already exist in the history of successful user interactions, the match is successful. The device execution command is then derived from the intent in the historical data and saved. If the match fails, the data is discarded. When the user's voice interaction ends, the final recognized intent is compared with the preprocessed intent. If they match, the comparison is successful, and the device command from the preprocessing stage can be sent to the corresponding device via the cloud platform. This modifies the serial execution flow of the entire voice link's device control portion into parallel execution, utilizing the time difference of ASR streaming output to quickly obtain control commands and send them to the device, accelerating real-time interaction efficiency and improving user experience. For example, user A first says "Set the temperature to 24 degrees" to the main air conditioner in the living room. The air conditioner then reports the collected voice information to the cloud platform. After non-streaming ASR recognition, the cloud platform obtains the intermediate recognition result "Set the temperature to 24", finds the corresponding control intent and the instruction "Set the air conditioner to 24 degrees", and obtains the final result of the user's speech "Set the temperature to 24 degrees". This result is then passed to NLP for processing into the control intent "Set the air conditioner temperature to 24 degrees", and then converted into the control instruction to set the air conditioner temperature attribute to 24 degrees. Thus, the instruction "Set the air conditioner to 24 degrees" can be sent to the designated air conditioner in the living room in advance. After execution, the living room air conditioner announces the execution result, the user receives the execution result information, and the response process ends.

[0093] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0094] Figure 6 is a structural block diagram of a control command transmitting device according to an embodiment of this application; as shown in Figure 6, it includes:

[0095] The first obtaining module 602 is used to obtain streaming recognition results from the automatic speech recognition (ASR) results, wherein the ASR results are obtained by the smart device or the cloud platform performing ASR on the interactive audio, and the streaming recognition results include: a first recognition result and a second recognition result, wherein the first recognition result does not contain a recognition end identifier, and the second recognition result contains a recognition end identifier;

[0096] The generation module 604 is used to generate a first control intent corresponding to the first recognition result and send a first control instruction generated based on the first control intent to the smart device. The first control instruction carries an execution time period and is used to control the smart device to execute the first control instruction after the execution time period has elapsed.

[0097] The second obtaining module 606 is used to perform natural language processing (NLP) on the second recognition result to obtain the second control intent;

[0098] The sending module 608 is used to verify the first control intent through the second control intent in order to determine whether to send a second control command generated based on the second control intent to the smart device.

[0099] Using the aforementioned device, a streaming recognition result is obtained from the Automatic Speech Recognition (ASR) result. The ASR result is obtained by the smart device or the cloud platform performing ASR on the interactive audio. The streaming recognition result includes: a first recognition result and a second recognition result. The first recognition result does not contain a recognition end marker, while the second recognition result does contain a recognition end marker. A first control intent corresponding to the first recognition result is generated, and a first control command generated based on the first control intent is sent to the smart device. The first control command carries an execution time period, used to control the smart device to execute the first control command after the execution time period has elapsed. Natural Language Processing (NLP) is performed on the second recognition result to obtain a second control intent. The first control intent is verified using the second control intent to determine... This application utilizes the streaming output characteristics of ASR to obtain a first control intent based on a portion of the recognition result (first recognition result) in advance. Simultaneously, it performs NLP processing on the complete recognition result (second recognition result) to obtain a second control intent. A first control intent carrying an execution time period is sent to the smart device. Then, the first control intent is verified using the second control intent to determine whether to send a second control instruction generated based on the second control intent to the smart device. This solves the technical problem of how to efficiently send control instructions to improve the control efficiency of voice interaction, reduces the latency accumulation in traditional serial processes, improves the sending efficiency and instantaneous response speed of voice control instructions, and also improves the control efficiency of voice interaction, thereby enhancing the user experience.

[0100] In an exemplary embodiment, the first obtaining module is further configured to: split the ASR result according to the sending time to obtain a plurality of audio packets with a sequential order; monitor the plurality of audio packets sequentially; if the identification end marker is detected for the first time in one of the plurality of audio packets, determine an intermediate audio based on the one audio packet and other audio packets whose sending time is earlier than the one audio packet, and obtain the first identification result of performing ASR on the intermediate audio; if the identification end marker is not detected in any of the plurality of audio packets, determine the second identification result based on the result of performing ASR on the plurality of audio packets.

[0101] In an exemplary embodiment, the acquisition module is further configured to determine that the first identification result passes the verification by: determining the interaction corpus corresponding to the first identification result, the device physical address of the smart device, and the current number of the interaction object; and determining that the first identification result passes the verification if it is determined that a historical interaction corpus consistent with the interaction corpus, a historical physical address consistent with the device physical address, and a historical number consistent with the current number are found in the historical interaction records.

[0102] In an exemplary embodiment, the acquisition module is further configured to: if it is determined that a historical interaction corpus consistent with the interaction corpus, a historical physical address consistent with the device physical address, and a historical number consistent with the current number are found in the historical interaction records, and if it is determined that the first control intent corresponding to the first identification result already exists, then discard the first identification result; if it is determined that at least one of the historical interaction corpus consistent with the interaction corpus, a historical physical address consistent with the device physical address, or a historical number consistent with the current number is not found in the historical interaction records, then determine that the first identification result has failed verification; if it is determined that no historical interaction corpus consistent with the interaction corpus is found in the historical interaction records, then determine that the first identification result has failed verification and discard the first identification result.

[0103] In an exemplary embodiment, the acquisition module is further configured to implement one of the following schemes: searching for the historical control intent corresponding to the first identification result from the historical interaction record, and determining the first control intent based on the historical control intent; determining the device category of the smart device based on the device information of the smart device, determining the prompt corresponding to the device category, inputting the prompt and the interaction corpus corresponding to the first identification result into the intent model, and obtaining the first control intent output by the intent model, wherein the intent model represents an open-source intelligent big model, and the prompt is used to instruct the intelligent big model to generate the control intent corresponding to the interaction corpus using the prompt.

[0104] In an exemplary embodiment, the apparatus is further configured to: obtain a verification result of verifying the first control intent by the second control intent; if the verification result indicates that the first control intent has failed verification, send the second control instruction to the smart device; if the verification result indicates that the first control intent has passed verification, not send any instruction to the smart device or send a confirmation execution instruction for the first control instruction to the smart device, so that the smart device immediately executes the first control instruction.

[0105] In an exemplary embodiment, the apparatus is further configured to: determine a cache result of caching a first control instruction generated based on the first control intent, wherein the cache result includes at least the first control intent; determine a verification result based on the cache result; wherein determining the verification result based on the cache result includes one of the following: if it is determined that there is a control intent consistent with the second control intent in the cache result, determine that the verification result is that the first control intent passes verification; if it is determined that the cache state of the cache result is cached, determine that the verification result is that the first control intent fails verification; if the cache result includes multiple first control intents, and the multiple first control intents satisfy all preset conditions, determine that the verification result is that the first control intent passes verification; if the cache result includes multiple first control intents, and the multiple first control intents satisfy any one of the preset conditions, determine that the verification result is that the first control intent fails verification; wherein the preset conditions include: the multiple first control intents include one control intent consistent with the second control intent, the device corresponding to the one control intent is consistent with the smart device, and the corpus corresponding to the one control intent is consistent with the corpus corresponding to the first control intent.

[0106] In an exemplary embodiment, the apparatus is further configured to: upon receiving a verification result between the second control intent and the first control intent during the execution time period, send the first control instruction or a second control instruction corresponding to the second control intent to the smart device according to the verification result; wherein, sending the first control instruction or the second control instruction corresponding to the second control intent to the smart device according to the verification result includes: if it is determined that the verification result indicates that the first control intent has passed the verification, sending a confirmation execution instruction for the first control instruction to the smart device to control the smart device to immediately execute the first control instruction; if it is determined that the verification result indicates that the first control intent has failed the verification, sending the second control instruction to the smart device to control the smart device to immediately execute the second control instruction.

[0107] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.

[0108] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:

[0109] S1, obtain streaming recognition results from automatic speech recognition (ASR) results, wherein the ASR results are obtained by the smart device or the cloud platform performing ASR on the interactive audio, and the streaming recognition results include: a first recognition result and a second recognition result, wherein the first recognition result does not contain a recognition end identifier, and the second recognition result contains a recognition end identifier;

[0110] S2, generate a first control intent corresponding to the first recognition result, and send a first control instruction generated based on the first control intent to the smart device, wherein the first control instruction carries an execution time period, and is used to control the smart device to execute the first control instruction after the execution time period has elapsed;

[0111] S3, Perform Natural Language Processing (NLP) on the second recognition result to obtain the second control intent;

[0112] S4, the first control intent is verified by the second control intent to determine whether to send a second control command generated based on the second control intent to the smart device.

[0113] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0114] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0115] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0116] S1, obtain streaming recognition results from automatic speech recognition (ASR) results, wherein the ASR results are obtained by the smart device or the cloud platform performing ASR on the interactive audio, and the streaming recognition results include: a first recognition result and a second recognition result, wherein the first recognition result does not contain a recognition end identifier, and the second recognition result contains a recognition end identifier;

[0117] S2, generate a first control intent corresponding to the first recognition result, and send a first control instruction generated based on the first control intent to the smart device, wherein the first control instruction carries an execution time period, and is used to control the smart device to execute the first control instruction after the execution time period has elapsed;

[0118] S3, Perform Natural Language Processing (NLP) on the second recognition result to obtain the second control intent;

[0119] S4, the first control intent is verified by the second control intent to determine whether to send a second control command generated based on the second control intent to the smart device.

[0120] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0121] Optionally, embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0122] Optionally, embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0123] Optionally, embodiments of this application also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.

[0124] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0125] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0126] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for sending control commands, characterized in that, The method, applied to a cloud platform, includes: obtaining streaming recognition results from Automatic Speech Recognition (ASR) results, wherein the ASR results are obtained by a smart device or the cloud platform performing ASR on interactive audio, and the streaming recognition results include: a first recognition result and a second recognition result, wherein the first recognition result does not contain a recognition end marker, and the second recognition result does contain a recognition end marker; generating a first control intent corresponding to the first recognition result, and sending a first control command generated based on the first control intent to the smart device, wherein the first control command carries an execution time period, used to control the smart device to execute the first control command after the execution time period has elapsed; performing Natural Language Processing (NLP) on the second recognition result to obtain a second control intent; and verifying the first control intent using the second control intent to determine whether to send a second control command generated based on the second control intent to the smart device.

2. The method for sending control commands according to claim 1, characterized in that, Obtaining the streaming recognition result of the interactive audio from the Automatic Speech Recognition (ASR) result includes: splitting the ASR result according to the sending time to obtain multiple audio packets with a sequential order; monitoring the multiple audio packets sequentially; if the recognition end marker is detected for the first time in one of the multiple audio packets, determining intermediate audio based on the one audio packet and other audio packets whose sending time is earlier than the one audio packet, and obtaining the first recognition result of ASR on the intermediate audio; if the recognition end marker is not detected in any of the multiple audio packets, determining the second recognition result based on the result of ASR on the multiple audio packets.

3. The method for sending control commands according to claim 1, characterized in that, Before generating the first control intent corresponding to the first identification result, the method further includes: determining that the first identification result passes verification by: determining the interaction corpus corresponding to the first identification result, the device physical address of the smart device, and the current number of the interaction object; and determining that the first identification result passes verification when it is determined that a historical interaction corpus consistent with the interaction corpus, a historical physical address consistent with the device physical address, and a historical number consistent with the current number are found in the historical interaction records.

4. The method for sending control commands according to claim 3, characterized in that, The method further includes one of the following: if it is determined that a historical interaction corpus consistent with the interaction corpus, a historical physical address consistent with the device physical address, and a historical number consistent with the current number are found in the historical interaction records, and if it is determined that the first control intent corresponding to the first identification result already exists, then the first identification result is discarded; if it is determined that at least one of the following is not found in the historical interaction records: a historical interaction corpus consistent with the interaction corpus, a historical physical address consistent with the device physical address, or a historical number consistent with the current number, then the first identification result is determined to have failed verification; if it is determined that no historical interaction corpus consistent with the interaction corpus is found in the historical interaction records, then the first identification result is determined to have failed verification and the first identification result is discarded.

5. The method for sending control commands according to claim 1, characterized in that, Generating a first control intent corresponding to the first identification result includes one of the following: searching for a historical control intent corresponding to the first identification result from historical interaction records, and determining the first control intent based on the historical control intent; The device category of the smart device is determined based on the device information of the smart device, and the prompt corresponding to the device category is determined. The prompt and the interactive corpus corresponding to the first recognition result are input into the intent model, and the first control intent output by the intent model is obtained. The intent model represents an open-source intelligent big model, and the prompt is used to instruct the intelligent big model to generate the control intent corresponding to the interactive corpus using the prompt.

6. The method for sending control commands according to claim 1, characterized in that, The first control intent is verified by the second control intent to determine whether to send a second control instruction generated based on the second control intent to the smart device. This includes: obtaining a verification result of verifying the first control intent by the second control intent; if the verification result indicates that the first control intent has failed verification, sending the second control instruction to the smart device; if the verification result indicates that the first control intent has passed verification, not sending any instruction to the smart device or sending a confirmation execution instruction for the first control instruction to the smart device, so that the smart device immediately executes the first control instruction.

7. The method for sending control commands according to claim 6, characterized in that, The method further includes: determining a cache result of caching a first control instruction generated based on the first control intent, wherein the cache result includes at least the first control intent; determining a verification result based on the cache result; the determination of the verification result based on the cache result includes one of the following: if it is determined that there is a control intent consistent with the second control intent in the cache result, the verification result is determined to be that the first control intent has passed verification; if it is determined that the cache state of the cache result is cached, the verification result is determined to be that the first control intent has failed verification; if the cache result includes multiple first control intents, and the multiple first control intents satisfy all preset conditions, the verification result is determined to be that the first control intent has passed verification; if the cache result includes multiple first control intents, and the multiple first control intents satisfy any one of the preset conditions, the verification result is determined to be that the first control intent has failed verification; wherein the preset conditions include: the multiple first control intents include one control intent consistent with the second control intent, the device corresponding to the one control intent is consistent with the smart device, and the corpus corresponding to the one control intent is consistent with the corpus corresponding to the first control intent.

8. The method for sending control commands according to claim 1, characterized in that, The method further includes: when a verification result of the second control intent and the first control intent is received during the execution time period, sending the first control instruction or the second control instruction corresponding to the second control intent to the smart device according to the verification result; wherein, sending the first control instruction or the second control instruction corresponding to the second control intent to the smart device according to the verification result includes: when it is determined that the verification result indicates that the first control intent has passed the verification, sending a confirmation execution instruction of the first control instruction to the smart device to control the smart device to immediately execute the first control instruction; when it is determined that the verification result indicates that the first control intent has failed the verification, sending the second control instruction to the smart device to control the smart device to immediately execute the second control instruction.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method according to any one of claims 1 to 8.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 8 through the computer program.