Device Control Method, Device, Equipment and Storage Medium
Through multicast transmission, the commands are sent to devices that have been configured for scene action recording, so that multiple devices can perform scene actions simultaneously, solve the problem of large network delays for multiple devices to perform multiple actions, and improve device control efficiency and user experience.
Patent Information
- Application Number
- CN202210565411.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-23
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-05-23
AI Technical Summary
In the prior art, the network delay is large when multiple devices perform multiple actions, which affects the user experience.
Scene control instructions are sent to devices that have been configured with scene action recording through multicast transmission, so that these devices perform scene actions simultaneously, avoiding controlling multiple smart devices one by one.
The network delay of multiple devices performing multiple actions is reduced, and the efficiency and user experience of device control are improved.
Smart Images

Figure CN115016302B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things technology. Specifically, this application relates to a device control method, apparatus, device, and storage medium. Background Art
[0002] With the rapid development of Internet of Things technology, the application of smart devices has gradually become widespread. In order to improve the operational convenience of smart devices for users, not only can device linkage be set, for example, if someone is sensed in the living room, the lights are automatically turned on, but also various modes can be set. For example, when the user leaves home, through the away mode, the air conditioner, lights, socket switches, etc. are automatically turned off.
[0003] However, currently, for the control of multiple smart devices, such as multiple smart devices in the away mode, it is often necessary to control them one by one based on multiple instructions. It can also be considered that multiple smart devices need to sequentially execute corresponding set actions, resulting in a large network delay, which easily affects the user experience.
[0004] As can be seen from the above, how to reduce the network delay of multiple devices performing multiple actions remains to be solved. Summary of the Invention
[0005] Embodiments of this application provide a device control method, apparatus, device, and storage medium, which can solve the problem of large network delay when multiple devices perform multiple actions in related technologies. The technical solutions are as follows:
[0006] According to one aspect of the embodiments of this application, a device control method includes: obtaining a scene control instruction for multiple devices, where the scene control instruction is used to instruct each of the devices to perform corresponding scene actions respectively; identifying a first device among each of the devices, where the first device is a device configured with a scene action record; if at least one of the first devices is identified, sending the scene control instruction to each of the first devices according to the multicast transmission method, so as to instruct each of the first devices to synchronously perform the scene actions recorded for the first device in the scene action record in response to the scene control instruction.
[0007] According to one aspect of the embodiments of this application, a device control method includes: receiving a scene control instruction for multiple devices, where the scene control instruction is used to instruct each of the devices to perform corresponding scene actions respectively; based on the configured scene action record, performing the scene actions related to itself in the scene action record in response to the scene control instruction.
[0008] According to one aspect of the embodiments of the present application, a device control device, the device includes: an instruction acquisition module, configured to acquire a scenario control instruction for a plurality of devices; the scenario control instruction is used to instruct each of the devices to perform corresponding scenario actions respectively; a device identification module, configured to identify a first device among each of the devices; the first device is a device configured with scenario action records; an instruction sending module, configured to, if at least one of the first devices is identified, send the scenario control instruction to each of the first devices according to the multicast transmission mode, so as to instruct each of the first devices to synchronously perform the scenario actions recorded for the first device in the scenario action records in response to the scenario control instruction.
[0009] In an exemplary embodiment, the instruction acquisition module includes: an instruction receiving unit, configured to receive a scenario control instruction for a plurality of the devices sent by a user terminal, the scenario control instruction is used to instruct the execution of a target scenario constructed in the user terminal, and corresponding scenario actions are configured for the plurality of the devices in the target scenario.
[0010] In an exemplary embodiment, the instruction acquisition module includes: a status data receiving unit, configured to receive device status data sent by a plurality of the devices, the device status data is used to indicate the device status of the devices; an instruction generating unit, configured to, according to the received device status data, if it is determined that the trigger condition in the device linkage data is satisfied, generate a scenario control instruction for a plurality of the devices according to the actions corresponding to the plurality of the devices in the device linkage data.
[0011] In an exemplary embodiment, the device identification module includes: a configuration detection unit, configured to perform configuration detection of scenario action records on each of the devices based on the scenario control instruction, and determine at least one of the first devices that has completed the configuration and / or at least one of the second devices that has not been configured; the instruction sending module includes: a multicast sending unit, configured to use at least one of the first devices as multicast members and send the scenario control instruction to the multicast members.
[0012] In an exemplary embodiment, the instruction sending module further includes: a unicast sending unit, configured to, if at least one of the second devices is identified, send device control instructions corresponding to the scenario control instruction to each of the second devices according to the unicast transmission mode, so that each of the second devices performs corresponding scenario actions in response to the device control instructions.
[0013] In an exemplary embodiment, the device further includes: a status data receiving module, configured to receive, for each of the first devices, device status data sent by the first device, where the device status data is used to indicate the device status after the first device executes a scenario action; an instruction retransmission module, configured to, if it is detected that the device status data receiving of the first device times out, retransmit the scenario control instruction to each of the first devices according to the multicast transmission method.
[0014] In an exemplary embodiment, the device further includes: a configuration data receiving module, configured to receive scenario configuration data, where the scenario configuration data at least indicates scenario actions that a plurality of the devices are configured to be allowed to execute; a configuration module, configured to, according to the scenario configuration data, request to configure a third device among the plurality of devices to record scenario actions; the third device is a device that supports the configuration of scenario action recording.
[0015] In an exemplary embodiment, the configuration module includes: a device determination unit, configured to determine the third device among the plurality of devices based on the plurality of devices indicated by the scenario configuration data; a snapshot data acquisition unit, configured to obtain, from the scenario configuration data, snapshot configuration data associated with the determined third device, where the snapshot configuration data is used to indicate scenario actions that the third device is configured to be allowed to execute; a snapshot data sending unit, configured to send the snapshot configuration data to the associated third device, so that the third device configures the recording of scenario actions according to the snapshot configuration data, and when the configuration of the recording of scenario actions is completed, the third device is transformed into the first device that has completed the configuration.
[0016] According to one aspect of the embodiments of the present application, a device control device includes: an instruction receiving module, configured to receive a scenario control instruction for a plurality of devices; the scenario control instruction is used to instruct each of the devices to execute corresponding scenario actions respectively; an action execution module, configured to, based on the configured scenario action record, in response to the scenario control instruction, execute the scenario actions related to itself in the scenario action record.
[0017] According to one aspect of the embodiments of the present application, a device includes: at least one processor, at least one memory, and at least one communication bus, where a computer program is stored on the memory, and the processor reads the computer program in the memory through the communication bus; when the computer program is executed by the processor, the method described above is implemented.
[0018] According to one aspect of the embodiments of the present application, a storage medium stores a computer program thereon, and when the computer program is executed by a processor, the method described above is implemented.
[0019] According to one aspect of the embodiments of the present application, a computer program product includes a computer program stored in a storage medium. A processor of a computer device reads the computer program from the storage medium, and the processor executes the computer program, so that when the computer device executes, the above-mentioned method is implemented.
[0020] The beneficial effects brought by the technical solution provided by the present application are as follows:
[0021] In the above technical solution, based on the obtained scenario control instructions for multiple devices, the scenario control instructions are used to instruct each device to perform corresponding scenario actions respectively. Then, if at least one first device is recognized, that is, a device with a recorded scenario action, the scenario control instructions can be sent to each first device in a multicast transmission manner, so as to instruct each first device to execute the scenario action recorded for the first device in the scenario action record in response to the scenario control instructions. That is to say, in the way of the scenario action record, the scenario actions corresponding to at least one first device are recorded and configured for these first devices. Then, in the process of device control, by sending the scenario control instructions to these first devices in a multicast transmission manner, these first devices can be controlled to synchronously execute the corresponding scenario actions recorded for the first device in the configured scenario action record, avoiding controlling multiple intelligent devices one by one based on multiple instructions, that is, avoiding the sequential execution of corresponding set actions by multiple intelligent devices, thereby reducing the network latency of multiple devices executing multiple actions, and thus effectively solving the problem of large network latency of multiple devices executing multiple actions in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments of the present application.
[0023] Figure 1 is a schematic diagram of the implementation environment related to the embodiments of the present application;
[0024] Figure 2 is a flowchart of a method for the scenario construction process according to the embodiments of the present application;
[0025] Figure 3 is one of the schematic diagrams of the scenario construction process according to the embodiments of the present application;
[0026] Figure 4 is another schematic diagram of the scenario construction process according to the embodiments of the present application;
[0027] Figure 5 is a flowchart of a device control method shown according to an exemplary embodiment;
[0028] Figure 6 is a flowchart of a method for configuring a scenario action record according to an exemplary embodiment;
[0029] Figure 7 is Figure 6 a flowchart of step 430 involved in the corresponding embodiment in one embodiment;
[0030] Figure 8 is a flowchart of another device control method according to an exemplary embodiment;
[0031] Figure 9 is a flowchart of another device control method according to an exemplary embodiment;
[0032] Figure 10 is a schematic diagram of a gateway sending different instructions to a first device and a second device according to an exemplary embodiment;
[0033] Figure 11 is a flowchart of another device control method according to an exemplary embodiment;
[0034] Figure 12 is a structural block diagram of a device control device according to an exemplary embodiment;
[0035] Figure 13 is a structural block diagram of another device control device according to an exemplary embodiment;
[0036] Figure 14 is a hardware structure diagram of a device according to an exemplary embodiment;
[0037] Figure 15 is a structural block diagram of a device according to an exemplary embodiment. Detailed Description of the Embodiment
[0038] The embodiments of the present application will be described in detail below. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present application and should not be construed as limiting the present application.
[0039] Those skilled in the art can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of this application means the presence of the described 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 their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of one or more related listed items.
[0040] The following are the introductions and explanations of several terms involved in this application:
[0041] Multicast: Also known as multi-destination broadcast or multi-cast, it is a point-to-multipoint network communication method, and is also considered a network communication method for data transmission between one sender and multiple receivers. The sender only sends one copy of the data, and the data received by multiple receivers are all copies of this data, that is, the same data.
[0042] Unicast: It is a point-to-point network communication method, mainly used for data transmission between one sender and one receiver. If it is needed to be applied to the transmission of the same data between one sender and multiple receivers, the difference from multicast is that the sender still needs to send multiple copies of the same data.
[0043] To make the purpose, technical solutions and advantages of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0044] Figure 1 It is a schematic diagram of the implementation environment involved in the embodiments of this application. This implementation environment includes a user terminal 110, a smart device 130, a gateway 150, a server side 170, and a router 190.
[0045] Specifically, the user terminal 110, which can also be considered as the user side or the 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, a tablet computer, a notebook computer, a desktop computer, a smart control panel, or other devices with display and control functions, and is not limited herein.
[0046] Among them, the client is associated with the intelligent device 130. In essence, the user registers an account in the client and configures the intelligent device 130 in the client. For example, the configuration includes adding a device identifier to the intelligent device 130, etc., so that when the client runs in the user terminal 110, functions such as device control of the intelligent device 130 can be provided for the user. This client can be in the form of an application or a web page. Correspondingly, the interface for the client to display the device can be in the form of a program window or a web page, and this is not limited here either.
[0047] The intelligent device 130 is deployed in the gateway 150 and communicates with the gateway 150 through its own configured communication module, and is thus controlled by the gateway 150. It should be understood that the intelligent device 130 generally refers to one of multiple intelligent devices 130. The embodiments of the present application only take the intelligent device 130 as an example for illustration. That is, the embodiments of the present application do not limit the number and device type of the intelligent devices deployed in the gateway 150. In an application scenario, the intelligent device 130 accesses the gateway 150 through a local area network and is thus deployed in the gateway 150. The process by which the intelligent device 130 accesses the gateway 150 through a local area network includes: the gateway 150 first establishes a local area network, and the intelligent device 130 joins the local area network established by the gateway 150 by connecting to the gateway 150. This local area network includes but is not limited to: ZIGBEE or Bluetooth. Among them, the intelligent device 130 can be an intelligent printer, intelligent fax machine, intelligent camera, intelligent air conditioner, intelligent door lock, intelligent light, intelligent fan, intelligent speaker, or a human body sensor, door and window sensor, temperature and humidity sensor, water immersion sensor, natural gas alarm, smoke alarm, wall switch, wall socket, wireless switch, wireless wall sticker switch, magic cube controller, curtain motor, etc. electronic devices equipped with a communication module. In the embodiments of the present application, the intelligent device 130 especially refers to an intelligent door lock.
[0048] 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 with the gateway 150 through the router 190 in a wired or wireless manner, etc. For example, the wired or wireless manner includes, but is not limited to, WIFI, etc., so that the user terminal 110 and the gateway 150 are deployed in the same local area network, and further the user terminal 110 can achieve interaction with the smart device 130 through the local area network path. In another application scenario, the user terminal 110 establishes a communication connection with the gateway 150 through the server side 170 in a wired or wireless manner, etc. For example, the wired or wireless manner 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, and further the user terminal 110 can achieve interaction with the smart device 130 through the wide area network path.
[0049] Among them, the server side 170 can also be considered as the cloud, cloud platform, platform side, service side, etc. This server side 170 can be a single server, or a server cluster composed of multiple servers, or a cloud computing center composed of multiple servers, in order to better provide background services to a large number of user terminals 110. For example, the background services include, but are not limited to, device control services, etc.
[0050] After introducing an implementation environment related to the embodiments of the present application, the following will be combined with Figure 2 and Figure 3 to introduce the scenario construction process involved in the embodiments of the present application. Among them, Figure 2 shows a method flowchart of the scenario construction process in an embodiment. Figure 3 shows a schematic diagram of the scenario construction process in a user terminal in an embodiment.
[0051] As Figure 2 shown, the process of constructing a scenario may include the following steps:
[0052] Step 210, in the scenario display page, display at least one constructed scenario and a scenario addition entry.
[0053] As Figure 3As shown, on the scene display page 301, the constructed scenes 303, 304, and the scene addition entry 302 are displayed. It should be noted that a scene is uniquely represented by a scene identifier. Similarly, an intelligent device is uniquely represented by a device identifier, and a scene action is uniquely represented by an action identifier. These identifiers can be in the form of letters, numbers, strings, words, graphics, etc., and are not limited herein. For example, the scene identifier A uniquely represents the scene 303, and the scene identifier B uniquely represents the scene 304.
[0054] Step 230, in response to a trigger operation on the scene addition entry, jump from the scene display page to the scene configuration page to add a scene.
[0055] In a possible implementation, on the scene configuration page, at least one configured action, as well as the scene name configuration entry and the action addition entry, are displayed.
[0056] As Figure 3 shown, if the user clicks the "+" control 302 on the scene display page 301, jump from the scene display page 301 to the scene configuration page 401. At the same time, on the scene configuration page 401, not only the configured action "turn off the living room lights" 403 is displayed, but also the scene name configuration entry 402 and the action configuration entry 404 are displayed. Among them, the user's click operation is regarded as a trigger operation on the scene configuration entry.
[0057] Step 250, based on the scene addition instruction, determine the scene and display it on the scene display page.
[0058] In a possible implementation, the scene addition instruction is triggered by at least one of the following operations: an input operation for inputting a scene identifier for the scene; an action configuration operation for configuring at least one intelligent device to perform corresponding scene actions in the scene; and a scene confirmation operation for confirming the completion of adding the scene.
[0059] As Figure 3As shown, in the input control 402, "turn off all lights" can be input for the scene as the scene identifier of the set device, and this user's input operation is regarded as an input operation; if the user clicks the "+" control 404 on the scene configuration page 401, it means that the user expects to add a scene action executed by a smart device in the scene. Or, if the user clicks the ">" control 406, it means that the user expects to modify a scene action executed by a smart device in the scene. The above click operations of this user can all be regarded as action configuration operations; if the user clicks the "Finish" control 405, it means that the user confirms the completion of the scene addition, and this user's click operation is regarded as a scene confirmation operation. Based on at least one of the above operations, it is possible to trigger the generation of a scene addition instruction, determine that the scene is represented by the scene identifier "turn off all lights", and display it on the scene display page 302, that is, "turn off all lights".
[0060] Further, step 250 may further include the following steps: in response to the action configuration operation, jump from the scene configuration page to the action configuration page; based on the action configuration instruction triggered on the action configuration page, determine the scene action executed by the smart device in the scene, and display it on the scene configuration page.
[0061] In a possible implementation manner, the action configuration instruction is triggered by at least one of the following operations: a device selection operation for selecting a smart device for the scene; a location selection operation for selecting a deployment location for the smart device selected in the scene, and the deployment location includes but is not limited to: master bedroom, guest bedroom, bathroom, dining room, living room, study, storage room, cloakroom, balcony, kitchen, corridor, etc. It can also be considered that the deployment location specifically defines the type of smart device. For example, if the deployment location of the "switch" is the dining room, it means that the smart device is the "dining room light", or if the deployment location of the "switch" is the living room, it means that the smart device is the "living room light"; an action selection operation for selecting a scene action for the smart device selected in the scene; an action confirmation operation for confirming the configuration of the scene action in the scene.
[0062] As Figure 3As shown, in the selection control 502, "Switch" connected to the lamp can be selected for the scene as the intelligent device selected for the scene, and this user's selection operation is regarded as a device selection operation; in the selection control 503, "Dining Room" can be selected for the switch as the deployment location selected for the intelligent device selected in the scene, and this user's selection operation is regarded as a location selection operation; in the selection control 504, "Off" can be selected for the switch as the scene action selected for the intelligent device selected in the scene; if the user clicks the "Next" control 505, it means that the user confirms that the scene action in the scene is completed, and this user's click operation is regarded as an action confirmation operation. Based on at least one of the above operations, an action configuration instruction can be triggered to be generated, so as to determine that the scene action executed by the intelligent device "Switch" connected to the lamp in the "Dining Room" in the scene is "Off", and it is displayed on the scene configuration page 401, that is, "Turn off the dining room lights".
[0063] Further, in step 270, in response to the scene selection operation for the target scene, jump from the scene display page to the scene details page of the target scene.
[0064] In Figure 3 If the user clicks on the scene 305 represented by the scene identifier "Turn off all lights", it means that the user selects the scene 305 as the target scene. At this time, jump from the scene display page 301 to the scene details page 601 of the scene 305, that is, "Turn off all lights". In this scene details page 601, at least the following are displayed: the scene actions performed by at least one intelligent device in the scene 305. For example, the living room light is turned off in the scene 305, that is, "Turn off the living room lights" 602; the dining room light is turned off in the scene 305, that is, "Turn off the dining room lights", etc. Among them, the user's click operation is regarded as the scene selection operation for the target scene. At the same time, a scene execution entry 603 is also displayed on this scene details page 601, providing the user with the function of one-key execution of the scene, so as to instruct at least one intelligent device to perform the corresponding scene action in this scene. For example, if the user clicks on the scene execution entry 603, it is regarded as one-key execution of the "Turn off all lights" scene, then the living room light and the dining room light are turned off accordingly, so as to realize the controlled execution of the "Turn off all lights" scene.
[0065] Similarly to the scene configuration page 401, in the scene details page 601, an action configuration operation can also be formed through the control 603 and the action addition entry 604, so as to add / modify the scene action performed by an intelligent device in the scene based on the action configuration operation. Of course, in other embodiments, the scene configuration page and the scene details page can also be combined into the same page according to the user experience, which is not specifically limited here.
[0066] It should be supplemented and explained that the scenes constructed in the user terminal, in addition to Figure 3In addition to the controlled execution scenario shown, there is also an automated scenario. The construction process of the automated scenario is basically the same as that of the controlled execution scenario. The difference is that in the automated scenario, in addition to configuring relevant scenario actions, relevant trigger conditions also need to be configured. That is to say, in the controlled execution scenario, when the user clicks the scenario execution entry, the intelligent device that has configured the scenario actions in the controlled execution scenario will execute the corresponding scenario actions; while in the automated scenario, it means that if the trigger conditions configured in the automated scenario are met, the intelligent device that has configured the scenario actions in the automated scenario will automatically execute the corresponding scenario actions.
[0067] Now in combination with Figure 4 , taking the automated scenario of the "going home" scenario as an example, the trigger conditions in the automated scenario that are different from the controlled execution scenario are described in detail as follows:
[0068] As Figure 4 shown, assume that the automated scenario 306 has been constructed and is displayed on the scenario display page 302 through the scenario identifier of the "going home" scenario. Then, when the user clicks on this scenario identifier, the user can enter the scenario details page 701 of the automated scenario 306. In the scenario details page 701, the displayed trigger condition is: the intelligent door lock is opened, the displayed scenario actions are: turn on the living room light, turn on the living room air conditioner. There is also a condition addition entry 703 for adding new trigger conditions and an action addition entry 706 for adding new scenario actions. In addition, the modification of the trigger condition can be implemented through the control 702, and the modification of the scenario action can be implemented through the controls 704 and 705. Based on this, with the construction of the automated scenario 306, when the user goes home and the intelligent door lock is opened, it is regarded as the trigger condition configured in the automated scenario 306 being met. At this time, the living room light and the living room air conditioner that have configured the scenario actions in the automated scenario 306 will automatically execute the corresponding scenario actions, that is, automatically turn on the living room light and automatically turn on the living room air conditioner, thus realizing the automatic execution of the going home scenario.
[0069] It is worth mentioning that according to the different input components configured on the user terminal (such as the touch layer, mouse, keyboard, etc. covered on the display screen), the specific behaviors of the above operations can also be different. For example, if the user terminal is a smart phone configured with a touch layer, the above operations can be gesture operations such as clicking and swiping; while for a laptop computer configured with a mouse as the user terminal, the above operations can be mechanical operations such as dragging, single-clicking, and double-clicking, which are not limited here. Thus, with the construction of the scenario in the user terminal, the user can control multiple devices to execute multiple actions by means of the controlled execution scenario or the automated scenario constructed in the user terminal.
[0070] The device control process specifically refers to, as Figure 5As shown in the figure, in step 310, obtain scenario control instructions for multiple devices; the scenario control instructions are used to instruct each device to execute corresponding scenario actions respectively; in step 330, identify the first device among the devices; the first device is a device that has been configured with scenario action records; in step 350, if at least one first device is identified, then send the scenario control instructions to each first device according to the multicast transmission method, so as to instruct each first device to synchronously execute the scenario actions recorded for the first device in the scenario action records in response to the scenario control instructions.
[0071] In the above process, it realizes controlling multiple devices to execute multiple actions simultaneously based on one scenario control instruction, avoiding controlling multiple intelligent devices one by one based on multiple instructions, that is, avoiding multiple intelligent devices executing corresponding set actions sequentially, thereby reducing the network latency of multiple devices executing multiple actions, and thus being able to effectively solve the problem of large network latency when multiple devices execute multiple actions in the related art.
[0072] Now in combination with Figures 6 to 7 , first, the configuration of scenario action records in the device control process is described in detail as follows, taking the application of this configuration process to the device as an example. Among them, the device can be Figure 1 the gateway 150 in Figure 1 , or the server - side 170, user terminal 110, etc. in
[0073] Here, no specific limitation is constituted. Figure 6 As shown in
[0074] Step 410, receive the scenario configuration data sent by the user terminal.
[0075] Among them, the scenario configuration data is generated when the user constructs a scenario in the user terminal, and this scenario configuration data at least indicates the scenario actions that multiple devices are configured to be allowed to execute.
[0076] It should be understood that with different scenarios, even for the same intelligent device, the scenario actions configured to be allowed to execute may be different. For example, when the scenario is the master bedroom and the owner is sleeping, the intelligent fan is turned on; if the scenario is the bathroom and the owner leaves, the intelligent fan is turned off. Therefore, the scenario actions configured for the device are premised on the scenario, and different scenarios result in different scenario configuration data. For example, scenario configuration data A corresponds to the controlled execution scenario, and this scenario configuration data A is used to indicate the scenario actions that multiple devices are configured to be allowed to execute in the controlled execution scenario; scenario configuration data B corresponds to the automated scenario, and this scenario configuration data B is used to indicate the trigger conditions configured in the automated scenario, that is, it indicates the device states of multiple devices when the trigger conditions are met in the automated scenario, and is also used to indicate the scenario actions that multiple devices are configured to be allowed to execute in the automated scenario.
[0077] In a possible implementation, the scenario configuration data at least includes: the scenario identifier of the scenario, the device identifiers of at least one device, and the action identifier of the scenario action corresponding to the device.
[0078] Step 430: According to the scenario configuration data, request to configure the scenario action recording for the third device among multiple devices.
[0079] Among them, the third device is a device that supports the scenario action recording configuration. Correspondingly, the first device is the device that has completed the configuration; the second device is a device that does not support the scenario action recording configuration, that is, a device that has not been configured.
[0080] The scenario action recording is a record of the scenario actions that the device is configured to be allowed to execute in the scenario, which can be understood as a snapshot data for the device function. For example, the execution actions supported by the device can be packaged as snapshot actions, and the data containing this snapshot action can be the scenario action recording. Correspondingly, the configuration of the scenario action recording refers to storing the scenario action recording in the third device so that the third device can know in advance the scenario actions that it can execute in the scenario.
[0081] Specifically, as Figure 7 shown, step 430 may include the following steps:
[0082] Step 431: Based on the multiple devices indicated by the scenario configuration data, determine the third device among the multiple devices
[0083] In a possible implementation, whether a device supports the scenario action recording configuration is determined by the device identifier. For example, on the server side, the device identifiers of the devices that support the scenario action recording configuration are pre-stored. In a possible implementation, whether a device supports the scenario action recording configuration is determined by the device version information. For example, on the server side, the device version information of the devices that support the scenario action recording configuration is pre-stored. Of course, in other embodiments, whether a device supports the scenario action recording configuration can also be determined by adding a snapshot identifier. For example, if the server side recognizes that the snapshot identifier carried by the device is 1, it means that the device supports the scenario action recording configuration, but this is not a specific limitation here.
[0084] Step 433: Obtain the snapshot configuration data associated with the determined third device from the scenario configuration data.
[0085] Among them, the snapshot configuration data is used to indicate the scenario actions that the third device is configured to be allowed to execute.
[0086] In a possible implementation, the snapshot configuration data at least includes: the device identifiers of at least one third device, and the action identifiers of the scenario actions corresponding to the third device.
[0087] Step 435: Send the snapshot configuration data to the associated third device, so that the third device configures the scenario action recording according to the snapshot configuration data.
[0088] Thus, when the scenario action recording configuration is completed, the third device is transformed into the first device that has completed the configuration.
[0089] For example, assume that in scenario A, wall switch B1 is turned on (action identifier is C1), the brightness of lamp B2 is 50% (action identifier is C2), and the temperature of air conditioner B3 is 26 degrees (action identifier is C3). Among them, lamp B2 and air conditioner B3 support the configuration of scenario action recording, while wall switch B1 does not support the configuration of scenario action recording.
[0090] Then, the scenario configuration data = {A, B1(C1), B2(C2), B3(C3)}.
[0091] Lamp B2 and air conditioner B3 are the third devices, so the snapshot configuration data associated with this third device is obtained = {B2(C2), B3(C3)}.
[0092] In a possible implementation, the configuration of the scenario action recording specifically means storing the scenario identifier of the scenario, the device identifier of the third device, and the action identifier of the scenario action in the third device. Taking the previous example for illustration, for lamp B2, the action identifier C2 of its execution of the scenario action in scenario A is stored. Then, during the subsequent process of multiple devices performing multiple actions in scenario A, it can perform the scenario action represented by the pre-stored action identifier C2, which can also be considered as executing the scenario action related to itself in the configured scenario action recording, that is, adjusting the brightness to 50%.
[0093] It is worth mentioning that during the configuration process of the scenario action recording, in a possible implementation, the gateway can send the part of the snapshot configuration data corresponding to each third device to each third device. For example, lamp B2 can only receive the action identifier C2 of its execution of the scenario action in the scenario, so as to reduce the data volume transmission between the gateway and the third device and is beneficial to improving the transmission efficiency; in another possible implementation, the gateway can also send the complete part of the snapshot configuration data to each third device. For example, lamp B2 can not only receive the action identifier C2 of its execution of the scenario action in the scenario, but also receive the action identifier C3 of the air conditioner B3's execution of the scenario action in the scenario, so as to reduce the processing burden of the gateway and is beneficial to improving the processing efficiency of the gateway. At this time, lamp B2 needs to further configure the scenario action recording in combination with its own device identifier B2, so as to be able to execute the scenario action related to itself in the subsequent scenario action recording, which is not limited here.
[0094] In the above process, the configuration of the scenario action record for the device is implemented, so that the subsequent device can quickly execute the scenario actions related to itself based on the configured scenario action record. In a possible implementation manner, a device control method is taken as an example of the method applied to an execution device for illustration. For example, the execution device may be Figure 1 the intelligent device 130 in Figure 8 . As shown in
[0095] , the device control method may include the following steps: Step 370, receiving a scenario control instruction for multiple devices; Step 390, based on the configured scenario action record, in response to the scenario control instruction, executing the scenario actions related to itself in the scenario action record. Thus, by sending one instruction from the device, multiple intelligent devices can be controlled to execute multiple actions simultaneously, which helps to solve the problem of large network latency in the related art when multiple devices execute multiple actions. Figure 9 , an embodiment of the present application provides a device control method, which is illustrated by taking the method applied to a device as an example. Among them, the device may be Figure 1 the gateway 150 in
[0096] . As shown in Figure 9 , the device control method may include the following steps:
[0097] Step 510, obtaining a scenario control instruction for multiple devices.
[0098] Among them, the scenario control instruction is used to instruct each device to execute the corresponding scenario action respectively.
[0099] In a possible implementation manner, the scenario control instruction at least includes: the scenario identifier of the scenario, the device identifiers of at least one device, and the action identifiers of the scenario actions corresponding to be executed by at least one device in the scenario.
[0100] Regarding the acquisition of the scenario control instruction, in a possible implementation manner, specifically, it refers to receiving a scenario control instruction for multiple devices sent by a user terminal. Among them, the scenario control instruction is used to indicate that the target scenario constructed in the user terminal is executed, and corresponding scenario actions are configured for multiple devices in the target scenario. In this way, the scenario control instruction is for the target scenario to be a controlled execution scenario. The scenario control instruction is generated when the user executes the target scenario with one key, and then is sent from the user terminal to the gateway, so that the gateway controls each device to execute the corresponding scenario actions configured in the controlled execution scenario respectively.
[0101] Regarding the acquisition of scene control instructions, in a possible implementation manner, specifically, it refers to receiving device status data sent by multiple devices, where the device status data is used to indicate the device status of the devices; according to the received device status data, if it is determined that the trigger condition in the device linkage data is satisfied, then according to the scene actions corresponding to multiple devices in the device linkage data, a scene control instruction for the multiple devices is generated. In this way, for an automated scene, when the trigger condition configured in the automated scene is satisfied, the scene control instruction is generated by the gateway so that the gateway controls each device to respectively execute the corresponding scene actions configured in the automated scene.
[0102] Step 520, based on the scene control instruction, perform configuration detection on the scene action records of each device, and determine at least one first device that has completed configuration and / or at least one second device that has not been configured.
[0103] Among them, the first device is a device that has configured scene action records. The second device is a device that has not been configured. The scene action record is a record of the scene actions that the device is configured to be allowed to execute in the scene.
[0104] In a possible implementation manner, the configuration detection of the scene action record refers to determining multiple devices according to the device identifiers in the scene control instruction, and then determining whether each device stores the scene identifier of the scene and the action identifier of the scene action executed by the device in the scene, so as to determine whether each device has configured a scene action record.
[0105] For example, for each of the multiple devices determined according to the device identifiers in the scene control instruction, the gateway performs configuration detection of the scene action record for the device, including: the gateway sends a configuration detection request regarding the scene action record to the device; in response to the configuration detection request, the device returns a corresponding request response to the gateway, and the request response carries the scene identifier A stored in the device and the action identifier C3 of the scene action executed by the device in the scene, then it is determined that the device has configured a scene action record. That is, the scene action record records that the device executes the scene action represented by the action identifier C3 in the scene represented by the scene identifier A.
[0106] Take the device that has completed configuration as the first device, and execute step 530, that is, in response to the scene control instruction, execute the scene action recorded for the first device in the scene action record.
[0107] Take the device that has not been configured as the second device, and execute step 550, that is, in response to the device control instruction corresponding to the scene control instruction, execute the scene action configured for the second device in the scene.
[0108] Step 530: Use at least one first device as a multicast member, and send a scene control instruction to the multicast members to instruct the multicast members to synchronously execute the scene actions recorded for them in the scene action record in response to the scene control instruction.
[0109] Figure 10 shows a schematic diagram of the gateway sending different instructions to the first device and the second device respectively. In Figure 10 , since the two first devices have completed the configuration of the scene action record, that is, the two first devices have recorded the scene actions they should execute in the scene. Therefore, for these two first devices, the gateway 150 actually controls them in a multicast transmission mode through a single scene control instruction (instruction ①), so as to enable the two first devices to synchronously execute the scene actions related to themselves in the scene action record.
[0110] Step 550: Send the device control instructions corresponding to the scene control instructions to each second device respectively according to the unicast transmission mode, so that each second device executes the corresponding scene actions in response to the device control instructions.
[0111] As mentioned above, for the second device, it does not store any scene identifiers of the scenes and the action identifiers of the scene actions it executes in the scene. Therefore, in a possible implementation, the device control instruction is extracted from the scene control instruction and at least includes the scene identifier of the scene and the action identifier of the scene action that the second device executes in the scene, so as to instruct the second device to execute the scene action in the scene.
[0112] Continue to refer to Figure 10 , since the two second devices have not completed the configuration of the scene action record, that is, the two second devices do not know the scene actions they should execute in the scene. Therefore, for these two second devices, the gateway 150 sends two device control instructions (instruction ② and instruction ③) to each second device in a unicast transmission mode, so that the two second devices execute their scene actions in the scene in the order of receiving the device control instructions.
[0113] According to the actual needs of network operation, in an application scenario, the process of device control is implemented among the user terminal, the server side, and the gateway. For example, the scene control instruction is forwarded from the server side to the gateway. In another application scenario, the process of device control can also be implemented between the user terminal and the gateway. For example, the scene control instruction is sent from the user terminal to the gateway.
[0114] Through the above process, for the second device that has not been configured, the device control has not been improved, and the gateway still needs to send multiple instructions one by one to control multiple intelligent devices one by one. For the first device that has completed the configuration, the device control has been greatly improved, that is, the gateway only needs to send one instruction to control multiple intelligent devices to perform multiple actions at the same time, thus avoiding the actions of multiple intelligent devices being executed in sequence. As the number of intelligent devices increases, it is more conducive to reducing the network delay of multiple devices performing actions, achieving the effect of quickly controlling multiple devices simultaneously, and greatly improving the user experience. For example, the user hopes that multiple intelligent devices perform the same action to achieve the effect of action consistency, rather than performing actions one after another.
[0115] In addition, the configuration of scene action records is not only applicable to multiple devices performing the same action, but also equally applicable to multiple devices performing different actions, effectively expanding the generality of device control.
[0116] Please refer to Figure 11 , in an exemplary embodiment, the device control method may further include the following steps:
[0117] Step 610, for each first device, receive the device status data sent by the first device.
[0118] Among them, the device status data is used to indicate the device status of the first device after performing the scene action. For example, the scene is the bathroom. If the intelligent fan performs the off action, the device status data is used to indicate that the device status of the intelligent fan is off. Or, if the intelligent light performs the on action, the device status data is used to indicate that the device status of the intelligent light is on.
[0119] Step 630, detect whether the reception of the device status data times out.
[0120] Relative to the gateway, the timeout of receiving the device status data is also the timeout of the first device reporting the device status data. If it is detected that at least one first device reports the device status data timeout, then step 650 is executed. On the contrary, if it is detected that none of the first devices report the device status data timeout, it is confirmed that all first devices have synchronously executed the scene actions recorded for the first devices in the scene action record.
[0121] Step 650, re - send the scene control instruction to each first device according to the multicast transmission mode.
[0122] In a possible implementation, the scenario control instruction is resent to all the first devices. In a possible implementation, the scenario control instruction is resent to the first devices that reported timeout until it is confirmed that all the first devices have synchronously executed the scenario actions recorded for them in the scenario action record. This can not only maximize the success rate of action execution and thus ensure the success rate of device control, but also fully guarantee the stability of device control.
[0123] It should be noted that for each first device, some first devices may have executed the scenario action and reported the device status data without timeout, then such first devices can ignore the re-received scenario control instruction. For the first devices that have not executed the scenario action or have reported the device status data with timeout, they need to respond to the re-received scenario control instruction again and re-execute the scenario actions recorded for them in the scenario action record.
[0124] In the above process, device status reporting detection is realized. Through the timeout retransmission mechanism, the first devices can receive the scenario control instruction again and be controlled again, so that they can execute the scenario actions again, thereby enhancing the robustness of the system and improving the stability of device control.
[0125] The following is an embodiment of the apparatus of the present application, which can be used to execute the device control method involved in the present application. For the details not disclosed in the embodiment of the apparatus of the present application, please refer to the method embodiment of the device control method involved in the present application.
[0126] Please refer to Figure 12 , in the embodiment of the present application, a device control apparatus 900 is provided, including but not limited to: an instruction acquisition module 910, a device identification module 930, and an instruction sending module 950.
[0127] Among them, the instruction acquisition module 910 is used to acquire the scenario control instruction for multiple devices; the scenario control instruction is used to instruct each of the devices to execute the corresponding scenario action respectively.
[0128] The device identification module 930 is used to identify the first devices among the devices; the first devices are the devices configured with the scenario action records associated with the scenario control instruction.
[0129] The instruction sending module 950 is used to, if at least one of the first devices is identified, send the scenario control instruction to each of the first devices in a multicast transmission manner, so as to instruct each of the first devices to synchronously execute the scenario actions recorded for them in the scenario action record in response to the scenario control instruction.
[0130] In an exemplary embodiment, the instruction acquisition module includes: an instruction receiving unit, configured to receive a scenario control instruction for a plurality of the devices sent by a user terminal, where the scenario control instruction is used to indicate that a target scenario constructed in the user terminal is to be executed, and corresponding scenario actions are configured for the plurality of the devices in the target scenario.
[0131] In an exemplary embodiment, the instruction acquisition module includes: a status data receiving unit, configured to receive device status data sent by a plurality of the devices, where the device status data is used to indicate the device status of the devices; an instruction generating unit, configured to, according to the received device status data, if it is determined that a trigger condition in device linkage data is satisfied, generate a scenario control instruction for the plurality of the devices according to actions corresponding to the plurality of the devices in the device linkage data.
[0132] In an exemplary embodiment, the device identification module includes: a configuration detection unit, configured to perform configuration detection of scenario action records for each of the devices based on the scenario control instruction, and determine at least one first device for which configuration is completed and / or at least one second device for which configuration is not performed; the instruction sending module includes: a multicast sending unit, configured to use at least one of the first devices as a multicast member and send the scenario control instruction to the multicast members.
[0133] In an exemplary embodiment, the instruction sending module further includes: a unicast sending unit, configured to, if at least one of the second devices is identified, send device control instructions corresponding to the scenario control instruction to each of the second devices respectively according to a unicast transmission method, so that each of the second devices respectively executes corresponding scenario actions in response to the device control instructions.
[0134] In an exemplary embodiment, the apparatus further includes: a status data receiving module, configured to receive device status data sent by each of the first devices, where the device status data is used to indicate the device status of the first device after executing a scenario action; an instruction retransmission module, configured to, if it is detected that the reception of the device status data of the first device times out, re-send the scenario control instruction to each of the first devices according to a multicast transmission method.
[0135] In an exemplary embodiment, the apparatus further includes: a configuration data receiving module, configured to receive scenario configuration data, where the scenario configuration data at least indicates scenario actions that the plurality of the devices are configured to be allowed to execute; a configuration module, configured to request configuration of scenario action records for a third device among the plurality of the devices according to the scenario configuration data; the third device is a device that supports configuration of scenario action records.
[0136] In an exemplary embodiment, the configuration module includes: a device determination unit configured to determine a third device among a plurality of devices based on the plurality of devices indicated by the scenario configuration data; a snapshot data acquisition unit configured to obtain, from the scenario configuration data, snapshot configuration data associated with the determined third device, where the snapshot configuration data is used to indicate scenario actions that the third device is configured to be allowed to execute; and a snapshot data sending unit configured to send the snapshot configuration data to the associated third device, such that the third device configures scenario action recording according to the snapshot configuration data, and in a case where the scenario action recording configuration is completed, the third device is transformed into the first device that has completed the configuration.
[0137] Please refer to Figure 13 , an apparatus for controlling a device 1000 provided in an embodiment of the present application includes, but is not limited to: an instruction receiving module 1010 and an action execution module 1030.
[0138] Among them, the instruction receiving module 1010 is configured to receive a scenario control instruction for a plurality of devices; the scenario control instruction is used to instruct each of the devices to execute corresponding scenario actions respectively.
[0139] The action execution module 1030 is configured to execute, in response to the scenario control instruction, scenario actions related to itself in the scenario action recording based on the configured scenario action recording associated with the scenario control instruction.
[0140] It should be noted that when the apparatus for controlling a device provided in the above embodiment performs device control, only the division of the above functional modules is used for illustration. In actual applications, the above functions may be allocated to different functional modules according to needs, that is, the internal structure of the apparatus for controlling a device will be divided into different functional modules to complete all or part of the functions described above.
[0141] In addition, the apparatus for controlling a device provided in the above embodiment and the embodiment of the method for controlling a device belong to the same concept. The specific manners in which each module performs operations have been described in detail in the method embodiment, and will not be elaborated here.
[0142] Please refer to Figure 14 , Figure 14 A schematic structural diagram of a device shown according to an exemplary embodiment. The device is applicable to Figure 1 the device 130, the gateway 150, and the server side 170 in the implementation environment shown.
[0143] It should be noted that this device is only an example adapted to the present application and cannot be considered as providing any limitation to the scope of use of the present application. This device cannot be interpreted as requiring dependence on or necessarily having Figure 14One or more components in the exemplary device 2000 shown.
[0144] The hardware structure of device 2000 can vary significantly due to different configurations or performances, such as Figure 14 As shown, device 2000 includes: a power supply 210, an interface 230, at least one memory 250, and at least one central processing unit (CPU) 270.
[0145] Specifically, the power supply 210 is used to provide working voltage for each hardware device on device 2000.
[0146] The interface 230 includes at least one wired or wireless network interface for interacting with external devices. For example, for Figure 1 the interaction between the user terminal 110 and the gateway 150 in the illustrated implementation environment.
[0147] Of course, in other examples adapted to this application, the interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input / output interface 235, and at least one USB interface 237, etc., as Figure 14 shown, and this is not specifically limited herein.
[0148] The memory 250, as a carrier for resource storage, can be a read-only memory, a random access memory, a disk, or an optical disc, etc. The resources stored thereon include an operating system 251, application programs 253, and data 255, etc., and the storage method can be transient storage or permanent storage.
[0149] Among them, the operating system 251 is used to manage and control each hardware device and application program 253 on device 2000 to enable the central processing unit 270 to perform operations and processing on the massive data 255 in the memory 250. It can be Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSD TM, etc.
[0150] The application program 253 is a computer program that completes at least one specific task based on the operating system 251. It can include at least one module ( Figure 14 not shown in the figure), and each module can separately contain a computer program for device 2000. For example, the device control device can be regarded as an application program 253 deployed on device 2000.
[0151] The data 255 can be photos, pictures, etc. stored on the disk, or device status data, scene configuration data, etc., and are stored in the memory 250.
[0152] The central processing unit 270 may include one or more processors, and is configured to communicate with the memory 250 through at least one communication bus to read the computer program stored in the memory 250, so as to perform operations and processing on the massive data 255 in the memory 250. For example, the device control method is completed by reading a series of computer programs stored in the memory 250 through the central processing unit 270.
[0153] In addition, the present application can also be implemented by hardware circuits or a combination of hardware circuits and software. Therefore, the implementation of the present application is not limited to any specific hardware circuit, software, or the combination of both.
[0154] Please refer to Figure 15 , in the embodiments of the present application, a device 4000 is provided. The device 400 may include: devices, gateways, servers, etc.
[0155] In Figure 15 , the device 4000 includes at least one processor 4001, at least one communication bus 4002, and at least one memory 4003.
[0156] Among them, the processor 4001 and the memory 4003 are connected, such as through the communication bus 4002. Optionally, the device 4000 may further include a transceiver 4004, and the transceiver 4004 may be used for data interaction between the device and other devices, such as sending and / or receiving data, etc. It should be noted that in practical applications, the transceiver 4004 is not limited to one, and the structure of the device 4000 does not constitute a limitation on the embodiments of the present application.
[0157] The processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure of the present application. The processor 4001 may also be a combination that implements a computing function, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0158] The communication bus 4002 may include a path for transmitting information among the above components. The communication bus 4002 can be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 15 it is only represented by a thick line in the figure, but it does not mean that there is only one bus or one type of bus.
[0159] 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. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0160] A computer program is stored in the memory 4003, and the processor 4001 reads the computer program stored in the memory 4003 through the communication bus 4002.
[0161] When the computer program is executed by the processor 4001, the device display method in the above embodiments is implemented.
[0162] In addition, an embodiment of the present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the device display method in the above embodiments is implemented.
[0163] An embodiment of the present application provides a computer program product, which includes a computer program stored in a storage medium. The processor of the computer device reads the computer program from the storage medium, and the processor executes the computer program, so that the computer device executes the device display method in the above embodiments.
[0164] Compared with the related art, in the way of recording scene actions, record the scene actions corresponding to at least one device in the scene, and configure them to the at least one device in this scene. During the device control process, send scene control instructions to these devices in a multicast manner, and these devices can execute the corresponding scene actions simultaneously according to the scene actions recorded for them in the configured scene action record, avoiding controlling multiple intelligent devices one by one based on multiple instructions, that is, avoiding the sequential execution of corresponding scene actions by multiple intelligent devices, thereby reducing the network latency of multiple devices performing multiple actions, and thus effectively solving the problem of large network latency of multiple devices performing multiple actions existing in the related art.
[0165] It should be understood that although each step in the flowchart of the accompanying drawings is shown sequentially according to the indication of the arrow, these steps do not necessarily have to be executed in the order indicated by the arrow. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages do not necessarily have to be executed at the same moment, but can be executed at different moments, and their execution order does not necessarily have to be sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0166] The above are only partial embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A device control method, characterized in that, The method includes: Based on the constructed scenarios for multiple devices, obtaining scenario control instructions for the multiple devices; the scenario control instructions are used to instruct each of the devices to perform corresponding scenario actions in the constructed scenarios; the constructed scenarios are completed by configuring scenario actions for the multiple devices respectively. Based on the scenario control instructions, performing configuration detection of scenario action records for each of the devices, and identifying a first device and / or a second device among the devices; the first device is a device that supports the configuration of scenario action records and has been configured with scenario action records; the second device is a device that does not support the configuration of scenario action records; the scenario action records are configured for the first device according to scenario configuration data, and are records of the scenario actions that the first device is configured to be allowed to perform in the constructed scenarios; the scenario configuration data is generated when the user terminal constructs scenarios for multiple devices. If at least one of the first devices is identified, sending the scenario control instructions to each of the first devices in a multicast transmission manner, so as to instruct each of the first devices to synchronously perform the scenario actions recorded for the first device in the scenario action records in response to the scenario control instructions. If at least one of the second devices is identified, sending device control instructions corresponding to the scenario control instructions to each of the second devices respectively in a unicast transmission manner, so that each of the second devices performs corresponding scenario actions in response to the device control instructions.
2. The method according to claim 1, wherein The obtaining of scenario control instructions for multiple devices based on the constructed scenarios for multiple devices includes: Receiving scenario control instructions for the multiple devices sent by the user terminal, where the scenario control instructions are used to instruct the execution of a target scenario constructed in the user terminal, and corresponding scenario actions are configured for the multiple devices in the target scenario.
3. The method according to claim 1, wherein The obtaining of scenario control instructions for multiple devices based on the constructed scenarios for multiple devices includes: Receiving device status data sent by the multiple devices, where the device status data is used to indicate the device status of the devices. According to the received device status data, if it is determined that the trigger condition in the device linkage data is satisfied, generating scenario control instructions for the multiple devices according to the scenario actions that the multiple devices correspondingly perform in the device linkage data.
4. The method according to claim 1, characterized in that, The performing of configuration detection of scenario action records for each of the devices based on the scenario control instructions and identifying a first device and / or a second device among the devices includes: Based on the scenario control instructions, performing configuration detection of scenario action records for each of the devices, and determining at least one of the first devices that has been configured, and / or, at least one of the second devices that has not been configured. The sending of the scenario control instructions to each of the first devices in a multicast transmission manner includes: Using at least one of the first devices as multicast members, and sending the scenario control instructions to the multicast members.
5. The method according to claim 1, characterized in that, After sending the scenario control instructions to each of the first devices in a multicast transmission manner, the method further includes: For each of the first devices, receive the device status data sent by the first device, where the device status data is used to indicate the device status after the first device performs a scenario action; If it is detected that the reception of the device status data of the first device times out, re - send the scenario control instruction to each of the first devices in a multicast transmission manner.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Receive scenario configuration data, where the scenario configuration data at least indicates scenario actions that multiple devices are configured to be allowed to perform; According to the scenario configuration data, request to configure scenario action recording for a third device among the multiple devices; the third device is a device that supports scenario action recording configuration.
7. The method according to claim 6, wherein The requesting to configure scenario action recording for the first device among the multiple devices according to the scenario configuration data includes: Based on the multiple devices indicated by the scenario configuration data, determine the third device among the multiple devices; Obtain, from the scenario configuration data, snapshot configuration data associated with the determined third device, where the snapshot configuration data is used to indicate scenario actions that the third device is configured to be allowed to perform; Send the snapshot configuration data to the associated third device, so that the third device configures scenario action recording according to the snapshot configuration data. When the scenario action recording configuration is completed, the third device is transformed into the first device that has completed the configuration.
8. A device control method, characterized in that, The method includes: Based on the constructed scenario for multiple devices, receive a scenario control instruction for the multiple devices; the scenario control instruction is used to indicate that each device performs a corresponding scenario action in the constructed scenario; the constructed scenario is completed by configuring scenario actions for multiple devices respectively; Based on the configured scenario action recording, in response to the scenario control instruction, perform the scenario action related to itself in the scenario action recording; the scenario action recording is configured for the first device according to the scenario configuration data and is a record of the scenario actions that the first device is configured to be allowed to perform in the constructed scenario; the first device is a device that supports scenario action recording configuration and has been configured with scenario action recording; the scenario configuration data is generated when the user terminal constructs a scenario for multiple devices.
9. A device control device, characterized in that, The apparatus includes: An instruction acquisition module, configured to obtain a scenario control instruction for multiple devices based on the constructed scenario for multiple devices; the scenario control instruction is used to indicate that each device performs a corresponding scenario action in the constructed scenario; the constructed scenario is completed by configuring scenario actions for multiple devices respectively; The device identification module is used to perform configuration detection of scenario action records for each of the devices based on the scenario control instruction, and identify the first device and / or the second device among each of the devices; the first device is a device that supports scenario action recording and has been configured with scenario action records; the second device is a device that does not support scenario action recording configuration; the scenario action record is configured for the first device according to the scenario configuration data, and is a record of the scenario actions that the first device is configured to be allowed to execute in the constructed scenario; the scenario configuration data is generated when the user terminal constructs scenarios for multiple devices. The instruction sending module is used to, if at least one of the first devices is identified, send the scenario control instruction to each of the first devices in a multicast transmission manner, so as to instruct each of the first devices to synchronously execute the scenario actions recorded for the first device in the scenario action record in response to the scenario control instruction; if at least one of the second devices is identified, send the device control instruction corresponding to the scenario control instruction to each of the second devices in a unicast transmission manner, so that each of the second devices executes the corresponding scenario actions in response to the device control instruction.
10. An apparatus control device, characterized in that, The device includes: The instruction receiving module is used to receive the scenario control instruction for multiple devices based on the constructed scenario for multiple devices; the scenario control instruction is used to instruct each of the devices to execute corresponding scenario actions in the constructed scenario; the constructed scenario is completed by configuring scenario actions for multiple devices respectively. The action execution module is used to execute the scenario actions related to itself in the scenario action record in response to the scenario control instruction based on the configured scenario action record; the scenario action record is configured for the first device according to the scenario configuration data, and is a record of the scenario actions that the first device is configured to be allowed to execute in the constructed scenario; the first device is a device that supports scenario action recording configuration and has been configured with scenario action records; the scenario configuration data is generated when the user terminal constructs scenarios for multiple devices.
11. A device, characterized in that, It includes: At least one processor, at least one memory, and at least one communication bus, wherein, The computer program is stored on the memory, and the processor reads the computer program in the memory through the communication bus; When the computer program is executed by the processor, it implements the device control method according to any one of claims 1 to 8.
12. A storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, it implements the device control method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method for controlling and reporting equipment in contextual model of whole-house intelligent system
CN113485129A