Control instruction execution method and device, electronic equipment, storage medium and product

By analyzing the characteristics of the instruction text and the controlled state of the device, the appropriate execution engine is dynamically selected to process the control instructions, which solves the problem of low instruction execution efficiency in the existing technology and achieves fast response and high-accuracy instruction execution.

CN122260944APending Publication Date: 2026-06-23MIDEA GRP (SHANGHAI) CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
MIDEA GRP (SHANGHAI) CO LTD
Filing Date
2026-03-10
Publication Date
2026-06-23

Smart Images

  • Figure CN122260944A_ABST
    Figure CN122260944A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a control instruction execution method and device, electronic equipment, storage medium and product, and relate to the technical field of intelligent control. The method comprises: determining a complexity and a controlled state based on an instruction text feature, the complexity being the complexity of a control instruction, and the controlled state being the controlled state of a device corresponding to the control instruction; determining a target execution engine based on the complexity and the controlled state; and routing the control instruction to the target execution engine to execute the control instruction. Through complexity judgment on the control instruction and evaluation of the controlled state of the instruction execution device, the embodiments of the present application determine and route the control instruction to the corresponding target execution engine for execution, which can improve the success rate and response speed of instruction control and improve the efficiency of control instruction execution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent control technology, and more specifically, to a control instruction execution method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology

[0002] Current instruction control methods cannot achieve rapid response to instruction execution and the ability to process complex instructions, resulting in poor real-time performance, poor reasoning performance for complex instructions, and low efficiency in controlling instruction execution. Summary of the Invention

[0003] This application provides a control instruction execution method, apparatus, electronic device, computer-readable storage medium, and computer program product, aiming to solve the technical problems of low success rate and slow response speed of existing control instruction execution.

[0004] Firstly, a method for executing control instructions is provided, the method comprising:

[0005] Based on the characteristics of the instruction text, the complexity and controlled state are determined; the complexity refers to the complexity of the control instruction, and the controlled state refers to the controlled state of the device corresponding to the control instruction. Determine the target execution engine based on the complexity and controlled state; The control commands are routed to the target execution engine to execute the control commands.

[0006] Optionally, based on the characteristics of the instruction text, the complexity and controlled state are determined, including: The complexity is determined based on the characteristics of the instruction text. Based on the characteristics of the instruction text, the device information of the device corresponding to the control instruction is obtained; Based on the equipment information, determine the controlled status.

[0007] Optionally, the complexity can be determined based on the characteristics of the instruction text, including: Generate a complexity feature vector based on the characteristics of the instruction text; Input the complexity feature vector into the complexity judgment model to determine the degree of complexity.

[0008] Optionally, the complexity assessment model includes a complexity feature enhancement layer, an association encoding layer, a classification projection layer, and a complexity decision output layer; Input the complexity feature vector into the complexity assessment model to determine the level of complexity, including: The complexity feature vector is input into the complexity feature enhancement layer, and nonlinear enhancement is performed on the complexity feature vector to obtain multiple enhanced feature vectors; Each enhanced feature vector is input into the associative encoding layer, and associative feature encoding is performed on the enhanced feature vectors based on the attention mechanism to obtain the corresponding complexity-based associative features; Each complexity-related feature is input into the classification projection layer, and the complexity-related features are projected onto the corresponding complexity level classification space to obtain the complexity level feature vector. The feature vectors of each complexity level are input into the complexity decision output layer, and the confidence level of the feature vectors is calibrated to obtain the complexity level.

[0009] Optionally, based on the characteristics of the instruction text, device information of the device corresponding to the control instruction can be obtained, including: Based on the characteristics of the instruction text and the context information of the control instruction, the device information of the device corresponding to the control instruction is obtained.

[0010] Optionally, based on the characteristics of the instruction text and the context information of the control instruction, the device information of the device corresponding to the control instruction is obtained, including: When device information is not available based on instruction text features and context information of control instructions, functional features are extracted from the instruction text features. The device information corresponding to the control command is determined based on functional characteristics.

[0011] Optionally, the controlled state includes large model controllable states and non-large model controllable states; Based on device information, determine the controlled state, including: Match the device information with the list of supported devices to obtain the matching results; If the matching result is successful, the controlled state is determined to be the controllable state of the large model; If the matching result is a failure, the controlled state is determined to be a non-controllable state of the large model.

[0012] Optionally, the level of complexity includes both complex and simple, and the target execution engine includes large model engines; Based on complexity and controlled state, the target execution engine is determined, including: Given the complexity level, the target execution engine is determined to be the large model engine; Given a level of complexity that is not complex, the target execution engine is determined based on the controlled state.

[0013] Optionally, the controlled state includes the large model controllable state and the non-large model controllable state, and the target execution engine includes the rule engine; Based on the controlled state, determine the target execution engine, including: When the controlled state is the controllable state of the large model, the target execution engine is determined to be the large model engine; When the controlled state is not a controllable state of the large model, the target execution engine is determined to be the rule engine.

[0014] Optionally, before determining the complexity and controlled state based on the characteristics of the instruction text, the method further includes: Obtain control commands; Determine whether the control command type is a device control type; When the instruction type is device control, the text content of the control instruction is parsed to obtain the instruction text characteristics.

[0015] Optionally, the target execution engine includes a large model engine; Control instructions are routed to the target execution engine for execution, including: The control commands are routed to the large model engine, so that the large model engine inputs the control commands into the target large model and obtains the sequence of commands to be executed. The large model engine executes the sequence of instructions to be executed in order to carry out control instructions.

[0016] Optionally, the target large model includes an embedded representation layer, a hierarchical cross-attention encoding layer, an instruction space projection layer, and a constraint-aware decoding layer; The control commands are input into the target large model to obtain a sequence of commands to be executed, including: Control commands are input into the embedded representation layer and converted into semantic representation vectors. The semantic representation vector is input into a hierarchical cross-attention encoding layer, and hierarchical feature extraction and cross-encoding are performed on the semantic representation vector to obtain multiple global semantic features. Each global semantic feature is input into the instruction space projection layer, and the global semantic features are nonlinearly projected onto the executable instruction space to obtain a sequence of spatial feature vectors. The spatial feature vector sequence is input into the constraint-aware decoding layer, and constraint-aware decoding and sequence generation processes are performed on the spatial feature vector sequence to obtain the instruction sequence to be executed.

[0017] Secondly, a control instruction execution device is provided, the device comprising: The feature analysis module is used to determine the complexity and controlled state based on the features of the instruction text; the complexity refers to the complexity of the control instruction, and the controlled state refers to the controlled state of the device corresponding to the control instruction. The engine determination module is used to determine the target execution engine based on complexity and controlled state; The execution module is used to route control instructions to the target execution engine for execution.

[0018] Thirdly, an electronic device is provided, the electronic device comprising: A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the methods in the first aspect of this application.

[0019] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, it implements the control instruction execution method shown in any of the first aspects of this application.

[0020] Fifthly, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the steps of any one of the methods in the first aspect of this application.

[0021] The beneficial effects of the technical solutions provided in this application are: The control command execution method provided in this application analyzes the characteristics of the command text to determine the complexity of the control command corresponding to the command text characteristics and the controlled state of the device corresponding to the control command. This enables intelligent identification and allocation of control commands, and can accurately route control commands of different complexities to the appropriate target execution engine for execution. This improves the accuracy and response speed of command execution, reduces the probability of command misjudgment and misexecution, and enhances user experience and the efficiency of control command execution. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0023] Figure 1 This is a schematic diagram illustrating an application scenario of a control instruction execution method provided in an embodiment of this application. Figure 2 A flowchart illustrating a control instruction execution method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the instruction processing flow routed to the large model engine in a control instruction execution method provided in an embodiment of this application; Figure 4 This is a schematic diagram of the instruction processing flow routed to the rule engine in a control instruction execution method provided in an embodiment of this application; Figure 5 A flowchart illustrating an example of a control instruction execution method provided in this application embodiment; Figure 6 This is a schematic diagram of the structure of a control instruction execution device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device to which a control instruction execution method is applicable, as provided in an embodiment of this application. Detailed Implementation

[0024] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.

[0025] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in the embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The terms “or,” “and / or,” “including at least one of the following,” etc., as used in this application, can be interpreted as inclusive, or mean any one or any combination thereof. For example, "including at least one of the following: A, B, C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C", and "A, B or C" or "A, B and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C".

[0026] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0027] In the specific embodiments of this application, any data related to the object, such as data involved in the use of the application, is required. When the embodiments of this application are applied to specific products or technologies, permission or consent from the object is required, and the collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. In other words, if any of the aforementioned object-related data is involved in the embodiments of this application, this data must be obtained with the object's authorization and consent, and in accordance with the relevant laws, regulations, and standards of the country and region.

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0029] Existing technologies typically employ rule-based intent recognition and skill execution frameworks, which offer advantages such as fast response speed, low cost, and high success rate in handling known deterministic instructions. However, these frameworks lack reasoning capabilities and have limited capacity when dealing with complex instructions requiring contextual memory, fuzzy expressions, state reasoning, or combinations of multiple intents, resulting in a lower upper limit for user experience. Furthermore, the reasoning time of large-scale models is significantly higher than that of traditional rule-based systems, leading to increased perceived latency and a poor user experience. Large-scale models struggle to accurately control all functions of all specific device models, especially in scenarios involving new devices, proprietary protocols, or complex functions, where control success rate and accuracy are difficult to guarantee. The precise control of large-scale models heavily relies on a complete and structured description of device functions and states. Within large enterprises, different departments are responsible for different device categories with varying iteration paces, making it difficult to synchronize with the development of large-scale model capabilities, thus hindering the implementation of one-size-fits-all transformation solutions.

[0030] The control instruction execution method, apparatus, electronic device, computer-readable storage medium, and computer program product provided in this application are intended to solve at least one of the above-mentioned technical problems of the prior art.

[0031] In view of at least one of the aforementioned technical problems or areas requiring improvement in related technologies, this application proposes a control instruction execution method, apparatus, electronic device, computer-readable storage medium, and computer program product. The control instruction execution method provided by this solution analyzes the characteristics of the instruction text to determine the complexity of the control instruction corresponding to the instruction text characteristics and to determine the controlled state of the device corresponding to the control instruction. This enables intelligent identification and allocation of control instructions, accurately routing control instructions of different complexities to the appropriate target execution engine for execution, improving the accuracy and response speed of instruction execution, reducing the probability of instruction misjudgment and misexecution, and improving user experience and the efficiency of control instruction execution.

[0032] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.

[0033] Figure 1This is a schematic diagram of an application scenario for the control instruction execution method provided in this application embodiment. The application environment may include a client 100, a server 200, and an execution device. The client 100 and the server 200 are connected via a network, and the execution device is communicatively connected to the server.

[0034] Specifically, client 100 receives control commands from the user and uploads them to server 200. Server 200 parses the control commands to obtain the corresponding command text features. Based on the command text features, it determines the complexity of the control commands and the controlled status of the corresponding execution devices. According to the complexity and controlled status, it determines the target execution engine that can process the control commands and routes the control commands to the target execution engine. The target execution engine processes the control commands, completes the steps of intent parsing, execution device location, and parameter filling, and generates executable commands that are sent to each execution device to complete the corresponding operation, thereby completing the execution of the control commands.

[0035] In practical implementation, client 100 can be a voice assistant or a terminal device with a voice assistant installed, and the aforementioned control commands can be voice control commands. Since the aforementioned control command execution method can be applied to smart home scenarios, the aforementioned execution device can be a smart home device.

[0036] The above application scenario is just an example and does not limit the application scenarios of the control instruction execution method of this application.

[0037] Those skilled in the art will understand that the client can be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a laptop computer, a digital broadcast receiver, a MID (Mobile Internet Device), a PDA (Personal Digital Assistant), a desktop computer, a smart home appliance, an in-vehicle terminal (such as an in-vehicle navigation terminal, an in-vehicle computer, etc.), a smart speaker, a smartwatch, etc. The client and the server can be connected directly or indirectly through wired or wireless communication, but are not limited to these methods.

[0038] The server side may include servers installed with the capability to handle database operations. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server or server cluster providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The embodiments of this application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving. Specific applications can be determined based on actual application needs and are not limited here.

[0039] In some possible implementations, taking the server as the executing entity as an example, embodiments of this application provide a method for executing control instructions, such as... Figure 2 As shown, it may include the following steps: S210, based on the characteristics of the instruction text, determines the complexity and controlled state; Here, complexity refers to the complexity of the control command, and controlled state refers to the controlled state of the device corresponding to the control command.

[0040] Among them, the instruction text features are the features obtained by parsing the control instructions, which may include equipment identification or equipment category, instruction action and complexity indication features, etc.

[0041] Specifically, the system acquires user control commands, parses them to obtain command text features, determines the complexity of the control commands based on these features, extracts the corresponding devices from the command text features, and determines the controlled state of the devices. Thus, it selects an appropriate target execution engine for the control commands based on both complexity and device controlled state, achieving precise routing of control commands and improving the execution efficiency and accuracy of the control commands.

[0042] In the specific implementation process, a routing decision module can be set up in the server. The routing decision module can perform dual-path parallel analysis on the control commands, identify the command text features of the control commands, determine whether they are complex commands, extract the devices and device information mentioned in the control commands, determine the controlled status of the devices, and make a comprehensive judgment based on the results of the above two analysis paths to determine the target execution engine. This separates the execution of complex commands from simple commands, which can not only improve the accuracy of parsing and executing complex commands, but also maintain the fast response of simple commands, thereby improving the overall efficiency of control command routing and execution.

[0043] S220 determines the target execution engine based on complexity and controlled state.

[0044] The target execution engine can include an execution engine that can quickly respond to simple instructions and an execution engine that can handle complex instructions with precise reasoning. It can be a rule engine or a large model engine.

[0045] Specifically, based on the complexity of the control command and the controlled state of the device, an execution engine capable of processing the control command is selected as the target execution engine. Complex commands and non-complex commands are determined based on their complexity. Complex commands are assigned to execution engines with stronger reasoning capabilities to improve control accuracy. For non-complex commands, the corresponding execution engine is selected based on the controlled state of the device to ensure a fast response to the control command.

[0046] In the specific implementation process, by analyzing the instruction text, at least the device identifier or category, instruction action and complexity indication features are extracted. Based on the preset routing strategy, the control instruction is dynamically selected to be processed by the rule engine or the large language model processing engine. The routing strategy includes a dual routing strategy of device or category dimension and instruction complexity dimension. While ensuring efficient and stable response to simple instructions, complex inference tasks are assigned to the large model engine, thus optimizing the configuration of processing resources.

[0047] S230 routes control commands to the target execution engine to execute the control commands.

[0048] Specifically, through the routing mechanism, devices or simple commands not supported by the large model engine are handed over to the mature rule engine for processing, ensuring low-latency and real-time response and user experience. Complex and ambiguous commands are guided to the large model engine for processing, making full use of its powerful reasoning and generalization capabilities. This solves complex scenarios that are difficult for traditional rule systems to handle and significantly improves the efficiency of command execution in complex interaction scenarios.

[0049] In practice, control commands are routed to a rule engine, which matches them against preset rules to extract intent and execution-related information, generating corresponding execution strategies. The commands are then executed based on these strategies. Alternatively, control commands can be routed to a large model engine, which parses the intent of the control commands using the target large model, generating executable steps to control the corresponding execution devices.

[0050] In the specific implementation process, a routing decision module can be set up in the server-side. Based on multiple dimensions such as business data completeness, device capabilities, device status, instruction complexity, and skill coverage, it dynamically distributes user instructions to the most suitable backend processor, namely the execution engine such as the rule engine or the large language model. This achieves the goal of enhancing the processing capability of complex instructions and supporting a smooth transition of control instruction execution methods after device updates, while ensuring user experience. Among them, business data completeness refers to the completion and rationality of the device object model construction; device status refers to whether there is a shadow status mechanism, that is, the latest device status snapshot saved in the cloud; instruction complexity has the same meaning as the above-mentioned complexity level, referring to the degree of simple skills or the degree of needing context and multi-step reasoning and planning.

[0051] In its implementation, this application constructs a collaborative processing framework integrating a rule engine and a large language model processing engine, ultimately outputting executable control commands. Specifically, it extracts and analyzes key features from user control commands, and allocates them to different backend processors—either the rule engine or the large language model engine—based on a dynamic routing strategy for intent parsing, device localization, and command generation, resulting in structured device control commands that are then executed and the results returned. This architecture combines the determinism of traditional rule systems with the generalization and reasoning capabilities of large language models, improving the accuracy of smart home control in complex scenarios and enhancing the user experience.

[0052] In some possible implementations, the steps described above, based on the characteristics of the instruction text, determine the complexity and controlled state, including: The complexity is determined based on the characteristics of the instruction text. Based on the characteristics of the instruction text, the device information of the device corresponding to the control instruction is obtained; Based on the equipment information, determine the controlled status.

[0053] Specifically, the features of the instruction text are extracted and analyzed to determine the complexity of the control instruction corresponding to the instruction text. Based on the features of the instruction text, the control instruction is parsed and matched to obtain the device information of the device corresponding to the control instruction. Based on the obtained device information and the execution requirements of the control instruction, the controlled state of the target device is determined.

[0054] In practical implementation, the level of complexity can be determined as complex or not complex, or complex or simple. The determination is based on whether the instruction text contains the necessary features for execution, such as control operations, execution devices, and execution locations. If the instruction intent is clear and all necessary features are present, the control instruction can be determined to be a non-complex or simple instruction. If the necessary features are missing or ambiguous, and the intent is unclear and requires reasoning, it is determined to be a complex instruction.

[0055] In some possible implementations, the complexity determination in the above steps, based on the characteristics of the instruction text, includes: Generate a complexity feature vector based on the characteristics of the instruction text; Input the complexity feature vector into the complexity judgment model to determine the degree of complexity.

[0056] Specifically, the control command text is preprocessed, including word segmentation, denoising, semantic parsing, and structural analysis, to extract multi-dimensional command text features such as command length, number of operation steps, logical branches, parameter types, constraints, and dependencies. The extracted text features are normalized and vectorized, and concatenated to generate a complexity feature vector that fully reflects the complexity of the command. This complexity feature vector is then input into a pre-built and trained complexity judgment model, which outputs the corresponding classification result to determine the complexity of the current command text.

[0057] In its implementation, the training process of the aforementioned complexity assessment model includes: pre-collecting a large number of instruction text samples labeled with complexity levels as a training dataset; extracting features from the instruction text in each training sample to obtain multi-dimensional text features including instruction length, operation steps, logical branches, number of parameters, constraints, and semantic structure, and vectorizing these features to generate corresponding training feature vectors; inputting the generated training feature vectors into the constructed complexity assessment model, using the difference between the model's output complexity classification result and the pre-labeled true labels as the optimization objective, and continuously adjusting the model's internal parameters through forward propagation, loss calculation, and backpropagation; during training, using a validation set to monitor the model's classification accuracy and generalization ability in real time; stopping training when the model's classification accuracy reaches a preset threshold and the loss function converges, resulting in the trained complexity assessment model; and finally, using the trained model to directly identify the complexity of real-time input instruction text, outputting the corresponding complexity level based on the input complexity feature vector.

[0058] In some possible implementations, the above steps involve inputting the complexity feature vector into a complexity assessment model to determine the level of complexity, including: The complexity feature vector is input into the complexity feature enhancement layer, and nonlinear enhancement is performed on the complexity feature vector to obtain multiple enhanced feature vectors; Each enhanced feature vector is input into the associative encoding layer, and associative feature encoding is performed on the enhanced feature vectors based on the attention mechanism to obtain the corresponding complexity-based associative features; Each complexity-related feature is input into the classification projection layer, and the complexity-related features are projected onto the corresponding complexity level classification space to obtain the complexity level feature vector. The feature vectors of each complexity level are input into the complexity decision output layer, and the confidence level of the feature vectors is calibrated to obtain the complexity level.

[0059] The complexity assessment model includes a complexity feature enhancement layer, an association encoding layer, a classification projection layer, and a complexity decision output layer.

[0060] Specifically, the complexity feature vector is input into the complexity feature enhancement layer, which performs non-linear feature enhancement and redundant dimension removal on the input complexity feature vector to obtain a high-discrimination refined complexity feature vector. The associative encoding layer encodes the refined complexity feature vector using a multi-scale attention mechanism to uncover the dependencies between different complexity indices, obtaining global complexity-related features. The adaptive classification projection layer adaptively projects the global complexity-related features onto the complexity level classification latent space to obtain complexity level feature vectors, achieving alignment mapping from the feature space to the complexity level space. Finally, the complexity decision output layer performs classification decisions and confidence calibration on the complexity level feature vectors, outputting a standardized and quantifiable instruction execution complexity.

[0061] In some possible implementations, the steps described above, based on the characteristics of the instruction text, involve obtaining device information of the device corresponding to the control instruction, including: Based on the characteristics of the instruction text and the context information of the control instruction, the device information of the device corresponding to the control instruction is obtained.

[0062] The context information of the control command may include historical commands related to the current command, device status, execution environment, operation permissions, scenario conditions, and semantic association information.

[0063] Specifically, if the control command text directly includes the device information, the device information can be obtained directly. If the control command text does not include the device information, the context information of the control command can be obtained. By combining the characteristics of the command text with the context information, the device information of the device corresponding to the control command can be determined.

[0064] In the specific implementation process, if the text content of the control command does not directly contain device-related information, such as the control command being: "Adjust to heating mode", the context information corresponding to the control command can be obtained, namely, historical control commands, current operation scenario, device operating status, semantic association information, and execution environment information. The command text features and context information are fused and analyzed, and the target device pointed to by the current control command is identified through keyword matching, semantic association, scenario reasoning, etc. For example, if the only device that can provide heating in the current scenario is the air conditioner, or the previous command was to turn on the air conditioner, then the corresponding device is determined to be the air conditioner. Then, based on the identified target device, the device type, device identifier, functional parameters, and communication address of the device are obtained and determined.

[0065] In some possible implementations, the above steps involve obtaining device information of the device corresponding to the control command based on the command text features and the context information of the control command, including: When device information is not available based on instruction text features and context information of control instructions, functional features are extracted from the instruction text features. The device information corresponding to the control command is determined based on functional characteristics.

[0066] Among them, functional characteristics refer to the characteristic information contained in the control command that can characterize the device to perform actions or achieve capabilities. Specifically, these include characteristic information that can uniquely point to a certain type of device performing functions, such as switching, adjusting, querying, setting, starting, stopping, mode switching, parameter adjustment, or status acquisition.

[0067] Specifically, when the corresponding device information cannot be obtained by parsing the command text features and the context information of the control command, functional features are further extracted from the command text features. Based on the extracted functional features, they are matched with a preset device function library to determine the device that matches the functional feature, thereby obtaining the device information of the device corresponding to the control command. The preset device function library includes the correspondence between functional features and devices.

[0068] In some possible implementations, determining the controlled state based on device information in the above steps includes: Match the device information with the list of supported devices to obtain the matching results; If the matching result is successful, the controlled state is determined to be the controllable state of the large model; If the matching result is a failure, the controlled state is determined to be a non-controllable state of the large model.

[0069] Among them, the controlled state includes the controllable state of the large model and the controllable state of the non-large model.

[0070] The supported device list is a list of devices that the large model engine can control.

[0071] Specifically, the device information is matched with the list of supported devices that the large model engine can support to obtain the matching result. If the matching result is successful, the controlled state is determined to be a controllable state of the large model, and the control command can be routed to the large model engine for execution. If the matching result is unsuccessful, the controlled state is determined to be a non-controllable state of the large model, and the target execution engine is determined based on the complexity.

[0072] In practical implementation, this application supports dynamically expanding the aforementioned list of supported devices based on the progress of business access. The routing decision module makes real-time judgments based on the current status of this list, thereby achieving gradual coverage and canary release of large model capabilities by device, category, or function dimension. This ensures that the introduction of new devices or technologies will not impact the stability of existing services, achieving smooth system upgrades and capability expansion. The design of the dynamic routing strategy and the device support list makes the access to large model capabilities no longer heavily reliant on the synchronous transformation of all business departments. Each department can complete the standardization of device descriptions at its own pace and independently access the large model engine, greatly reducing the complexity of cross-departmental collaboration and accelerating the overall intelligent upgrade process. Its core lies in the fact that the dynamic routing strategy is not fixed but deeply coupled with a dynamically updated support list, which defines the range of devices, categories, or functions currently available to be served by the large language model processing engine.

[0073] In some possible implementations, the target execution engine is determined based on complexity and controlled state in the above steps, including: Given the complexity level, the target execution engine is determined to be the large model engine; Given a level of complexity that is not complex, the target execution engine is determined based on the controlled state.

[0074] The level of complexity includes both complex and uncomplex, and the target execution engine includes large model engines.

[0075] Specifically, in cases of high complexity, the target execution engine is determined to be the large model engine. Regardless of the controlled state of the corresponding device, the system routes to the large model engine because its reasoning capabilities are an effective means of handling such problems. In cases of low complexity, the target execution engine is determined based on the controlled state, i.e., whether it is within the support list of the large model engine. By intelligently guiding complex and ambiguous instructions to the large model for processing, its powerful reasoning and generalization capabilities are fully utilized, enabling efficient handling of control instruction execution steps even in complex scenarios that are difficult for traditional rule systems to process.

[0076] In some possible implementations, the steps described above, based on a controlled state, determine the target execution engine, including: When the controlled state is the controllable state of the large model, the target execution engine is determined to be the large model engine; When the controlled state is not a controllable state of the large model, the target execution engine is determined to be the rule engine.

[0077] Among them, the controlled state includes the large model controllable state and the non-large model controllable state, and the target execution engine includes the rule engine.

[0078] Specifically, the device information is matched with the list of supported devices, and the controlled state is determined based on the matching results. If the controlled state is a state where the large model is controllable, the target execution engine is determined to be the large model engine. If the controlled state is a state where the large model is not controllable, the target execution engine is determined to be the rule engine. This avoids sending all control commands to the rule engine or the large model engine for processing, which would lead to inaccurate parsing, excessive consumption of computing resources, or increased costs. This achieves intelligent allocation of computing resources and improves command execution efficiency.

[0079] In the specific implementation process, under the condition that the complexity is not complex and the controlled state is the controllable state of the large model, the target execution engine can be either the large model engine or the rule engine.

[0080] For example, the target execution engine is the overall decision-making process of the large model engine, such as... Figure 3 As shown, the user issues a control command: "Set the air conditioner to 26 degrees Celsius and set a timer for half an hour." This command integrates multiple intents, fuzzy requests, task planning, and timing logic. The user expects to first turn on the air conditioner, set it to 26 degrees Celsius, and then turn it off after half an hour. This control command includes setting the temperature and setting the timer. It requires breaking down the task and the device dependency context to determine how to execute it. Furthermore, the control command does not explicitly specify the corresponding device, and the specific device needs to be determined from the context. The routing decision module performs instruction complexity analysis on the control command based on instruction complexity rules, determining that the control command is suitable for complex reasoning instructions. The air conditioner is a controlled category or model of the large model engine. Since this control command requires reasoning, task breakdown, and device identification, which exceeds the construction capabilities of the rule engine, it is routed to the large model engine. The large model completes intent generalization, task decomposition, and parameter generation through deep reasoning, and finally outputs an executable sequence of instructions to be executed (i.e., the structured control command shown in the figure), thereby completing the execution of the control command and feeding back the execution result to the user, demonstrating the upper limit of the system's ability to handle complex requirements.

[0081] For example, the target execution engine is the overall judgment steps of the rule engine, such as... Figure 4As shown, when a user issues a control command to turn on the living room air conditioner, the complexity of the control command is determined and categorized. It is determined to be a basic function with no contextual dependencies, no complex parameters, and conforms to the simple command rules. The controlled device analysis result shows only the air conditioner, with no multi-category or multi-device associations. The routing decision module, based on the command complexity rules, determines that the control command is suitable for simple commands, and since the air conditioner is a controlled category or model within the large model engine, it can be routed to the rule engine for processing. This quickly generates a structured control command, completes the command execution, and feeds the execution result back to the user, ensuring a high success rate and low latency, effectively improving the user experience.

[0082] In some possible implementations, before determining the complexity and controlled state based on the characteristics of the instruction text in the above steps, the method further includes: Obtain control commands; Determine whether the control command type is a device control type; When the instruction type is device control, the text content of the control instruction is parsed to obtain the instruction text characteristics.

[0083] The control commands can be either voice commands or text commands.

[0084] Specifically, the system acquires control commands. If the command is text-based, the command text is obtained directly. If the command is voice-based, the voice command is recognized to obtain the command text. The system then identifies whether the command text contains device name, control action, on / off status, parameter adjustment, or other device control-related features. This information is then matched against a pre-defined control command feature library to determine whether the command is a device control type, a query type, or another type. If the command is a device control type, the original text content is parsed to obtain command text features. Based on the control command type determination, non-device control commands are directly routed to other skill modules for processing. This allows the control command execution method to focus on serving the core scenario of device control, significantly improving the accuracy and efficiency of command recognition, reducing interference from non-home device control commands, and enhancing the user experience in home control scenarios.

[0085] In practical implementation, the aforementioned control commands can also be in bitstream form. The server obtains externally sent control commands through the communication interface. These commands may be transmitted in bitstream form, i.e., binary data stream. The server identifies the command type of the obtained commands and determines whether they belong to the device control type by using a preset command type identifier. Non-device control commands such as status queries and heartbeat packets are filtered out. If the command is determined to be a device control type command, the bitstream control command is first parsed according to the preset communication protocol format, including steps such as frame header verification, length parsing, byte order conversion, checksum verification, etc. According to the field offset and bit width agreed upon in the preset protocol, the corresponding control features are extracted from the bitstream. For example, the first 4 bytes are the device number, the lower 4 bits of the 5th byte are the control action code, and the 6th and 7th bytes are the execution parameter values. This completes the conversion of the bitstream command into recognizable command features, providing standardized feature data for the subsequent execution of device control actions.

[0086] In some possible implementations, the control instructions described above are routed to the target execution engine for execution, including: The control commands are routed to the large model engine, so that the large model engine inputs the control commands into the target large model and obtains the sequence of commands to be executed. The large model engine executes the sequence of instructions to be executed in order to carry out control instructions.

[0087] The target execution engine includes a large model engine.

[0088] Specifically, control commands are routed to a large model engine, which inputs the control commands into the target large model to obtain a sequence of commands to be executed. The target large model then parses the intent of the control commands, generating commands corresponding to different intents. These commands are then populated with parameters based on preset parameter rules, device constraints, user habits, and contextual information, resulting in a sequence of commands to be executed. Device location is then performed based on device information, and the sequence of commands is sent to the corresponding device for execution to complete the control command execution. Finally, the execution result is fed back to the user. By intelligently guiding complex and ambiguous commands to the large model engine for processing, and leveraging the powerful reasoning and generalization capabilities of the large model, complex scenarios that traditional rule-based systems struggle to handle are solved, significantly improving the accuracy and efficiency of command execution.

[0089] In practical implementation, the steps for parsing the intent of control commands using a target-oriented large model can include: denoising, correcting errors, segmenting, and standardizing the format of the control commands; converting the control commands into semantic vectors using the target-oriented large model; capturing the semantic features, keywords, and logical relationships of the control commands; determining the intent category of the control commands; extracting key information such as entities, objects, parameters, values, time, and location from the control commands; generating specific information such as the control object, target state, and constraints; obtaining multiple commands to be executed; parsing the logical relationships of the commands to be executed, such as sequence, condition, loop, negation, etc.; and verifying whether the commands to be executed are legal, conflict-free, and executable; and generating a sequence of commands to be executed. The intent categories can include switch control, parameter adjustment, query, mode switching, and cancellation operations.

[0090] In some possible implementations, the above steps involve inputting control commands into the target large model to obtain a sequence of commands to be executed, including: Control commands are input into the embedded representation layer and converted into semantic representation vectors. The semantic representation vector is input into a hierarchical cross-attention encoding layer, and hierarchical feature extraction and cross-encoding are performed on the semantic representation vector to obtain multiple global semantic features. Each global semantic feature is input into the instruction space projection layer, and the global semantic features are nonlinearly projected onto the executable instruction space to obtain a sequence of spatial feature vectors. The spatial feature vector sequence is input into the constraint-aware decoding layer, and constraint-aware decoding and sequence generation processes are performed on the spatial feature vector sequence to obtain the instruction sequence to be executed.

[0091] The target large model includes an embedded representation layer, a hierarchical cross-attention encoding layer, an instruction space projection layer, and a constraint-aware decoding layer.

[0092] Specifically, control commands are input into the embedding representation layer, which converts the control commands into semantic representation vectors. These semantic representation vectors are then input into a hierarchical cross-attention encoding layer, where hierarchical feature extraction and cross-encoding are performed to obtain multiple global semantic features. These global semantic features are then input into the instruction space projection layer, where they are nonlinearly projected onto the executable instruction space or the instruction space to be executed, resulting in a spatial feature vector sequence. This spatial feature vector sequence is then input into a constraint-aware decoding layer, where constraint-aware decoding and sequence generation are performed to obtain the instruction sequence to be executed.

[0093] In the specific implementation process, the control instructions are converted into multi-granularity contextual semantic representation vectors through the target large model. The multi-granularity contextual semantic representation vectors are then extracted and fused through a hierarchical cross-attention encoding layer to obtain highly robust global semantic features. The global semantic features are nonlinearly projected onto the normalized executable instruction latent space through an adaptive instruction space projection layer to obtain a sequence of spatial feature vectors. The spatial feature vectors are then sequence-decoded and instruction-normalized through a constraint-aware decoding and instruction normalization layer to generate a temporally ordered, logically conflict-free, and directly executable sequence of instructions to be executed.

[0094] In the specific implementation process, the training steps of the aforementioned target large model may include: constructing a training sample set containing several control instructions and corresponding standard execution instruction sequences, and dividing it into a training set, a validation set, and a test set; inputting the control instructions in the training set into the embedding representation layer, converting the control instructions into semantic representation vectors, and then inputting the semantic representation vectors into the hierarchical cross-attention encoding layer, performing hierarchical feature extraction and cross-encoding processing on the semantic representation vectors to obtain multiple global semantic features; subsequently, inputting each global semantic feature into the instruction space projection layer, nonlinearly projecting the global semantic features onto the executable instruction space to obtain a spatial feature vector sequence, and then inputting the spatial feature vector sequence into the constraint-aware decoding layer, performing constraint-aware decoding and sequence generation processing on the spatial feature vector sequence to obtain the predicted execution instruction sequence; constructing a loss function based on the difference between the predicted execution instruction sequence and the standard execution instruction sequence, updating the parameters of the embedding representation layer, the hierarchical cross-attention encoding layer, the instruction space projection layer, and the constraint-aware decoding layer layer by layer through the backpropagation algorithm; monitoring the model performance using the validation set during the training process; stopping training when the loss function converges and the model accuracy meets the preset conditions, and finally obtaining the trained target large model.

[0095] In the above embodiments, by analyzing the characteristics of the instruction text, the complexity of the control instruction corresponding to the instruction text characteristics is determined, and the controlled state of the device corresponding to the control instruction is determined, so as to realize the intelligent identification and allocation of control instructions. This enables control instructions of different complexities to be accurately routed to the appropriate target execution engine for execution, thereby improving the accuracy and response speed of instruction execution, reducing the probability of instruction misjudgment and misexecution, and improving user experience and the efficiency of control instruction execution.

[0096] Furthermore, differentiated routing is performed based on instruction complexity and device control status to achieve refined control of instruction execution logic, optimize the overall instruction scheduling logic, and enhance the stability and reliability of the overall process.

[0097] In one example, the control instruction execution method of this application is as follows: Figure 5 As shown, it may include: The user inputs control commands via voice, and the client sends the control commands to the server.

[0098] The server performs speech recognition on the voice input control commands and converts them into text. It then uses a skill classifier to determine whether the control commands belong to device control skills. Non-device control queries, such as weather and encyclopedia queries, are routed to other skill modules for processing.

[0099] If the control command belongs to the device control skill, the routing decision module will classify the command complexity and analyze the controlled device.

[0100] Specifically, by analyzing the characteristics of the instruction text, if the instruction is identified as belonging to a complex, fuzzy, or high-order reasoning type—that is, the instruction contains multiple intent combinations, context dependencies, fuzzy referencing, or advanced parameter settings—the decision engine will immediately generate a signal to route to the large model engine. Simultaneously, the device information mentioned in the control instruction is extracted and compared with the large model's list of controlled item types to determine whether the device corresponding to the control instruction is a type or model that the large model engine can control.

[0101] The routing decision module makes a comprehensive judgment on the results of the two analysis paths above. As long as the instruction is judged to be complex, fuzzy or high-order reasoning, it will be routed to the large model engine regardless of whether its target device is in the support list.

[0102] For simple and explicit instructions that are determined to be basic functions, the instructions are routed to the large model engine if the target home device happens to be in the large model controlled item type list, based on the device's controlled status. If the target device is not in the supported list, the instructions are routed to the rules engine.

[0103] After the instruction is routed to the rules engine or large model engine, the engine completes the final intent parsing, device location, parameter filling, and generates executable control instructions to be delivered to downstream devices for execution, and finally feeds the results back to the user.

[0104] The aforementioned control command execution method analyzes the characteristics of the command text to determine the complexity of the control command corresponding to the command text characteristics and the controlled state of the device corresponding to the control command. This enables intelligent identification and allocation of control commands, allowing control commands of different complexities to be accurately routed to the appropriate target execution engine for execution. This improves the accuracy and response speed of command execution, reduces the probability of command misjudgment and misexecution, and enhances user experience and the efficiency of control command execution.

[0105] Furthermore, differentiated routing is performed based on instruction complexity and device control status to achieve refined control of instruction execution logic, optimize the overall instruction scheduling logic, and enhance the stability and reliability of the overall process.

[0106] This application provides a control instruction execution device, such as... Figure 6 As shown, the control command execution device 60 may include: a feature analysis module 610, an engine determination module 620, and an execution module 630, wherein, The feature analysis module 610 is used to determine the complexity and controlled state based on the features of the instruction text; the complexity refers to the complexity of the control instruction, and the controlled state refers to the controlled state of the device corresponding to the control instruction. Engine determination module 620 is used to determine the target execution engine based on complexity and controlled state; Execution module 630 is used to route control instructions to the target execution engine to execute the control instructions.

[0107] As an optional embodiment, in this device, the feature analysis module 610 is specifically used for: The complexity is determined based on the characteristics of the instruction text. Based on the characteristics of the instruction text, the device information of the device corresponding to the control instruction is obtained; Based on the equipment information, determine the controlled status.

[0108] As an optional embodiment, in this device, the feature analysis module 610 is specifically used for: Generate a complexity feature vector based on the characteristics of the instruction text; Input the complexity feature vector into the complexity judgment model to determine the degree of complexity.

[0109] As an optional embodiment, in this device, the feature analysis module 610 is specifically used for: The complexity assessment model includes a complexity feature enhancement layer, an association encoding layer, a classification projection layer, and a complexity decision output layer. The complexity feature vector is input into the complexity feature enhancement layer, and nonlinear enhancement is performed on the complexity feature vector to obtain multiple enhanced feature vectors; Each enhanced feature vector is input into the associative encoding layer, and associative feature encoding is performed on the enhanced feature vectors based on the attention mechanism to obtain the corresponding complexity-based associative features; Each complexity-related feature is input into the classification projection layer, and the complexity-related features are projected onto the corresponding complexity level classification space to obtain the complexity level feature vector. The feature vectors of each complexity level are input into the complexity decision output layer, and the confidence level of the feature vectors is calibrated to obtain the complexity level.

[0110] As an optional embodiment, in this device, the feature analysis module 610 is specifically used for: Based on the characteristics of the instruction text and the context information of the control instruction, the device information of the device corresponding to the control instruction is obtained.

[0111] As an optional embodiment, in this device, the feature analysis module 610 is specifically used for: When device information is not available based on instruction text features and context information of control instructions, functional features are extracted from the instruction text features. The device information corresponding to the control command is determined based on functional characteristics.

[0112] As an optional embodiment, in this device, the feature analysis module 610 is specifically used for: Controlled states include controllable states of large models and controllable states of non-large models; Match the device information with the list of supported devices to obtain the matching results; If the matching result is successful, the controlled state is determined to be the controllable state of the large model; If the matching result is a failure, the controlled state is determined to be a non-controllable state of the large model.

[0113] As an optional embodiment, in this device, the engine determination module 620 is specifically used for: Complexity includes both complex and uncomplex, and the target execution engine includes large model engines; Given the complexity level, the target execution engine is determined to be the large model engine; Given a level of complexity that is not complex, the target execution engine is determined based on the controlled state.

[0114] As an optional embodiment, in this device, the engine determination module 620 is specifically used for: Controlled states include large-scale model controllable states and non-large-scale model controllable states; the target execution engine includes the rule engine. When the controlled state is the controllable state of the large model, the target execution engine is determined to be the large model engine; When the controlled state is not a controllable state of the large model, the target execution engine is determined to be the rule engine.

[0115] As an optional embodiment, the device further includes an acquisition module, specifically used for: Obtain control commands; Determine whether the control command type is a device control type; When the instruction type is device control, the text content of the control instruction is parsed to obtain the instruction text characteristics.

[0116] As an optional embodiment, in this device, the execution module 630 is specifically used for: The target execution engine includes a large model engine; The control commands are routed to the large model engine, so that the large model engine inputs the control commands into the target large model and obtains the sequence of commands to be executed. The large model engine executes the sequence of instructions to be executed in order to carry out control instructions.

[0117] As an optional embodiment, in this device, the execution module 630 is specifically used for: The target large model includes an embedded representation layer, a hierarchical cross-attention encoding layer, an instruction space projection layer, and a constraint-aware decoding layer; Control commands are input into the embedded representation layer and converted into semantic representation vectors. The semantic representation vector is input into a hierarchical cross-attention encoding layer, and hierarchical feature extraction and cross-encoding are performed on the semantic representation vector to obtain multiple global semantic features. Each global semantic feature is input into the instruction space projection layer, and the global semantic features are nonlinearly projected onto the executable instruction space to obtain a sequence of spatial feature vectors. The spatial feature vector sequence is input into the constraint-aware decoding layer, and constraint-aware decoding and sequence generation processes are performed on the spatial feature vector sequence to obtain the instruction sequence to be executed.

[0118] The control command execution device provided in this application analyzes the characteristics of the command text to determine the complexity of the control command corresponding to the command text characteristics and the controlled state of the device corresponding to the control command. It realizes intelligent identification and allocation of control commands, and can accurately route control commands of different complexities to the appropriate target execution engine for execution, thereby improving the accuracy and response speed of command execution, reducing the probability of command misjudgment and misexecution, and improving user experience and efficiency of control command execution.

[0119] Furthermore, differentiated routing is performed based on instruction complexity and device control status to achieve refined control of instruction execution logic, optimize the overall instruction scheduling logic, and enhance the stability and reliability of the overall process.

[0120] The apparatus in this application embodiment can execute the method provided in this application embodiment, and its implementation principle is similar, and it has corresponding technical effects. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For a detailed functional description of each module of the apparatus, please refer to the description in the corresponding method shown above, which will not be repeated here.

[0121] This application provides an electronic device including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method provided in any optional embodiment of this application. Compared with the prior art, it can achieve the following: by analyzing the characteristics of the instruction text, the complexity of the control instruction corresponding to the instruction text characteristics is determined, and the controlled state of the device corresponding to the control instruction is determined. This enables intelligent identification and allocation of control instructions, accurately routing control instructions of different complexities to the appropriate target execution engine for execution, improving the accuracy and response speed of instruction execution, reducing the probability of instruction misjudgment and misexecution, and improving user experience and the efficiency of control instruction execution.

[0122] In one alternative embodiment, an electronic device is provided, such as Figure 7 As shown, Figure 7 The illustrated electronic device 7000 includes a processor 7001 and a memory 7003. The processor 7001 and the memory 7003 are connected, for example, via a bus 7002. Optionally, the electronic device 7000 may further include a transceiver 7004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 7004 is not limited to one type, and the structure of the electronic device 7000 does not constitute a limitation on the embodiments of this application.

[0123] Processor 7001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 7001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0124] Bus 7002 may include a pathway for transmitting information between the aforementioned components. Bus 7002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 7002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0125] The memory 7003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.

[0126] The memory 7003 is used to store computer programs that execute the embodiments of this application, and its execution is controlled by the processor 7001. The processor 7001 is used to execute the computer programs stored in the memory 7003 to implement the steps shown in the foregoing method embodiments.

[0127] Electronic devices include, but are not limited to: smart home devices, smart home appliances, industrial control equipment, Internet of Things terminals, vehicle-mounted devices, and mobile terminals, as well as other electronic devices with command receiving and execution functions.

[0128] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps and corresponding content of the aforementioned method embodiments.

[0129] It should be noted that the computer-readable storage medium described above in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0130] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.

[0131] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) 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 a sequence other than that shown in the illustrations or text descriptions.

[0132] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0133] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.

[0134] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.

Claims

1. A method for executing control instructions, wherein, include: Based on the characteristics of the instruction text, determine the complexity and controlled state; The complexity refers to the complexity of the control command, and the controlled state refers to the controlled state of the device corresponding to the control command. Based on the complexity and the controlled state, the target execution engine is determined; The control instructions are routed to the target execution engine to execute the control instructions.

2. The control instruction execution method according to claim 1, wherein, The determination of complexity and controlled state based on instruction text features includes: The complexity level is determined based on the characteristics of the instruction text. Based on the characteristics of the instruction text, the device information of the device corresponding to the control instruction is obtained; Based on the device information, the controlled state is determined.

3. The control instruction execution method according to claim 2, wherein, Determining the complexity based on the instruction text features includes: Based on the aforementioned instruction text features, a complexity feature vector is generated; The complexity feature vector is input into the complexity judgment model to determine the degree of complexity.

4. The control instruction execution method according to claim 3, wherein, The complexity judgment model includes a complexity feature enhancement layer, an association encoding layer, a classification projection layer, and a complexity decision output layer. The step of inputting the complexity feature vector into the complexity judgment model to determine the complexity level includes: The complexity feature vector is input into the complexity feature enhancement layer, and nonlinear enhancement is performed on the complexity feature vector to obtain multiple enhanced feature vectors; Each of the enhanced feature vectors is input into the association coding layer, and the enhanced feature vectors are associated with the encoding based on the attention mechanism to obtain the corresponding complexity association features; Each of the complexity-related features is input into the classification projection layer, and the complexity-related features are projected onto the corresponding complexity level classification space to obtain a complexity level feature vector. The feature vectors of each complexity level are input into the complexity decision output layer, and the confidence level of the feature vectors is calibrated to obtain the complexity level.

5. The control instruction execution method according to claim 2, wherein, The step of obtaining the device information of the device corresponding to the control command based on the command text features includes: Based on the characteristics of the instruction text and the context information of the control instruction, the device information of the device corresponding to the control instruction is obtained.

6. The control instruction execution method according to claim 5, wherein, The step of obtaining device information for the device corresponding to the control command based on the command text features and the context information of the control command includes: If the device information is not obtained based on the instruction text features and the context information of the control instructions, extract the functional features from the instruction text features; Based on the aforementioned functional characteristics, the device information of the device corresponding to the control command is determined.

7. The control instruction execution method according to claim 2, wherein, The controlled state includes the large model controllable state and the non-large model controllable state; Determining the controlled state based on the device information includes: The device information is matched with the list of supported devices to obtain the matching results; If the matching result is successful, the controlled state is determined to be a controllable state of the large model; If the matching result is a failure, the controlled state is determined to be a non-large model controllable state.

8. The control instruction execution method according to any one of claims 1-7, wherein, The level of complexity includes both complex and uncomplex, and the target execution engine includes large model engines; The determination of the target execution engine based on the complexity and the controlled state includes: Given the complexity level, the target execution engine is determined to be a large model engine. When the complexity level is not complex, the target execution engine is determined based on the controlled state.

9. The control instruction execution method according to claim 8, wherein, The controlled state includes a large model controllable state and a non-large model controllable state; the target execution engine includes a rule engine. The step of determining the target execution engine based on the controlled state includes: When the controlled state is the controllable state of the large model, the target execution engine is determined to be the large model engine; When the controlled state is the non-large model controllable state, the target execution engine is determined to be the rule engine.

10. The control instruction execution method according to any one of claims 1-9, wherein, Before determining the complexity and controlled state based on the characteristics of the instruction text, the method further includes: Obtain control commands; Determine whether the instruction type of the control command is a device control type; When the instruction type is device control type, the text content of the control instruction is parsed to obtain the instruction text features.

11. The control instruction execution method according to any one of claims 1-10, wherein, The target execution engine includes a large model engine; The step of routing the control instructions to the target execution engine to execute the control instructions includes: The control commands are routed to the large model engine, so that the large model engine inputs the control commands into the target large model to obtain a sequence of commands to be executed. The large model engine executes the sequence of instructions to be executed in order to execute the control instructions.

12. The control instruction execution method according to claim 11, wherein, The target large model includes an embedded representation layer, a hierarchical cross-attention encoding layer, an instruction space projection layer, and a constraint-aware decoding layer. The step of inputting the control commands into the target large model to obtain the sequence of commands to be executed includes: The control command is input into the embedded representation layer, and the control command is converted into a semantic representation vector; The semantic representation vector is input into the hierarchical cross-attention encoding layer, and hierarchical feature extraction and cross-encoding are performed on the semantic representation vector to obtain multiple global semantic features; Each of the global semantic features is input into the instruction space projection layer, and the global semantic features are nonlinearly projected onto the executable instruction space to obtain a spatial feature vector sequence. The spatial feature vector sequence is input into the constraint-aware decoding layer, and constraint-aware decoding and sequence generation processing are performed on the spatial feature vector sequence to obtain the instruction sequence to be executed.

13. A control command execution device, wherein, include: The feature analysis module is used to determine the complexity and controlled state based on the features of the instruction text; The complexity refers to the complexity of the control command, and the controlled state refers to the controlled state of the device corresponding to the control command. An engine determination module is used to determine the target execution engine based on the complexity and the controlled state; An execution module is used to route the control instructions to the target execution engine to execute the control instructions.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein, The processor executes the computer program to implement the steps of the control instruction execution method according to any one of claims 1-12.

15. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed by the processor, it implements the steps of the control instruction execution method according to any one of claims 1-12.

16. A computer program product comprising a computer program, wherein, When the computer program is executed by the processor, it implements the steps of the control instruction execution method according to any one of claims 1-12.