Equipment control method and device, equipment and storage medium
By generating and processing execution failure information in the device group control system, the notification and processing problems when the device execution fails are solved, the synchronization and reliability of the device group control are improved, and the stability of the system is enhanced.
Patent Information
- Application Number
- CN202411373493.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-27
AI Technical Summary
When multiple devices receive and execute control instructions at the same time, if an equipment fails to execute, there is a lack of effective notification and processing mechanism, resulting in incomplete or inconsistent execution of the instructions, affecting system stability and reliability.
When the target device fails to execute the group control command, the execution failure information is generated and sent to the corresponding receiver (such as a server or other device) so that the receiver can generate a control strategy based on the failure information and perform synchronous control of the device set. Specific strategies include pausing execution of instructions, repeatedly sending instructions or replacing devices, etc.
By timely processing equipment execution failure information, the synchronization and consistency of equipment group control is improved, the flexibility and reliability of the system are enhanced, and the stability of equipment group control is ensured.
Smart Images

Figure CN119211313A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of device group control, and in particular, to a device control method, apparatus, device and storage medium. Background Art
[0002] Device group control refers to the synchronous control of multiple devices through a server. In the existing group control command execution system, when multiple devices receive and execute control commands at the same time, if a device fails to execute, there is usually a lack of effective notification and processing mechanism. This may lead to incomplete or inconsistent execution of commands, affecting the stability and reliability of the entire system. Therefore, how to control the group control device in a timely manner when the device fails to execute the group control command has become an urgent problem to be solved. Summary of the invention
[0003] In view of this, in order to solve the above technical problems or part of the technical problems, the embodiments of the present invention provide a device control method, apparatus, device and storage medium.
[0004] In a first aspect, an embodiment of the present invention provides a device control method, which is applied to a target device, including:
[0005] Receiving a group control instruction sent by a server, where the group control instruction is used to control devices in a device set;
[0006] When the target device fails to execute the group control instruction, generating execution failure information;
[0007] The execution failure information is sent to a receiving end corresponding to the target device, so that the receiving end controls the devices in the device set according to the execution failure information. The receiving end includes: the server and / or the first device, and the first device and the target device are devices in the device set.
[0008] In a possible implementation manner, sending the execution failure information to a receiving end corresponding to the target device to control the receiving end according to the execution failure information includes:
[0009] When the target device has an association relationship with each device in the device set, determining that the receiving end is the server;
[0010] The execution failure information is sent to the server, so that the server generates a control policy for the device set according to the execution failure information, and controls the devices in the device set according to the control policy.
[0011] In a possible implementation manner, enabling the server to generate a control strategy for the device set according to the execution failure information includes:
[0012] so that the server determines the execution failure reason of the target device according to the execution failure information;
[0013] When the execution failure reason is an internal reason of the target device, the control strategy is determined to be a first strategy, and the first strategy is to control all devices in the device set to suspend execution of the group control instruction.
[0014] In a possible implementation manner, enabling the server to generate a control strategy for the device set according to the execution failure information includes:
[0015] so that the server determines the execution failure reason of the target device according to the execution failure information;
[0016] When the reason for the execution failure is an external reason of the target device, the control strategy is determined to be the second strategy, and the second strategy is to repeatedly send group control instructions to the target device at intervals of a preset duration, and when the number of times the execution failure information is received is greater than a threshold number, all devices in the device set are controlled to suspend the execution of the group control instructions.
[0017] In a possible implementation manner, sending the execution failure information to a receiving end corresponding to the target device to control the receiving end according to the execution failure information includes:
[0018] When the target device has an association relationship with a first device in the device set, determining that the receiving end is the first device;
[0019] The execution failure information is sent to the first device, so that the first device generates a control strategy for the first device according to the execution failure information, and controls the first device according to the control strategy.
[0020] In a possible implementation manner, enabling the first device to generate a control strategy for the first device according to the execution failure information includes:
[0021] so that the first device determines the execution failure reason of the target device according to the execution failure information;
[0022] When the execution failure reason is an internal reason of the target device, the control strategy is determined to be a third strategy, and the third strategy is to control the first device and the target device to suspend execution of the group control instruction.
[0023] In a possible implementation manner, enabling the first device to generate a control strategy for the first device according to the execution failure information includes:
[0024] so that the first device determines the execution failure reason of the target device according to the execution failure information;
[0025] When the execution failure reason is an external reason of the target device, the control strategy is determined to be the fourth strategy, and the fourth strategy is to control the first device and the target device to suspend the execution of the group control instruction when the number of times the execution failure information is received is greater than the number threshold.
[0026] In a second aspect, an embodiment of the present invention provides a device control apparatus, including:
[0027] A receiving module, used to receive a group control instruction sent by a server, wherein the group control instruction is used to control devices in a device set;
[0028] A generating module, used for generating execution failure information when the target device fails to execute the group control instruction;
[0029] A sending module is used to send the execution failure information to a receiving end corresponding to the target device so that the receiving end controls the device in the device set according to the execution failure information. The receiving end includes: the server and / or the first device, and the first device and the target device are devices in the device set.
[0030] In a third aspect, an embodiment of the present invention provides a device, comprising: a processor and a memory, wherein the processor is used to execute a device control program stored in the memory to implement the device control method described in any one of the first aspects above.
[0031] In a fourth aspect, an embodiment of the present invention provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the device control method described in any one of the first aspects above.
[0032] The device control solution provided by the embodiment of the present invention receives a group control instruction sent by a server, and the group control instruction is used to control the devices in the device set; when the target device fails to execute the group control instruction, an execution failure message is generated; the execution failure message is sent to the receiving end corresponding to the target device, so that the receiving end controls the devices in the device set according to the execution failure message, and the receiving end includes: the server and / or the first device, and the first device and the target device are devices in the device set. As a result, when the target device fails to execute the group control instruction, the devices in the group control device set can be synchronously controlled in time, thereby improving the synchronization and consistency of the device group control, and the receiving end of the execution failure message includes the server and the first device, and controls are performed on different receiving ends, thereby improving the flexibility and reliability of the device group control. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of a flow chart of a device control method provided by an embodiment of the present invention;
[0034] Figure 2 A schematic diagram of a flow chart of another device control method provided by an embodiment of the present invention;
[0035] Figure 3 A flowchart of another device control method provided by an embodiment of the present invention;
[0036] Figure 4 A flowchart of another device control method provided by an embodiment of the present invention;
[0037] Figure 5 A schematic diagram of the structure of a device control device provided by an embodiment of the present invention;
[0038] Figure 6 A schematic diagram of the structure of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.
[0041] Figure 1A flow chart of a device control method provided by an embodiment of the present invention is as follows: Figure 1 As shown, the method specifically includes:
[0042] S11. Receive a group control instruction sent by a server, where the group control instruction is used to control devices in a device set.
[0043] The device control method provided in an embodiment of the present invention is applied to a target device, where the target device is a device in a device set that needs to be group controlled. The device set may be a device that needs to be linked controlled (for example, curtains, lamps, air conditioners, etc. that need to be linked controlled in smart home devices). Specifically, when the target device fails to execute a group control instruction, the execution failure information is sent to different receiving ends, so that different control strategies are generated by the receiving ends to control the device set.
[0044] In this embodiment, the server is connected to each device in the device set in communication, and each device in the device set is also connected to each other in communication. The connection method is not specifically limited in this embodiment (for example, Bluetooth, WiFi, etc.), and message queues, message confirmation and other mechanisms can be used to ensure the reliability and timeliness of the transmission and reception of information and instructions. When the server performs group control, it will send the corresponding group control instructions to each device in the device set. When the target device receives its corresponding group control instruction, it will execute the group control instruction and determine whether the execution fails.
[0045] S12: When the target device fails to execute the group control instruction, an execution failure message is generated.
[0046] In this embodiment, when the target device fails to execute the group control command, an execution failure message is generated according to the current execution failure reason. The execution failure message may include but is not limited to: the unique identifier of the target device, the executed command content, the device execution log (characterizing the execution failure reason) and the timestamp of the failure, etc. If the execution is successful, an execution success message is also generated. The execution failure message and the execution success message are used to return to the receiving end corresponding to the target device. Among them, the execution failure reason may include but is not limited to: the internal reason and external reason of the target device itself. The internal reason may be a failure of the target device, and the external reason may be a network connection failure, a server failure, etc.
[0047] S13: Send the execution failure information to a receiving end corresponding to the target device, so that the receiving end controls the devices in the device set according to the execution failure information.
[0048] In this embodiment, the receiving end may include: a server and a first device, the first device being a device in the device set associated with the target device, that is, the first device and the target device must execute the group control instruction synchronously or there is a sequence when the first device and the target device execute the group control instruction (for example, the first device is a lamp, the target device is a curtain, and the lamp should be turned on when the curtain is closed. The device set may also include devices such as smart TVs and smart speakers that are not associated with the target device). The number of first devices may be multiple.
[0049] The receiving end can be preset as a server or a first device. When the receiving end is preset as a server, the execution failure information is sent to the server, and the server controls the devices in the device set according to the execution failure information. The specific control strategy can be to control the target device and the first device with an associated relationship to suspend the execution of the group control instruction, or to control the devices in the entire device set to suspend the execution of the group control instruction, or the server repeatedly sends the group control instruction to the target device, and when the number of execution failure information received is greater than the number threshold, the target device and the first device with an associated relationship or the devices in the entire device set are controlled to suspend the execution of the group control instruction, wherein when the first device or the devices in the device set suspend the execution of the group control instruction, the currently executed step can be suspended, or restored to the state before the group control instruction is executed.
[0050] Furthermore, after the pause, the server can obtain a new group control instruction corresponding to the target device at a preset interval; send the new group control instruction to the target device, and at the same time send a command to continue executing the group control instruction to other devices that have paused the execution of the group control instruction. The new group control instruction can be a pre-set backup group control instruction corresponding to each device when the execution of the group control instruction fails (for example, the air conditioning group control instruction is to turn on the cooling mode, and the backup new group control instruction can be to turn on the dehumidification mode. Or, the group control instruction is that the wind speed is high, and the new group control instruction can be that the wind speed is automatically adjusted).
[0051] When the receiving end is preset as the first device, the execution failure information is sent to the first device, and the first device controls the devices in the device set according to the execution failure information. The first device can be all the devices in the device set, or the devices in the device set that are associated with the target device. After receiving the execution failure information, the first device can directly control itself to suspend the execution of the group control instruction, or suspend the execution of the group control instruction when the number of execution failure information received is greater than the number threshold, and then re-execute the group control instruction when receiving the start execution instruction again, or wait for the server or the target device to send other control instructions. The target device can directly enter the pause state when the execution fails, or repeat the execution of the group control instruction after a preset time period, and determine whether the execution fails.
[0052] In a possible implementation, the receiving end is determined according to the current association between the target device and the first device. Specifically, when the target device has an association relationship with each device in the device set, or the number of the associated first devices is greater than a set threshold, the receiving end can be determined to be a server, and the devices in the device set are uniformly controlled by the server. When the target device has an association relationship with only one first device, or the number of first devices is less than or equal to the set threshold, the receiving end is determined to be each first device, so as to directly control each first device.
[0053] As an example, Figure 4 The figure shows a flow chart of another device control method provided by an embodiment of the present invention. Specifically, the group control instruction of the server is triggered, and the group control instruction is issued to each device in the device set. When the target device receives the group control instruction and executes it, the execution fails due to certain reasons (including: external reasons and internal reasons), and the device generates an execution failure message. The execution failure information may include: the target device unique identifier, the content of the executed instruction, the reason for the execution failure (or the device execution log), and the timestamp of the failure. At this time, the device has two ways to push its own execution failure information, which can be sent to the server or to the first device with an associated relationship. The specific sending object can be flexibly configured according to the system configuration or specified requirements, and only one or both can be sent. If the device sends the execution failure information to the server, the server analyzes the failure reason when receiving the information to determine whether it is a temporary failure or a system problem; according to the analysis results, it is decided to re-issue the instruction to the device for execution or other processing solutions (including but not limited to replacing the device, changing the system status, and adjusting the execution strategy of other devices at the same time). If the device's execution failure information is sent to the first device, other devices can take the following processing measures: suspend or terminate the execution of related instructions to avoid wasting resources or hidden system conflicts; if the first device has a processing plan, it can flexibly adjust its execution strategy according to the content of the notification; if there is no plan, it can wait for further instructions from the server.
[0054] The device control method provided by the embodiment of the present invention receives a group control instruction sent by a server, and the group control instruction is used to control the devices in the device set; when the target device fails to execute the group control instruction, an execution failure message is generated; the execution failure message is sent to the receiving end corresponding to the target device, so that the receiving end controls the devices in the device set according to the execution failure message, and the receiving end includes: the server and / or the first device, and the first device and the target device are devices in the device set. As a result, when the target device fails to execute the group control instruction, the devices in the group control device set can be synchronously controlled in time, thereby improving the synchronization and consistency of the device group control, and the receiving end of the execution failure message includes the server and the first device, and controls are performed on different receiving ends, thereby improving the flexibility and reliability of the device group control.
[0055] Figure 2 A flow chart of another device control method provided by an embodiment of the present invention is as follows: Figure 2 As shown, the method specifically includes:
[0056] S21. Receive a group control instruction sent by the server, where the group control instruction is used to control devices in the device set;
[0057] S22: When the target device fails to execute the group control instruction, an execution failure message is generated.
[0058] In this embodiment, similar to step S11 and step S12, the specific details can be referred to Figure 1 For the sake of brevity, the relevant content will not be elaborated here.
[0059] S23: When the target device has an association relationship with each device in the device set, determine that the receiving end is the server; and send the execution failure information to the server.
[0060] In this embodiment, the association relationship between the target device and each device is determined. The association relationship can be pre-set when the device set is generated. When the target device has an association relationship with each device in the device set, or the number of devices with an association relationship is greater than a preset threshold, the processing pressure is large due to the need to control a large number of devices. In order to alleviate the processing pressure of the device, the receiving end is determined to be a server, and the target device sends an execution failure message to the server.
[0061] S24, enabling the server to generate a control policy for the device set according to the execution failure information, and to control the devices in the device set according to the control policy.
[0062] In this embodiment, when the server receives execution failure information, it can generate a control policy for all devices in the device set, or it can generate a control policy only for the first device associated with the target device. The specific control policy is related to the execution failure cause of the target device.
[0063] The server generates a control strategy for the device set based on the execution failure information, including: the server determines the execution failure reason of the target device based on the execution failure information; when the execution failure reason is an internal reason of the target device, determines the control strategy to be the first strategy, and the first strategy is to control all devices in the device set to suspend the execution of group control instructions.
[0064] When the reason for the execution failure is external to the target device, the control strategy is determined to be the second strategy. The second strategy is to repeatedly send group control instructions to the target device at a preset interval. When the number of execution failure information received is greater than the number threshold, all devices in the control device set will suspend the execution of group control instructions.
[0065] Specifically, the server can obtain the device execution log in the execution failure information, parse the execution failure reason from the device execution log, and when the execution failure reason is that the device target fails or the target device cannot execute the group control instruction, determine that the execution failure reason is the internal reason of the target device, determine that the control strategy is the first strategy, and control the devices in the device set according to the first strategy, including: sending a pause instruction to each device in the device set or each first device with an associated relationship to make it suspend the execution of the group control instruction, or restore it to a state where the group control instruction is not executed, and send an alarm prompt to the user to prompt the user to repair or replace the target device. It can be further determined whether the execution failure reason is a temporary failure of the target device (for example, the target device is being updated or upgraded or is in standby mode at the current time, and the group control instruction cannot be processed. The group control instruction can be executed normally after a preset time). If it is a temporary failure, the group control instruction can be sent to each paused device again after a preset time. If it is not a temporary failure, the user can be reminded to perform maintenance. Or, it may be that the target device cannot execute the current group control instruction, and a new group control instruction is generated to control the target device.
[0066] When the execution failure is caused by a network failure, a group control system failure, or a server failure, the execution failure is determined to be an external cause of the target device, the control strategy is determined to be the second strategy, and the devices in the device set are controlled according to the second strategy, including: the server repeatedly sends the group control command to the target device at a preset interval until all devices are successfully executed, and when the number of execution failure information received from the target device is greater than the number threshold, the devices in the control device set are all suspended from executing the group control command. Further, the user can be prompted to handle the cause of the failure before re-controlling the device to execute the group control command.
[0067] In one possible implementation, when the problem is an internal one of the target device, the server can determine whether there is a corresponding backup device for the target device. The backup device can be a pre-set device with similar functions to the target device, which is used to replace the target device when it fails (for example, the target device is air conditioner A, and the backup device is air conditioner B, or the target device is air conditioner and the backup device is a fan). When the control of the target device is suspended, or the number of execution failure messages received is greater than a threshold, the target device is replaced with a backup device, and the corresponding group control instruction is sent to the backup device.
[0068] The device control method provided by the embodiment of the present invention receives a group control instruction sent by a server, and the group control instruction is used to control the devices in the device set; when the target device fails to execute the group control instruction, an execution failure information is generated. When the target device has an association relationship with each device in the device set, the receiving end is determined to be the server; and the execution failure information is sent to the server. So that the server generates a control strategy for the device set according to the execution failure information, and controls the devices in the device set according to the control strategy. In this way, the devices in the device set can be controlled by the server when the device fails to execute the group control instruction, thereby improving the synchronization, consistency and flexibility of the device group control. At the same time, the generation of the control strategy in the server can reduce the processing pressure of the device and improve the processing efficiency when the execution failure occurs during the group control execution process.
[0069] Figure 3 A flow chart of another device control method provided by an embodiment of the present invention is as follows: Figure 3 As shown, the method specifically includes:
[0070] S31, receiving a group control instruction sent by a server, where the group control instruction is used to control devices in a device set;
[0071] S32: When the target device fails to execute the group control instruction, an execution failure message is generated.
[0072] In this embodiment, similar to step S11 and step S12, the specific details can be referred to Figure 1 For the sake of brevity, the relevant content will not be elaborated here.
[0073] S33: When the target device is associated with a first device in the device set, determine that the receiving end is the first device; and send the execution failure information to the first device.
[0074] In this embodiment, the association relationship between the target device and each device is determined. The association relationship can be pre-set when the device set is generated. When the target device has an association relationship with the first device in the device set, or the number of first devices with an association relationship is less than or equal to a preset threshold, since only a small number of first devices need to be controlled, the processing pressure is small, and the receiving end can be determined to be each first device, and the target device sends the execution failure information to the first device.
[0075] S34, enabling the first device to generate a control strategy for the first device according to the execution failure information, and to control the first device according to the control strategy.
[0076] In this embodiment, when the first device receives the execution failure information, a control strategy of the first device may be generated according to the execution failure information. The specific control strategy is related to the execution failure cause of the target device.
[0077] The first device generates a control strategy for the first device based on the execution failure information, including: the first device determines the execution failure reason of the target device based on the execution failure information; when the execution failure reason is an internal reason of the target device, determines that the control strategy is a third strategy, and the third strategy is to control the first device and the target device to suspend the execution of the group control instruction.
[0078] When the execution failure reason is an external reason of the target device, the control strategy is determined to be the fourth strategy, and the fourth strategy is to control the first device and the target device to suspend the execution of the group control instruction when the number of execution failure information received is greater than the number threshold.
[0079] Specifically, the first device can obtain the device execution log in the execution failure information, and parse the reason for the execution failure from the device execution log. When the execution failure reason is that the device target fails or the target device cannot execute the group control instruction, it is determined that the execution failure reason is an internal reason of the target device, and the control strategy is determined to be the third strategy. The first device is controlled according to the third strategy, including: controlling the first device and the target device to suspend the execution of the group control instruction, or restore to a state where the group control instruction is not executed, and sending an alarm to the user to prompt the user to repair or replace the target device, and when the first device receives the group control instruction or the target device execution success information again, it re-executes the group control instruction.
[0080] The target device can further determine whether the reason for the execution failure is a temporary failure of the target device (for example, the target device is being updated or is in standby mode at the current time, and cannot process the group control command. The group control command can be executed normally after a preset time). If it is a temporary failure, the target device can repeat the group control command at intervals of a preset time. When the execution is successful, the target device sends an execution success message to the first device so that the first device can restart the execution of the group control command. If the target device is not a temporary failure, the user can be reminded to perform maintenance. Or, it may be that the target device cannot execute the current group control command, and the target device can notify the server to generate a new group control command to control the target device.
[0081] When the execution failure is caused by a network failure, a group control system failure or a server failure, etc., the execution failure is determined to be an external reason of the target device, and the control strategy is determined to be the fourth strategy. The first device is controlled according to the fourth strategy, including: the target device can repeatedly execute the group control instruction at a preset time interval, and send an execution failure message to the first device after each execution failure. When the first device receives the execution failure message more than a threshold number of times, the first device and the target device are controlled to suspend the execution of the group control instruction until the execution success message is received, and then the first device is controlled to execute the group control instruction again.
[0082] The device control method provided by the embodiment of the present invention receives a group control instruction sent by a server, and the group control instruction is used to control the devices in the device set; when the target device fails to execute the group control instruction, an execution failure message is generated. When the target device has an association relationship with the first device in the device set, the receiving end is determined to be the first device; and the execution failure message is sent to the first device. So that the first device generates a control strategy for the first device according to the execution failure information, and controls the first device according to the control strategy. In this way, when the device fails to execute the group control instruction, the devices in the device set can be controlled by the first device with an associated relationship, thereby improving the synchronization, consistency and flexibility of the device group control. At the same time, the processing process is dispersed to each first device, and the first device can control itself and the target device, thereby improving the processing efficiency when the execution failure occurs during the group control execution process.
[0083] Figure 5 A schematic diagram of a device control device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device specifically includes:
[0084] A receiving module 51 is used to receive a group control instruction sent by a server, where the group control instruction is used to control devices in a device set;
[0085] A generating module 52, configured to generate execution failure information when the target device fails to execute the group control instruction;
[0086] The sending module 53 is used to send the execution failure information to the receiving end corresponding to the target device, so that the receiving end controls the device in the device set according to the execution failure information. The receiving end includes: the server and / or the first device, and the first device and the target device are devices in the device set.
[0087] In a possible implementation, the determination module 54 is configured to determine that the receiving end is the server when the target device has an association relationship with each device in the device set;
[0088] The sending module is specifically used to send the execution failure information to the server, so that the server generates a control strategy for the device set according to the execution failure information, and controls the devices in the device set according to the control strategy.
[0089] In a possible implementation, the control module 55 is configured to enable the server to determine the execution failure reason of the target device according to the execution failure information;
[0090] When the execution failure reason is an internal reason of the target device, the control strategy is determined to be a first strategy, and the first strategy is to control all devices in the device set to suspend execution of the group control instruction.
[0091] In a possible implementation manner, the control module is further configured to enable the server to determine the execution failure reason of the target device according to the execution failure information;
[0092] When the reason for the execution failure is an external reason of the target device, the control strategy is determined to be the second strategy, and the second strategy is to repeatedly send group control instructions to the target device at intervals of a preset duration, and when the number of times the execution failure information is received is greater than a threshold number, all devices in the device set are controlled to suspend the execution of the group control instructions.
[0093] In a possible implementation manner, the determining module is further configured to determine that the receiving end is a first device in the device set when there is an association relationship between the target device and the first device;
[0094] The sending module is further used to send the execution failure information to the first device, so that the first device generates a control strategy for the first device according to the execution failure information, and controls the first device according to the control strategy.
[0095] In a possible implementation manner, the control module is further configured to enable the first device to determine a reason for the execution failure of the target device according to the execution failure information;
[0096] When the execution failure reason is an internal reason of the target device, the control strategy is determined to be a third strategy, and the third strategy is to control the first device and the target device to suspend execution of the group control instruction.
[0097] In a possible implementation manner, the control module is further configured to enable the first device to determine a reason for the execution failure of the target device according to the execution failure information;
[0098] When the execution failure reason is an external reason of the target device, the control strategy is determined to be the fourth strategy, and the fourth strategy is to control the first device and the target device to suspend the execution of the group control instruction when the number of times the execution failure information is received is greater than the number threshold.
[0099] The device control device provided in this embodiment can be as follows Figure 5 The device shown in FIG. 1 can perform the following steps: Figure 1-3 All steps of the device control method in the Figure 1-3 For details on the technical effects of the device control method shown, please refer to Figure 1-3 For the sake of brevity, the relevant description is not repeated here.
[0100] Figure 6 A schematic diagram of a device provided in an embodiment of the present invention is provided. Figure 6 The device 600 shown includes: at least one processor 601, a memory 602, at least one network interface 604 and other user interfaces 603. The various components in the device 600 are coupled together via a bus system 605. It is understood that the bus system 605 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 605 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 605 is not shown in FIG. Figure 6 Various buses are labeled as bus system 605 .
[0101] The user interface 603 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0102] It can be understood that the memory 602 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 602 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0103] In some implementations, the memory 602 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 6021 and an application 6022 .
[0104] The operating system 6021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 6022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 6022.
[0105] In the embodiment of the present invention, by calling the program or instruction stored in the memory 602, specifically, the program or instruction stored in the application 6022, the processor 601 is used to execute the method steps provided by each method embodiment, for example, including:
[0106] Receiving a group control instruction sent by a server, where the group control instruction is used to control devices in a device set;
[0107] When the target device fails to execute the group control instruction, generating execution failure information;
[0108] The execution failure information is sent to a receiving end corresponding to the target device, so that the receiving end controls the devices in the device set according to the execution failure information. The receiving end includes: the server and / or the first device, and the first device and the target device are devices in the device set.
[0109] In a possible implementation, when the target device has an association relationship with each device in the device set, determining that the receiving end is the server;
[0110] The execution failure information is sent to the server, so that the server generates a control policy for the device set according to the execution failure information, and controls the devices in the device set according to the control policy.
[0111] In a possible implementation manner, the server determines the execution failure reason of the target device according to the execution failure information;
[0112] When the execution failure reason is an internal reason of the target device, the control strategy is determined to be a first strategy, and the first strategy is to control all devices in the device set to suspend execution of the group control instruction.
[0113] In a possible implementation manner, the server determines the execution failure reason of the target device according to the execution failure information;
[0114] When the reason for the execution failure is an external reason of the target device, the control strategy is determined to be the second strategy, and the second strategy is to repeatedly send group control instructions to the target device at intervals of a preset duration, and when the number of times the execution failure information is received is greater than a threshold number, all devices in the device set are controlled to suspend the execution of the group control instructions.
[0115] In a possible implementation, when the target device has an association relationship with a first device in the device set, determining that the receiving end is the first device;
[0116] The execution failure information is sent to the first device, so that the first device generates a control strategy for the first device according to the execution failure information, and controls the first device according to the control strategy.
[0117] In a possible implementation manner, the first device determines the execution failure reason of the target device according to the execution failure information;
[0118] When the execution failure reason is an internal reason of the target device, the control strategy is determined to be a third strategy, and the third strategy is to control the first device and the target device to suspend execution of the group control instruction.
[0119] In a possible implementation manner, the first device determines the execution failure reason of the target device according to the execution failure information;
[0120] When the execution failure reason is an external reason of the target device, the control strategy is determined to be the fourth strategy, and the fourth strategy is to control the first device and the target device to suspend the execution of the group control instruction when the number of times the execution failure information is received is greater than the number threshold.
[0121] The method disclosed in the above embodiment of the present invention can be applied to the processor 601, or implemented by the processor 601. The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 601 or the instruction in the form of software. The above processor 601 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the above method in combination with its hardware.
[0122] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0123] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0124] The device provided in this embodiment can be Figure 5 The device shown in , can be executed as Figure 1-3 All steps of the device control method in the Figure 1-3 For details on the technical effects of the device control method shown, please refer to Figure 1-3 For the sake of brevity, the relevant description is not repeated here.
[0125] The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0126] When one or more programs in the storage medium can be executed by one or more processors, the device control method executed on the device side can be implemented.
[0127] The processor is used to execute the device control program stored in the memory to implement the following steps of the device control method executed on the device side:
[0128] Receiving a group control instruction sent by a server, where the group control instruction is used to control devices in a device set;
[0129] When the target device fails to execute the group control instruction, generating execution failure information;
[0130] The execution failure information is sent to a receiving end corresponding to the target device, so that the receiving end controls the devices in the device set according to the execution failure information. The receiving end includes: the server and / or the first device, and the first device and the target device are devices in the device set.
[0131] In a possible implementation, when the target device has an association relationship with each device in the device set, determining that the receiving end is the server;
[0132] The execution failure information is sent to the server, so that the server generates a control policy for the device set according to the execution failure information, and controls the devices in the device set according to the control policy.
[0133] In a possible implementation manner, the server determines the execution failure reason of the target device according to the execution failure information;
[0134] When the execution failure reason is an internal reason of the target device, the control strategy is determined to be a first strategy, and the first strategy is to control all devices in the device set to suspend execution of the group control instruction.
[0135] In a possible implementation manner, the server determines the execution failure reason of the target device according to the execution failure information;
[0136] When the reason for the execution failure is an external reason of the target device, the control strategy is determined to be the second strategy, and the second strategy is to repeatedly send group control instructions to the target device at intervals of a preset duration, and when the number of times the execution failure information is received is greater than a threshold number, all devices in the device set are controlled to suspend the execution of the group control instructions.
[0137] In a possible implementation, when the target device has an association relationship with a first device in the device set, determining that the receiving end is the first device;
[0138] The execution failure information is sent to the first device, so that the first device generates a control strategy for the first device according to the execution failure information, and controls the first device according to the control strategy.
[0139] In a possible implementation manner, the first device determines the execution failure reason of the target device according to the execution failure information;
[0140] When the execution failure reason is an internal reason of the target device, the control strategy is determined to be a third strategy, and the third strategy is to control the first device and the target device to suspend execution of the group control instruction.
[0141] In a possible implementation manner, the first device determines the execution failure reason of the target device according to the execution failure information;
[0142] When the execution failure reason is an external reason of the target device, the control strategy is determined to be the fourth strategy, and the fourth strategy is to control the first device and the target device to suspend the execution of the group control instruction when the number of times the execution failure information is received is greater than the number threshold.
[0143] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0144] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0145] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A device control method, characterized in that: Applied to target devices, including: Receiving a group control instruction sent by a server, where the group control instruction is used to control devices in a device set; When the target device fails to execute the group control instruction, generating execution failure information; The execution failure information is sent to a receiving end corresponding to the target device, so that the receiving end controls the devices in the device set according to the execution failure information. The receiving end includes: the server and / or the first device, and the first device and the target device are devices in the device set.
2. The method according to claim 1, characterized in that The sending the execution failure information to a receiving end corresponding to the target device, so that the receiving end controls the device in the device set according to the execution failure information, includes: When the target device has an association relationship with each device in the device set, determining that the receiving end is the server; The execution failure information is sent to the server, so that the server generates a control policy for the device set according to the execution failure information, and controls the devices in the device set according to the control policy.
3. The method according to claim 2, characterized in that The method of enabling the server to generate a control strategy for the device set according to the execution failure information includes: so that the server determines the execution failure reason of the target device according to the execution failure information; When the execution failure reason is an internal reason of the target device, the control strategy is determined to be a first strategy, and the first strategy is to control all devices in the device set to suspend execution of the group control instruction.
4. The method according to claim 2, characterized in that: The method of enabling the server to generate a control strategy for the device set according to the execution failure information includes: so that the server determines the execution failure reason of the target device according to the execution failure information; When the reason for the execution failure is an external reason of the target device, the control strategy is determined to be the second strategy, and the second strategy is to repeatedly send group control instructions to the target device at intervals of a preset duration, and when the number of times the execution failure information is received is greater than a threshold number, all devices in the device set are controlled to suspend the execution of the group control instructions.
5. The method according to claim 1, characterized in that The sending the execution failure information to a receiving end corresponding to the target device, so that the receiving end controls the device in the device set according to the execution failure information, includes: When the target device has an association relationship with a first device in the device set, determining that the receiving end is the first device; The execution failure information is sent to the first device, so that the first device generates a control strategy for the first device according to the execution failure information, and controls the first device according to the control strategy.
6. The method according to claim 5, characterized in that The step of enabling the first device to generate a control strategy for the first device according to the execution failure information includes: so that the first device determines the execution failure reason of the target device according to the execution failure information; When the execution failure reason is an internal reason of the target device, the control strategy is determined to be a third strategy, and the third strategy is to control the first device and the target device to suspend execution of the group control instruction.
7. The method according to claim 5, characterized in that The step of enabling the first device to generate a control strategy for the first device according to the execution failure information includes: so that the first device determines the execution failure reason of the target device according to the execution failure information; When the execution failure reason is an external reason of the target device, the control strategy is determined to be the fourth strategy, and the fourth strategy is to control the first device and the target device to suspend the execution of the group control instruction when the number of times the execution failure information is received is greater than the number threshold.
8. A device control device, characterized in that: include: A receiving module, used to receive a group control instruction sent by a server, wherein the group control instruction is used to control devices in a device set; A generating module, used for generating execution failure information when the target device fails to execute the group control instruction; A sending module is used to send the execution failure information to a receiving end corresponding to the target device so that the receiving end controls the device in the device set according to the execution failure information. The receiving end includes: the server and / or the first device, and the first device and the target device are devices in the device set.
9. A device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a device control program stored in the memory to implement the device control method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the device control method according to any one of claims 1 to 7.