Device control method and apparatus, electronic device, and storage medium
By acquiring scene sensing information to generate control commands, device linkage control is achieved, solving the problems of energy waste and aging caused by forgetting to turn off devices in smart scenarios, and improving device management efficiency.
Patent Information
- Application Number
- CN202211175121.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-09-26
AI Technical Summary
In smart scenarios, users forgetting to turn off devices or cancel usage plans leads to energy waste and accelerated device aging.
By acquiring scene sensing information reported by the edge gateway of the scene, control commands are generated and sent to the terminal device to realize the linkage control of the device and execute predetermined actions according to real-time events.
Reduce energy waste, slow down equipment aging, and improve the success rate of equipment linkage actions.
Smart Images

Figure CN115580640B_ABST
Abstract
Description
Technical Field
[0001] This application relates to Internet of Things (IoT) device control technology, and more particularly to a device control method and apparatus, electronic device and storage medium. Background Technology
[0002] IoT platforms utilize technologies such as communication and networking, automatic control, and artificial intelligence to connect, control, and manage various devices, ultimately providing users with a more comfortable, convenient, secure, and environmentally friendly IoT environment. Within an IoT platform, devices can connect to the internet via wired or wireless connections, enabling remote control and data collection of their operational status. Sensors and other technologies can also be used to enable devices to operate automatically and in conjunction with each other.
[0003] In some scenarios (such as smart meeting rooms), users often forget to turn off smart devices such as air conditioners, lights, projectors, and printers, resulting in energy waste and accelerating the aging of these devices. Similarly, if a user schedules a time to use smart devices but then cancels the plan, this also leads to energy waste and further accelerates the devices' aging.
[0004] How to control the equipment in the scenario to reduce energy waste and slow down the aging of the equipment is still a problem that needs to be solved. Summary of the Invention
[0005] This application provides a device control method and apparatus, an electronic device and a storage medium to solve the problem of how to control devices in a scenario to reduce energy waste and slow down the aging of devices.
[0006] On the one hand, this application provides a device control method applied to a cloud server, the method comprising:
[0007] Obtain scene sensing information reported by the edge gateway of the scene. The scene sensing information is generated by the sensing devices in the scene collecting real-time events that occur in the scene and then uploaded to the edge gateway.
[0008] Control commands are generated based on the scene sensing information. The control commands are used to instruct each of the multiple terminal devices in the scene to perform its corresponding predetermined action.
[0009] The control commands are sent to each terminal device.
[0010] In one embodiment, generating control commands based on the scene sensing information includes:
[0011] Based on the scene sensing information, real-time events occurring in the scene are obtained, and characteristic events in the real-time events are identified;
[0012] When the feature events corresponding to the scene sensing information uploaded at multiple intervals identified over a preset time period are all of the first type of feature events, the first device linkage rule corresponding to the first type of feature event is obtained.
[0013] A first control command is generated based on the first device linkage rule;
[0014] Sending the control command to each terminal device includes:
[0015] The first control command is sent to each terminal device.
[0016] In one embodiment, after sending the first control command to each terminal device, and after generating the control command according to the device linkage rules, the generation of the control command based on the scene sensing information further includes:
[0017] When the feature event corresponding to the scene sensing information uploaded at the next interval is a second type of feature event, the second device linkage rule corresponding to the second type of feature event is obtained. The second type of feature event is different from the first type of feature event.
[0018] A second control command is generated based on the second device linkage rule;
[0019] The step of sending the control command to each terminal device further includes:
[0020] The second control command is sent to each terminal device.
[0021] In one embodiment, the method further includes:
[0022] If the feature event corresponding to the scene sensing information uploaded at the next interval is the first type of feature event, no action is taken.
[0023] In one embodiment, the first type of feature event is a need-to-use event or a need-to-close event, and the second type of feature event is a need-to-use event or a need-to-close event;
[0024] When the first type of feature event is a need-to-use event or the second type of feature event is a need-to-use event, the device linkage rule corresponding to the need-to-use event is device linkage activation, and the first control command or the second control command is a device linkage activation command.
[0025] When the first type of feature event is a shutdown event or the second type of feature event is a shutdown event, the device linkage rule corresponding to the shutdown event is device linkage shutdown, and the first control command or the second control command is a device linkage shutdown command.
[0026] In one embodiment, the predetermined action includes multiple actions to be executed step by step, and after sending the control command to each terminal device, the method further includes:
[0027] When the first terminal device successfully executes the first action in the corresponding predetermined action, a continue execution instruction is sent to the first terminal device so that the first terminal device executes the second action in the corresponding predetermined action, until the first terminal device has completed the corresponding predetermined action.
[0028] In one embodiment, after sending the control command to each terminal device, the method further includes:
[0029] When the second terminal device fails to complete the corresponding predetermined action, the control command is resent to the second terminal device until the Mth time it is determined that the second terminal device cannot complete the corresponding predetermined action. At this point, the information of the second terminal device is recorded, and / or...
[0030] After obtaining N actions from the predetermined actions that the second terminal device cannot execute, record them, where M and N are both natural numbers greater than zero.
[0031] In one embodiment, sending the control command to each terminal device includes:
[0032] When at least two terminal devices in the scenario have a preset state, the control command is sent to each of the at least two terminal devices.
[0033] The control command is used to instruct the terminal device to perform a corresponding predetermined action to have a state opposite to the preset state.
[0034] In one embodiment, before sending the control command to each terminal device, the method further includes:
[0035] Send an instruction distribution request to the management terminal, wherein the instruction distribution request carries the content of the control instruction;
[0036] The system receives the command and response from the management terminal and sends the control command to each terminal device.
[0037] In one embodiment, the scenario is a conference room.
[0038] On the other hand, this application provides a device control apparatus for use in a cloud server, the apparatus comprising:
[0039] The acquisition module is used to acquire scene sensing information reported by the edge gateway of the scene. The scene sensing information is generated by the sensing devices in the scene collecting real-time events that occur in the scene and then uploaded to the edge gateway.
[0040] The processing module is used to generate control instructions based on the scene sensing information. The control instructions are used to instruct each of the multiple terminal devices in the scene to perform its corresponding predetermined action.
[0041] A communication module is used to send the control commands to each terminal device.
[0042] On the other hand, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0043] The memory stores computer-executed instructions;
[0044] The processor executes computer execution instructions stored in the memory to implement the device control method as described in the first aspect.
[0045] On the other hand, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed, cause a computer to perform the device control method as described in the first aspect.
[0046] On the other hand, this application provides a computer program product, including a computer program that, when executed by a processor, implements the device control method as described in the first aspect.
[0047] The method provided in this application obtains scene sensing information reported by the edge gateway of the scene, generates control commands based on the scene sensing information, and then sends the control commands to each terminal device. The scene sensing information is generated by sensing devices in the scene collecting real-time events occurring in the scene and reported by the edge gateway in the scene. The control commands generated based on the scene sensing information are used to control the operation of devices based on real-time events; specifically, they are used to cause each of the multiple terminal devices in the scene to perform its corresponding predetermined action. The predetermined actions corresponding to the scene sensing information can be set according to actual needs. For example, if the real-time event is a shutdown event, the control commands are used to cause all predetermined actions performed by the multiple terminal devices to be shutdown.
[0048] In summary, the device control method provided by the embodiments of this application can control the devices in the scene according to real-time events that occur in the scene, thereby reducing energy waste and slowing down the aging of terminal devices. Attached Figure Description
[0049] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0050] Figure 1 A schematic diagram illustrating an application scenario of the device control method provided in this application;
[0051] Figure 2 A schematic flowchart of a device control method provided in one embodiment of this application;
[0052] Figure 3 A schematic flowchart of a device control method provided for another embodiment of this application;
[0053] Figure 4 A schematic flowchart of a device control method provided in yet another embodiment of this application;
[0054] Figure 5 A schematic diagram of a device control apparatus provided in one embodiment of this application;
[0055] Figure 6 A schematic diagram of an electronic device provided for one embodiment of this application.
[0056] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0057] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0058] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0059] IoT platforms utilize technologies such as communication and networking, automatic control, and artificial intelligence to connect, control, and manage various devices, ultimately providing users with a more comfortable, convenient, secure, and environmentally friendly IoT environment. Within an IoT platform, devices can connect to the internet via wired or wireless connections, enabling remote control and data collection of their operational status. Sensors and other technologies can also be used to enable devices to operate automatically and in conjunction with each other.
[0060] In some scenarios (such as smart meeting rooms), users often forget to turn off smart devices such as air conditioners, lights, projectors, and printers, resulting in energy waste and accelerating the aging of these devices. Similarly, if a user schedules a time to use smart devices but then cancels the plan, this also leads to energy waste and further accelerates the devices' aging.
[0061] Based on this, this application provides a device control method and apparatus, an electronic device, and a storage medium. The device control method is applied to a cloud server and includes: acquiring scene sensing information reported by an edge gateway of a scene, the scene sensing information being generated by sensing devices in the scene collecting real-time events occurring in the scene; generating a control command based on the scene sensing information, the control command being used to instruct each of a plurality of terminal devices in the scene to perform its corresponding predetermined action; and sending the control command to each terminal device.
[0062] The control commands generated based on the scene sensing information are used to control the operation of the device based on real-time events. Specifically, they are used to cause each of the multiple terminal devices in the scene to perform its corresponding predetermined action. The predetermined actions corresponding to the scene sensing information can be set according to actual needs. For example, if the real-time event is a shutdown event, the control command is used to cause all the predetermined actions performed by the multiple terminal devices to be shutdown. Therefore, the device control method provided in this application can control the devices in the scene according to the real-time events occurring in the scene, thereby reducing energy waste and slowing down the aging of terminal devices.
[0063] The device control method provided in this application is applied to electronic devices, such as computers and cloud servers. Figure 1 This is a schematic diagram illustrating the application of the device control method provided in this application. In the diagram, the electronic device acquires scene sensing information reported by the edge gateway of the scene, generates control commands based on the scene sensing information, and sends the control commands to each of the multiple terminal devices in the scene. The scene sensing information is generated by sensing devices in the scene collecting real-time events occurring in the scene. The control commands are used to instruct each of the multiple terminal devices in the scene to perform its corresponding predetermined action.
[0064] Please see Figure 2 One embodiment of this application provides a device control method applied to a cloud server, the method comprising:
[0065] S210, Obtain scene sensing information reported by the edge gateway of the scene. This scene sensing information is generated by the sensing devices in the scene collecting real-time events that occur in the scene and then uploaded to the edge gateway.
[0066] The sensing devices in the scene include human body sensors (infrared human body sensors) and sound acquisition devices. The human body sensor is used to detect whether a person is present in the scene, and the sound acquisition device is used to detect sound information in the scene. The sensing devices collect real-time events occurring in the scene, such as real-time events of whether a person is present in the scene and real-time events of whether sound information is present.
[0067] Each sensing device is bound to a unique identification document (ID) for a scene. The scene sensing information uploaded to the edge gateway can also carry this unique ID, as can the scene sensing information reported by the edge gateway to the cloud server. Therefore, after receiving the scene sensing information, the cloud server can use this unique ID to determine the corresponding scene and which terminal devices are within that scene.
[0068] The sensing device can collect real-time events at regular intervals to generate scene sensing information. Correspondingly, the edge gateway can report the scene sensing information to the cloud server at regular intervals. For example, the sensing device uploads scene sensing information every 30 seconds, and the edge gateway, after receiving the scene sensing information, reports it to the cloud server in real time via the Internet of Things.
[0069] This scenario could be a conference room. Every 30 seconds, infrared human sensors in the conference room collect real-time data on whether anyone is present, and then upload the generated scene sensing information to the edge network.
[0070] S220, a control command is generated based on the scene sensing information. The control command is used to instruct each of the multiple terminal devices in the scene to perform its corresponding predetermined action.
[0071] After acquiring the scene sensing information, the cloud server obtains real-time events occurring in the scene based on this information and then identifies characteristic events within these events. These real-time events include, for example, the appearance of a person in the scene, the sound emitted by a terminal device in the scene, and the movement of furniture in the scene. The cloud server needs to identify events with preset characteristics (i.e., characteristic events) from these real-time events, then obtain the device linkage rules for multiple terminal devices in the scene based on these characteristic events, and generate the control command according to these device linkage rules. This control command instructs each of the multiple terminal devices in the scene to execute its corresponding predetermined action. During execution, multiple terminal devices can execute their respective predetermined actions in a coordinated manner. Coordinated execution means that after one device executes a predetermined action or a step-by-step action within a predetermined action, another device or several other devices are triggered to begin executing their respective predetermined actions. Alternatively, multiple terminal devices can execute their respective predetermined actions separately.
[0072] In an optional embodiment, when multiple terminal devices coordinate to execute their respective predetermined actions, the coordinated execution of their respective predetermined actions will only be triggered after one or more terminal devices meet certain rule conditions. These rule conditions are, for example, being in a closed or open state. For instance, the coordinated execution of their respective predetermined actions will only be triggered when one or more terminal devices are in a closed state. It should be noted that previous device coordination only supported triggering the coordinated execution of actions when a single terminal device met the rule conditions. Sometimes, the coordinated execution of actions could not be achieved because other terminal devices could not coordinate. However, the method provided in this embodiment can support triggering the coordinated execution of actions when multiple terminal devices meet the rule conditions, which improves the success rate of coordinated execution of actions to a certain extent, thereby enhancing the management effect of terminal devices.
[0073] In an optional embodiment, the cloud server acquires real-time events occurring in the scene based on the scene sensing information and identifies characteristic events within those real-time events. When the characteristic events corresponding to the scene sensing information uploaded at multiple intervals within a preset time period are all of the first type of characteristic events, a first device linkage rule corresponding to the first type of characteristic event is acquired. A first control command is generated based on the first device linkage rule and sent to each terminal device. For example, if the characteristic events identified in the scene sensing information uploaded by the edge gateway to the cloud server within a periodic time are all of the first type of characteristic events, the first device linkage rule corresponding to the first type of characteristic event is acquired.
[0074] The first type of characteristic event is either a "use-required event" or a "shutdown-required event." A "use-required event" can be understood as the presence of people in the scene necessitating the device's activation, while a "shutdown-required event" can be understood as the absence of people in the scene necessitating the device's deactivation. When the first type of characteristic event is a "use-required event," the corresponding device linkage rule is "device linkage activation," and the first control command is a "device linkage activation command." "Device linkage activation" can be understood as activating certain software functions or hardware functions of the device. For example, in a conference room scenario, device linkage activation could involve lowering the air conditioner temperature and then playing a video on the television, or increasing the brightness of the lights.
[0075] For example, the edge gateway reports scene sensing information every 30 seconds. The characteristic event corresponding to this scene sensing information is either a "use-required" event or a "disable-required" event. Scene sensing information uploaded at intervals of 15 minutes all correspond to the first type of characteristic event, which is a "use-required" event. For instance, at 15:00:00, the edge gateway sends a "use-required" event; at 15:00:30, device A sends a "use-required" event; at 15:01:00, device A sends a "use-required" event; at 15:01:30, the edge gateway sends a "use-required" event, and so on, until the 15-minute interval. When this first type of characteristic event is a "use-required" event, the first device linkage rule corresponding to this first type of characteristic event is obtained. This first device linkage rule specifies that each of the multiple terminal devices in the scene is linked to start. Linked start means that when one terminal device starts, it triggers other terminal devices to also start. The linked start of terminal devices is implemented based on the IoT platform. The first control command generated according to the first device linkage rule instructs the terminal devices to perform the corresponding predetermined action, which is the linked start.
[0076] For example, the edge gateway reports scene sensing information every 30 seconds. The characteristic event corresponding to this scene sensing information is either a "use" event or a "shutdown" event. Scene sensing information uploaded at intervals of 15 minutes all correspond to the first type of characteristic event, which is a "shutdown" event. For instance, at 15:00:00, the edge gateway sends a "shutdown" event; at 15:00:30, device A sends a "shutdown" event; at 15:01:00, device A sends a "shutdown" event; at 15:01:30, the edge gateway sends a "shutdown" event, and so on, until the 15-minute interval. When this first type of characteristic event is a "shutdown" event, the first device linkage rule corresponding to this first type of characteristic event is obtained. This first device linkage rule stipulates that each of the multiple terminal devices in the scene is linked to shut down. Linked shutdown means that when one terminal device shuts down, it triggers other terminal devices to shut down as well. The linkage of terminal devices is implemented based on the IoT platform. The first control command generated according to the first device linkage rule instructs the terminal devices to perform the corresponding predetermined action of linked shutdown. In some scenarios, coordinated shutdown can also mean shutting down some software functions of a device or shutting down certain hardware components of a device. For example, in a conference room setting, the air conditioner lowers the temperature, the TV stops playing video, and the lights dim.
[0077] In an optional embodiment, if, within the validity period after the first control command is sent, the cloud server receives scene sensing information and identifies a feature event of the same type as the previous feature event, then the generation of the first control command will not be triggered again. That is, if the feature event corresponding to the scene sensing information uploaded at the next interval is the first type of feature event, the cloud server will not take any action.
[0078] After the validity period expires, the control command needs to be regenerated. There are two conditions for the validity period to expire: automatic termination and forced termination. For example, in the case of automatic termination, if the validity period is set to 10 minutes, and the characteristic events identified by the scene sensing information received within 10 minutes after the first control command is sent are still the same type of characteristic events as the previous characteristic events, the validity period will also expire when the 10-minute period ends.
[0079] The following details the circumstances under which the validity period is forcibly terminated.
[0080] When a feature event of a different type from the preceding feature event occurs within the validity period, the validity period is forcibly terminated. The second feature event differs from the first feature event. When the feature event corresponding to the scene sensing information uploaded in the next interval is a second type of feature event, the second device linkage rule corresponding to this second type of feature event is obtained, and a second control command is generated based on this second device linkage rule. The second control command is then sent to each terminal device. For example, if the feature events identified in the scene sensing information uploaded by the edge gateway to the cloud server within a period are all second type of feature events, the second device linkage rule corresponding to this second type of feature event is obtained.
[0081] The second type of characteristic event is either a "use-required event" or a "shutdown-required event." A "use-required event" can be understood as the presence of people in the scene, thus requiring the device to be turned on; a "shutdown-required event" can be understood as the absence of people in the scene, thus requiring the device to be turned off. When the second type of characteristic event is a "use-required event," the device linkage rule corresponding to this event is "device linkage start," and the second control command is a "device linkage start command."
[0082] For example, the edge gateway reports scene sensing information every 30 seconds. The characteristic event corresponding to this scene sensing information is either a "use-required" event or a "disable-required" event. Scene sensing information uploaded at intervals of 15 minutes all correspond to the second type of characteristic event, which is a "use-required" event (at this time, the first type of characteristic event is a "disable-required" event). For example, at 15:00:00, the edge gateway sends a "use-required" event; at 15:00:30, device A sends a "use-required" event; at 15:01:00, device A sends a "use-required" event; at 15:01:30, the edge gateway sends a "use-required" event, and so on, until the 15-minute interval. When this second type of characteristic event is a "use-required" event, the second device linkage rule corresponding to this second type of characteristic event is obtained. This second device linkage rule stipulates that each of the multiple terminal devices in the scene is linked to start. Linked start means that when one terminal device starts, it triggers other terminal devices to also start. The linked start of terminal devices is implemented based on the IoT platform. The second control command generated according to the second device linkage rule is used to instruct the terminal device to perform the corresponding predetermined action to activate the linkage.
[0083] For example, the edge gateway reports scene sensing information every 30 seconds. The characteristic event corresponding to this scene sensing information is either a "use" event or a "shutdown" event. Scene sensing information uploaded at intervals of 15 minutes all correspond to the second type of characteristic event, which is a "shutdown" event (at this time, the first type of characteristic event is a "use" event). For example, at 15:00:00, the edge gateway sends a "shutdown" event; at 15:00:30, device A sends a "shutdown" event; at 15:01:00, device A sends a "shutdown" event; at 15:01:30, the edge gateway sends a "shutdown" event, and so on, until the 15-minute interval. When this second type of characteristic event is a "shutdown" event, the second device linkage rule corresponding to this second type of characteristic event is obtained. This second device linkage rule stipulates that each of the multiple terminal devices in the scene will shut down in a coordinated manner. Linked shutdown means that when one terminal device shuts down, it triggers other terminal devices to also shut down. The linkage of terminal devices is implemented based on the IoT platform. The second control command generated according to the second device linkage rule is used to instruct the terminal device to perform the corresponding predetermined action of linkage shutdown.
[0084] S230, the control command is sent to each terminal device.
[0085] Sending the control command to each terminal device means sending the control command to each of the multiple terminal devices in the scenario. The control command can be either the first control command or the second control command as described above.
[0086] In an optional embodiment, when the control command is sent to each of the multiple terminal devices in the scenario, it is done when at least two terminal devices in the scenario have a preset state. The control command instructs the terminal device to perform a corresponding predetermined action to have a state opposite to the preset state. For example, when the air conditioner and computer in the conference room are both on, a control command to turn off the terminal device is sent to the air conditioner and the computer to turn them off, reducing energy consumption and slowing down equipment aging. The above-described multiple terminal devices will trigger the coordinated execution of their respective predetermined actions only after all the rule conditions are met. This can also be understood as the control command being sent to each of the at least two terminal devices only when at least two terminal devices in the scenario have a preset state, as described in this embodiment.
[0087] In an optional embodiment, the predetermined action to be performed by the terminal device can be multiple actions executed in a distributed manner, that is, the terminal device needs to complete the predetermined actions step by step. For example, an air conditioner needs to first turn off the airflow and then cut off the power. When the first terminal device (e.g., the air conditioner) successfully executes the first action (e.g., turning on the airflow) of the corresponding predetermined action, a continue execution command is sent to the first terminal device to make the first terminal device execute the second action (e.g., cutting off the power) of the corresponding predetermined action, until the first terminal device has completed the corresponding predetermined action.
[0088] When the second terminal device fails to complete the corresponding predetermined action, the control command is resent to the second terminal device. This continues until the Mth time it is determined that the second terminal device cannot complete the corresponding predetermined action. At this point, the information of the second terminal device is recorded, and / or, N actions from the corresponding predetermined actions that the second terminal device cannot perform are obtained and recorded. For example, an air conditioner needs to first turn off the airflow and then cut off the power. If turning off the airflow cannot be completed, the control command is resent to the second terminal device. If it is determined for the third time that the air conditioner cannot turn off the airflow, the air conditioner information (e.g., the air conditioner model) is recorded, and / or, the statement "the air conditioner cannot turn off the airflow" is recorded.
[0089] During the execution of device linkage rules, the running scripts support parameterized processing, meaning that certain constants in the script can be replaced with parameters. For example, the predetermined action is to execute action A, then action B. Action A outputs parameter A1, and action B inputs parameter B1. When passing parameter A1 to parameter B1 of action B, due to parameter definition or parameter type mismatch, parameter A1 needs to be converted to parameter B1 through the script. Or, if the input parameter of action B is a constant parameter B2, then the constant parameter B2 needs to be defined through the script. These scripts are often complex and difficult to run. Therefore, replacing certain constants in these scripts with parameters can not only reduce the cost of script execution but also improve the speed of device linkage execution.
[0090] In an optional embodiment, before sending the control command to each terminal device, a command issuance request is sent to the management terminal, carrying the content of the control command. The management terminal could be, for example, a mobile phone, tablet, or personal computer belonging to the conference room administrator. The conference room administrator can approve the control command and, if it is deemed appropriate to issue the command, send a command issuance response to the cloud server. The cloud server receives the command issuance response from the management terminal and then sends the control command to each terminal device. Requesting administrator approval is to better adapt to the actual usage needs of the scenario.
[0091] To make the specific implementation of the equipment control method provided in this embodiment clearer, the method will be explained using a conference room as an example.
[0092] Human body sensors in the conference room collect real-time events to generate scene sensing information, which is then sent to the edge gateway. The edge gateway then reports this information to the cloud server. The cloud server uses the scene sensing information to identify characteristic events and determines whether these events meet pre-set device linkage rules.
[0093] Please see Figure 3 For example, it determines whether a feature event is a required event specified by the device linkage rules. If the feature event is a required event, the device linkage rules corresponding to the required event are satisfied. At this point, the cloud server obtains the device status of each terminal device in the conference room. For instance, the cloud server sends a status feedback command to the terminal device, and the terminal device in the conference room reports its own status (including whether it is on or off) after receiving the status feedback command. The cloud server then determines the terminal devices that are not turned on based on the status of each terminal device and sends control commands to these terminal devices to turn them on.
[0094] Please see Figure 4 For example, it determines whether a feature event is a shutdown event specified by the device linkage rules. If the feature event is a shutdown event, the device linkage rules corresponding to the shutdown event are satisfied. At this point, the cloud server obtains the device status of each terminal device in the conference room. For instance, the cloud server sends a status upload command to the terminal devices, and the terminal devices in the conference room upload their status after receiving the command. The cloud server then determines which terminal devices are not shut down based on the status of each terminal device and sends control commands to these unshutdown terminal devices to shut them down.
[0095] In summary, the method provided in this embodiment obtains scene sensing information reported by the edge gateway of the scene, generates control commands based on the scene sensing information, and then sends the control commands to each terminal device. The scene sensing information is generated by sensing devices in the scene collecting real-time events occurring in the scene and reported by the edge gateway in the scene. The control commands generated based on the scene sensing information are used to control the operation of the devices based on real-time events. Specifically, they are used to cause each of the multiple terminal devices in the scene to perform its corresponding predetermined action. The predetermined actions corresponding to the scene sensing information can be set according to actual needs. For example, if the real-time event is a shutdown event, the control command is used to cause all the predetermined actions performed by the multiple terminal devices to be shutdown.
[0096] The device control method provided in this embodiment can control the devices in the scene according to real-time events that occur in the scene, thereby reducing energy waste and slowing down the aging of terminal devices.
[0097] Please see Figure 5 An embodiment of this application also provides a device control apparatus 10, applied to a cloud server, the device control apparatus 10 comprising:
[0098] The acquisition module 11 is used to acquire scene sensing information reported by the edge gateway of the scene. This scene sensing information is generated by the sensing devices in the scene collecting real-time events occurring in the scene and then uploaded to the edge gateway. The scene is a conference room.
[0099] The processing module 12 is used to generate control instructions based on the scene sensing information. The control instructions are used to instruct each of the multiple terminal devices in the scene to perform its corresponding predetermined action.
[0100] The communication module 13 is used to send the control command to each terminal device.
[0101] The processing module 12 is specifically used to obtain real-time events occurring in the scene based on the scene sensing information and identify feature events in the real-time events; when the feature events corresponding to the scene sensing information uploaded at multiple intervals identified within a preset time period are all first-type feature events, the module obtains the first device linkage rule corresponding to the first-type feature event; and generates a first control command based on the first device linkage rule.
[0102] The communication module 13 is specifically used to send the first control command to each terminal device.
[0103] The processing module 12 is specifically used to obtain a second device linkage rule corresponding to the second type of feature event when the feature event corresponding to the scene sensing information uploaded at the next interval is a second type of feature event. The second type of feature event is different from the first type of feature event. The second control command is generated according to the second device linkage rule.
[0104] The communication module 13 is specifically used to send the second control command to each terminal device.
[0105] The processing module 12 is also used to not take any action when the feature event corresponding to the scene sensing information uploaded at the next interval is the first type of feature event.
[0106] The first type of characteristic event is either a need-to-use event or a need-to-close event, and the second type of characteristic event is either a need-to-use event or a need-to-close event. When the first type of characteristic event is a need-to-use event or the second type of characteristic event is a need-to-use event, the device linkage rule corresponding to the need-to-use event is device linkage on, and the first control command or the second control command is a device linkage on command. When the first type of characteristic event is a need-to-close event or the second type of characteristic event is a need-to-close event, the device linkage rule corresponding to the need-to-close event is device linkage off, and the first control command or the second control command is a device linkage off command.
[0107] The predetermined action includes multiple steps. The communication module 13 is also used to send a continue execution instruction to the first terminal device when the first terminal device successfully executes the first step of the corresponding predetermined action, so that the first terminal device executes the second step of the corresponding predetermined action, until the first terminal device completes the corresponding predetermined action.
[0108] The processing module 12 is also used to resend the control command to the second terminal device when the second terminal device is unable to complete the corresponding predetermined action, until the second terminal device is determined to be unable to complete the corresponding predetermined action for the Mth time, record the information of the second terminal device, and / or, obtain and record N actions in the corresponding predetermined actions that the second terminal device cannot perform, where M and N are both natural numbers greater than zero.
[0109] The communication module 13 is specifically used to send the control command to each of the at least two terminal devices when at least two terminal devices in the scenario have a preset state; the control command is used to instruct the terminal device to perform a corresponding predetermined action to have a state opposite to the preset state.
[0110] The communication module 13 is also used to send an instruction issuance request to the management terminal, the instruction issuance request carrying the content of the control instruction; to obtain the instruction issuance response issued by the management terminal; and to send the control instruction to each terminal device.
[0111] Please see Figure 6 This application also provides an electronic device 20, including a processor 21 and a memory 22 communicatively connected to the processor 21. The memory 22 stores computer-executable instructions, and the processor 21 executes the computer-executable instructions stored in the memory 22 to implement the device control method provided in any of the preceding embodiments.
[0112] This application also provides a computer-readable storage medium storing computer-executable instructions that, when executed, cause the computer-executable instructions to be executed by a processor to implement the device control method provided in any of the preceding embodiments.
[0113] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the device control method as provided in any of the preceding embodiments.
[0114] It should be noted that the aforementioned computer-readable storage media can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc. It can also be various electronic devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0115] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0116] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0117] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0118] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0119] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0120] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0121] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A device control method, characterized in that, Applied to cloud servers, the method includes: The scene sensing information reported by the edge gateway of the scene is obtained. The scene sensing information is generated by the sensing devices in the scene after collecting real-time events that occur in the scene and uploaded to the edge gateway. The sensing devices include human body sensing devices and sound acquisition devices. Based on the scene sensing information, real-time events occurring in the scene are obtained, and characteristic events in the real-time events are identified; When the feature events corresponding to the scene sensing information uploaded at multiple intervals identified within a preset time period are all of the first type of feature events, the first device linkage rule corresponding to the first type of feature event is obtained; wherein, the first type of feature event is a need-to-use event or a need-to-close event; A first control command is generated based on the first device linkage rule; When at least two terminal devices in the scenario have a preset state, the first control instruction is sent to each of the at least two terminal devices; the first control instruction is used to instruct each terminal device in the scenario to perform its corresponding predetermined action to have a state opposite to the preset state; The predetermined action includes multiple actions to be executed step by step. After sending the first control command to each terminal device, the method further includes: When the first terminal device successfully executes the first action in the corresponding predetermined action, a continue execution instruction is sent to the first terminal device so that the first terminal device executes the second action in the corresponding predetermined action, until the first terminal device has completed the corresponding predetermined action. After sending the first control command to each terminal device, the method further includes: When the second terminal device fails to complete the corresponding predetermined action, the first control command is resent to the second terminal device until the Mth time it is determined that the second terminal device cannot complete the corresponding predetermined action. At this point, the information of the second terminal device is recorded, and / or... After obtaining N predetermined actions that the second terminal device cannot execute, record the N actions, where M and N are both natural numbers greater than zero.
2. The equipment control method according to claim 1, characterized in that, After sending the first control command to each terminal device, the method further includes: When the feature event corresponding to the scene sensing information uploaded at the next interval is a second type of feature event, the second device linkage rule corresponding to the second type of feature event is obtained. The second type of feature event is different from the first type of feature event. A second control command is generated based on the second device linkage rule; The second control command is sent to each terminal device.
3. The equipment control method according to claim 2, characterized in that, The method further includes: If the feature event corresponding to the scene sensing information uploaded at the next interval is the first type of feature event, no action is taken.
4. The equipment control method according to claim 2, characterized in that, The first type of characteristic event is a need-to-use event or a need-to-close event; the second type of characteristic event is a need-to-use event or a need-to-close event. When the first type of feature event is a need-to-use event or the second type of feature event is a need-to-use event, the device linkage rule corresponding to the need-to-use event is device linkage activation, and the first control command or the second control command is a device linkage activation command. When the first type of feature event is a shutdown event or the second type of feature event is a shutdown event, the device linkage rule corresponding to the shutdown event is device linkage shutdown, and the first control command or the second control command is a device linkage shutdown command.
5. The equipment control method according to claim 1, characterized in that, Before sending the first control command to each terminal device, the method further includes: Send an instruction distribution request to the management terminal, wherein the instruction distribution request carries the content of the first control instruction; The system receives the instruction response from the management terminal and sends the first control instruction to each terminal device.
6. The equipment control method according to claim 1, characterized in that, The setting is a conference room.
7. A device control apparatus, characterized in that, The device, applied to a cloud server, includes: The acquisition module is used to acquire scene sensing information reported by the edge gateway of the scene. The scene sensing information is generated by the sensing devices in the scene collecting real-time events that occur in the scene and then uploaded to the edge gateway. The sensing devices include human body sensing devices and sound acquisition devices. The processing module is used to generate control commands based on the scene sensing information; A communication module is used to send the control commands to each terminal device; The processing module is specifically used to acquire real-time events occurring in the scene based on the scene sensing information, and to identify characteristic events in the real-time events; When the feature events corresponding to the scene sensing information uploaded at multiple intervals identified within a preset time period are all of the first type of feature events, the first device linkage rule corresponding to the first type of feature event is obtained; wherein, the first type of feature event is a need-to-use event or a need-to-close event; A first control command is generated based on the first device linkage rule; The communication module is specifically used to send the first control instruction to each of the at least two terminal devices when at least two terminal devices in the scenario have a preset state; the first control instruction is used to instruct each of the multiple terminal devices in the scenario to perform its corresponding predetermined action to have a state opposite to the preset state; The predetermined action includes multiple actions to be executed step by step. The communication module is also used to send a continue execution instruction to the first terminal device when the first terminal device successfully executes the first action in the corresponding predetermined action, so that the first terminal device executes the second action in the corresponding predetermined action, until the first terminal device completes the corresponding predetermined action. The processing module is further configured to resend the first control command to the second terminal device when the second terminal device is unable to perform the corresponding predetermined action, until the second terminal device is determined to be unable to perform the corresponding predetermined action for the Mth time, record the information of the second terminal device, and / or, after obtaining N actions from the corresponding predetermined actions that the second terminal device cannot perform, record the N actions, where M and N are both natural numbers greater than zero.
8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the device control method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed, cause the computer to perform the device control method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the device control method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Internet of things appliance control system, control method and appliance gateway
CN104618201A