Instruction optimization method and apparatus, and terminal and computer-readable storage medium

By obtaining and updating the device parameters and scene steady-state sets of smart devices, and using featureization and clustering technologies to optimize device control instructions, the cumbersome problem of the optimization process of device control instructions in IoT technology is solved, and the user experience and device control are improved Adaptability.

WO2024230698A1PCT designated stage expired Publication Date: 2024-11-14SHENZHEN LUMIUNITED TECH CO LTD

Patent Information

Application Number
PCT/CN2024/091493
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-08
Filing Date
2024-05-07
Publication Date
2024-11-14

AI Technical Summary

Technical Problem

In the Internet of Things technology, as the number of smart devices and scenarios increases, the optimization process of device control instructions becomes too cumbersome, reducing users' optimization enthusiasm and making it difficult to meet personalized needs and changes in user needs.

Method used

By obtaining the device parameters and scene steady-state set of the target scenario, updating and processing device control instructions, adjusting instructions according to the environment state using featureization and clustering technology, automatically optimizing device control instructions, reducing user modification steps and improving user experience.

Benefits of technology

The optimization process of equipment control instructions is simplified, making equipment control more in line with user intentions, reducing user operation complexity, and improving the practicality of user experience and device control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024091493_14112024_PF_FP_ABST
    Figure CN2024091493_14112024_PF_FP_ABST
Patent Text Reader

Abstract

An instruction optimization method and apparatus, and an electronic device and a computer-readable storage medium, which relate to the technical field of the Internet of Things. The instruction optimization method is executed by a control terminal, and comprises: acquiring a first device parameter of a target scenario (310), wherein the first device parameter is generated by an intelligent device executing an initial action configured in the target scenario; acquiring a scenario steady-state set of the target scenario (330), wherein the scenario steady-state set comprises second device parameters generated in a plurality of scenario observation periods, and the second device parameters are generated by the intelligent device executing an additional action in one scenario observation period; and according to the first device parameter, and the second device parameters in the scenario steady-state set, updating a device control instruction of when the target scenario is triggered (350), wherein the device control instruction is configured for instructing the intelligent device to execute the corresponding initial action.
Need to check novelty before this filing date? Find Prior Art

Description

Instruction optimization method, device, terminal and computer-readable storage medium

[0001] This disclosure claims priority to Chinese patent application CN202310511468.6, filed on May 8, 2023, entitled “Instruction Optimization Method, Device, Electronic Device and Computer-Readable Storage Medium,” the entire contents of which are hereby incorporated herein by reference. Technical Field

[0002] The present disclosure relates to the field of Internet of Things technology, and more specifically, to an instruction optimization method, device, electronic device, and computer-readable storage medium. Background Art

[0003] With the development of IoT technology, the methods for controlling smart devices in smart home networks are becoming increasingly diverse. In addition to device control methods for smart devices, there are also device control methods for various scenarios. Device control based on scenarios can reduce the steps of controlling multiple smart devices one by one, and different scenarios can be tailored to different user needs, making it more intelligent.

[0004] Currently, each smart device can configure a corresponding action in a scene. When the scene is triggered, the device control command instructing the smart device to perform the action is sent to the corresponding smart device, causing each smart device to perform the corresponding action in response to the device control command. Based on this, if you need to optimize the device control command, you need to modify the configuration in the scene.

[0005] However, as the number of scenes or the number of smart devices that need to configure initial actions in the scenes gradually increases, it will become increasingly difficult to modify the scene configuration. For users, the increased difficulty of modifying the scene configuration will reduce their enthusiasm for optimizing device control instructions.

[0006] From the above, we can see that the device control instruction optimization process is too cumbersome and has become a problem that needs to be solved urgently.

[0007] Summary of the Invention

[0008] The embodiments of the present disclosure provide an instruction optimization method, apparatus, electronic device, and computer-readable storage medium. The technical solution is as follows:

[0009] According to one aspect of the present disclosure, an instruction optimization method is executed by a control end, and the method includes: obtaining a first device parameter of a target scene, the first device parameter is generated by an intelligent device executing an initial action configured in the target scene; obtaining a scene steady-state set of the target scene, the scene steady-state set including a second device parameter generated during multiple scene observation periods; the second device parameter is generated by the intelligent device executing an additional action during one scene observation period; and updating the device control instruction when the target scene is triggered according to the first device parameter and the second device parameter in the scene steady-state set; the device control instruction is used to instruct the intelligent device to execute the corresponding initial action.

[0010] According to one aspect of the present disclosure, an instruction optimization device includes: a first parameter acquirer for acquiring a first device parameter of a target scene, wherein the first device parameter is generated by an intelligent device executing an initial action configured in the target scene; a second parameter acquirer for acquiring a scene steady-state set of the target scene, wherein the scene steady-state set includes second device parameters generated during multiple scene observation periods; the second device parameter is generated by the intelligent device executing an additional action during one scene observation period. An instruction updater is used to update the device control instruction when the target scene is triggered based on the first device parameter and the second device parameter in the scene steady-state set; the device control instruction is used to instruct the intelligent device to execute the corresponding initial action.

[0011] In an exemplary embodiment, the instruction updater includes: a characterization unit, used to characterize the environmental parameters when the target scene is triggered to obtain the environmental state corresponding to the target scene; a clustering unit, used to 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; the third device parameters are related to the actions that the smart device is expected to perform in the corresponding environmental state; and an updating unit, used to update the device control instructions when the target scene is triggered based on the third device parameters and the first device parameters under the corresponding environmental state.

[0012] In an exemplary embodiment, the instruction updater is further used to compare the differences between the third device parameters and the first device parameters under corresponding environmental states to obtain comparison results; and update the device control instructions when the target scene is triggered according to the comparison results.

[0013] In an exemplary embodiment, the instruction updater is further used 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; if the confidence level meets the set conditions, the device control instruction when the target scene is triggered is updated based on the third device parameter and the first device parameter under the corresponding environmental state.

[0014] In an exemplary embodiment, the instruction updater is further used to determine the confidence level corresponding to the third device parameter under the corresponding environmental state; the confidence level is determined based on the ratio between the number of times the third device parameter appears within a 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 based on the third device parameter and the first device parameter under the corresponding environmental state.

[0015] In an exemplary embodiment, the instruction updater is further used to determine a scene steady-state set under various environmental states when there are multiple environmental states corresponding to the target scene; for each environmental state, the second device parameters in the determined scene steady-state set are clustered to obtain the third device parameters under the corresponding environmental state.

[0016] In an exemplary embodiment, the instruction updater is further configured to detect whether the third device parameters under various environmental states are the same; if not, a new scene is pushed based on the third device parameters under various environmental states.

[0017] In an exemplary embodiment, the instruction updater is further configured to create a new scene based on the third device parameters under various environmental states if it is detected that the third device parameters under various environmental states are different.

[0018] In an exemplary embodiment, the instruction updater is further used to receive a feedback message regarding the creation of a new scene; if the feedback message indicates that the creation of a new scene is allowed, a new scene is created based on the third device parameter, and the created new scene is stored to update the device control instruction when the new scene is triggered based on the third device parameter of the new scene.

[0019] In an exemplary embodiment, the instruction optimization device is also used 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 instructions when the target scene is triggered need to be updated, then the scene steady-state set of the target scene is obtained.

[0020] In an exemplary embodiment, the instruction optimization device is further used to determine the feedback amount for the scene observation period within a set time period; the feedback amount is used to indicate the number of times the smart device is detected to perform additional actions during the scene observation period; and the scene observation period is adjusted based on the feedback amount.

[0021] In an exemplary embodiment, the instruction optimization device is further configured to send the 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.

[0022] In an exemplary embodiment, the instruction optimization device is also used to detect whether the instruction optimization function is turned on; turning on the instruction optimization function means allowing the device control instructions to be updated when the target scene is triggered; if it is detected that the instruction optimization function is turned on, the scene steady-state set of the target scene is obtained.

[0023] According to one aspect of the present disclosure, a method for instruction optimization is performed by a user end, and the method includes: displaying instruction optimization data of a target scene, the instruction optimization data being used to indicate device control instructions after update processing; the device control instructions after update processing are determined by the control end 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 executing an initial action configured in the target scene, and is used to indicate a device state of the intelligent device; the scene steady-state set includes the second device parameter within multiple scene observation periods; the second device parameter is generated by the intelligent device executing an additional action within a scene observation period; in response to a confirmation operation triggered by the instruction optimization data, a confirmation message is sent to the control end, so that the control end updates the device control instructions when the target scene is triggered.

[0024] According to one aspect of the present disclosure, an instruction optimization device includes: a data display for displaying instruction optimization data of a target scene, the instruction optimization data being used to indicate device control instructions after update processing; the device control instructions after update processing are determined by a control end 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 executing an initial action configured in the target scene, and is used to indicate a device state of the intelligent device; the scene steady-state set includes the second device parameter within multiple scene observation periods; the second device parameter is generated by the intelligent device executing an additional action within a scene observation period; a message sender is used to send a confirmation message to the control end in response to a confirmation operation triggered by the instruction optimization data, so that the control end updates the device control instructions when the target scene is triggered.

[0025] In an exemplary embodiment, the instruction optimization device is further configured to, in response to a start operation triggered for the instruction optimization function, request the control end to mark the instruction optimization function as turned on.

[0026] According to one aspect of the present disclosure, an electronic device includes at least one processor and at least one memory, wherein a computer program is stored in the memory; the computer program is executed by one or more of the processors, so that the electronic device implements the instruction optimization method as described above.

[0027] According to one aspect of the present disclosure, a computer-readable storage medium stores a computer program thereon, and the computer program is executed by one or more processors to implement the instruction optimization method as described above.

[0028] According to one aspect of the present disclosure, a computer program product includes a computer program, which is stored in a computer-readable storage medium. One or more processors of an electronic device read the computer program from the computer-readable storage medium, load and execute the computer program, so that the electronic device implements the instruction optimization method as described above.

[0029] The beneficial effects brought about by the technical solution provided by the present disclosure are:

[0030] In the above technical solution, 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 can make 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 instructions when the target scene is triggered are automatically updated based on the first device parameters and the second device parameters in the scene steady-state set, which can reduce the steps for users to modify the target scene configuration, making the instruction optimization operation simple and not cumbersome, thereby improving the user experience, and then effectively solving the problem of the overly cumbersome device control instruction optimization process existing in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] To more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for describing the embodiments of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can also derive other drawings based on these drawings without inventive effort.

[0032] FIG1 is a schematic diagram of an implementation environment according to the present disclosure;

[0033] FIG2 is a flow chart showing an instruction optimization method according to an exemplary embodiment;

[0034] FIG3 is a flow chart of an instruction updating method according to an exemplary embodiment;

[0035] FIG4 is a flow chart showing another instruction optimization method according to an exemplary embodiment;

[0036] FIG5 is a schematic diagram of a specific implementation of an instruction optimization method in an application scenario;

[0037] FIG6 is a structural block diagram of an instruction optimization device according to an exemplary embodiment;

[0038] FIG7 is a structural block diagram of another instruction optimization device according to an exemplary embodiment;

[0039] FIG8 is a hardware structure diagram of an electronic device according to an exemplary embodiment;

[0040] FIG9 is a hardware structure diagram of a terminal according to an exemplary embodiment;

[0041] Fig. 10 is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0042] The following describes in detail embodiments of the present disclosure, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present disclosure and are not to be construed as limiting the present disclosure.

[0043] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be understood that the term "comprising" used in the specification of the present disclosure refers to the presence of the 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 refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any units and all combinations of one or more associated listed items.

[0044] As mentioned above, as the number of scenes or the number of smart devices that need to configure initial actions in scenes increases, modifying scene configurations will become increasingly difficult.

[0045] Taking smart home as an example, there are a large number of scene-based device linkage control services in smart home. For example, the target scene is configured as [turn on the air conditioner to cool to 26°C when there are people and the temperature is above 28°C]. Among them, the trigger condition for triggering the target scene is "there are people and the temperature is above 28°C". Then, when the trigger condition is met, the target scene can be automatically triggered, and the device control instruction "turn on the cooling mode of the air conditioner and set it to 26°C" can be sent to the air conditioner, so that the air conditioner is turned on and cooled to 26°C.

[0046] The device linkage control service greatly simplifies the steps for users to control devices. However, each user has different adaptability to different environmental conditions and device usage habits. Some users may feel hot only at 29°C, while others are accustomed to setting the air conditioner to 22°C. Therefore, device linkage control needs to be adaptively adjusted to meet the needs of different users. If the target scene also configures device linkage control for other smart devices, the user must find the device linkage control for the air conditioner among the several device linkage controls configured in the target scene and modify its trigger condition to "person present and temperature above 29°C", or modify its device control instruction to "turn on the air conditioner's cooling mode and set it to 22°C."

[0047] However, since there are many scenes in a smart home, and there may be linkage control between several smart devices in the scene, if the user wants to adjust the target scene, he not only needs to find the target scene among several scenes to adjust the device control instructions in the target scene according to his expectations, but also needs to consider the connection relationship between each smart device when adjusting the device control instructions.

[0048] Therefore, the steps for optimizing the device control instructions are cumbersome and difficult to optimize, resulting in most users not having a strong motivation to modify the configuration of the device linkage control after configuration. The device linkage control that cannot be adaptively adjusted can neither meet personalized needs nor meet changes in user needs.

[0049] As can be seen from the above, the related art still has the defect that the device control instruction optimization process is too complicated.

[0050] To this end, the instruction optimization method provided by the present invention can effectively reduce the steps during instruction optimization and simplify the instruction optimization operation. Accordingly, the instruction optimization method is suitable for an instruction optimization device, which can be deployed in an electronic device. For example, the electronic device can be a computer device configured with a von Neumann architecture, and the computer device includes a desktop computer, a laptop computer, a server, etc. It can also be an electronic device with a central control function, for example, the electronic device can be a gateway, etc.

[0051] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0052] Figure 1 is a schematic diagram of an 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 devices. In Figure 1, the network devices include a gateway 150 and a router 190, although this is not intended to be a specific limitation.

[0053] Among them, the user terminal 110, which can also be considered as a user end or terminal, can deploy (also understood as install) the client associated with the smart device 130. This user terminal 110 can be an electronic device such as a smart phone, tablet computer, laptop computer, desktop computer, smart control panel, other devices with display and control functions, etc., which are not limited here.

[0054] Among them, the client is associated with the smart device 130. In essence, the user registers an account in the client and configures the smart device 130 in the client. For example, the configuration includes adding a device identifier to the smart device 130, so that when the client is run in the user terminal 110, it can provide the user with device display, device control and other functions about the smart device 130. This client can be in the form of an application or a web page. Accordingly, the interface for device display on the client can be in the form of a program window or a web page, which is not limited here.

[0055] The smart device 130 is deployed in the gateway 150 and communicates with the gateway 150 through its own configured communication module, thereby being controlled by the gateway 150. It should be understood that the smart device 130 generally refers to one of the multiple smart devices 130. The embodiments of the present disclosure only use the smart device 130 as an example. That is, the embodiments of the present disclosure do not limit the number and device types of smart devices deployed in the gateway 150.

[0056] In one application scenario, smart device 130 accesses gateway 150 via a local area network and is thus deployed in gateway 150. The process of smart device 130 accessing gateway 150 via a local area network includes: gateway 150 first establishing a local area network, and smart device 130 joining the local area network established by gateway 150 by connecting to gateway 150. This local area network includes, but is not limited to, ZIGBEE or Bluetooth. Smart device 130 may be a smart printer, smart fax machine, smart camera, smart air conditioner, smart door lock, smart light, or a human body sensor equipped with a communication module, door and window sensor, temperature and humidity sensor, water immersion sensor, natural gas alarm, smoke alarm, wall switch, wall socket, wireless switch, wireless wall switch, magic cube controller, curtain motor, millimeter wave radar, etc.

[0057] The interaction between the user terminal 110 and the smart device 130 can be achieved through a local area network or a wide area network. In one application scenario, the user terminal 110 establishes a communication connection between the router 190 and the gateway 150 by means of a wired or wireless method. For example, the wired or wireless method includes but is not limited to WIFI, so that the user terminal 110 and the gateway 150 are deployed in the same local area network, thereby enabling the user terminal 110 to interact with the smart device 130 through the local area network path. In another application scenario, the user terminal 110 establishes a communication connection between the server 170 and the gateway 150 by means of a wired or wireless method. For example, the wired or wireless method includes but is not limited to 2G, 3G, 4G, 5G, WIFI, etc., so that the user terminal 110 and the gateway 150 are deployed in the same wide area network, thereby enabling the user terminal 110 to interact with the smart device 130 through the wide area network path.

[0058] The server side 170 can also be considered as a cloud, cloud platform, platform side, service side, etc. The server side 170 can be a single server, a server cluster composed of multiple servers, or a cloud computing center composed of multiple servers, so as to better provide backend services to a large number of user terminals 110. For example, the backend service includes an instruction optimization service.

[0059] In an application scenario, the server 170 obtains a first device parameter and a device steady-state value of a target scene, and updates a device control instruction when the target scene is triggered according to the first device parameter and a second device parameter in the scene steady-state set.

[0060] In another application scenario, the user terminal 110 displays the instruction optimization data of the target scene to show the user the updated device control instructions. If the user confirms to optimize the instructions, the user terminal 110 sends a confirmation message to the server 170, so that the server 170 updates the device control instructions when the target scene is triggered.

[0061] Please refer to FIG2 . An embodiment of the present disclosure provides an instruction optimization method, which is executed by a control end. The control end may be applicable to an electronic device, which may be the gateway 150 or the server end 170 in the implementation environment shown in FIG1 .

[0062] In the following method embodiments, for ease of description, the execution subject of each step of the method is taken as an electronic device as an example for illustration, but this does not constitute a specific limitation.

[0063] As shown in FIG2 , the method may include the following steps:

[0064] Step 310: Acquire first device parameters of the target scene.

[0065] First, a target scene is a device control method that allows multiple smart devices to be linked and configured. A target scene can include one or more device control instructions. When a target scene is triggered, each device control instruction is sent to the corresponding smart device, causing the smart device to execute the initial action configured in the target scene. For example, if the configured target scene is a homecoming scene, that is, "If someone is in the hallway, turn on the living room lights, hallway lights, and living room air conditioner," when the homecoming scene is triggered, the living room lights and hallway lights will turn on, and at the same time, the living room air conditioner will turn on.

[0066] 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 that the first device parameter indicates the device state of the smart device after executing the initial action. For example, in the target scenario "Home Scenario," the initial action configured for the living room air conditioner is "Turn on cooling mode, cooling to 23°C." Accordingly, the device control instruction is "Turn on cooling mode, cooling to 23°C." When the Home Scenario is triggered, this device control instruction is sent to the living room air conditioner, causing it to execute the action "Turn on cooling mode, cooling to 23°C." Thus, the first device parameter indicates that the device state of the living room air conditioner after executing the initial action is "Cooling mode, temperature 23°C." A target scenario can include multiple device control instructions. When the target scenario is triggered, each device control instruction is sent to the corresponding smart device, causing it to execute the initial action. Consequently, when multiple smart devices execute the initial action, multiple corresponding first device parameters are generated. Using the Home Scenario as an example, when the Home Scenario is triggered, three first device parameters are generated, indicating "Living room light on," "Entrance hall light on," and "Living room air conditioner on."

[0067] Of course, the number of first device parameters when different target scenes are triggered may be different, and may be determined by the number of device control instructions configured in the target scene, which is not specifically limited here.

[0068] Step 330: Acquire a scene steady-state set of the target scene.

[0069] The scenario steady-state set includes second device parameters generated over multiple scenario observation periods. These second device parameters are generated by the smart device performing additional actions during a single scenario observation period. An additional action is a different action than the initial action configured for the smart device in the target scenario that the smart device performs during the scenario observation period.

[0070] When the target scene is triggered, the initial action performed by the smart device configured in the target scene may not meet the user's expectations. For example, the current ambient temperature drops, and the "turn on cooling mode for the living room air conditioner" is configured in the home scene. In other words, the initial action "turn on cooling mode" configured for the living room air conditioner in the home scene does not conform to the actual situation. Based on this, the user manually turns off the living room air conditioner soon after the home scene is triggered. Among them, the user manually turning off the living room air conditioner is regarded as an additional action performed by the living room air conditioner during a scene observation period, and the second device parameter generated thereby can be "turn off the living room air conditioner". It can be understood that the second device parameter is not generated every time the target scene is triggered. If the smart device does not perform any additional actions during the scene observation period, accordingly, there will be no corresponding second device parameter when the target scene is triggered.

[0071] The scene observation period refers to the time period set after the target scene is triggered to observe whether the smart device in the target scene performs additional actions. For example, the scene observation period can 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 has performed 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 has performed additional manual control on the smart device during multiple scene observation periods, it means that the device control based on the target scene does not meet the user's expectations.

[0072] It is worth mentioning that the length of the scene observation period can affect the accuracy of instruction optimization. Since the second device parameters are generated by the smart device performing additional actions during a scene observation period, if the scene observation period is too short, the smart device has not yet performed the additional action, and the scene observation period has ended, then it is impossible to understand the user's attitude towards the target scene configuration, resulting in the inability to smoothly and accurately optimize the instructions; on the contrary, if the scene observation period is too long, it may cause the second device parameters in the scene steady-state concentration to contain a lot of unreliable information. For example, after the target scene is triggered, the time changes from evening to morning. Due to the influence of sunlight, the user turns off the light device in the target scene. The user turning off the light device is a normal device control. If the scene observation period is extended indefinitely, turning off the light device is also considered to be the light device performing an additional action during a scene observation period to generate the second device parameter. Then, the instruction optimization based on the second device parameter will misunderstand the user's intention, resulting in errors in the instruction optimization results.

[0073] As can be seen from the above, no matter which of the above situations is concerned, it is possible to cause inaccurate instruction optimization results. For this reason, in one possible implementation method, the adjustment of the scene observation period may include the following steps: determining the feedback amount for the scene observation period within a set time period; adjusting the scene observation period based on the feedback amount. The feedback amount is used to indicate the number of times the smart device performs additional actions during 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 during the scene observation period is abnormally small, the scene observation period can be appropriately extended after determining that the cause of the abnormality is due to the scene observation period being too short; when the feedback amount indicates that the number of times the smart device performs additional actions during the scene observation period is abnormally frequent, the scene observation period can be appropriately shortened after determining that the cause of the abnormality is due to the scene observation period being too long, so as to better understand the user's true intentions and accurately optimize instructions.

[0074] Furthermore, different scene observation periods can be set for different users to accommodate their device usage habits. For example, if user A quickly exercises additional manual control over the smart device when the target scene doesn't meet their expectations, their scene observation period can be set shorter. Conversely, user B, when the target scene doesn't meet their expectations, waits for a while before exercising additional manual control over the smart device. Accordingly, their scene observation period can be set longer. Thus, by setting scene observation periods that better suit different users' device usage habits, we can better understand their true intentions and make the instruction optimization function more intelligent.

[0075] Of course, the electronic device can always detect whether the corresponding device control instructions need to be updated when the target scene is triggered, or it can update the device control instructions when the target scene is triggered according to the indication. In one possible implementation method, the indication is realized by whether the instruction optimization function is turned on, wherein the turning on of the instruction optimization function means allowing the device control instructions when the target scene is triggered to be updated. Specifically, detect whether the instruction optimization function is turned on; if it is detected that the instruction optimization function is turned on, it means that the device control instructions when the target scene is triggered are allowed to be updated, then the scene steady-state set of the target scene is obtained, so that the corresponding device control instructions need to be updated based on the scene steady-state set of the target scene; otherwise, if it is detected that the instruction optimization function is turned off, it means that the device control instructions when the target scene is triggered are not allowed to be updated, then there is no need to obtain the scene steady-state set of the target scene, and the device control instructions are directly sent to the corresponding smart device, so that the smart device performs the corresponding initial action.

[0076] In this way, you can flexibly set whether to enable the instruction optimization function according to the actual needs of the application scenario. For example, in an application scenario with limited resources, you can turn off the instruction optimization function. At this time, the scene steady-state set of the target scene will not be obtained to avoid instruction optimization calculations, thereby reducing resource usage.

[0077] It should be noted that when a smart device performs additional actions during a scene observation period, it may indicate that the initial action performed by the smart device after the target scene is triggered does not meet the user's expectations, but it does not mean that the user is dissatisfied with the configuration of the target scene. For example, the weather suddenly turns cold, and the target scene includes a device control instruction to turn on the air conditioning cooling mode. When the target scene is triggered, the user manually controls the air conditioner to increase the temperature during the scene observation period. The cold weather this time is a temporary temperature change, and the user's operation is only for the target scene that is triggered this time. In other words, based on the number and / or frequency of additional actions performed by the smart device during multiple scene observation periods, it can be indicated whether the user is satisfied with the configuration of the target scene, and thus it can be decided whether to optimize the instructions.

[0078] Based on this, in one possible implementation, whether to update the device control instructions when the target scene is triggered is determined by the satisfaction of the target scene. Specifically, the following steps may be included: 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 instructions when the target scene is triggered need to be updated, then obtaining the scene steady-state set of the target scene.

[0079] The satisfaction level indicates how often the smart device performs additional actions within multiple scene observation periods. This can refer to the number of times and / or the frequency. 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%.

[0080] It should be understood that the higher the frequency with which the smart device performs additional actions during multiple scene observation periods and the lower the satisfaction with the target scene, the greater the need to update the device control instructions when the target scene is triggered. For example, when the satisfaction with the target scene is 50%, the device control instructions when the target scene is triggered can be updated or not; when the satisfaction with the target scene is 20%, there is a need to update the device control instructions when the target scene is triggered, otherwise the initial action configured for the smart device in the target scene may not meet user expectations.

[0081] Based on this, a threshold can be set for satisfaction. When the satisfaction is lower than the threshold, it is determined that the device control instructions need to be updated when the target scene is triggered. 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 given here.

[0082] To sum up, the satisfaction level of the target scene is used to determine whether to update the device control instructions when the target scene is triggered. On the one hand, when the device control instructions do not meet the requirements when the target scene is triggered, they can be updated in time, making the target scene more practical and in line with actual needs; on the other hand, it avoids obtaining and analyzing the scene steady-state set every time the smart device performs an additional action, which can effectively reduce the amount of calculation and save resources.

[0083] Step 350 : updating the device control instruction when the target scene is triggered according to the first device parameter and the second device parameter in the scene steady-state set.

[0084] The device control instruction is used to instruct the smart device to perform the corresponding initial action.

[0085] It should be noted that since the second device parameters are obtained by the smart device performing additional actions during a scene observation period, the second device parameters in the scene steady-state set can reflect the user's device usage habits, and the first device parameters are generated by the smart device performing the initial action configured in the target scene. That is to say, the first device parameters are related to the device control instructions when the target scene is triggered. Therefore, the device control instructions 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.

[0086] For example, target scene A includes multiple device control instructions such as turning on the living room air conditioning 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 scene observation period after the target scene A is triggered multiple times, then the second device parameter of the living room TV being turned off will be recorded during the scene observation period. When optimizing the instructions, the electronic device can update the device control instructions corresponding to the target scene A based on the above second device parameters. That is to say, the new device control instruction of "turning off the living room TV" can be used to update the device control instruction of "turning on the living room TV" in the target scene A.

[0087] Of course, the target scene is configured based on the linkage of multiple smart devices. If the target scene is triggered, during the scene observation period, the user manually controls the multiple smart devices configured for the target scene to perform additional actions. Accordingly, multiple second device parameters will be obtained, and each second device parameter corresponds to an additional action performed by a different smart device during the scene observation period. Then, in one possible implementation, based on the second device parameters corresponding to each smart device during multiple scene observation periods, the device control instructions corresponding to when the target scene is triggered are updated. It can be understood that based on the second device parameters corresponding to each smart device during multiple scene observation periods, the electronic device can directly update the device control instructions corresponding to when the target scene is triggered to obtain an updated target scene; or it can first obtain the updated content of the target scene based on the second device parameters, and then push the updated content of the target scene to the user for confirmation. After obtaining the user's confirmation instruction, the device control instructions corresponding to when the target scene is triggered are updated.

[0088] Taking target scene 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 scene observation period after A is triggered multiple times, then the electronic device can be based on the second device parameters corresponding to the living room TV and the living room air purifier respectively. That is, the new device control instruction of "turning off the living room TV" can be used to update the device control instruction of "turning on the living room TV" in target scene A. In addition, a new device control instruction of "turning on the living room air purifier" can also be added to target scene A.

[0089] After completing instruction optimization for the target scene, when the target scene is triggered, the updated device control instruction can be sent to the corresponding smart device, so that the smart device performs an initial action in response to the updated device control instruction.

[0090] 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 can make 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 instructions when the target scene is triggered are automatically updated based on the first device parameters and the second device parameters in the scene steady-state set, which can reduce the steps for users to modify the target scene configuration, making the instruction optimization operation simple and not cumbersome, thereby increasing the user experience.

[0091] Referring to FIG. 3 , in an exemplary embodiment, step 350 may include the following steps:

[0092] Step 351 : Characterize the environmental parameters when the target scene is triggered to obtain the environmental state corresponding to the target scene.

[0093] Environmental parameters are used to indicate the actual environmental conditions when the target scenario is triggered. Environmental parameters can be acquired by smart sensors deployed in the IoT or by smart devices deployed in the target scenario, without limitation. For example, a temperature sensor in the IoT detects an actual ambient temperature of 26°C, and a humidity sensor detects a relative humidity of 75%.

[0094] Characterization processing refers to determining the actual environmental characteristics of the target scene based on different environmental parameters. This involves converting continuous environmental parameters into discrete environmental states, allowing the environmental parameters to have distinct characteristics. For example, for the time parameter in the environmental parameter, each continuous time point is converted into a discrete time period: morning (6:00-11:00), noon (11:00-1:00), afternoon (1:00-19:00), evening (19:00-1:00), and early morning (1:00-6:00). For another example, for the temperature value in the environmental parameter, each continuous temperature value is converted into a discrete temperature representation: low temperature (below 18°C), comfortable (18°C-26°C), and high temperature (above 26°C).

[0095] Step 353 : Cluster the second device parameters in the scene steady-state set according to the obtained environmental state to obtain third device parameters under the corresponding environmental state.

[0096] The third device parameter is related to an action that the smart device is expected to perform in the corresponding environmental state.

[0097] It can be understood that if the electronic device clusters the second device parameters in the scene steady-state set for each environmental parameter, since 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, it is difficult to determine the corresponding third device parameter for one of the environmental parameters; and 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 intentions, which will cause inaccurate instruction optimization results.

[0098] Based on this, the environmental parameters are used for characterization processing to obtain the environmental state of the target scene. Since the environmental state corresponds to multiple environmental parameters, there are many second device parameters in this environmental state. Then, clustering the second device parameters in this environmental state can fully explore the device usage patterns of users 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.

[0099] It should be noted that clustering methods such as hierarchical method, density algorithm, graph theory clustering method, grid algorithm, etc. can be used to cluster the second device parameters in the scene steady-state set, which is not specifically limited here.

[0100] For example, the second device parameters in the scene steady-state set under environment state A include a, a, a, a, a, a, b, b, c, c, c, d; the second device parameters in the scene steady-state set under environment state B include a, a, a, b, b, b, b, b, c, d, d, where different letters indicate that the smart device performs different additional actions; the second device parameters under environment state A are clustered, and the clustering result obtained is a, which is the third device parameter of environment state A; the second device parameters under environment state B are clustered, and the clustering result obtained is b, and similarly, b is the third device parameter of environment state B.

[0101] It should be noted that the target scene may be triggered under different environmental states. Therefore, there may be multiple environmental states corresponding to the target scene. It can be understood that the additional actions performed by the smart devices configured in the target scene in different environmental states may reflect the user's device usage habits in different environmental states.

[0102] Then, in order to understand the user's device usage habits under different environmental states, so that the device control instructions when the target scene is triggered are more in line with the user's true intentions, in one possible implementation method, clustering the second device parameters in the scene steady-state set can also include the following steps: when there are multiple environmental states corresponding to the target scene, determining the scene steady-state sets under various environmental states; for each environmental state, clustering the second device parameters in the determined scene steady-state set respectively to obtain the third device parameters under the corresponding environmental state.

[0103] Among them, the third device parameters under each environmental state can be regarded as the actions that the user expects to perform on each smart device configured in the target scene when the target scene is triggered under the environmental state. Of course, if the third device parameters under each environmental state obtained by clustering are the same, it can be said that there is no difference in the actions that the user expects to perform on each smart device in the target scene between each environmental state, that is, the user has the same device usage habits in different environmental states. On the contrary, if the third device parameters under each environmental state are different, it can be said 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 has different device usage habits in different environmental states.

[0104] Based on this, in one possible implementation, it is detected whether the third device parameters in various environmental states are the same; if not, a new scene is created or pushed based on the third device parameters in various environmental states.

[0105] It should be noted that the electronic device can directly create a new scene based on the third device parameters under various environmental states, or push it to the user, and the user decides whether to create a new scene. This is not limited here.

[0106] 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 regarding the creation of a new scene; if the feedback message indicates that the creation of a new scene is allowed, creating a new scene based on a third device parameter, and storing the created new scene to update the device control instructions when the new scene is triggered based on the third device parameter of the new scene.

[0107] It is understood that the created new scenarios can cover the actions that users expect to be performed on various smart devices in various environmental conditions. In short, the created new scenarios can meet actual needs and conform to the user's true intentions in different environmental conditions. The number of created new scenarios can be one or more, depending on the parameters of the third device.

[0108] Step 355 : updating the device control instruction when the target scene is triggered according to the third device parameter and the first device parameter under the corresponding environmental state.

[0109] First of all, it should be noted that the third device parameters under 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 under the environmental state. Based on this, the third device parameters can be used to update the corresponding device control instructions in the target scene.

[0110] In one possible implementation, updating the device control instructions when a target scenario is triggered may include the following steps: comparing the difference 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 instructions when the target scenario is triggered based on the comparison result. For example, the first device parameters indicate that the living room air conditioner is on, the operating mode is cooling 24°C, the living room lights are on, and the living room TV is on, and the third device parameters indicate that the living room air conditioner is on, the operating mode is cooling 22°C, the living room lights are on, and the living room TV is on; comparing the two, the comparison result indicates that there is a difference between the first device parameters and the third device parameters in the execution action of the living room air conditioner, and thus, based on the comparison result, updating the device control instructions when the target scenario is triggered.

[0111] It should be noted that the third device parameter is obtained by clustering the second device parameters. If the second device parameter appears less frequently, for example, the target scene is triggered 20 times, the second device parameters recorded in the scene steady-state set are a, b, b, b, c, and d, where different letters represent different additional actions of the smart device. If the above-mentioned 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, and b appears only 3 times. In other words, the clustering result is not significant. If the device control instructions when the target scene is triggered are updated according to the third device parameter b, the target scene will not conform to the user's true intention.

[0112] Based on this, in one possible implementation, before updating the device control instructions when the target scene is triggered according to the third device parameters, the following steps may also be included: determining the confidence level corresponding to the third device parameters for the corresponding environmental state; if the confidence level meets the set conditions, comparing the difference between the third device parameters and the first device parameters for the corresponding environmental state, and updating the device control instructions when the target scene is triggered according to the third device parameters and the first device parameters for the corresponding environmental state.

[0113] The confidence level is determined based on the number of times the target scenario appears within a preset time period when the third device parameter is used, or based on the ratio between the number of times the target scenario appears within a preset time period and the number of times the target scenario is triggered when the third device parameter is used. It should be understood that when the confidence level of the third device parameter satisfies a set condition, it can indicate that the third device parameter meets the user's true intention.

[0114] For example, the setting conditions are: the target scene is triggered more than 10 times within half a month, and the confidence indicator 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 of the third device parameter meets the above setting conditions, the difference between the third device parameter and the first device parameter under the corresponding environmental state can be compared to update the device control instructions when the target scene is triggered according to the third device parameter.

[0115] Under the influence of the above-mentioned embodiments, on the one hand, the third device parameters obtained by clustering the second device parameters in the scene steady-state set can explore 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, new scenes are pushed or created for the third device parameters under various environmental states, which can actively provide users with suggestions for instruction optimization under various environmental states, which not only enhances the practicality of scene-based device control, but also greatly improves the user experience.

[0116] Please refer to FIG4 . An embodiment of the present disclosure provides an instruction optimization method. The method is executed by a user terminal. The user terminal is applicable to an electronic device. The electronic device may be the user terminal 110 in the implementation environment shown in FIG1 .

[0117] In the following method embodiments, for ease of description, the execution subject of each step of the method is taken as an electronic device as an example for illustration, but this does not constitute a specific limitation.

[0118] As shown in FIG4 , the method may include the following steps:

[0119] Step 410: Display instruction optimization data of the target scenario.

[0120] The target scenario is a device control method configured based on the linkage of multiple smart devices and may include one or more device control instructions. The instruction optimization data indicates the updated device control instructions, which are determined by the control end based on the first device parameter of the target scenario and the second device parameter in the scenario steady-state set. In one embodiment, the control end may be a server end or a gateway, where the server end may also be considered as a cloud, cloud platform, platform end, service end, etc.

[0121] Step 430, in response to the confirmation operation triggered by the instruction optimization data, sends a confirmation message to the control end, so that the control end updates the device control instruction when the target scene is triggered according to the first device parameter of the target scene and the second device parameter in the scene steady state set.

[0122] The first device parameter is generated by the smart device executing the initial action configured in the target scenario and is used to indicate the device state of the smart device. The scenario steady-state set includes the second device parameter over multiple scenario observation periods. The second device parameter is generated by the smart device executing additional actions within a single scenario observation period. The updated device control instructions are determined by the control end based on the first device parameter of the target scenario and the second device parameter in the scenario steady-state set.

[0123] Regarding the confirmation message, it is used to confirm the update processing of the device control instructions when the target scene is triggered. The confirmation message can be triggered by the user on the user terminal, so that the user terminal sends the confirmation message to the control end, which is not limited here.

[0124] Optionally, the user can choose whether to update the device control instructions when the target scene is triggered. In one possible implementation, in response to the activation operation for the instruction optimization function, the control terminal is requested to mark the instruction optimization function as enabled. Enabling the instruction optimization function means allowing the device control instructions to be updated when the target scene is triggered.

[0125] Through the above process, the instruction optimization data is displayed and the user is provided with instruction optimization suggestions. If the user confirms the update, the control end will update the device control instructions when the target scene is triggered. The user does not need to perform too much operation, only needs to trigger the confirmation operation. The remaining instruction optimization steps are automatically executed by the control end, reducing the complexity of instruction optimization and thus improving the user experience.

[0126] Figure 5 is a schematic diagram of a specific implementation of an instruction optimization method in an application scenario. In this application scenario, the instruction optimization method can be applied to the server 170 in the implementation environment of Figure 1, and can also be applied to the gateway 150 in the implementation environment of Figure 1.

[0127] As shown in FIG5 , the instruction optimization method in this application scenario may include the following steps:

[0128] Through step 801, a target scene is set, and device control instructions are configured for the target scene.

[0129] Through step 803, the instruction optimization function is enabled.

[0130] Through step 805, the target scene is triggered, and the first device parameter of the target scene is obtained.

[0131] Through step 807, the second device parameter of the target scene is obtained to determine the satisfaction level of the target scene.

[0132] If the satisfaction level indicates that the device control instructions when the target scene is triggered need to be updated, then step 809 is performed to obtain a scene steady-state set of the target scene.

[0133] Through step 811, the environmental parameters are characterized to obtain the environmental state of the target scene.

[0134] Through step 813, based on the environmental state and the second device parameters in the scene steady-state set, third device parameters under various environmental states are obtained.

[0135] Through step 815 , it is detected whether the third device parameter under various environmental conditions is the same, and the confidence level corresponding to the third device parameter is determined.

[0136] Through step 817, if the third device parameters under various environmental states are the same and the confidence level meets the set conditions, the device control instructions when the target scene is triggered are updated based on the third device parameters.

[0137] Through step 819, if the third devices in various environmental states are different and the confidence meets the set conditions, a new scene is pushed based on the parameters of the third devices in various environmental states.

[0138] Through step 821, a feedback message is received.

[0139] If the feedback message indicates that the new scene is allowed, through step 823, a new scene is created based on the third device parameter, and the created new scene is stored.

[0140] In this application scenario, first, as long as the user turns on the instruction optimization function, the instructions will be automatically optimized for the target scene, reducing the instruction optimization steps; second, whether to obtain the scene steady-state set is determined based on the satisfaction of the target scene, so that the instruction optimization calculation can be performed only when the target scene is out of the actual situation, saving resources; third, the device control instructions are updated only when the confidence of the third device parameters meets the set conditions, avoiding erroneous instruction optimization and making the instruction optimization results more accurate; fourth, the third device parameters under various environmental conditions are obtained based on environmental parameters and scene steady-state sets, making instruction optimization more intelligent, providing users with suggestions for creating new scenes, increasing the practicality of using scenes for device control, and improving user experience.

[0141] The following are embodiments of the apparatus disclosed herein, which can be used to execute the instruction optimization method involved in the present disclosure. For details not disclosed in the apparatus embodiments of the present disclosure, please refer to the method embodiments of the instruction optimization method involved in the present disclosure.

[0142] 6 , an embodiment of the present disclosure provides an instruction optimization apparatus 900 , including but not limited to: a first parameter acquirer 910 , a second parameter acquirer 930 , and an instruction updater 950 .

[0143] The first parameter acquirer 910 is used to acquire a first device parameter of the target scene, where the first device parameter is generated by the smart device executing an initial action configured in the target scene.

[0144] The second parameter acquirer 930 is used to acquire a scene steady-state set of the target scene, where the scene steady-state set includes second device parameters generated during multiple scene observation periods; the second device parameters are generated by the smart device performing additional actions during one scene observation period.

[0145] The instruction updater 950 is used to update the device control instruction when the target scene is triggered according to the first device parameter and the second device parameter in the scene steady-state set; the device control instruction is used to instruct the smart device to perform the corresponding initial action.

[0146] In an exemplary embodiment, the instruction updater 950 includes a characterization unit for characterizing the environmental parameters when the target scene is triggered to obtain the environmental state corresponding to the target scene; a clustering unit for clustering 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; an updating unit for correlating the third device parameters with the action that the smart device is expected to perform in the corresponding environmental state; and updating the device control instructions when the target scene is triggered based on the third device parameters and the first device parameters under the corresponding environmental state.

[0147] In an exemplary embodiment, the instruction updater 950 is further used to compare the differences between the third device parameters and the first device parameters under the corresponding environmental states to obtain comparison results; and update the device control instructions when the target scene is triggered according to the comparison results.

[0148] In an exemplary embodiment, the instruction updater 950 is also used 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; if the confidence level meets the set conditions, the device control instruction when the target scene is triggered is updated based on the third device parameter and the first device parameter under the corresponding environmental state.

[0149] In an exemplary embodiment, the instruction updater 950 is also used to determine the confidence level corresponding to the third device parameter under the corresponding environmental state; the confidence level is determined based on the ratio between the number of times the third device parameter appears within a 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 based on the third device parameter and the first device parameter under the corresponding environmental state.

[0150] In an exemplary embodiment, the instruction updater 950 is also used to determine a scene steady-state set under various environmental states when there are multiple environmental states corresponding to the target scene; for each environmental state, the second device parameters in the determined scene steady-state set are clustered to obtain the third device parameters under the corresponding environmental state.

[0151] In an exemplary embodiment, the instruction updater 950 is further configured to detect whether the third device parameters under various environmental states are the same; if not, a new scene is pushed based on the third device parameters under various environmental states.

[0152] In an exemplary embodiment, the instruction updater 950 is further configured to create a new scene based on the third device parameters in various environmental states if it is detected that the third device parameters in various environmental states are different.

[0153] In an exemplary embodiment, the instruction updater 950 is also used to receive a feedback message regarding the creation of a new scene; if the feedback message indicates that the creation of a new scene is allowed, a new scene is created based on the third device parameters, and the created new scene is stored to update the device control instructions when the new scene is triggered based on the third device parameters of the new scene.

[0154] In an exemplary embodiment, the instruction optimization device 900 is also used to determine 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 instructions when the target scene is triggered need to be updated, the scene steady-state set of the target scene is obtained.

[0155] In an exemplary embodiment, the instruction optimization device 900 is also used to determine the feedback amount for the scene observation period within a set time period; the feedback amount is used to indicate the number of times the smart device is detected to perform additional actions during the scene observation period; and the scene observation period is adjusted based on the feedback amount.

[0156] In an exemplary embodiment, the instruction optimization apparatus 900 is further configured to send the 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.

[0157] In an exemplary embodiment, the instruction optimization device 900 is also used to detect whether the instruction optimization function is turned on; turning on the instruction optimization function means allowing the device control instructions to be updated when the target scene is triggered; if it is detected that the instruction optimization function is turned on, the scene steady-state set of the target scene is obtained.

[0158] Please refer to FIG. 7 . An embodiment of the present disclosure provides another instruction optimization device 1000 , including but not limited to: a data display 1010 and a message sender 1030 .

[0159] Data display 1010 is used to display instruction optimization data for the target scenario, the instruction optimization data indicating the updated device control instructions; the updated device control instructions are determined by the control end based on the first device parameters of the target scenario and the second device parameters in the scenario steady-state set; the first device parameters are generated by the smart device executing the initial action configured in the target scenario and are used to indicate the device state of the smart device; the scenario steady-state set includes the second device parameters over multiple scenario observation periods; the second device parameters are generated by the smart device executing additional actions during a single scenario observation period;

[0160] The message sender 1030 is used to send a confirmation message to the control end in response to the confirmation operation triggered by the instruction optimization data, so that the control end updates the device control instruction when the target scene is triggered.

[0161] In an exemplary embodiment, the instruction optimization apparatus 1000 is further configured to, in response to a start operation triggered for the instruction optimization function, request the control end to mark the instruction optimization function as turned on.

[0162] It should be noted that the instruction optimization device provided in the above embodiment only uses the division of the above-mentioned functional units as an example when performing instruction optimization. In actual applications, the above-mentioned functions can be assigned to different functional units as needed, that is, the internal structure of the instruction optimization device will be divided into different functional units to complete all or part of the functions described above.

[0163] In addition, the instruction optimization device and instruction optimization method provided in the above embodiments belong to the same concept, and the specific manner in which each device performs operations has been described in detail in the method embodiments and will not be repeated here.

[0164] Fig. 8 is a schematic diagram showing the structure of an electronic device according to an exemplary embodiment. The electronic device is applicable to the server 170 or the gateway 150 in the implementation environment shown in Fig. 1 .

[0165] It should be noted that the electronic device is only an example adapted for the present disclosure and should not be considered to provide any limitation on the scope of use of the present disclosure. The electronic device should not be interpreted as needing to rely on or necessarily having one or more components in the exemplary electronic device 2000 shown in FIG8.

[0166] The hardware structure of the electronic device 2000 may vary greatly due to different configurations or performances. As shown in FIG8 , 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 .

[0167] Specifically, the power supply 210 is used to provide operating voltage for various hardware devices on the electronic device 2000 .

[0168] The interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices, for example, interacting between the server 170 and the user terminal 110200 or between the gateway 150 and the user terminal 110 in the implementation environment shown in FIG1 .

[0169] Of course, in other examples adapted by the present disclosure, the interface 230 may also include at least one serial-to-parallel conversion interface 233, at least one input / output interface 235, and at least one USB interface 237, as shown in FIG8 , which is not specifically limited here.

[0170] 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 thereon include an operating system 251, application 253 and data 255, etc. The storage method can be temporary storage or permanent storage.

[0171] Among them, the operating system 251 is used to manage and control the various hardware devices and application programs 253 on the electronic device 2000 to enable the central processing unit 270 to calculate and process the massive data 255 in the memory 250. It can be Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0172] The application 253 is a computer program that performs at least one specific task based on the operating system 251. It may include at least one module (not shown in FIG8 ), each of which may include a computer program for the electronic device 2000. For example, the instruction optimization device may be considered as the application 253 deployed on the electronic device 2000.

[0173] The data 255 may be photos, pictures, etc. stored in a disk, or may be first device parameters, scene steady-state sets, etc. stored in the memory 250 .

[0174] 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 programs stored in the memory 250, thereby performing operations and processing on the massive amount of data 255 in the memory 250. For example, the instruction optimization method may be implemented by the central processing unit 270 reading a series of computer programs stored in the memory 250.

[0175] In addition, the present disclosure can also be implemented through hardware circuits or hardware circuits combined with software. Therefore, the implementation of the present disclosure is not limited to any specific hardware circuits, software, or combination thereof.

[0176] Please refer to Fig. 9, which is a schematic diagram showing the structure of a terminal according to an exemplary embodiment. The terminal is applicable to the user terminal 110 in the implementation environment shown in Fig. 1.

[0177] It should be noted that the terminal is only an example adapted for the present disclosure and should not be considered to provide any limitation on the scope of use of the present disclosure. The terminal should not be interpreted as needing to rely on or necessarily having one or more components in the exemplary terminal 1100 shown in Figure 9.

[0178] As shown in FIG9 , terminal 1100 includes a memory 101, a memory controller 103, one or more (only one is shown in FIG9 ) processors 105, a peripheral interface 107, a radio frequency module 109, a positioning module 111, a camera module 113, an audio module 115, a touch screen 117, and a key module 119. These components communicate with each other via one or more communication buses / signal lines 121.

[0179] Among them, the memory 101 can be used to store computer programs, such as the computer programs corresponding to the instruction optimization method and device in the exemplary embodiment of the present disclosure. The processor 105 executes various functions and data processing by running the computer programs stored in the memory 101, thereby completing the instruction optimization method.

[0180] The memory 101 is a carrier for resource storage and can be a random access memory, such as a high-speed random access memory, a non-volatile memory, such as one or more magnetic storage devices, a flash memory, or other solid-state memory. The storage method can be temporary storage or permanent storage.

[0181] The peripheral interface 107 may include at least one wired or wireless network interface, at least one serial-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 achieve communication with various external input / output devices.

[0182] The RF module 109 is used to transmit and receive electromagnetic waves, converting electromagnetic waves into electrical signals, thereby communicating with other devices via a communication network. The communication network includes a cellular telephone network, a wireless local area network, or a metropolitan area network. The above communication networks can use various communication standards, protocols, and technologies.

[0183] The positioning module 111 is used to obtain the current geographical location of the terminal 1100. Examples of the positioning module 111 include, but are not limited to, a global positioning system (GPS) and positioning technologies based on a wireless local area network or a mobile communication network.

[0184] The camera module 113 is a camera that is used to take pictures or videos. The pictures or videos taken can be stored in the memory 101 and can also be sent to the host computer through the radio frequency module 109.

[0185] The audio module 115 provides an audio interface to the user, which may include one or more microphone interfaces, one or more speaker interfaces, and one or more headphone interfaces. The audio data is interacted with other devices through the audio interface. The audio data can be stored in the memory 101 and can also be sent through the radio frequency module 109.

[0186] Touch screen 117 provides an input / output interface between terminal 1100 and the user. Specifically, the user can use touch screen 117 to perform input operations, such as clicks, touches, and swipes, to cause terminal 1100 to respond to the input operations. Terminal 1100 then displays output content, such as text, images, or videos, in any form or combination thereof, to the user via touch screen 117.

[0187] The key module 119 includes at least one key to provide an interface for the user to input to the terminal 1100. The user can press different keys to make the terminal 1100 perform different functions. For example, the sound adjustment key allows the user to adjust the volume of the sound played by the terminal 1100.

[0188] It is understood that the structure shown in Figure 9 is merely illustrative, and terminal 1100 may include more or fewer components than shown in Figure 9, or have components different from those shown in Figure 9. Each component shown in Figure 9 may be implemented using hardware, software, or a combination thereof.

[0189] Referring to FIG. 10 , an electronic device 4000 is provided in an embodiment of the present disclosure. The electronic device 4000 may include a desktop computer, a laptop computer, a server, a gateway, a smart phone, a tablet computer, etc.

[0190] In FIG. 10 , the electronic device 4000 includes at least one processor 4001 and at least one memory 4003 .

[0191] Data exchange between the processor 4001 and the memory 4003 can be achieved via at least one communication bus 4002. The 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, for example. The communication bus 4002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, FIG10 shows only one thick line, but this does not mean that there is only one bus or one type of bus.

[0192] Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data exchange between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the number of transceivers 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present disclosure.

[0193] 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 may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0194] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired computer program in the form of instructions or data structures and can be accessed by the electronic device 400, but is not limited to these.

[0195] The memory 4003 stores a computer program, and the processor 4001 can read the computer program stored in the memory 4003 through the communication bus 4002 .

[0196] The computer program is executed by one or more processors 4001 to implement the instruction optimization method in the above embodiments.

[0197] In addition, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. The computer program is executed by one or more processors to implement the instruction optimization method described above.

[0198] In an embodiment of the present disclosure, a computer program product is provided. The computer program product includes a computer program. The computer program is stored in a computer-readable storage medium. One or more processors of an electronic device read the computer program from the computer-readable storage medium, load and execute the computer program, so that the electronic device implements the instruction optimization method as described above.

[0199] Compared with related technologies, first, 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 can make the target scene more suitable for the actual situation, so that the device control based on the target scene is more in line with the user's true intention; second, when the target scene deviates from the actual situation, the device control instructions when the target scene is triggered are automatically updated based on the first device parameters and the second device parameters in the scene steady-state set, which can reduce the steps for users to modify the target scene configuration, making the instruction optimization operation simple and not cumbersome, thereby improving the user experience; third, new scenes are pushed or created for the third device parameters under various environmental conditions, which can actively provide users with suggestions for instruction optimization under various environmental conditions, greatly enhancing the practicality of scene-based device control.

[0200] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified 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 of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0201] The above description is only part of the embodiments of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure.

Claims

1. A method for optimizing instructions, executed by a control terminal, comprising: Acquire a first device parameter of a target scene, where the first device parameter is generated by the smart device executing an initial action configured in the target scene; Acquire a scene steady-state set of the target scene, wherein the scene steady-state set includes second device parameters generated during multiple scene observation periods; The second device parameter is generated by the smart device performing an additional action during a scene observation period; According to the first device parameter and the second device parameter in the scene steady-state set, the device control instruction when the target scene is triggered is updated; the device control instruction is used to instruct the smart device to perform a corresponding initial action.

2. The method of claim 1, wherein: The updating process of the device control instruction when the target scene is triggered according to the first device parameter and the second device parameter in the scene steady-state set includes: Performing characterization processing on the environmental parameters when the target scene is triggered to obtain the environmental state corresponding to the target scene; Clustering the 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; the third device parameters are related to the action that the smart device is expected to perform in the corresponding environmental state; According to the third device parameter and the first device parameter under the corresponding environmental state, the device control instruction when the target scene is triggered is updated.

3. The method of claim 2, wherein: The updating process of the device control instruction when the target scene is triggered according to the third device parameter and the first device parameter in the corresponding environmental state includes: respectively comparing the differences between the third device parameters and the first device parameters under corresponding environmental states to obtain comparison results; The device control instruction when the target scene is triggered is updated according to the comparison result.

4. The method of claim 2, wherein: Before updating the device control instruction when the target scene is triggered according to the third device parameter and the first device parameter in the corresponding environmental state, the method further includes: For the third device parameter under the corresponding environmental state, determining a 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; If the confidence level satisfies the set condition, 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.

5. The method of claim 2, wherein: Before updating the device control instruction when the target scene is triggered according to the third device parameter and the first device parameter in the corresponding environmental state, the method further includes: Determining, for the third device parameter in the corresponding environmental state, a confidence level corresponding to the third device parameter; the confidence level is determined based on a ratio between the number of times the third device parameter appears within a preset time period and the number of times the target scene is triggered; If the confidence level satisfies the set condition, 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.

6. The method of claim 2, wherein: The clustering of 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 includes: When there are multiple environmental states corresponding to the target scene, determining a scene steady-state set under various environmental states; For each environmental state, the second device parameters in the determined scene steady-state set are clustered respectively to obtain the third device parameters in the corresponding environmental state.

7. The method of claim 6, wherein: After clustering the determined second device parameters in the scene steady-state set for each environmental state to obtain the third device parameters under the corresponding environmental state, the method further includes: Detecting whether the third device parameters are the same under various environmental conditions; If not, new scenes are pushed based on the third device parameters under various environmental conditions.

8. The method of claim 7, wherein: The method further includes: if it is detected that the third device parameters under various environmental states are different, creating a new scene based on the third device parameters under various environmental states.

9. The method of claim 7, wherein: After pushing the creation of a new scene based on the third device parameter in various environmental states, the method further includes: Receive feedback messages for new scene creation; If the feedback message indicates that the creation of a new scene is allowed, a new scene is created based on the third device parameter, and the created new scene is stored, so as to update the device control instruction when the new scene is triggered based on the third device parameter of the new scene.

10. The method according to any one of claims 1 to 9, wherein: Before acquiring the scene steady-state set of the target scene, the method further includes: 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 level of the target scene indicates that the device control instruction when the target scene is triggered needs to be updated, then a scene steady-state set of the target scene is obtained.

11. The method according to any one of claims 1 to 9, wherein: The method further comprises: Determining a feedback amount for the scene observation period within a set time period; the feedback amount is used to indicate the number of times the smart device is detected to perform an additional action within the scene observation period; Based on the feedback amount, the scene observation period is adjusted.

12. The method according to any one of claims 1 to 9, wherein: After updating the device control instruction when the target scene is triggered according to the first device parameter and the second device parameter in the scene steady-state set, the method further includes: If the target scene is triggered, the updated device control instruction is sent to the corresponding smart device, so that the smart device performs an initial action in response to the updated device control instruction.

13. The method according to any one of claims 1 to 9, wherein: Before acquiring the scene steady-state set of the target scene, the method further includes: Detecting whether the instruction optimization function is turned on; turning on the instruction optimization function means allowing the device control instructions to be updated when the target scene is triggered; If it is detected that the instruction optimization function is turned on, the scene steady-state set of the target scene is obtained.

14. A method for optimizing instructions, executed by a user terminal, the method comprising: Displaying instruction optimization data of the target scene, wherein the instruction optimization data is used to indicate the device control instructions after the update processing; The updated device control instruction is determined by the control end according to the first device parameter of the target scene and the second device parameter in the scene steady-state set; the first device parameter is generated by the smart device executing the initial action configured in the target scene, and is used to indicate the device state of the smart device; The scene steady-state set includes second device parameters in multiple scene observation periods; the second device parameters are generated by the smart device performing additional actions in one scene observation period; In response to a confirmation operation triggered by the instruction optimization data, a confirmation message is sent to the control end, so that the control end updates the device control instruction when the target scene is triggered.

15. The method of claim 14, wherein: The method further comprises: In response to the activation operation triggered for the instruction optimization function, the control end is requested to mark that the instruction optimization function has been activated.

16. An instruction optimization device, comprising: A first parameter acquirer, used to acquire a first device parameter of a target scene, where the first device parameter is generated by the smart device executing an initial action configured in the target scene; A second parameter acquirer, used to acquire a scene steady-state set of the target scene, wherein the scene steady-state set includes second device parameters generated during multiple scene observation periods; The second device parameter is generated by the smart device performing an additional action during a scene observation period; An instruction updater is used to update the device control instruction when the target scene is triggered according to the first device parameter and the second device parameter in the scene steady-state set; the device control instruction is used to instruct the smart device to perform a corresponding initial action.

17. An instruction optimization device, comprising: A data display, used to display instruction optimization data of a target scene, wherein the instruction optimization data is used to indicate the device control instructions after the update process; The updated device control instruction is determined by the control end according to the first device parameter of the target scene and the second device parameter in the scene steady state set; the first device parameter is the smart device executing the target scene. The scene steady-state set includes second device parameters in multiple scene observation periods; the second device parameters are generated by the smart device performing additional actions in one scene observation period; The message transmitter is used to send a confirmation message to the control end in response to the confirmation operation triggered by the instruction optimization data, so that the control end updates the device control instruction when the target scene is triggered.

18. An electronic device comprising: at least one processor and at least one memory, wherein: The memory stores a computer program; The computer program is executed by one or more of the processors, so that the electronic device implements the instruction optimization method according to any one of claims 1 to 15.

19. A computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by one or more processors to implement the instruction optimization method according to any one of claims 1 to 15.

20. A computer program product, comprising computer-readable instructions, wherein when the computer-readable instructions are executed by a processor, the steps of the instruction optimization method according to any one of claims 1 to 15 are implemented.

Citation Information

Patent Citations

  • Generating suggestions for scenes and triggers

    CN107870572A

  • Scene creation method and device, computer equipment and storage medium

    CN113268004A

  • Intelligent equipment control method and device, electronic equipment and storage medium

    CN114253147A

  • Smart home scene creation method and device, storage medium and electronic device

    CN114740748A

  • Instruction optimization method and device, electronic equipment and storage medium

    CN116700067A

Cited By

  • Method and device for determining steady state of industrial control network equipment

    CN119892417A

  • Control method of intelligent sound system

    CN121262501A

  • Air conditioner self-adaptive control method and device based on user operation

    CN122650486A