Instruction optimization methods, apparatus, electronic devices and storage media
By acquiring and clustering the parameters of smart devices, the device control commands are automatically updated, solving the problem of cumbersome optimization of device control commands in smart homes and improving the adaptability of device control and user experience.
Patent Information
- Application Number
- CN202310511468.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-05-08
AI Technical Summary
Optimizing device control commands is a cumbersome process, especially in smart home scenarios. As the number of scenarios and devices increases, it becomes difficult for users to effectively modify and optimize device control commands to meet their personalized needs.
By acquiring the first device parameters of the target scenario and the second device parameters of the scenario steady-state set, the device control commands are automatically updated, and the commands are optimized using feature-based and clustering techniques, reducing the number of steps required for user modification.
The process of optimizing device control commands has been simplified, making them more aligned with the user's true intentions and improving the user experience and adaptability of device control.
Smart Images

Figure CN116700067B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, and more specifically, to an instruction optimization method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of IoT technology, the methods for controlling smart devices in smart home networks are becoming increasingly diverse. In addition to methods for controlling individual smart devices, there are also methods for controlling devices based on various scenarios. Scene-based device control reduces the steps of sequentially controlling multiple smart devices, and different scenarios cater to different user needs, making it more intelligent.
[0003] Currently, each smart device can be configured with corresponding actions within a scene. When the scene is triggered, device control commands, instructing the smart devices to perform actions, are sent to the corresponding smart devices, causing them to execute the appropriate actions in response. Therefore, if device control commands need to be optimized, the configuration within the scene must be modified.
[0004] However, as the number of scenes or the number of smart devices that need to be configured with initial actions in a scene gradually increases, modifying scene configurations will become increasingly difficult. For users, the increased difficulty in modifying scene configurations will reduce their motivation to optimize device control commands.
[0005] As can be seen from the above, the optimization process of equipment control commands is too cumbersome, which has become a problem that urgently needs to be solved. Summary of the Invention
[0006] This application provides an instruction optimization method, apparatus, electronic device, and storage medium, which can solve the problem of overly cumbersome device control instruction optimization processes in related technologies. The technical solutions are as follows:
[0007] According to one aspect of this application, an instruction optimization method is provided, the method comprising: acquiring first device parameters of a target scene, the first device parameters being generated by an intelligent device performing an initial action configured in the target scene; acquiring a scene steady-state set of the target scene, the scene steady-state set including second device parameters generated during multiple scene observation periods; the second device parameters being generated by the intelligent device performing an additional action during a single scene observation period; updating a device control instruction for when the target scene is triggered based on the first device parameters and the second device parameters in the scene steady-state set; the device control instruction being used to instruct the intelligent device to perform a corresponding initial action.
[0008] According to one aspect of this application, an instruction optimization apparatus includes: a first parameter acquisition module for acquiring first device parameters of a target scene, the first device parameters being generated by an intelligent device performing an initial action configured in the target scene; a second parameter acquisition module for acquiring a scene steady-state set of the target scene, the scene steady-state set including second device parameters generated over multiple scene observation periods; the second device parameters being generated by the intelligent device performing an additional action during a single scene observation period; and an instruction update module for updating a device control instruction when the target scene is triggered based on the first device parameters and the second device parameters in the scene steady-state set; the device control instruction instructs the intelligent device to perform a corresponding initial action.
[0009] In an exemplary embodiment, the instruction update module includes: a characterization unit, configured to characterize environmental parameters when the target scene is triggered to obtain an environmental state corresponding to the target scene; a clustering unit, configured to cluster the second device parameters in the steady-state set of the scene according to the obtained environmental state to obtain a third device parameter in the corresponding environmental state; the third device parameter is related to the action that the smart device is expected to perform in the corresponding environmental state; and an update unit, configured to update the device control instruction when the target scene is triggered according to the third device parameter in the corresponding environmental state and the first device parameter.
[0010] In an exemplary embodiment, the instruction update module is further configured to compare the differences between the third device parameter and the first device parameter under the corresponding environmental state to obtain a comparison result; and update the device control instruction when the target scene is triggered based on the comparison result.
[0011] In an exemplary embodiment, the instruction update module is further configured to determine the confidence level corresponding to the third device parameter under the corresponding environmental state; the confidence level is determined based on the number of times the third device parameter appears within a preset time period, or based on the ratio between the number of times the third device parameter appears within the preset time period and the number of times the target scene is triggered; if the confidence level meets the set conditions, the device control instruction when the target scene is triggered is updated according to the third device parameter and the first device parameter under the corresponding environmental state.
[0012] In an exemplary embodiment, the instruction update module is further configured to determine a scene steady-state set under various environmental states when there are multiple environmental states corresponding to the target scene; and for each environmental state, cluster the second device parameters in the determined scene steady-state set to obtain the third device parameters under the corresponding environmental state.
[0013] In an exemplary embodiment, the instruction update module is further configured to detect whether the third device parameters are the same under various environmental conditions; if not, then create or push a new scene based on the third device parameters under various environmental conditions.
[0014] In an exemplary embodiment, the instruction update module is further configured to receive a feedback message for the creation of a new scenario; if the feedback message indicates that the creation of a new scenario is permitted, then a new scenario is created based on the third device parameters, and the created new scenario is stored, so as to update the device control instruction when the new scenario is triggered based on the third device parameters of the new scenario.
[0015] In an exemplary embodiment, the instruction optimization device is further configured to determine the satisfaction level of the target scene based on the frequency of the smart device performing additional actions during multiple scene observation periods; if the satisfaction level of the target scene indicates that the device control instruction when the target scene is triggered needs to be updated, then the steady-state set of the target scene is obtained.
[0016] In an exemplary embodiment, the instruction optimization device is further configured to determine a feedback quantity for the scene observation period within a set time period; the feedback quantity is used to indicate the number of times the smart device is detected to perform additional actions during the scene observation period; and to adjust the scene observation period based on the feedback quantity.
[0017] In an exemplary embodiment, the instruction optimization device is further configured to send an updated device control instruction to the corresponding smart device if the target scenario is triggered, so that the smart device performs an initial action in response to the updated device control instruction.
[0018] In an exemplary embodiment, the instruction optimization device is further configured to detect whether the instruction optimization function is enabled; the enabling of the instruction optimization function means allowing the device control instruction to be updated when the target scene is triggered; if the instruction optimization function is detected to be enabled, the scene steady-state set of the target scene is obtained.
[0019] According to one aspect of this application, an instruction optimization apparatus includes: a data display module for displaying instruction optimization data for a target scene, the instruction optimization data indicating an updated device control instruction; the updated device control instruction is determined by a gateway or cloud based on a first device parameter of the target scene and a second device parameter in a scene steady-state set; the first device parameter is generated by an intelligent device performing an initial action configured in the target scene, indicating the device state of the intelligent device; the scene steady-state set includes the second device parameter over multiple scene observation periods; the second device parameter is generated by the intelligent device performing an additional action during a single scene observation period; and a message sending module for sending a confirmation message to a gateway or cloud in response to a confirmation operation triggered by the instruction optimization data, causing the gateway or cloud to update the device control instruction when the target scene is triggered.
[0020] In one exemplary embodiment, the instruction optimization device is further configured to request the gateway or cloud to mark the instruction optimization function as enabled in response to an activation operation triggered for the instruction optimization function.
[0021] According to one aspect of this application, an electronic device includes at least one processor and at least one memory, wherein computer-readable instructions are stored on the memory; the computer-readable instructions are executed by one or more of the processors to cause the electronic device to implement the instruction optimization method as described above.
[0022] According to one aspect of this application, a storage medium stores computer-readable instructions thereon, which are executed by one or more processors to implement the instruction optimization method as described above.
[0023] According to one aspect of this application, a computer program product includes computer-readable instructions stored in a storage medium, wherein one or more processors of an electronic device read the computer-readable instructions from the storage medium, load and execute the computer-readable instructions, causing the electronic device to implement the instruction optimization method as described above.
[0024] The beneficial effects of the technical solution provided in this application are:
[0025] In the above technical solution, on the one hand, the scene steady-state set includes second device parameters generated during multiple scene observation periods. Updating the target scene based on the scene steady-state set makes the target scene more suitable for the actual situation, thereby making the device control based on the target scene more in line with the user's true intention. On the other hand, when the target scene deviates from the actual situation, the device control command triggered by the target scene is automatically updated based on the first device parameters and the second device parameters in the scene steady-state set. This reduces the steps for users to modify the target scene configuration, making the command optimization operation simple and not cumbersome, thereby improving the user experience and effectively solving the problem of the overly cumbersome device control command optimization process in related technologies. Attached Figure Description
[0026] 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.
[0027] Figure 1 This is a schematic diagram based on the implementation environment involved in this application;
[0028] Figure 2 This is a flowchart illustrating an instruction optimization method according to an exemplary embodiment;
[0029] Figure 3 yes Figure 2 A flowchart of step 350 in one embodiment corresponds to the following example;
[0030] Figure 4 This is a flowchart illustrating another instruction optimization method according to an exemplary embodiment;
[0031] Figure 5 This is a schematic diagram illustrating the specific implementation of an instruction optimization method in an application scenario;
[0032] Figure 6 This is a structural block diagram of an instruction optimization apparatus according to an exemplary embodiment;
[0033] Figure 7 This is a structural block diagram of another instruction optimization device according to an exemplary embodiment;
[0034] Figure 8 This is a hardware structure diagram of an electronic device according to an exemplary embodiment;
[0035] Figure 9 This is a hardware structure diagram of a terminal according to an exemplary embodiment;
[0036] Figure 10 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0037] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0038] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0039] As mentioned earlier, as the number of scenes, or the number of smart devices that need to be configured with initial actions in a scene, gradually increases, modifying scene configurations will become increasingly difficult.
[0040] Taking smart homes as an example, there are a large number of scene-based device linkage control services in smart homes. For example, the target scene is configured as "someone is here and the temperature is above 28°C, it's hot, turn on the air conditioner to cooling to 26°C". The trigger condition for triggering the target scene is "someone is here and the temperature is above 28°C". When the trigger condition is met, the target scene can be automatically triggered, and the device control command "turn on the air conditioner to cooling mode and set it to 26°C" can be sent to the air conditioner, so that the air conditioner turns on and cools to 26°C.
[0041] Device linkage control services greatly simplify the steps for users to control devices. However, since each user's adaptability to different environmental conditions and device usage habits vary, some users may only feel hot at 29℃, while others are accustomed to setting the air conditioner to 22℃. Therefore, device linkage control needs to be adaptively adjusted to meet the needs of different users. Furthermore, if device linkage control for other smart devices is also configured in the target scenario, then the user needs to find the device linkage control related to the air conditioner among the several device linkage controls configured in the target scenario and modify its trigger condition to "someone is present and the temperature is higher than 29℃", or modify its device control command to "turn on the air conditioner's cooling mode and set it to 22℃".
[0042] However, since there are many scenarios in a smart home, and there may be linkage control between several smart devices in a scenario, if a user wants to adjust the target scenario, not only does he need to find the target scenario among several scenarios in order to adjust the device control commands in the target scenario according to his expectations, but he also needs to consider the connection relationship between the various smart devices when adjusting the device control commands.
[0043] Therefore, optimizing equipment control commands is a complicated and difficult process, resulting in most users not having a strong incentive to modify the configuration of equipment linkage control after configuration. The non-adaptive equipment linkage control cannot meet personalized needs or changes in user requirements.
[0044] As can be seen from the above, the related technologies still suffer from the drawback of overly cumbersome equipment control command optimization processes.
[0045] Therefore, the instruction optimization method provided in this application can effectively reduce the steps in instruction optimization and simplify the instruction optimization operation. Accordingly, the instruction optimization method is applicable to an instruction optimization device, which can be deployed on an electronic device. For example, the electronic device can be a computer device configured with a von Neumann architecture, including desktop computers, laptops, servers, etc., or it can be an electronic device with central control function, such as a gateway.
[0046] 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.
[0047] Figure 1 This is a schematic diagram of the implementation environment involved in a method for generating an environment model. The implementation environment includes at least a user terminal 110, a smart device 130, a server 170, and network equipment. Figure 1 In this context, network devices include gateway 150 and router 190, but this is not intended to be a specific limitation.
[0048] The user terminal 110, which can also be considered as a user terminal or terminal, can deploy (or install) the client associated with the smart device 130. This user terminal 110 can be an electronic device such as a smartphone, tablet, laptop, desktop computer, smart control panel, or other device with display and control functions, and is not limited here.
[0049] The client, associated with the smart device 130, is essentially where the user registers an account and configures the smart device 130. For example, the configuration includes adding a device identifier to the smart device 130, so that when the client runs on the user terminal 110, it can provide the user with functions such as device display and device control of the smart device 130. This client can be in the form of an application or a web page. Correspondingly, the interface for displaying the device on the client can be in the form of a program window or a web page, and there is no limitation here.
[0050] Smart device 130 is deployed in gateway 150 and communicates with gateway 150 through its own configured communication module, thereby being controlled by gateway 150. It should be understood that smart device 130 generally refers to one of multiple smart devices 130. This application embodiment only uses smart device 130 as an example; that is, this application embodiment does not limit the number or type of smart devices deployed in gateway 150. In one application scenario, smart device 130 is deployed in gateway 150 by accessing it through a local area network. The process of smart device 130 accessing gateway 150 through a local area network includes: gateway 150 first establishes a local area network, and smart device 130 joins the local area network established by gateway 150 by connecting to it. This local area network includes, but is not limited to, ZIGBEE or Bluetooth. Among them, the smart device 130 can be a smart printer, smart fax machine, smart camera, smart air conditioner, smart door lock, smart light, or a human body sensor, door and window sensor, temperature and humidity sensor, water immersion sensor, natural gas alarm, smoke alarm, wall switch, wall socket, wireless switch, wireless wall sticker switch, cube controller, curtain motor, millimeter wave radar, etc., equipped with a communication module.
[0051] The interaction between user terminal 110 and smart device 130 can be achieved through a local area network (LAN) or a wide area network (WAN). In one application scenario, user terminal 110 establishes a wired or wireless communication connection with gateway 150 via router 190, such as Wi-Fi, allowing user terminal 110 and gateway 150 to be deployed on the same LAN, thus enabling user terminal 110 to interact with smart device 130 via the LAN path. In another application scenario, user terminal 110 establishes a wired or wireless communication connection with gateway 150 via server 170, such as 2G, 3G, 4G, 5G, or Wi-Fi, allowing user terminal 110 and gateway 150 to be deployed on the same WAN, thus enabling user terminal 110 to interact with smart device 130 via the WAN path.
[0052] Here, server-side 170 can also be considered as the cloud, cloud platform, platform side, server side, etc. This server-side 170 can be a single server, a server cluster consisting of multiple servers, or a cloud computing center consisting of multiple servers, in order to better provide backend services to a massive number of user terminals 110. For example, backend services include instruction optimization services.
[0053] In one application scenario, the server 170 obtains the first device parameters and the steady-state value of the target scenario, and updates the device control command when the target scenario is triggered based on the first device parameters and the second device parameters in the steady-state set of the scenario.
[0054] In another application scenario, user terminal 110 displays the instruction optimization data of the target scenario to show the user the updated device control instructions. If the user confirms the instruction optimization, user terminal 110 sends a confirmation message to server 170, so that server 170 updates the device control instructions when the target scenario is triggered.
[0055] Please see Figure 2 This application provides an instruction optimization method, applicable to electronic devices, which may be... Figure 1 The diagram shows gateway 150 or server 170 in the implementation environment.
[0056] In the following method embodiments, for ease of description, the execution subject of each step of the method is an electronic device, but this does not constitute a specific limitation.
[0057] like Figure 2 As shown, the method may include the following steps:
[0058] Step 310: Obtain the first device parameters for the target scene.
[0059] First, it should be noted that a target scenario is a device control method for the coordinated configuration of multiple smart devices. A target scenario can include one or more device control commands. When a target scenario is triggered, the control commands are sent to the corresponding smart devices, causing them to execute the initial actions configured in the target scenario. For example, if the configured target scenario is a "coming home" scenario, which means "if someone is in the entryway, turn on the living room light, entryway light, and living room air conditioner," then when the "coming home" scenario is triggered, the living room light and entryway light will turn on, and at the same time, the living room air conditioner will also turn on.
[0060] Secondly, the first device parameter is generated by the smart device executing the initial action configured in the target scenario. It can also be understood as indicating the device state after the smart device executes the initial action. For example, in the target scenario "coming home," the initial action configured for the living room air conditioner is "turn on cooling mode, cool to 23℃." Correspondingly, the device control command is "turn on cooling mode, cool to 23℃." When the "coming home" scenario is triggered, this device control command is sent to the living room air conditioner, causing it to execute the action "turn on cooling mode, cool to 23℃." Thus, the first device parameter indicates the device state of the living room air conditioner after executing the initial action as "cooling mode, temperature 23℃." Furthermore, the target scenario can include multiple device control commands. When the target scenario is triggered, each device control command is sent to the corresponding smart device to execute the initial action. Multiple smart devices executing initial actions will generate multiple corresponding first device parameters. Again, using the "coming home" scenario as an example, when the "coming home" scenario is triggered, three first device parameters can be generated, indicating "living room light on," "entryway light on," and "living room air conditioner on," respectively.
[0061] Of course, the number of first device parameters when different target scenarios are triggered can be different, and can be determined by the number of device control commands configured in the target scenario. No specific limitation is made here.
[0062] Step 330: Obtain the scene steady-state set of the target scene.
[0063] The scene steady-state set includes second device parameters generated during multiple scene observation periods. These second device parameters are generated when the intelligent device performs additional actions during a single scene observation period. It should be noted that additional actions refer to actions performed by the intelligent device in the target scene during the scene observation period that differ from the initial actions configured for the intelligent device in the target scene.
[0064] When a target scenario is triggered, the initial action performed by the smart device configured in that scenario may not meet the user's expectations. For example, the ambient temperature may drop, but the "homecoming scenario" is configured to "turn on the cooling mode for the living room air conditioner." In other words, the initial action configured for the living room air conditioner in the "homecoming scenario"—"turn on cooling mode"—is not realistic. Based on this, the user quickly and manually turns off the living room air conditioner after the "homecoming scenario" is triggered. The user manually turning off the living room air conditioner is considered an additional action performed by the living room air conditioner within a scenario observation period, and the resulting second device parameter could be "turn off the living room air conditioner." It's understandable that a second device parameter is not generated every time a target scenario is triggered. If the smart device does not perform any additional actions within the scenario observation period, then no corresponding second device parameter will exist for that specific triggering of the target scenario.
[0065] Regarding the scene observation period, it refers to a time period set after the target scene is triggered, for observing whether the smart device under the target scene performs an additional action. For example, the scene observation period may be within 1 minute after the target scene is triggered. The setting of the scene observation period can be used to determine whether the user performs additional control on the smart device after the target scene is triggered, so as to determine whether the user is satisfied with the device linkage control based on the target scene. For example, if the user performs additional manual control on the smart device in multiple scene observation periods, it indicates that the device control performed based on the target scene does not meet the user's expectation.
[0066] It is worth mentioning that the length of the scene observation period may affect the accuracy of instruction optimization. Since the second device parameter is generated by the smart device performing an additional action within one scene observation period, if the scene observation period is too short and the scene observation period ends before the smart device performs the additional action, it will be impossible to understand the user's attitude towards the target scene configuration, thereby failing to perform instruction optimization smoothly and accurately; on the contrary, if the scene observation period is too long, there may be a lot of untrustworthy information in the second device parameters collected in the scene steady state. For example, after the target scene is triggered, the time changes from night to morning. Due to the influence of sunlight, the user turns off the lamp device in the target scene, and the user turning off the lamp device belongs to normal device control. If the scene observation period is extended indefinitely, and the turning off of the lamp device is also regarded as the lamp device performing an additional action within one scene observation period to generate the second device parameter, then the instruction optimization performed based on the second device parameter will misunderstand the user's intention, resulting in an error in the instruction optimization result.
[0067] It can be seen from the above that no matter which of the above situations occurs, it may cause an inaccurate instruction optimization result. To this end, in a possible implementation manner, the adjustment of the scene observation period may include the following steps: within a set time period, determining a feedback amount for the scene observation period; and adjusting the scene observation period based on the feedback amount. The feedback amount is used to indicate the number of times that the smart device is detected to perform an additional action within the scene observation period. It should be understood that when the feedback amount indicates that the number of times the smart device performs additional actions within the scene observation period is abnormally small, after determining that the cause of the abnormality is that the scene observation period is too short, the scene observation period may be appropriately extended; when the feedback amount indicates that the number of times the smart device performs additional actions within the scene observation period is abnormally frequent, after determining that the cause of the abnormality is that the scene observation period is too long, the scene observation period may be appropriately shortened, so as to better understand the user's real intention and perform instruction optimization accurately.
[0068] Furthermore, different scene observation periods can be set for different users to adapt to their different device usage habits. For example, if user A quickly makes additional manual control of the smart device when the target scene does not meet expectations, then their scene observation period can be set to be shorter. Conversely, if user B observes for a while before making additional manual control of the smart device when the target scene does not meet expectations, then their scene observation period can be set to be longer. Therefore, by setting scene observation periods that better match the device usage habits of different users, we can better understand the true intentions of different users, making the command optimization function more intelligent.
[0069] Of course, electronic devices can always detect whether the corresponding device control commands need to be updated when the target scene is triggered, or they can update the device control commands when the target scene is triggered based on the indication. In one possible implementation, the indication is achieved by whether the command optimization function is enabled. Enabling the command optimization function means allowing the device control commands to be updated when the target scene is triggered. Specifically, the system detects whether the command optimization function is enabled. If the command optimization function is enabled, it means that the device control commands to be updated when the target scene is triggered are allowed. Then, the steady-state set of the target scene is obtained so that the corresponding device control commands can be detected based on the steady-state set of the target scene. Otherwise, if the command optimization function is disabled, it means that the device control commands to be updated when the target scene is triggered are not allowed. Then, it is not necessary to obtain the steady-state set of the target scene, and the device control commands are directly sent to the corresponding smart device, so that the smart device performs the corresponding initial action.
[0070] In this approach, the instruction optimization function can be flexibly enabled or disabled according to the actual needs of the application scenario. For example, in resource-limited application scenarios, the instruction optimization function can be disabled. In this case, the steady-state set of the target scenario is not obtained to avoid instruction optimization calculations, thereby reducing resource consumption.
[0071] To further clarify, when a smart device performs additional actions during a scenario observation period, it indicates that the initial action taken by the device after the target scenario was triggered does not meet the user's expectations. However, this does not necessarily mean the user is dissatisfied with the target scenario's configuration. For example, if the weather suddenly turns cold, and the target scenario includes a device control command to turn on the air conditioner's cooling mode, and the user manually raises the air conditioner's temperature during the scenario observation period after the target scenario is triggered, the sudden cold weather is a temporary temperature change, and the user's action only applies to the target scenario that was triggered at that moment. In other words, only the number and / or frequency of additional actions performed by the smart device across multiple scenario observation periods can indicate whether the user is satisfied with the target scenario's configuration, thus allowing a decision to optimize the commands.
[0072] Based on this, one possible implementation is to determine whether to update the device control command when the target scene is triggered by judging the satisfaction of the target scene. Specifically, it may include the following steps: determining the satisfaction of the target scene based on the frequency of the smart device performing additional actions during multiple scene observation periods; if the satisfaction of the target scene indicates that the device control command when the target scene is triggered needs to be updated, then obtaining the steady-state set of the target scene.
[0073] Satisfaction level is used to indicate the frequency of additional actions performed by the smart device within multiple scene observation periods. This frequency can refer to the number of times and / or the frequency of actions. For example, if the smart device performs additional actions twice within 10 scene observation periods, the satisfaction level is 80%; if the smart device performs additional actions eight times within 10 scene observation periods, the satisfaction level is 20%.
[0074] It should be understood that the higher the frequency of additional actions performed by the smart device during multiple scene observation periods, and the lower the satisfaction level of the target scene, the more necessary it is to update the device control instructions when the target scene is triggered. For example, when the satisfaction level of the target scene is 50%, the device control instructions when the target scene is triggered can be updated or not; when the satisfaction level of the target scene is 20%, it is necessary to update the device control instructions when the target scene is triggered, otherwise the initial actions configured for the smart device in the target scene may not meet the user's expectations.
[0075] Based on this, a threshold can be set for satisfaction. When the satisfaction level is lower than the threshold, it is determined that the device control command when the target scene is triggered needs to be updated. Specifically, the threshold can be set manually by the user or by the server based on big data analysis and calculation. No specific limitation is made here.
[0076] In summary, using the satisfaction level of the target scenario to determine whether to update the device control commands when the target scenario is triggered has two advantages. First, it allows for timely updates to the device control commands when the target scenario is triggered if they no longer meet the requirements, making the target scenario more practical and in line with actual needs. Second, it avoids acquiring and analyzing the steady-state set of the scenario every time the smart device performs additional actions, which can effectively reduce the amount of computation and save resources.
[0077] Step 350: Update the device control command when the target scene is triggered based on the first device parameters and the second device parameters in the scene steady-state set.
[0078] Among them, device control commands are used to instruct smart devices to perform corresponding initial actions.
[0079] It should be noted that since the second device parameters are obtained by the smart device performing additional actions during a single scene observation period, the second device parameters in the scene steady-state set can reflect the user's device usage habits. Furthermore, the first device parameters are generated by the smart device performing the initial actions configured in the target scene. In other words, the first device parameters are related to the device control commands when the target scene is triggered. Therefore, the device control commands when the target scene is triggered can be updated based on the first device parameters and the second device parameters in the scene steady-state set.
[0080] For example, target scenario A includes multiple device control commands such as turning on the living room air conditioner in cooling mode, turning on the living room lights, and turning on the living room TV. If the living room TV is turned off multiple times during the scenario observation period after target scenario A is triggered multiple times, then the second device parameter of the living room TV being turned off will be recorded during the scenario observation period. When optimizing the commands, the electronic device can update the device control commands corresponding to target scenario A based on the above second device parameter. In other words, the new device control command of "turning off the living room TV" can be used to update the device control command of "turning on the living room TV" in target scenario A.
[0081] Of course, the target scenario is configured based on the interaction of multiple smart devices. If, after the target scenario is triggered, the user manually controls the multiple smart devices configured for the target scenario to perform additional actions during the scenario observation period, multiple second device parameters will be obtained. Each second device parameter corresponds to a different additional action performed by a different smart device during the scenario observation period. In one possible implementation, the device control command corresponding to the triggering of the target scenario is updated based on the second device parameters corresponding to each smart device during multiple scenario observation periods. It can be understood that, based on the second device parameters corresponding to each smart device during multiple scenario observation periods, the electronic device can directly update the device control command corresponding to the triggering of the target scenario to obtain the updated target scenario; alternatively, it can first obtain the updated content of the target scenario based on the second device parameters, then push the updated content of the target scenario to the user for confirmation, and only after obtaining the user's confirmation command can the device control command corresponding to the triggering of the target scenario be updated.
[0082] Taking target scenario A as an example, if the living room TV is turned off multiple times and the living room air purifier is turned on multiple times during the scenario observation period after A is triggered multiple times, then the electronic device can update the device control command for "turn on the living room TV" in target scenario A based on the second device parameters corresponding to the living room TV and the living room air purifier, respectively. In other words, the new device control command for "turn off the living room TV" can be used to update the device control command for "turn on the living room TV" in target scenario A. In addition, a new device control command for "turn on the living room air purifier" can be added to target scenario A.
[0083] After optimizing the instructions for the target scenario, when the target scenario is triggered, the updated device control instructions can be sent to the corresponding smart device, so that the smart device can respond to the updated device control instructions and perform the initial action.
[0084] Through the above process, on the one hand, the scene steady-state set includes the second device parameters generated during multiple scene observation periods. Updating the target scene based on the scene steady-state set makes the target scene more suitable for the actual situation, thereby making the device control based on the target scene more in line with the user's true intentions. On the other hand, when the target scene deviates from the actual situation, the device control command triggered by the target scene is automatically updated based on the first device parameters and the second device parameters in the scene steady-state set. This reduces the steps for users to modify the target scene configuration, making the command optimization operation simple and not cumbersome, thereby improving the user experience.
[0085] Please see Figure 3 In one exemplary embodiment, step 350 may include the following steps:
[0086] Step 351: Perform feature processing on the environmental parameters when the target scene is triggered to obtain the environmental state corresponding to the target scene.
[0087] The environmental parameters indicate the actual environmental conditions when the target scenario is triggered. These parameters can be acquired by smart sensors configured in the IoT or by smart devices configured in the target scenario; no specific limitation is made here. For example, a temperature sensor in the IoT detects an actual ambient temperature of 26°C, and a humidity sensor detects an actual ambient relative humidity of 75%.
[0088] Characterization refers to determining the actual environmental characteristics of a target scenario based on different environmental parameters. This involves transforming continuous environmental parameters into discrete environmental states, allowing for clear characteristic representations of these parameters. For example, regarding time in environmental parameters, continuous time points are converted into discrete time periods: morning (6:00 to 11:00), noon (11:00 to 1:00), afternoon (1:00 to 19:00), evening (19:00 to 1:00), and early morning (1:00 to 6:00). Similarly, regarding temperature in environmental parameters, continuous temperature values are converted into discrete temperature representations: low temperature (below 18℃), comfortable (18℃-26℃), and high temperature (above 26℃).
[0089] Step 353: Cluster the second device parameters in the scene steady state set according to the obtained environmental state to obtain the third device parameters under the corresponding environmental state.
[0090] Among them, the third device parameter is related to the action that the smart device is expected to perform in the corresponding environmental state.
[0091] It is understandable that if electronic devices cluster the second device parameters in the steady-state set of the scene for each environmental parameter, it is difficult to determine the corresponding third device parameter for one environmental parameter because the environmental parameters are difficult to be completely consistent each time the target scene is triggered, the number of environmental parameters is large, and the number of second device parameters under one environmental parameter is limited. Furthermore, since the number of second device parameters corresponding to one environmental parameter is small, it is difficult to discover the user's device usage patterns based on a few second device parameters, and the obtained third device parameters cannot reflect the user's true intention, which will result in inaccurate instruction optimization results.
[0092] Based on this, the environmental state of the target scene is obtained by using environmental parameters for feature processing. Since the environmental state corresponds to multiple environmental parameters, there are many second device parameters in this environmental state. Therefore, clustering the second device parameters in this environmental state can fully explore the user's device usage patterns in this environmental state, so that the obtained third device parameters can restore the user's true intention, thereby improving the practicality of the target scene and enhancing the user experience.
[0093] It should be noted that clustering methods such as hierarchical clustering, density clustering, graph theory clustering, and grid clustering can be used to cluster the second device parameters in the steady-state set of the scene, and no specific limitation is made here.
[0094] For example, the second device parameters in the steady-state set of the scene under environment A include a, a, a, a, a, a, b, b, c, c, c, d, and the second device parameters in the steady-state set of the scene under environment B include a, a, a, b, b, b, b, b, c, d, d, where different letters indicate that the smart device has performed different additional actions. Clustering the second device parameters under environment A yields cluster result a, which is the third device parameter under environment A. Similarly, clustering the second device parameters under environment B yields cluster result b, which is the third device parameter under environment B.
[0095] To further clarify, the target scenario may be triggered under different environmental conditions. Therefore, there may be multiple environmental conditions corresponding to the target scenario. It is understandable that the additional actions performed by the smart device configured in the target scenario under different environmental conditions may reflect the user's device usage habits under different environmental conditions.
[0096] Therefore, in order to understand users' device usage habits under different environmental conditions and make the device control commands when the target scenario is triggered more in line with the user's true intentions, one possible implementation is to cluster the second device parameters in the scene steady-state set, which may also include the following steps: when there are multiple environmental states corresponding to the target scenario, determine the scene steady-state set under each environmental state; for each environmental state, cluster the second device parameters in the determined scene steady-state set to obtain the third device parameters under the corresponding environmental state.
[0097] The third device parameters in each environmental state can be considered as the actions that the user expects to perform on each smart device configured in the target scene when the target scene is triggered in that environmental state. Of course, if the third device parameters obtained from clustering are the same in each environmental state, it means that there is no difference in the actions that the user expects to perform on each smart device in the target scene in each environmental state, that is, the user's device usage habits are the same in different environmental states. Conversely, if the third device parameters are different in each environmental state, it means that there are differences in the actions that the user expects to perform on each smart device in the target scene in each environmental state, that is, the user's device usage habits are also different in different environmental states.
[0098] Based on this, one possible implementation is to detect whether the parameters of the third device are the same under various environmental conditions; if not, then create or push a new scene based on the parameters of the third device under various environmental conditions.
[0099] It should be noted that electronic devices can directly create new scenes based on third-party device parameters under various environmental conditions, or they can push these scenes to users, allowing users to decide whether to create new scenes; this is not limited here.
[0100] In one possible implementation, the creation of a new scene is determined by the user and may include the following steps: receiving a feedback message for the creation of a new scene; if the feedback message indicates that the creation of a new scene is permitted, creating a new scene based on third device parameters and storing the created new scene, so as to update the device control command when the new scene is triggered based on the third device parameters of the new scene.
[0101] It's understandable that the newly created scenarios can cover the actions users expect to perform on various smart devices under different environmental conditions. In short, the newly created scenarios can further meet actual needs and conform to the user's true intentions under different environmental conditions. There can be one or more new scenarios created, depending on the parameters of the third-party devices.
[0102] Step 355: Update the device control command when the target scene is triggered based on the third device parameters and the first device parameters under the corresponding environmental conditions.
[0103] First, it should be noted that the third device parameters in the corresponding environmental state can be regarded as the actions that the user expects the corresponding smart device to perform when the target scene is triggered in that environmental state. Based on this, the third device parameters can be used to update the corresponding device control commands in the target scene.
[0104] In one possible implementation, updating the device control commands when the target scene is triggered may include the following steps: comparing the differences between the third device parameters and the first device parameters under the corresponding environmental conditions to obtain a comparison result; and updating the device control commands when the target scene is triggered based on the comparison result. For example, the first device parameters indicate that the living room air conditioner is turned on, its operating mode is cooling at 24°C, the living room lights are turned on, and the living room TV is turned on; the third device parameters indicate that the living room air conditioner is turned on, its operating mode is cooling at 22°C, the living room lights are turned on, and the living room TV is turned on; comparing the two, the comparison result indicates that there is a difference in the actions performed by the living room air conditioner between the first and third device parameters, and thus, updating the device control commands when the target scene is triggered based on the comparison result.
[0105] It should be further explained that the third device parameter is obtained by clustering the second device parameters. If the second device parameter appears infrequently, for example, if the target scene is triggered 20 times, the second device parameters recorded in the steady-state set of the scene are a, b, b, b, c, and d, where different letters refer to different additional actions of the smart device. If the above second device parameters are clustered, the third device parameter obtained by clustering is b. It should be understood that although b is the clustering result, the target scene is triggered 20 times, but b only appears 3 times. In other words, the clustering result is not significant. If the device control command when the target scene is triggered is updated according to the third device parameter b, it will cause the target scene to not conform to the user's true intention.
[0106] Based on this, in one possible implementation, before updating the device control command when the target scene is triggered according to the third device parameters, the following steps may also be included: for the third device parameters in the corresponding environmental state, determine the confidence level corresponding to the third device parameters; if the confidence level meets the set conditions, compare the difference between the third device parameters in the corresponding environmental state and the first device parameters, and update the device control command when the target scene is triggered according to the third device parameters in the corresponding environmental state and the first device parameters.
[0107] The confidence level is determined based on the number of times the target scenario occurs within a preset time period using the third device parameter, or based on the ratio between the number of times the target scenario occurs using the third device parameter within the preset time period and the number of times the target scenario is triggered. It should be understood that when the confidence level of the third device parameter meets the set conditions, it indicates that the third device parameter matches the user's true intent.
[0108] For example, the conditions are set as follows: the target scene is triggered more than 10 times within half a month, and the confidence level indicates that the ratio between the number of times the third device parameter appears in the target scene and the number of times the target scene is triggered is greater than 30%. If the confidence level of the third device parameter meets the above conditions, the difference between the third device parameter and the first device parameter under the corresponding environmental state can be compared, so as to update the device control command when the target scene is triggered according to the third device parameter.
[0109] Under the above embodiments, on the one hand, the third device parameters obtained by clustering the second device parameters in the steady-state set of the scene can discover the user's device usage habits, so that the updated target scene is more in line with the user's true intention; on the other hand, pushing or creating new scenes for the third device parameters under various environmental conditions can proactively provide users with suggestions for optimizing instructions under various environmental conditions, which not only enhances the practicality of scene-based device control, but also greatly improves the user experience.
[0110] Please see Figure 4 This application provides an instruction optimization method, applicable to electronic devices, which may be... Figure 1 The user terminal 110 in the implementation environment is shown.
[0111] In the following method embodiments, for ease of description, the execution subject of each step of the method is an electronic device, but this does not constitute a specific limitation.
[0112] like Figure 4 As shown, the method may include the following steps:
[0113] Step 410: Display the instruction optimization data for the target scenario.
[0114] The target scenario is a device control method configured based on the linkage of multiple smart devices. The target scenario may include one or more device control commands; the command optimization data is used to indicate the updated device control commands.
[0115] Step 430: In response to the confirmation operation triggered by the instruction optimization data, a confirmation message is sent to the gateway or cloud, so that the gateway or cloud updates the device control instruction when the target scene is triggered based on the first device parameters of the target scene and the second device parameters in the scene steady-state set.
[0116] The first device parameter is generated by the intelligent device executing the initial actions configured in the target scene, and is used to indicate the device state of the intelligent device. The scene steady-state set includes the second device parameter over multiple scene observation periods. The second device parameter is generated by the intelligent device executing additional actions during a single scene observation period. The updated device control command is determined by the gateway or cloud based on the first device parameter of the target scene and the second device parameter in the scene steady-state set.
[0117] The confirmation message is used to confirm the update of the device control command when the target scenario is triggered. This confirmation message can be triggered by the user's terminal, causing the terminal to send the confirmation message to the gateway or the cloud. No specific restrictions are imposed here.
[0118] Furthermore, users can choose whether to update the device control commands when the target scenario is triggered. In one possible implementation, in response to an activation operation triggered by the command optimization function, a request is made to the gateway or cloud to mark that the command optimization function is enabled. Enabling the command optimization function means allowing the update processing of the device control commands when the target scenario is triggered.
[0119] Through the above process, the display command optimization data provides users with command optimization suggestions. If the user confirms the update, the gateway or cloud will update the device control commands when the target scenario is triggered. The user does not need to do much, only needs to trigger the confirmation operation. The remaining command optimization steps are automatically executed by the gateway or cloud, reducing the complexity of command optimization and thus improving the user experience.
[0120] Figure 5 This is a schematic diagram illustrating the specific implementation of an instruction optimization method in an application scenario.
[0121] In step 801, the target scenario is set, and device control commands are configured for the target scenario.
[0122] Enable the instruction optimization function via step 803.
[0123] In step 805, the target scene is triggered, and the first device parameters of the target scene are obtained.
[0124] Step 807 involves obtaining the second device parameters for the target scenario and determining the satisfaction level of the target scenario.
[0125] If the device control command when the satisfaction indicator target scenario is triggered needs to be updated, then the steady-state set of the target scenario is obtained through step 809.
[0126] Step 811 involves characterizing the environmental parameters to obtain the environmental state of the target scene.
[0127] Through step 813, based on the second device parameters in the environmental state and the scene steady state set, the third device parameters under various environmental states are obtained.
[0128] Step 815 involves detecting whether the parameters of the third device are the same under various environmental conditions and determining the confidence level corresponding to the parameters of the third device.
[0129] If the third device parameters are the same under various environmental conditions and the confidence level meets the set conditions, then the device control command when the target scene is triggered is updated based on the third device parameters in step 817.
[0130] If the third device is different under various environmental conditions and the confidence level meets the set conditions through step 819, then a new scenario will be pushed based on the parameters of the third device under various environmental conditions.
[0131] Receive feedback messages via step 821.
[0132] If the feedback message indicates that the creation of a new scene is permitted, step 823 is performed to create a new scene based on the third device parameters and store the created new scene.
[0133] In this application scenario, firstly, once the user enables the command optimization function, commands will be automatically optimized for the target scenario, reducing the number of optimization steps. Secondly, the availability of a steady-state set for the scenario is determined based on the user's satisfaction with the target scenario, enabling command optimization calculations to be performed only when the target scenario deviates from the actual situation, thus saving resources. Thirdly, device control commands are only updated when the confidence level of the third-party device parameters meets the set conditions, avoiding erroneous command optimization and making the results more accurate. Fourthly, third-party device parameters under various environmental conditions are obtained based on environmental parameters and the steady-state set of the scenario, making command optimization more intelligent, providing users with suggestions for creating new scenarios, increasing the practicality of using scenarios for device control, and improving the user experience.
[0134] The following are embodiments of the apparatus described in this application, which can be used to execute the instruction optimization method involved in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments of the instruction optimization method involved in this application.
[0135] See Figure 6This application provides an instruction optimization device 900, including but not limited to: a first parameter acquisition module 910, a second parameter acquisition module 930, and an instruction update module 950.
[0136] The first parameter acquisition module 910 is used to acquire the first device parameters of the target scene. The first device parameters are generated by the smart device executing the initial action configured in the target scene.
[0137] The second parameter acquisition module 930 is used to acquire the scene steady-state set of the target scene. The scene steady-state set includes the second device parameters generated during multiple scene observation periods. The second device parameters are generated by the intelligent device performing additional actions during a scene observation period.
[0138] The instruction update module 950 is used to update the device control instructions when the target scene is triggered based on the first device parameters and the second device parameters in the scene steady state set; the device control instructions are used to instruct the smart device to perform the corresponding initial actions.
[0139] In an exemplary embodiment, the instruction update module 950 includes: a characterization unit, configured to characterize environmental parameters when a target scene is triggered to obtain an environmental state corresponding to the target scene; a clustering unit, configured to cluster second device parameters in the scene steady-state set according to the obtained environmental state to obtain third device parameters in the corresponding environmental state; and an update unit, configured to associate the third device parameters with the action expected to be performed by the smart device in the corresponding environmental state; and to update the device control instruction when the target scene is triggered according to the third device parameters and the first device parameters in the corresponding environmental state.
[0140] In an exemplary embodiment, the instruction update module 950 is further configured to compare the differences between the third device parameters and the first device parameters under the corresponding environmental conditions to obtain a comparison result; and update the device control instruction when the target scene is triggered based on the comparison result.
[0141] In an exemplary embodiment, the instruction update module 950 is further configured to determine the confidence level corresponding to the third device parameter under the corresponding environmental state; the confidence level is determined based on the number of times the third device parameter appears within a preset time period, or based on the ratio between the number of times the third device parameter appears within the preset time period and the number of times the target scene is triggered; if the confidence level meets the set conditions, the device control instruction when the target scene is triggered is updated according to the third device parameter and the first device parameter under the corresponding environmental state.
[0142] In an exemplary embodiment, the instruction update module 950 is further configured to determine the scene steady-state set under various environmental states when there are multiple environmental states corresponding to the target scene; and for each environmental state, cluster the second device parameters in the determined scene steady-state set to obtain the third device parameters under the corresponding environmental state.
[0143] In an exemplary embodiment, the instruction update module 950 is further configured to detect whether the parameters of the third device are the same under various environmental conditions; if not, a new scene is created or pushed based on the parameters of the third device under various environmental conditions.
[0144] In an exemplary embodiment, the instruction update module 950 is further configured to receive a feedback message for the creation of a new scenario; if the feedback message indicates that the creation of a new scenario is permitted, then a new scenario is created based on the third device parameters, and the created new scenario is stored, so as to update the device control instruction when the new scenario is triggered based on the third device parameters of the new scenario.
[0145] In an exemplary embodiment, the instruction optimization device 900 is further configured to determine the satisfaction level of the target scenario based on the frequency of the smart device performing additional actions during multiple scenario observation periods; if the satisfaction level of the target scenario indicates that the device control instruction when the target scenario is triggered needs to be updated, then the steady-state set of the target scenario is obtained.
[0146] In an exemplary embodiment, the instruction optimization device 900 is further configured to determine a feedback quantity for a scene observation period within a set time period; the feedback quantity is used to indicate the number of times the smart device performs additional actions during the scene observation period; and the scene observation period is adjusted based on the feedback quantity.
[0147] In an exemplary embodiment, the instruction optimization device 900 is further configured to send an updated device control instruction to the corresponding smart device if the target scenario is triggered, so that the smart device performs an initial action in response to the updated device control instruction.
[0148] In an exemplary embodiment, the instruction optimization device 900 is further configured to detect whether the instruction optimization function is enabled; enabling the instruction optimization function means allowing the device control instructions to be updated when the target scene is triggered; if the instruction optimization function is detected to be enabled, the steady-state set of the target scene is obtained.
[0149] Please see Figure 7 This application provides another instruction optimization device 1000, including but not limited to: a data display module 1010 and a message sending module 1030.
[0150] The data display module 1010 is used to display the instruction optimization data of the target scene. The instruction optimization data is used to indicate the updated device control instructions. The updated device control instructions are determined by the gateway or cloud based on the first device parameters of the target scene and the second device parameters in the scene steady-state set. The first device parameters are generated by the smart device executing the initial action configured in the target scene and are used to indicate the device state of the smart device. The scene steady-state set includes the second device parameters within multiple scene observation periods. The second device parameters are generated by the smart device executing additional actions within one scene observation period.
[0151] The message sending module 1030 is used to send a confirmation message to the gateway or cloud in response to the confirmation operation triggered by the instruction optimization data, so that the gateway or cloud can update the device control instructions when the target scenario is triggered.
[0152] In one exemplary embodiment, the instruction optimization device 1000 is further configured to request the gateway or cloud to mark the instruction optimization function as enabled in response to an activation operation triggered for the instruction optimization function.
[0153] It should be noted that the instruction optimization device provided in the above embodiments is only illustrated by the division of the above functional modules when performing instruction optimization. In actual applications, the above functions can be assigned to different functional modules as needed. That is, the internal structure of the instruction optimization device will be divided into different functional modules to complete all or part of the functions described above.
[0154] Furthermore, the instruction optimization apparatus and instruction optimization method embodiments provided in the above embodiments belong to the same concept, and the specific way in which each module performs operations has been described in detail in the method embodiments, and will not be repeated here.
[0155] Figure 8 A schematic diagram of the structure of an electronic device is shown according to an exemplary embodiment. This electronic device is suitable for... Figure 1 The server 170 or gateway 150 in the implementation environment are shown.
[0156] It should be noted that this electronic device is merely an example adapted to this application and should not be construed as providing any limitation on the scope of use of this application. Furthermore, this electronic device should not be interpreted as requiring or depending on any specific feature. Figure 8 One or more components of the exemplary electronic device 2000 shown.
[0157] The hardware architecture of electronic devices 2000 can vary considerably due to differences in configuration or performance, such as... Figure 8As shown, the electronic device 2000 includes: a power supply 210, an interface 230, at least one memory 250, and at least one central processing unit (CPU) 270.
[0158] Specifically, power supply 210 is used to provide operating voltage for various hardware devices on electronic device 2000.
[0159] Interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. For example, to perform... Figure 1 The diagram illustrates the interaction between terminal 100 and electronic device 200 in the implementation environment.
[0160] Of course, in other examples adapted in this application, interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input / output interface 235, and at least one USB interface 237, etc. Figure 8 As shown, this does not constitute a specific limitation.
[0161] The memory 250 serves as a carrier for resource storage and can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it include the operating system 251, application programs 253, and data 255, etc., and the storage method can be temporary storage or permanent storage.
[0162] The operating system 251 is used to manage and control the various hardware devices and application programs 253 on the electronic device 2000, so as to enable the central processing unit 270 to perform calculations and processing on the massive data 255 in the memory 250. It can be Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0163] Application 253 is a computer-readable instruction based on operating system 251 that performs at least one specific task, and may include at least one module ( Figure 8 (Not shown), each module may contain computer-readable instructions for the electronic device 2000. For example, the instruction optimization device may be considered as an application program 253 deployed on the electronic device 2000.
[0164] Data 255 can be photos, pictures, etc. stored on a disk, or it can be first device parameters, scene steady-state sets, etc., stored in memory 250.
[0165] The central processing unit 270 may include one or more processors and is configured to communicate with the memory 250 via at least one communication bus to read computer-readable instructions stored in the memory 250, thereby performing operations and processing on the massive amounts of data 255 stored in the memory 250. For example, an instruction optimization method may be implemented by the central processing unit 270 reading a series of computer-readable instructions stored in the memory 250.
[0166] Furthermore, this application can also be implemented through hardware circuits or a combination of hardware circuits and software. Therefore, the implementation of this application is not limited to any specific hardware circuit, software, or combination thereof.
[0167] Please see Figure 9 , Figure 9 This is a schematic diagram illustrating the structure of a terminal according to an exemplary embodiment. The terminal is suitable for… Figure 1 The user terminal 110 in the implementation environment is shown.
[0168] It should be noted that this terminal is merely an example adapted to this application and should not be construed as providing any limitation on the scope of use of this application. Furthermore, this terminal should not be interpreted as requiring or depending on any specific feature. Figure 9 One or more components of the exemplary terminal 1100 shown.
[0169] like Figure 9 As shown, terminal 1100 includes memory 101, memory controller 103, and one or more ( Figure 9 (Only one is shown) Processor 105, peripheral interface 107, radio frequency module 109, positioning module 111, camera module 113, audio module 115, touch screen 117, and button module 119. These components communicate with each other through one or more communication buses / signal lines 121.
[0170] The memory 101 can be used to store computer-readable instructions, such as the computer-readable instructions corresponding to the instruction optimization method and apparatus in the exemplary embodiment of this application. The processor 105 executes various functions and data processing by running the computer-readable instructions stored in the memory 101, that is, it completes the instruction optimization method.
[0171] The memory 101, as a carrier for resource storage, can be random access memory, such as high-speed random access memory, non-volatile memory, such as one or more magnetic storage devices, flash memory, or other solid-state memory. The storage method can be temporary storage or permanent storage.
[0172] The peripheral interface 107 may include at least one wired or wireless network interface, at least one serial-to-parallel conversion interface, at least one input / output interface, and at least one USB interface, etc., for coupling various external input / output devices to the memory 101 and the processor 105 to realize communication with various external input / output devices.
[0173] The radio frequency module 109 is used to transmit and receive electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, thereby enabling communication with other devices through a communication network. The communication network includes cellular telephone networks, wireless local area networks, or metropolitan area networks, and these communication networks can use various communication standards, protocols, and technologies.
[0174] The positioning module 111 is used to obtain the current geographical location of the terminal 1100. Examples of positioning modules 111 include, but are not limited to, Global Positioning System (GPS), positioning technologies based on wireless local area networks or mobile communication networks.
[0175] The camera module 113 is part of the camera and is used to capture pictures or videos. The captured pictures or videos can be stored in the memory 101 or transmitted to the host computer via the radio frequency module 109.
[0176] The audio module 115 provides an audio interface to the user, which may include one or more microphone jacks, one or more speaker jacks, and one or more headphone jacks. Audio data is exchanged with other devices through the audio interface. Audio data can be stored in the memory 101 and can also be transmitted via the radio frequency module 109.
[0177] The touchscreen 117 provides an input / output interface between the terminal 1100 and the user. Specifically, the user can perform input operations through the touchscreen 117, such as clicking, touching, and swiping gestures, so that the terminal 1100 can respond to the input operations. The terminal 1100 then displays the output content, which can be text, images, or videos in any form or combination thereof, to the user through the touchscreen 117.
[0178] The button module 119 includes at least one button, providing an interface for users to input information into the terminal 1100. Users can press different buttons to enable the terminal 1100 to perform different functions. For example, the volume adjustment button allows users to adjust the volume of the sound played by the terminal 1100.
[0179] Understandable. Figure 9 The structure shown is for illustrative purposes only; terminal 1100 may also include components that are more advanced than those shown. Figure 9 The more or fewer components shown, or having the same Figure 9 The different components are shown. Figure 9 The components shown can be implemented using hardware, software, or a combination thereof.
[0180] Please see Figure 10 This application provides an electronic device 4000, which may include: a desktop computer, a laptop computer, a server, etc.
[0181] exist Figure 10 In this context, the electronic device 4000 includes at least one processor 4001 and at least one memory 4003.
[0182] The data interaction between the processor 4001 and the memory 4003 can be achieved through at least one communication bus 4002. This communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 10 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.
[0183] Optionally, the electronic device 4000 may further include a transceiver 4004, 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 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.
[0184] Processor 4001 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 4001 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.
[0185] The memory 4003 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an 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 or other magnetic storage devices, or any other medium capable of carrying or storing desired computer-readable instructions in the form of instructions or data structures and accessible by the electronic device 400, but not limited thereto.
[0186] The memory 4003 stores computer-readable instructions, and the processor 4001 can read the computer-readable instructions stored in the memory 4003 through the communication bus 4002.
[0187] The computer-readable instruction is executed by one or more processors 4001 to implement the instruction optimization methods in the above embodiments.
[0188] Furthermore, this application provides a storage medium storing computer-readable instructions that are executed by one or more processors to implement the instruction optimization method described above.
[0189] This application provides a computer program product including computer-readable instructions stored in a storage medium. One or more processors of an electronic device read the computer-readable instructions from the storage medium, load and execute the computer-readable instructions, thereby enabling the electronic device to implement the instruction optimization method described above.
[0190] Compared with related technologies, firstly, the scene steady-state set includes second device parameters generated during multiple scene observation periods. Updating the target scene based on the scene steady-state set makes the target scene more suitable for the actual situation, thus making device control based on the target scene more in line with the user's true intentions. Secondly, when the target scene deviates from the actual situation, the device control commands triggered by the target scene are automatically updated based on the first device parameters and the second device parameters in the scene steady-state set. This reduces the steps required for users to modify the target scene configuration, making command optimization simple and less cumbersome, thereby improving the user experience. Thirdly, pushing or creating new scenes based on the third device parameters under various environmental conditions can proactively provide users with suggestions for command optimization under various environmental conditions, greatly enhancing the practicality of scene-based device control.
[0191] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0192] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method of instruction optimization, characterized by, The method includes: Obtain the first device parameters of the target scene, wherein the first device parameters are generated by the smart device performing the initial action configured in the target scene; A steady-state set of the target scene is obtained, the steady-state set of the scene includes second device parameters generated during multiple scene observation periods; the second device parameters are generated by the intelligent device performing additional actions during one scene observation period; the scene observation period refers to the time period set after the target scene is triggered to observe whether the intelligent device in the target scene performs the additional actions; the additional actions refer to actions performed by the intelligent device in the target scene during the scene observation period that are different from the initial actions configured for the intelligent device in the target scene. The environmental parameters of the target scene are characterized when the target scene is triggered under different environmental states to obtain at least one environmental state corresponding to the target scene. The second device parameters in the steady-state set of the scenario are clustered according to at least one environmental state corresponding to the target scenario to obtain a third device parameter under at least one environmental state; the third device parameter is related to the action that the smart device is expected to perform under the environmental state corresponding to the target scenario; Based on the third device parameters and the first device parameters under at least one environmental state, the device control command when the target scene is triggered is updated; the device control command is used to instruct the smart device to perform corresponding initial actions.
2. The method as described in claim 1, characterized in that, The step of updating the device control command when the target scene is triggered based on the third device parameters under at least one environmental state and the first device parameters includes: The differences between the third device parameters and the first device parameters under the corresponding environmental conditions are compared to obtain the comparison results; Update the device control command when the target scenario is triggered based on the comparison result.
3. The method as described in claim 1, characterized in that, Before updating the device control command when the target scene is triggered based on the third device parameters and the first device parameters under at least one environmental state, the method further includes: For the third device parameter under the corresponding environmental condition, determine the confidence level corresponding to the third device parameter; the confidence level is determined based on the number of times the third device parameter appears within a preset time period, or based on the ratio between the number of times the third device parameter appears within the preset time period and the number of times the target scene is triggered; If the confidence level meets the set conditions, the device control command when the target scene is triggered is updated based on the third device parameters and the first device parameters under the corresponding environmental conditions.
4. The method as described in claim 1, characterized in that, The step of clustering the second device parameters in the steady-state set of the scenario based on at least one environmental state corresponding to the target scenario to obtain the third device parameters under at least one environmental state includes: When there are multiple environmental states corresponding to the target scene, determine the scene steady-state set under each environmental state; For each environmental state, the second device parameters in the determined steady-state set of the scenario are clustered to obtain the third device parameters under the corresponding environmental state.
5. The method as described in claim 4, characterized in that, After clustering the second device parameters in the determined scene steady-state set for each environmental state to obtain the third device parameters under the corresponding environmental state, the method further includes: The parameters of the third device are checked to see if they are the same under various environmental conditions. If not, then based on the third device parameters under various environmental conditions, a new scene will be created or pushed.
6. The method as described in claim 5, characterized in that, After creating or pushing new scenes based on the third device parameters under various environmental conditions, the method further includes: Receive feedback messages created for new scenarios; If the feedback message indicates that the creation of a new scene is allowed, then a new scene is created based on the third device parameters, and the created new scene is stored, so as to update the device control command when the new scene is triggered based on the third device parameters of the new scene.
7. The method according to any one of claims 1 to 6, characterized in that, Before obtaining the scene steady-state set of the target scene, the method further includes: The satisfaction level of the target scene is determined based on the frequency of additional actions performed by the intelligent device during multiple observation periods of the scene. If the satisfaction level of the target scenario indicates that the device control command triggered by the target scenario needs to be updated, then the steady-state set of the target scenario is obtained.
8. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Within a set time period, a feedback quantity is determined for the scene observation period; the feedback quantity is used to indicate the number of times the smart device is detected to perform additional actions during the scene observation period; Based on the feedback, the observation period for the scenario is adjusted.
9. The method according to any one of claims 1 to 6, characterized in that, After updating the device control command when the target scene is triggered based on the third device parameters and the first device parameters under at least one environmental state, the method further includes: If the target scenario is triggered, the updated device control command is sent to the corresponding smart device, causing the smart device to perform an initial action in response to the updated device control command.
10. The method according to any one of claims 1 to 6, characterized in that, Before obtaining the scene steady-state set of the target scene, the method further includes: Check whether the instruction optimization function is enabled; enabling the instruction optimization function means allowing the device control instructions to be updated when the target scene is triggered. If instruction optimization is detected to be enabled, the steady-state set of the target scene is obtained.
11. An instruction optimization method, characterized in that, The method includes: The display shows optimized instruction data for the target scenario, which is used to indicate updated device control instructions. The updated device control instructions are determined by a gateway or cloud based on first device parameters of the target scenario and third device parameters under at least one environmental state. The first device parameters are generated by the intelligent device executing an initial action configured in the target scenario and are used to indicate the device state of the intelligent device. The third device parameters are obtained by clustering second device parameters in the scenario steady-state set based on at least one environmental state corresponding to the target scenario. The third device parameters are related to the action expected to be executed by the intelligent device under the environmental state corresponding to the target scenario. The at least one environmental state corresponding to the target scenario is obtained by characterizing the environmental parameters when the target scenario is triggered under different environmental states. The scenario steady-state set includes the second device parameters generated during multiple scenario observation periods. The second device parameters are generated by the intelligent device executing an additional action during one scenario observation period. The scenario observation period refers to the time period set after the target scenario is triggered to observe whether the intelligent device in the target scenario executes the additional action. The additional action refers to an action executed by the intelligent device in the target scenario during the scenario observation period that is different from the initial action configured for the intelligent device in the target scenario. In response to the confirmation operation triggered by the data optimization for the instruction, a confirmation message is sent to the gateway or cloud, so that the gateway or cloud updates the device control instruction when the target scenario is triggered.
12. The method as described in claim 11, characterized in that, The method further includes: In response to an enable operation triggered by the instruction optimization function, the gateway or cloud is requested to mark the instruction optimization function as enabled.
13. An instruction optimization apparatus, characterized in that, The device includes: The first parameter acquisition module is used to acquire the first device parameters of the target scene. The first device parameters are generated by the smart device executing the initial action configured in the target scene. The second parameter acquisition module is used to acquire the scene steady-state set of the target scene, which includes second device parameters generated during multiple scene observation periods. The second device parameters are generated by the intelligent device performing additional actions during a single scene observation period. The scene observation period refers to the time period set after the target scene is triggered to observe whether the intelligent device in the target scene performs the additional actions. The additional actions refer to actions performed by the intelligent device in the target scene during the scene observation period that are different from the initial actions configured for the intelligent device in the target scene. The instruction update module is used to perform feature processing on the environmental parameters when the target scene is triggered under different environmental states to obtain at least one environmental state corresponding to the target scene; to cluster the second device parameters in the steady-state set of the scene according to the at least one environmental state corresponding to the target scene to obtain a third device parameter under the at least one environmental state; and to update the device control instruction when the target scene is triggered according to the third device parameter under the at least one environmental state and the first device parameter; the third device parameter is related to the action that the smart device is expected to perform under the environmental state corresponding to the target scene; and the device control instruction is used to instruct the smart device to perform the corresponding initial action.
14. An instruction optimization apparatus, characterized in that, The device includes: The data display module is used to display instruction optimization data for a target scenario. This instruction optimization data indicates updated device control instructions. The updated device control instructions are determined by a gateway or cloud based on first and third device parameters of the target scenario. The first device parameters are generated by the intelligent device executing an initial action configured in the target scenario and are used to indicate the device state of the intelligent device. The third device parameters are obtained by clustering second device parameters in the scenario steady-state set based on at least one environmental state corresponding to the target scenario. The third device parameters are related to the action expected to be executed by the intelligent device in the environmental state corresponding to the target scenario. The at least one environmental state corresponding to the target scenario is obtained by characterizing the environmental parameters when the target scenario is triggered in different environmental states. The scenario steady-state set includes the second device parameters generated during multiple scenario observation periods. The second device parameters are generated by the intelligent device executing an additional action during a single scenario observation period. The scenario observation period refers to the time period set after the target scenario is triggered to observe whether the intelligent device in the target scenario executes the additional action. The additional action refers to an action executed by the intelligent device in the target scenario during the scenario observation period that is different from the initial action configured for the intelligent device in the target scenario. The message sending module is used to send a confirmation message to the gateway or cloud in response to the confirmation operation triggered by the instruction optimization data, so that the gateway or cloud updates the device control instruction when the target scenario is triggered.
15. An electronic device, characterized in that, include: At least one processor and at least one memory, wherein, The memory stores computer-readable instructions; The computer-readable instructions are executed by one or more of the processors, causing the electronic device to implement the instruction optimization method as described in any one of claims 1 to 12.
16. A storage medium having computer-readable instructions stored thereon, characterized in that, The computer-readable instructions are executed by one or more processors to implement the instruction optimization method as described in any one of claims 1 to 12.
Citation Information
Patent Citations
Air conditioner adjusting method, server, terminal and system
CN115402057A
Scene adjustment method and device, storage medium and electronic device
CN115883273A
