Adaptive control method for smart home scene
Patent Information
- Application Number
- CN202611103712.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]本申请提供一种智能家居场景的自适应控制方法,用以解决现有技术中当用户下次再次触发相同场景时,系统仍会重复执行不符合用户意愿的默认动作,导致用户需要反复进行相同的纠错操作的缺陷
[0016] This application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the adaptive control method for any of the smart home scenarios described above.
Smart Images

Figure CN122923490A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home / intelligent home, and more specifically, to an adaptive control method for smart home scenarios. Background Technology
[0002] In smart home scene control, after a user triggers a preset scene template via natural language, the system executes multiple device actions at once. Although existing systems support users issuing natural language error correction feedback after execution, they only treat this feedback as a one-time adjustment command for the current device state. They cannot establish a connection between the user's error correction intent and the scene action just executed, nor can they transform the correction information into reusable structured knowledge.
[0003] Therefore, when the user triggers the same scenario again, the system will still repeat the default action that does not meet the user's expectations, causing the user to repeatedly perform the same error correction operation. Summary of the Invention
[0004] This application provides an adaptive control method for smart home scenarios to solve the defect in the prior art where the system will repeatedly execute default actions that do not conform to the user's wishes when the user triggers the same scenario again, causing the user to have to repeatedly perform the same error correction operation.
[0005] This application provides an adaptive control method for smart home scenarios, including: In response to a first scene command triggered by a user, determine the scene intent corresponding to the first scene command, and generate and execute a first set of device control actions based on the scene intent; Obtain natural language correction feedback from the user regarding the set of control actions for the first device; Extract the difference constraints between the natural language correction feedback and the first device control action set; Based on the difference constraints, a structured scene memory patch is generated and stored. The scene memory patch is used to record the difference constraints between the first set of device control actions and the user's correction expectations. The scene memory patch is stored in association with the scene intent. In response to a second scene command triggered by the user, when the scene intent of the second scene command is identified to match the scene intent associated with the scene memory patch, the scene memory patch is invoked, and the default device control action set generated by the default scene template corresponding to the scene intent is modified according to the difference constraint, and a second device control action set is generated and executed.
[0006] According to the adaptive control method for a smart home scene provided in this application, determining the scene intent corresponding to the first scene instruction includes: The natural language understanding model is used to identify the scene intent and confidence level corresponding to the first scene instruction; If the confidence level is lower than a preset threshold, a confirmation request is sent to the user, and the scenario intent is determined based on the user's response to the confirmation request.
[0007] According to the adaptive control method for a smart home scenario provided in this application, the step of extracting the difference constraints between the natural language correction feedback and the first device control action set includes: Semantic parsing is performed on the natural language correction feedback to extract the correction object, action type, and scope of effect; The correction object, action type, and scope of action are compared item by item with each action in the first set of device control actions. Based on the comparison results, the correction type of the difference constraint is determined, and the correction type includes at least one of deletion, overwrite, retention and addition.
[0008] According to the adaptive control method for a smart home scene provided in this application, the step of semantically parsing the natural language correction feedback to extract the correction object, action type, and scope of application includes: If the natural language correction feedback includes a negative expression and the negative expression points to a device action in the first device control action set, then the corresponding device action and action type are extracted as objects to be deleted. If the natural language correction feedback includes a range restriction expression, then the device object and action type defined by the range restriction expression are extracted as objects to be retained, and other device objects belonging to the same action type as the objects to be retained are objects to be excluded. If the natural language correction feedback includes a parameter adjustment expression, then extract the device object pointed to by the parameter adjustment expression and the adjusted parameter value; If the natural language correction feedback includes a new action expression and the device action pointed to by the new action expression is not included in the first device control action set, then the corresponding device object, action type, and action parameters are extracted as the object to be added.
[0009] According to the adaptive control method for smart home scenes provided in this application, the generation of structured scene memory patches includes: The correction object, action type, and scope of application in the aforementioned difference constraints are used as the field content of the scene memory patch; The scene intent is used as the associated index of the scene memory patch; The scene memory patch is assigned a user identifier, a family identifier, a priority identifier, and a timestamp. The user identifier is used to limit the users to which the scene memory patch applies, the family identifier is used to limit the families to which the scene memory patch applies, the priority identifier is used to determine the application order when multiple patches conflict, and the timestamp is used to identify the generation time of the patch.
[0010] The adaptive control method for a smart home scene provided in this application further includes: The scene memory patch is associated with and stored with the user identifier and the family identifier to determine that different users and / or different families correspond to different scene memory patches under the same scene intent.
[0011] According to the adaptive control method for a smart home scene provided in this application, the step of modifying the set of default device control actions generated from the default scene template corresponding to the scene intent based on the difference constraints includes: If the correction type of the difference constraint is deletion, then the corresponding device action is deleted from the default device control action set; If the correction type of the difference constraint is coverage, then the action parameters in the difference constraint are used to cover the parameters of the corresponding action in the default device control action set; If the modification type of the difference constraint is to retain, then only the action corresponding to the device object specified by the difference constraint is retained, and other device objects belonging to the same action type are excluded. If the modification type of the difference constraint is "add", then the action specified by the difference constraint is added to the default device control action set.
[0012] According to the adaptive control method for a smart home scene provided in this application, when multiple scene memory patches match the scene intent, the step of correcting the set of default device control actions generated from the default scene template corresponding to the scene intent based on the difference constraints includes: Obtain the priority identifier of each scene memory patch; According to the priority identifiers from high to low, the difference constraints of each scene memory patch are applied sequentially to modify the default device control action set. The priority levels of the priority identifiers, from highest to lowest, are: user explicit long-term correction, user's most recent confirmation, historical habit statistics, and system default template.
[0013] The adaptive control method for a smart home scene provided in this application further includes: If the natural language correction feedback includes a long-term expression indicating that the correction is applicable to subsequent similar scenarios, then the applicable status of the difference constraint is marked as long-term applicable; if the natural language correction feedback does not include the long-term expression, then the applicable status of the difference constraint is marked as temporary applicable. Obtain secondary natural language correction feedback from the user's input of the second set of control actions for the device; If the application status of the secondary natural language correction feedback is temporary, then the existing scene memory patch remains unchanged; If the applicable state of the secondary natural language correction feedback is long-term applicable and is opposite to the difference constraint of the existing scene memory patch, then the existing scene memory patch is marked as invalid, or a new high-priority scene memory patch is generated to cover the existing scene memory patch.
[0014] According to the adaptive control method for a smart home scenario provided in this application, before extracting the difference constraints between the natural language correction feedback and the first device control action set, the method further includes: If the natural language correction feedback cannot clearly point to any device action in the first set of device control actions, then disambiguation is performed by combining the execution context of the first scene instruction and the home device topology information; If the result is still uncertain after disambiguation, a confirmation request is sent to the user.
[0015] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the adaptive control method for any of the smart home scenarios described above.
[0016] This application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the adaptive control method for any of the smart home scenarios described above.
[0017] The adaptive control method for smart home scenarios provided in this application compares the user's natural language correction feedback with the set of executed first device control actions, extracts the difference constraints between the two, and generates a structured scene memory patch associated with the scene intent. This transforms the natural language correction feedback into a reusable knowledge structure representing the difference constraints between the first set of device control actions and the user's correction expectations. When the scene intent matches the scene intent associated with the scene memory patch, the system automatically calls the scene memory patch and corrects the default set of device control actions according to the difference constraints to generate a second set of device control actions. Thus, without relying on historical operation statistics frequency and without requiring the user to repeatedly express preferences, the method achieves the leap from one-time instructions to long-term reusable rules for error correction information, effectively reducing the number of repeated error corrections, lowering the probability of miscontrol, and improving the personalization and interaction efficiency of scene control. 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 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, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the hardware environment for an adaptive control method for a smart home scene according to an embodiment of this application; Figure 2 This is a flowchart illustrating the adaptive control method for smart home scenarios provided in this application; Figure 3 This is a schematic diagram of the structure of the adaptive control system for the smart home scenario provided in this application; Figure 4 This is a schematic diagram illustrating the principle of generating and applying structured scene memory patches provided in this application. Detailed Implementation
[0021] 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.
[0022] 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.
[0023] According to one aspect of the embodiments of this application, an adaptive control method for smart home scenarios is provided, which is widely applicable to digital control scenarios such as smart homes, smart home ecosystems, intelligencehouse ecosystems, whole-house intelligence, digital homes, networked homes, automated homes, electronic homes, digital homes, and digital homes. It relies on technologies such as the Internet of Things (IoT), cloud computing, artificial intelligence (AI), digital technology, digital twins, and AR / VR to construct an intelligent, automated, personalized, and customized digital ecosystem. Optionally, in this embodiment, the above-mentioned adaptive control method for smart home scenarios can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to 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 for 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 for server 104.
[0024] The aforementioned network communication architecture includes, but is not limited to, two types of links: wired transmission and wireless connection. Among them, the wired network can cover wide area networks, metropolitan area networks, and local area networks, while the wireless network supports communication standards such as WIFI, Bluetooth, and 5G. It can adapt to the digital technology transmission needs of the Internet of Things (IoT), the Internet of Things, and the Internet of Things blockchain, ensuring stable interaction of digital information, enabling devices to make autonomous, accurate, precise, and accurate judgments and adjustments, and supporting personalized and customized intelligent capabilities such as voice interaction, remote control, and self-control. Terminal devices 102 include, but are not limited to, PCs, mobile phones, tablets, and all categories of digital home appliances, digital electrical appliances, smart home appliances, and whole-house smart devices. Specifically, they include: smart air conditioners, air conditioning equipment, smart range hoods, smart refrigerators, smart ovens, grilling and cooking equipment, smart stoves, smart washing machines, washing, rinsing, drying and garment processing equipment, smart water heaters, smart washing equipment, smart dishwashers, smart projectors, smart TVs, smart clothes racks, smart curtains, smart audio-visual equipment, smart sockets, smart speakers, smart speakers, smart fresh air systems, smart kitchen and bathroom systems, kitchens, cabinets, kitchen cabinet equipment, smart bathroom equipment, robot vacuum cleaners, robot window cleaners, robot mopping, air purifiers, smart steam ovens, smart microwave ovens, smart water heaters, smart air purifiers, smart water dispensers, smart door locks, smart lighting fixtures, smart light bulbs, smart air detectors, smart remote controls, and smart gateways. They also cover smart terminals for security, lighting, and other digital home furnishings.
[0025] Figure 2 This is a flowchart illustrating the adaptive control method for smart home scenarios provided in this application. Figure 3 This is a schematic diagram of the adaptive control system for the smart home scenario provided in this application. Figure 4 This is a schematic diagram illustrating the principle of generating and applying structured scene memory patches provided in this application.
[0026] like Figure 2 As shown in the figure, this embodiment provides an adaptive control method for a smart home scene. The corresponding system can be deployed at any one of the following: a cloud server, a local home hub, a smart speaker, a smart control screen, and a home gateway. Alternatively, it can be implemented by combining multiple of the above devices. The overall system corresponds to the attached figure. Figure 3The system architecture diagram includes interactive input, intent recognition, device topology management, scene template management, action generation and execution, context recording, correction parsing, difference calculation, memory patch storage, and memory fusion conflict handling. Users interact with the system via voice or text. The system first executes the scene according to the default template, then receives the user's correction feedback and converts it into a structured memory patch. The next time the same scene is triggered, the patch is automatically applied to adjust the action. The main methods include: 201. In response to the first scene command triggered by the user, determine the scene intent corresponding to the first scene command, and generate and execute a first set of device control actions based on the scene intent.
[0027] Specifically, users input the first scene command through interactive devices such as voice speakers, smart control screens, mobile apps, and large TV screens, for example, a user saying "I want to watch a movie." Upon receiving the command, the system recognizes the scene intent as a movie-watching scenario. Next, the system queries the current home's device topology information, including which controllable devices are in the home, which room they belong to, their supported functions, online status, and control protocols. Based on the devices' online status, it filters executable actions and verifies the legality of the actions based on the devices' capabilities, avoiding the generation of invalid commands that the devices cannot execute. Then, the system calls a preset template for the movie-watching scenario to generate a set of first-device control actions, such as closing the living room curtains, closing the bedroom curtains, turning on the TV, adjusting the living room light brightness to 20%, and turning on the speakers, while also including the default setting of dim lighting. The system converts these actions into commands that the corresponding devices can recognize and executes them, while simultaneously recording the trigger statement, scene intent, action list, executing device, execution time, and execution result—all execution context information—to provide a complete basis for corrective feedback and matching.
[0028] 202. Obtain natural language correction feedback from the user's input of the first set of device control actions.
[0029] Specifically, after the scenario is executed, if the user feels the result is not as expected, they will suggest corrections, such as "Just close the living room curtains, the bedroom curtains don't need to be closed." The system, combining this with the previously recorded execution context, determines that this statement is a correction to the just-executed movie-watching scenario, rather than a new, independent control command. This directly links the user's correction to the corresponding scenario, preventing the correction feedback from being misinterpreted as an isolated device control command.
[0030] 203. Extract the difference constraints between the natural language correction feedback and the first device control action set.
[0031] Specifically, the system compares the user's correction statements with the set of the first device control actions executed, identifying the differences between them, i.e., the difference constraints. For example, if the default action includes closing the bedroom curtains, and the user explicitly states that the bedroom curtains don't need to be closed, the corresponding difference constraint is to delete the action of closing the bedroom curtains. The user's correction only applies to curtain-related actions and does not involve lights, televisions, or audio equipment. Therefore, the default actions of these devices are not affected by the correction and the original settings are retained. This process directly transforms the user's verbal corrections into executable rules that correspond to specific device actions.
[0032] 204. Based on the difference constraints, generate and store a structured scene memory patch. The scene memory patch is used to record the difference constraints between the first set of device control actions and the user's correction expectations. The scene memory patch is stored in association with the scene intent.
[0033] Specifically, the system organizes the extracted discrepancy constraints into structured data, namely scene memory patches. These patches do not simply record the user's current action, but rather specifically store the rules governing the difference between the default action and the user's expectations, and bind them to the viewing scene intent. This process corresponds to... Figure 4 The diagram illustrates the generation and application of scene memory patches. The default movie-watching scene includes three core actions: closing the living room curtains, closing the bedroom curtains, and dimming the lights. After user corrections, closing the bedroom curtains is marked as excluded, closing the living room curtains is marked as retained, and the default action of dimming the lights is unaffected and retained. This structured patch format transforms one-time user corrections into reusable rules, enabling the accumulation and reuse of error correction information.
[0034] 205. In response to a second scene command triggered by the user, when the scene intent of the second scene command is identified to match the scene intent associated with the scene memory patch, the scene memory patch is invoked, and the default device control action set generated by the default scene template corresponding to the scene intent is modified according to the difference constraint, and a second device control action set is generated and executed.
[0035] Specifically, when a user inputs a second scenario command, such as "I want to watch a movie," "Watch a movie," or "Preparing to watch a movie," the system recognizes that the scenario intent is still movie watching. By classifying the scenario intent and combining it with the semantic similarity of the original trigger statement, the system retrieves and matches the corresponding memory patch. The system first generates a default set of device control actions consistent with the first instance, then adjusts this default set using the difference constraints in the memory patch. For example, it removes the action of closing the bedroom curtains, ultimately generating a second set of device control actions: closing the living room curtains, turning on the TV, adjusting the living room light brightness to 20%, and turning on the speakers, fully preserving the default setting of dimming the lights. During execution, the system can provide feedback to the user based on the memory patch, such as informing the user, "Based on your previous settings, the bedroom curtains will no longer be closed during movie watching," making the control process more transparent and explainable. This process eliminates the need for the user to repeatedly explain the correction requirements; the system automatically applies historical preferences to output control results that conform to the user's usage habits. Simultaneously, it directly calls the structured memory patch, without relying entirely on large models for re-inference, resulting in higher execution efficiency and more stable results.
[0036] Furthermore, based on the above embodiments, this embodiment determines the scene intent corresponding to the first scene instruction by: identifying the scene intent and confidence level corresponding to the first scene instruction through a natural language understanding model; if the confidence level is lower than a preset threshold, sending a confirmation request to the user, and determining the scene intent based on the user's response to the confirmation request.
[0037] Specifically, the system uses a natural language understanding model to identify the scene intent corresponding to the first scene command and outputs a corresponding confidence score to characterize the accuracy of the identification result. If the confidence score obtained is lower than a preset threshold, it means that the system cannot accurately determine the user's scene needs, so it sends a confirmation request to the user, such as asking "Do you want to start the movie-watching scene?" After the user replies with confirmation, the final scene intent is determined. This avoids scene recognition errors caused by unclear user expressions, accent differences, etc., reduces false triggering, and improves the accuracy of scene recognition. Furthermore, based on the above embodiments, this embodiment extracts the difference constraints of natural language correction feedback relative to the first set of device control actions, including: performing semantic parsing on the natural language correction feedback to extract the correction object, action type, and scope of application; comparing the correction object, action type, and scope of application with each action in the first set of device control actions; and determining the correction type of the difference constraint based on the comparison results, wherein the correction type includes at least one of deletion, overwrite, retention, and addition.
[0038] Specifically, the natural language correction feedback is first semantically analyzed to extract the correction object, action type, and scope. The correction object is the device the user wants to adjust, the action type is the category of operation performed on the device, and the scope is the room or area to which the adjustment applies. The extracted correction object, action type, and scope are then compared one by one with each action in the first set of device control actions to confirm which actions correspond to the correction content. Based on the comparison results, the correction type for the difference constraint is determined, including four categories: deletion, overwrite, retention, and addition. The user's colloquial correction is broken down into clear operational elements and accurately matched to the specific actions already performed, providing a clear basis for the generation of memory patches.
[0039] Furthermore, based on the above embodiments, this embodiment performs semantic parsing on the natural language correction feedback to extract the correction object, action type, and scope of application, including: if the natural language correction feedback includes a negation expression and the negation expression points to a device action in the first device control action set, then the corresponding device action and action type are extracted as objects to be deleted; if the natural language correction feedback includes a scope restriction expression, then the device object and action type limited by the scope restriction expression are extracted as objects to be retained, and other device objects belonging to the same action type as the objects to be retained are extracted as objects to be excluded; if the natural language correction feedback includes a parameter adjustment expression, then the device object pointed to by the parameter adjustment expression and the adjusted parameter value are extracted; if the natural language correction feedback includes a new action expression and the device action pointed to by the new action expression is not included in the first device control action set, then the corresponding device object, action type, and action parameters are extracted as objects to be added.
[0040] Specifically, if the natural language correction feedback contains negative expressions such as "don't," "no need," "don't," "no need," or "cancel," and the negative expression points to a device action in the first set of device control actions, then the corresponding device action and action type are extracted as objects to be deleted. For example, if a user says "the bedroom curtains don't need to be closed," which negates the action of closing the bedroom curtains, then closing the bedroom curtains is extracted as an object to be deleted.
[0041] If the natural language correction feedback contains range-limiting expressions such as "only," "merely," "just," or "only need," then the device object and action type limited by that expression are extracted as objects to be retained, and other device objects belonging to the same action type as the objects to be retained are listed as objects to be excluded. For example, if a user says "only close the living room curtains," then the action of closing the living room curtains is retained, and the bedroom curtains, which belong to the same action of closing curtains, are listed as objects to be excluded.
[0042] If the natural language correction feedback includes parameter adjustment expressions such as "brighten it a bit," "dim it a bit," "raise the temperature a bit," or "reduce the fan speed a bit," then the device object that the expression refers to and the adjusted parameter value are extracted. For example, if a user triggers a sleep scenario and says, "I don't need to turn the air conditioner so low when I sleep, just set it to 27℃," then the bedroom air conditioner device object and the parameter value of 27℃ are extracted as the parameter coverage content.
[0043] If the natural language correction feedback contains an expression for adding an action, and the device action that expression refers to is not included in the first set of device control actions, then the corresponding device object, action type, and action parameters are extracted as objects to be added. For example, if a user says "turn on the air purifier," but the default movie-watching scenario does not involve turning on the air purifier, then turning on the air purifier will be added as an object to be added.
[0044] By covering various commonly used correction expressions in daily life, it can accurately identify users' true correction intentions and adapt to different spoken expression habits.
[0045] Furthermore, based on the above embodiments, this embodiment generates a structured scene memory patch, including: using the correction object, action type, and scope of application in the difference constraints as field content of the scene memory patch; using the scene intent as the association index of the scene memory patch; assigning a user identifier, family identifier, priority identifier, and timestamp to the scene memory patch, where the user identifier is used to limit the users to which the scene memory patch applies, the family identifier is used to limit the families to which the scene memory patch applies, the priority identifier is used to determine the application order when multiple patches conflict, and the timestamp is used to identify the generation time of the patch.
[0046] Specifically, when generating the memory patch, the contents of the difference constraints are first organized into standardized fields. The complete field contents and functions are shown in Table 1: Table 1
[0047] After populating all fields, the scene intent is used as the associated index for the scene memory patch, facilitating quick retrieval of matching patches based on the scene intent. Simultaneously, the patch is associated with a corresponding user identifier, family identifier, priority identifier, and timestamp, completing the generation of the entire structured patch. These fields constitute a complete structured patch, enabling quick searching by scene and distinguishing between different users and families, adapting to complex home usage environments.
[0048] Furthermore, based on the above embodiments, this embodiment also includes: associating and storing scene memory patches with user identifiers and family identifiers, and determining that different users and / or different families correspond to different scene memory patches under the same scene intent.
[0049] Specifically, the system associates and stores scene memory patches with user and family identifiers. When the same scene intent is triggered by different users, it will match their respective memory patches. Similarly, when the same scene intent is triggered in different families, it will match the corresponding family's memory patch. For example, if the father triggers a movie-watching scene, the father's exclusive memory patch will be used; if the mother triggers the same scene, the mother's memory patch will be used. Similarly, if a user triggers a sleep scene in their own home versus another residence, the corresponding family's patch will be invoked. This storage method achieves personalized memory isolation across multiple users, families, and rooms, ensuring that different users' preferences do not interfere with each other, and that the same scene adapts to different usage habits in different environments.
[0050] Furthermore, based on the above embodiments, this embodiment modifies the default device control action set generated by the default scene template corresponding to the scene intent according to the difference constraint, including: if the correction type of the difference constraint is deletion, then the corresponding device action is deleted from the default device control action set; if the correction type of the difference constraint is overwrite, then the action parameters in the difference constraint are overwritten with the parameters of the corresponding action in the default device control action set; if the correction type of the difference constraint is retention, then only the action corresponding to the device object specified by the difference constraint is retained, and other device objects belonging to the same action type are excluded; if the correction type of the difference constraint is addition, then the action specified by the difference constraint is added to the default device control action set.
[0051] Specifically, if the correction type for the difference constraint is deletion, the corresponding device action is deleted from the default device control action set. For example, if the patch requires deleting the action of closing bedroom curtains, then this item is removed from the default movie viewing action set.
[0052] If the correction type of the difference constraint is coverage, the action parameters in the difference constraint are used to replace the parameters of the corresponding actions in the default device control action set. Taking the sleep scenario as an example, the default action set for the sleep scenario includes turning off the living room lights, turning off the bedroom lights, turning off the TV, closing all the curtains in the house, and setting the bedroom air conditioner to 26°C. After the user corrects the air conditioner temperature, a parameter coverage patch is generated, specifying the bedroom air conditioner temperature as 27°C. When the system applies the patch, the default 26°C is replaced with 27°C, and the other default actions remain unchanged.
[0053] If the modification type of the difference constraint is "retain", only the action corresponding to the device object specified by the difference constraint will be retained, and other device objects belonging to the same action type will be excluded. For example, if the patch requires that only the action of closing the living room curtains be retained, then the default action of closing the bedroom curtains will be excluded, and only the action of closing the living room curtains will be retained.
[0054] If the modification type of the difference constraint is "add", the action specified by the difference constraint will be added to the default device control action set. For example, if the patch requires the addition of the action to turn on the air purifier, this action will be added to the final action set.
[0055] Different correction types correspond to different processing logic, which can accurately adjust the default action set and ensure that the final output action set fully matches the user's correction expectations.
[0056] Furthermore, based on the above embodiments, in this embodiment, when multiple scene memory patches match scene intents, the default device control action set generated by the default scene template corresponding to the scene intent is modified according to the difference constraints. This includes: obtaining the priority identifier of each scene memory patch; applying the difference constraints of each scene memory patch to modify the default device control action set in descending order of priority identifiers; wherein, the priority levels of the priority identifiers from high to low are: user explicit long-term modification, user's most recent confirmation, historical habit statistics, and system default template.
[0057] Specifically, when multiple scene memory patches match the current scene intent, the system first obtains the priority identifier of each memory patch. Then, according to the priority identifier from high to low, the difference constraints of each patch are applied to the default device control action set to complete the correction process. The priority identifiers, from high to low, are: user-explicit long-term corrections, user's most recent confirmation, historical habit statistics, and system default templates. That is, corrections that the user has explicitly stated will be effective for a long time have the highest priority, followed by content that the user has most recently confirmed, then usage habits obtained through historical operation statistics, and finally, the system's default templates have the lowest priority. This clear priority order provides a clear execution sequence when there are conflicts between multiple patches or between patches and default rules, ensuring stable and predictable control results and avoiding logical confusion.
[0058] Furthermore, based on the above embodiments, this embodiment also includes: if the natural language correction feedback includes a long-term expression indicating that the correction content is applicable to subsequent similar scenarios, then the applicable state of the difference constraint is marked as long-term applicable; if the natural language correction feedback does not include a long-term expression, then the applicable state of the difference constraint is marked as temporary applicable; obtaining secondary natural language correction feedback input by the user for the second device control action set; if the applicable state of the secondary natural language correction feedback is temporary applicable, then the existing scene memory patch remains unchanged; if the applicable state of the secondary natural language correction feedback is long-term applicable and opposite to the difference constraint of the existing scene memory patch, then the existing scene memory patch is marked as invalid, or a new high-priority scene memory patch is generated to cover the existing scene memory patch.
[0059] Specifically, the system first determines whether the natural language correction feedback contains expressions indicating long-term applicability, such as "later," "next time," "everything in the future," or "when watching movies later." If such long-term expressions are included, the corresponding difference constraint is marked as long-term applicable, and will be automatically applied whenever the same scenario is triggered. If such long-term expressions are not included, the difference constraint is marked as temporary applicable, effective only for the current instance and not affecting subsequent scenario execution. When the system receives secondary natural language correction feedback from the user regarding the second device control action set, it first determines the applicability of the secondary feedback. If the secondary natural language correction feedback is temporarily applicable, the existing scenario memory patch remains unchanged. If the secondary natural language correction feedback is long-term applicable and its difference constraint is opposite to that of the existing scenario memory patch, the original scenario memory patch is marked as invalid, or a new high-priority scenario memory patch is generated to overwrite the existing old patch. This method can distinguish between the user's temporary adjustments and long-term preferences, avoiding the impact of a single temporary modification on regular use; it also supports users updating their preferences, ensuring that the memory patch always conforms to the user's latest usage habits.
[0060] Furthermore, based on the above embodiments, before extracting the difference constraint between the natural language correction feedback and the first set of device control actions in this embodiment, the method further includes: if the natural language correction feedback cannot clearly point to any device action in the first set of device control actions, then disambiguation is performed by combining the execution context of the first scene instruction and the home device topology information; if it still cannot be determined after disambiguation, a confirmation request is sent to the user.
[0061] Specifically, before extracting the difference constraints between the natural language correction feedback and the first set of device control actions, if the natural language correction feedback cannot clearly point to any device action in the first set of device control actions, the system performs disambiguation by combining the execution context of the first scenario command and the home device topology information. It references the most recently executed action sequence, the spatial affiliation of the device, and the functional capabilities of the device to determine the specific content the user wants to correct. If the disambiguation still cannot determine the exact content, a confirmation request is sent to the user, directly asking for the specific device and action to be adjusted. This disambiguation and confirmation mechanism avoids correction recognition errors caused by ambiguous user statements, ensures the accuracy of the memory patch, and reduces erroneous modifications.
[0062] 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. An adaptive control method for a smart home scenario, characterized in that, include: In response to a first scene command triggered by a user, determine the scene intent corresponding to the first scene command, and generate and execute a first set of device control actions based on the scene intent; Obtain natural language correction feedback from the user regarding the set of control actions for the first device; Extract the difference constraints between the natural language correction feedback and the first device control action set; Based on the difference constraints, a structured scene memory patch is generated and stored. The scene memory patch is used to record the difference constraints between the first set of device control actions and the user's correction expectations. The scene memory patch is stored in association with the scene intent. In response to a second scene command triggered by the user, when the scene intent of the second scene command is identified to match the scene intent associated with the scene memory patch, the scene memory patch is invoked, and the default device control action set generated by the default scene template corresponding to the scene intent is modified according to the difference constraint, and a second device control action set is generated and executed.
2. The adaptive control method for smart home scenarios according to claim 1, characterized in that, Determining the scene intent corresponding to the first scene instruction includes: The natural language understanding model is used to identify the scene intent and confidence level corresponding to the first scene instruction; If the confidence level is lower than a preset threshold, a confirmation request is sent to the user, and the scenario intent is determined based on the user's response to the confirmation request.
3. The adaptive control method for smart home scenarios according to claim 1, characterized in that, The step of extracting the difference constraints between the natural language correction feedback and the first device control action set includes: Semantic parsing is performed on the natural language correction feedback to extract the correction object, action type, and scope of effect; The correction object, action type, and scope of action are compared item by item with each action in the first set of device control actions. Based on the comparison results, the correction type of the difference constraint is determined, and the correction type includes at least one of deletion, overwrite, retention and addition.
4. The adaptive control method for smart home scenarios according to claim 3, characterized in that, The semantic parsing of the natural language correction feedback, extracting the correction object, action type, and scope of application, includes: If the natural language correction feedback includes a negative expression and the negative expression points to a device action in the first device control action set, then the corresponding device action and action type are extracted as objects to be deleted. If the natural language correction feedback includes a range restriction expression, then the device object and action type defined by the range restriction expression are extracted as objects to be retained, and other device objects belonging to the same action type as the objects to be retained are objects to be excluded. If the natural language correction feedback includes a parameter adjustment expression, then extract the device object pointed to by the parameter adjustment expression and the adjusted parameter value; If the natural language correction feedback includes a new action expression and the device action pointed to by the new action expression is not included in the first device control action set, then the corresponding device object, action type, and action parameters are extracted as the object to be added.
5. The adaptive control method for smart home scenarios according to claim 1, characterized in that, The generation of structured scene memory patches includes: The correction object, action type, and scope of application in the aforementioned difference constraints are used as the field content of the scene memory patch; The scene intent is used as the associated index of the scene memory patch; The scene memory patch is assigned a user identifier, a family identifier, a priority identifier, and a timestamp. The user identifier is used to limit the users to which the scene memory patch applies, the family identifier is used to limit the families to which the scene memory patch applies, the priority identifier is used to determine the application order when multiple patches conflict, and the timestamp is used to identify the generation time of the patch.
6. The adaptive control method for smart home scenarios according to claim 5, characterized in that, Also includes: The scene memory patch is associated with and stored with the user identifier and the family identifier to determine that different users and / or different families correspond to different scene memory patches under the same scene intent.
7. The adaptive control method for smart home scenarios according to claim 1, characterized in that, The step of correcting the set of default device control actions generated from the default scene template corresponding to the scene intent based on the difference constraints includes: If the correction type of the difference constraint is deletion, then the corresponding device action is deleted from the default device control action set; If the correction type of the difference constraint is coverage, then the action parameters in the difference constraint are used to cover the parameters of the corresponding action in the default device control action set; If the modification type of the difference constraint is to retain, then only the action corresponding to the device object specified by the difference constraint is retained, and other device objects belonging to the same action type are excluded. If the modification type of the difference constraint is "add", then the action specified by the difference constraint is added to the default device control action set.
8. The adaptive control method for smart home scenarios according to claim 7, characterized in that, When multiple scene memory patches match the scene intent, the step of correcting the set of default device control actions generated from the default scene template corresponding to the scene intent according to the difference constraints includes: Obtain the priority identifier of each scene memory patch; According to the priority identifiers from high to low, the difference constraints of each scene memory patch are applied sequentially to modify the default device control action set. The priority levels of the priority identifiers, from highest to lowest, are: user explicit long-term correction, user's most recent confirmation, historical habit statistics, and system default template.
9. The adaptive control method for a smart home scenario according to claim 1, characterized in that, Also includes: If the natural language correction feedback includes a long-term expression indicating that the corrected content is applicable to subsequent similar scenarios, then the applicable status of the difference constraint is marked as long-term applicable. If the natural language correction feedback does not include the long-term expression, then the applicable status of the difference constraint is marked as temporarily applicable; Obtain secondary natural language correction feedback from the user's input of the second set of control actions for the device; If the application status of the secondary natural language correction feedback is temporary, then the existing scene memory patch remains unchanged; If the applicable state of the secondary natural language correction feedback is long-term applicable and is opposite to the difference constraint of the existing scene memory patch, then the existing scene memory patch is marked as invalid, or a new high-priority scene memory patch is generated to cover the existing scene memory patch.
10. The adaptive control method for a smart home scene according to any one of claims 1-9, characterized in that, Before extracting the difference constraints between the natural language correction feedback and the first device control action set, the method further includes: If the natural language correction feedback cannot clearly point to any device action in the first set of device control actions, then disambiguation is performed by combining the execution context of the first scene instruction and the home device topology information; If the result is still uncertain after disambiguation, a confirmation request is sent to the user.