Device control method, system, device and medium
By establishing local linkage rules and encrypted control instructions in the device, the problem in the existing technology that remote control of the device relies on cloud forwarding is solved, efficient local control and simplified configuration processes are achieved, and the impact of traffic and faults is reduced.
Patent Information
- Application Number
- CN202311841412.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-26
- Filing Date
- 2023-12-28
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2043-12-28
AI Technical Summary
Existing technology requires forwarding through the cloud for device remote control, which results in the inability to achieve device linkage when the gateway or cloud fails, and generates additional traffic and complex configuration processes.
By establishing local linkage rules, the control end receives the linkage rules sent by the cloud and makes a judgment. If they are consistent, the process will be issued, otherwise it will be resent; encrypted control instructions and keys are used for local matching initialization, and the controlled device executes according to the local MAC address. Instructions to avoid cloud forwarding and traffic.
It achieves local control of the device, avoids the impact of cloud failures, optimizes the configuration process, reduces traffic, and improves control efficiency.
Smart Images

Figure CN117614993B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a device control method, system, device and medium. Background Art
[0002] In order to achieve remote control of the device or real-time viewing of the device data, it is necessary to realize device linkage through the cloud. Specifically, the control device reports the message to the cloud through Bluetooth broadcast or other links, and the cloud identifies and matches the linkage rules corresponding to the device. After the rule matching is completed, the cloud encapsulates the control message and sends it to the controlled device through Bluetooth broadcast or other links, thereby realizing remote device control. Of course, before realizing device control, the cloud also needs to transmit the encapsulated message rules to the control device through Bluetooth broadcast or other links, and transmit the matching message rules to the controlled device through Bluetooth broadcast or other links, and complete the distribution of the rules of the control device and the controlled device at the same time, so that the local linkage can take effect.
[0003] However, the linkage between the control device and the controlled device in the existing technology needs to be forwarded through the cloud. When the gateway or the cloud fails, the device linkage cannot be realized. At the same time, a large number of local and cloud interactive messages will be generated in the system, generating additional traffic. The linkage rules also need to be sent to the control device and the controlled device at the same time, which makes the configuration complicated. Summary of the invention
[0004] In order to overcome the deficiencies of the prior art, one of the objectives of the present invention is to provide a device control method, which establishes local linkage rules to achieve local control of the controlled device by the control terminal.
[0005] One of the purposes of the present invention is achieved by the following technical solution:
[0006] A device control method comprises the following steps:
[0007] The controlled device receives the local linkage rules sent by the cloud, and forwards the linkage rules to the cloud;
[0008] The cloud performs linkage rule judgment: if the linkage rule sent by the cloud is consistent with the linkage rule received, the linkage rule issuance process is completed, otherwise the local linkage rule is resent to the controlled device;
[0009] Enter matching initialization, the control end sends the encrypted control command to the controlled device through the local MAC address, and the encrypted key is stored in the cloud and the control end;
[0010] After the controlled device receives the control instruction, it matches the local MAC address with the control instruction according to the stored linkage rules. If the match is successful, the control instruction is decrypted and executed through the key, and the matching initialization is successful. The key is sent to the controlled device when the cloud sends the local linkage rules; otherwise, the matching initialization fails.
[0011] Furthermore, the local linkage rule includes a local MAC address of a control device and a device control logic, and the local linkage rule uses a TLV protocol.
[0012] Furthermore, before the controlled device receives the local linkage rule sent by the cloud and forwards the linkage rule to the cloud, it also includes:
[0013] The cloud receives and stores the information and control rules of the control device and the controlled device;
[0014] The cloud replaces the preset device information in the control rule according to the information of the control device and the controlled device, generates a local linkage rule and sends it to the controlled device.
[0015] Furthermore, forwarding the linkage rule to the cloud also includes: sending the linkage rule and its corresponding CRC to the cloud; the cloud stores the CRC corresponding to the local linkage rule.
[0016] Furthermore, the cloud performs linkage rule judgment, including: the cloud compares the stored CRC with the received CRC, the received CRC is the CRC sent by the controlled device, if the CRC is the same, completes the linkage rule issuance process, otherwise resends the local linkage rule to the controlled device.
[0017] Furthermore, after the matching initialization is successful, it also includes:
[0018] The control end receives the control instruction;
[0019] When the control instruction is a remote control instruction issued by the cloud, the local linkage rule is not triggered and the control instruction is executed, and the control result is reported to the cloud; when the control instruction is a local control instruction, the local linkage rule is executed.
[0020] Furthermore, the control end reports the control result to the cloud through the global MAC address; when reporting the control result to the cloud, the controlled device simultaneously obtains the control result and performs MAC address judgment. If the MAC address is a global MAC address, no operation is performed; if the MAC address is a local MAC address, the local linkage rule is executed.
[0021] A second object of the present invention is to provide a device control system, which sends local linkage rules to the controlled device through the cloud, so that the control end can control the controlled device using the local linkage rules.
[0022] The second object of the present invention is achieved by adopting the following technical solution:
[0023] A device control system, comprising: a control terminal, a cloud terminal and a device terminal;
[0024] The device end is used to receive local linkage rules sent by the cloud and forward the linkage rules to the cloud; when a control instruction is received, the local MAC address and the control instruction are matched according to the stored linkage rules. If the match is successful, the control instruction is decrypted and executed by the key, and the matching initialization is successful; otherwise, the matching initialization fails.
[0025] The cloud is used to judge the linkage rules: if the linkage rules sent by the cloud are consistent with the received linkage rules, the linkage rule issuance process is completed, otherwise the local linkage rules are resent to the controlled device;
[0026] The control terminal is used to send encrypted control instructions to the controlled device through the local MAC address, and the encrypted key is stored in the cloud and the control terminal, and is sent to the device terminal along with local rules.
[0027] The third object of the present invention is to provide an electronic device for performing one of the objects of the invention, which includes a processor, a storage medium and a computer program, wherein the computer program is stored in the storage medium, and when the computer program is executed by the processor, the above-mentioned device control method is implemented.
[0028] A fourth object of the present invention is to provide a computer-readable storage medium storing one of the objects of the invention, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned device control method is implemented.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] The device control method of the present invention only needs to send the local linkage rules to the controlled device through the cloud, without sending them to the control device, thereby optimizing the configuration process and making the linkage rules send faster; when the control instruction sent locally by the control end matches the linkage rule, the instruction is decrypted to complete the linkage matching between the control end and the controlled device, and the encrypted control instruction can ensure that the data cannot be tampered with, and the controlled device key only needs to be sent and stored together with the linkage rule, and then decrypted by the key to achieve control of the local device, without repeatedly acquiring and decrypting the control instructions through the cloud; in addition, the local linkage control of the present invention can avoid the inability of local users to control the device due to cloud failure, and the local control efficiency is higher, which is not affected by cloud network fluctuations and cloud performance, and also reduces the forwarding traffic. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a flow chart of the device control method of embodiment 1;
[0032] Figure 2 is a flow chart of the device linkage method of embodiment 2;
[0033] Figure 3 is a schematic diagram of a device control system of Embodiment 3;
[0034] Figure 4 It is a structural block diagram of an electronic device of the fourth embodiment. DETAILED DESCRIPTION
[0035] The present invention will be described in more detail below in conjunction with the accompanying drawings. It should be noted that the following description of the present invention with reference to the accompanying drawings is only illustrative and not restrictive. The various embodiments can be combined with each other to form other embodiments not shown in the following description.
[0036] Embodiment 1
[0037] Embodiment 1 provides a device control method, which aims to achieve local linkage between the control end and the controlled device by sending linkage rules to the controlled device without interacting with the control end. The control end is the device that sends control messages, and the controlled device is the device that receives control messages and performs response operations.
[0038] Usually, in the cloud, such as the IoT platform, linkage rules are implemented through a rule engine, which requires large memory and CPU resources. However, the memory and CPU of local devices are small and cannot meet the requirements of the rule engine. Therefore, the device linkage in the existing technology is implemented through the cloud.
[0039] In fact, in many cases, the control of devices is completed locally, such as the linkage between the control end and the controlled device within the same LAN or Bluetooth coverage. However, due to the limitation that the linkage rules are stored in the cloud, even local control must be forwarded through the cloud and the cloud must identify the device and match the control instructions. Although local control can also be achieved through physical connections, there is a problem that changes to the device or the control end require changes to the physical line.
[0040] The device control method described in this embodiment abandons the existing technical rule logic matching scheme and directly adopts the preset TLV matching scheme, that is, TLV matching → execution action. No logical matching is required, only TLV matching is required, so the scheme has low requirements for memory and CPU. Through software definition, only the rules need to be modified, and the original switch control TV rules are changed to switch control air conditioner rules, which greatly saves time and money costs.
[0041] The above-mentioned TLV refers to a structure consisting of data type Type, data length Length, and data value Value. It can describe almost any data type. The Value of TLV can also be a TLV structure to realize a nested structure.
[0042] It should be noted that the data transmission in this embodiment can be achieved through a local area network, Bluetooth broadcasting, etc., and this embodiment does not limit the specific transmission method.
[0043] According to the above principles, please refer to Figure 1 As shown, a device control method comprises the following steps:
[0044] S1. The controlled device receives the local linkage rules sent by the cloud, and forwards the linkage rules to the cloud;
[0045] The above-mentioned local linkage rule includes the local MAC address of the control device and the device control logic, and the local linkage rule uses the TLV protocol.
[0046] Before step S1, it is also necessary to generate a local linkage rule. Specifically, before the controlled device receives the local linkage rule sent by the cloud and forwards the linkage rule to the cloud, it also includes:
[0047] The cloud receives and stores the information and control rules of the control device and the controlled device;
[0048] The cloud replaces the preset device information in the control rule according to the information of the control device and the controlled device, generates a local linkage rule and sends it to the controlled device.
[0049] The specific content of the control rules will not be elaborated in this embodiment. It should be noted that since the control rules or control logic of different devices or different brands are not necessarily the same, the cloud can store local control rules for multiple devices or multiple brands. During actual operation, the cloud needs to replace the corresponding addresses in the control rules with the local MAC address and global MAC address of the control end. It is worth noting that since the key rules of different control ends and controlled devices may be different from the control rules stored in the cloud, for example, the control end button 1 corresponds to the start of the controlled device, and the button 0 in the control rule corresponds to the start of the controlled device. At this time, it is necessary to convert the logic to the logic of the control rule, such as matching the control end button 1 to the button 0 in the rule; the names of different controlled devices in the rules can also be replaced, such as replacing "air conditioner" in the rule with "TV", etc. There are many implementation methods such as the implementation logic code or the programming language used for the specific local linkage rules, which will not be elaborated in this embodiment. Of course, the local linkage rules can also be configured manually and sent directly to the cloud for subsequent operations.
[0050] Forwarding the linkage rule to the cloud in S1 also includes: sending the linkage rule and its corresponding CRC to the cloud; the cloud stores the CRC corresponding to the local linkage rule.
[0051] CRC is a cyclic redundancy check, which is a fast algorithm that generates a short fixed-bit check code based on network data packet data. It is mainly used to detect or check errors that may occur after data transmission or storage.
[0052] S2. The cloud performs linkage rule judgment: if the linkage rule sent by the cloud is consistent with the received linkage rule, the linkage rule issuance process is completed, otherwise the local linkage rule is resent to the controlled device;
[0053] The cloud performs linkage rule judgment, including: the cloud compares the stored CRC with the received CRC, the received CRC is the CRC sent by the controlled device, if the CRC is the same, completes the linkage rule issuance process, otherwise resends the local linkage rule to the controlled device.
[0054] The above-mentioned CRC of the rule configuration (linkage rule) reported by the controlled device, the cloud compares the saved configuration CRC with the reported CRC, and realizes the function that the configuration sent must reach the device. Usually, the way of sending configuration in the prior art is to send the configuration CRC at the same time as sending the configuration in the cloud. After the controlled device receives the configuration sent by the cloud, the controlled device performs CRC comparison. If the CRC is the same, it proves that the received configuration is the same as the one sent by the cloud, the configuration is sent successfully, and a reception success packet is sent to the cloud. If the CRC is different, it means that the configuration has failed to be sent, and a reception failure data packet is sent to the cloud, and the cloud re-sends the configuration. Since the cloud needs to handle the situation where the device reports the loss, it is also necessary to add timeout and other mechanism processing, and the logic is complicated. Compared with the solution of the prior art, the CRC reporting solution of this embodiment has simple logical processing. The controlled device reports the CRC, and the cloud compares and re-sends the rules or the next matching operation according to the results, which reduces the difficulty of cloud calculation and the data length of the sent data packet. When the configuration of the controlled device is lost, the CRC changes. The cloud can quickly discover the configuration loss problem and re-send the configuration through CRC comparison, so that when the device configuration is accidentally lost, the configuration can still be re-synchronized. The CRC of the prior art solution is sent from the cloud and compared on the controlled device side, so it is difficult to detect and handle in time when the configuration of the controlled device is lost. In addition, the prior art cannot complete the configuration sending when the controlled device is not online, while the solution described in this embodiment can complete the configuration sending by uploading the CRC to the cloud after the controlled device is online.
[0055] S3, entering matching initialization, the control end sends the encrypted control command to the controlled device through the local MAC address, and the encrypted key is stored in the cloud and the control end;
[0056] The matching initialization in S3 refers to matching the control terminal with the controlled device after the local linkage rule is issued. The above encryption method is not limited in this embodiment, and AES128, SHA family algorithms, etc. can be used for encryption implementation.
[0057] The key can be pre-stored in the cloud and the control end at the factory, or it can be generated by adding a key generation algorithm in the cloud or the control end and transmitted to each other. This embodiment does not limit the specific method of generating the key.
[0058] S4. After the controlled device receives the control instruction, it matches the local MAC address with the control instruction according to the stored linkage rule. If the match is successful, the control instruction is decrypted and executed by the key, and the matching initialization is successful. The key is sent to the controlled device when the cloud sends the local linkage rule; otherwise, the matching initialization fails.
[0059] The following is an example of an operation to illustrate step S4:
[0060] 1. Turn on the physical button 1 on the control terminal.
[0061] 2. Through the Bluetooth broadcast channel, the control end sends the key 1 open message TLV format DATA (such as 0x010101) to the controlled device through the local MAC address. TLV DATA is encrypted using the key KEY through the AES128 encryption algorithm.
[0062] 3. The controlled device receives the local MAC message sent by the control device, and checks whether the linkage rule between the local MAC address of the control end and button 1 exists. If it exists, the key KEY sent by the cloud is used to decrypt the DATA data, obtain the MATCH: TLV data (0x010101), execute the linkage rule and finally execute the action, ACTION: TLV (such as 0x020100); otherwise, exit.
[0063] Embodiment 2
[0064] Embodiment 2 is carried out on the basis of embodiment 1, and describes specific local linkage control.
[0065] Please refer to Figure 2 As shown, after the matching initialization is successful, it also includes:
[0066] S21, the control end receives the control instruction;
[0067] The above-mentioned control instructions include control instructions issued by the cloud and local control instructions. The cloud sends control commands to the control end without triggering local linkage rules. Only when the control instructions are issued to the control end, the linkage rules between the control device and the controlled device are triggered.
[0068] S22: When the control instruction is a remote control instruction issued by the cloud, the local linkage rule is not triggered and the control instruction is executed, and the control result is reported to the cloud; when the control instruction is a local control instruction, the local linkage rule is executed.
[0069] Specifically, the control end reports the control result to the cloud through the global MAC address; when reporting the control result to the cloud, the controlled device simultaneously obtains the control result and performs MAC address judgment. If the MAC address is a global MAC address, no operation is performed; if the MAC address is a local MAC address, the local linkage rule is executed.
[0070] For example, the control end receives the button 1 on command sent from the cloud, and compares whether the local button is touched. If the local button is not touched, it is considered to be a command sent by the cloud console, otherwise it is considered to be a local physical button operation. If the cloud control button 1 is turned on, no local linkage operation is performed, and only the button 1 of the control device itself is turned on.
[0071] After the control end presses button 1, it uses the global MAC to report the operation result to the cloud through Bluetooth broadcast. The controlled device will also receive the message reported to the cloud by the control device through Bluetooth broadcast, but the MAC address in the linkage rule on the controlled device is configured with the local MAC of the control device, which is different from the global MAC of the control end, so the message will be discarded and the linkage operation will not be performed.
[0072] It is worth noting that the second lowest bit of the highest byte of the MAC address indicates whether the MAC address is global or local. If it is 0, it means it is a global address, otherwise it means a local address. For example, 00:00:00:00:00:01 represents a global MAC, and the corresponding local MAC is 02:00:00:00:00:01. Therefore, it is easy to distinguish between global addresses and local addresses.
[0073] In summary, the solution of this embodiment simplifies the linkage rule configuration process, and can distinguish between local operations and cloud operations, thereby realizing local linkage capabilities between devices.
[0074] Embodiment 3
[0075] Embodiment 3 discloses a system corresponding to the device control method of the above embodiment, please refer to Figure 3 As shown, it includes: a control end 310, a cloud end 320 and a device end 330;
[0076] The device end is used to receive local linkage rules sent by the cloud and forward the linkage rules to the cloud; when a control instruction is received, the local MAC address and the control instruction are matched according to the stored linkage rules. If the match is successful, the control instruction is decrypted and executed by the key, and the matching initialization is successful; otherwise, the matching initialization fails.
[0077] The cloud is used to judge the linkage rules: if the linkage rules sent by the cloud are consistent with the received linkage rules, the linkage rule issuance process is completed, otherwise the local linkage rules are resent to the controlled device;
[0078] The control terminal is used to send encrypted control instructions to the controlled device through the local MAC address, and the encrypted key is stored in the cloud and the control terminal, and is sent to the device terminal along with local rules.
[0079] Preferably, the local linkage rule includes a local MAC address of a control device and a device control logic, and the local linkage rule uses a TLV protocol.
[0080] Preferably, before the controlled device receives the local linkage rule sent by the cloud and forwards the linkage rule to the cloud, it also includes:
[0081] The cloud receives and stores the information and control rules of the control device and the controlled device;
[0082] The cloud replaces the preset device information in the control rule according to the information of the control device and the controlled device, generates a local linkage rule and sends it to the controlled device.
[0083] Preferably, forwarding the linkage rule to the cloud further includes: sending the linkage rule and its corresponding CRC to the cloud; the cloud stores the CRC corresponding to the local linkage rule.
[0084] Preferably, the cloud performs linkage rule judgment, including: the cloud compares the stored CRC with the received CRC, the received CRC is the CRC sent by the controlled device, if the CRC is the same, complete the linkage rule sending process, otherwise resend the local linkage rule to the controlled device.
[0085] Preferably, after the matching initialization is successful, the method further includes:
[0086] The control end receives the control instruction;
[0087] When the control instruction is a remote control instruction issued by the cloud, the local linkage rule is not triggered and the control instruction is executed, and the control result is reported to the cloud; when the control instruction is a local control instruction, the local linkage rule is executed.
[0088] Preferably, the control end reports the control result to the cloud via the global MAC address; when reporting the control result to the cloud, the controlled device simultaneously obtains the control result and performs MAC address judgment. If the MAC address is a global MAC address, no operation is performed; if the MAC address is a local MAC address, the local linkage rule is executed.
[0089] Embodiment 4
[0090] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention is shown in FIG. Figure 4 As shown, the electronic device includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of processors 410 in the computer device can be one or more. Figure 4 A processor 410 is taken as an example; the processor 410, the memory 420, the input device 430 and the output device 440 in the electronic device can be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0091] The memory 420 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and modules. The processor 410 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 420, that is, implements the device control method of the above-mentioned embodiments 1 to 2.
[0092] The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 420 may further include a memory remotely arranged relative to the processor 410, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0093] The input device 430 may be used to receive input user identity information, device data, linkage rules, etc. The output device 440 may include a display device such as a display screen.
[0094] Embodiment 5
[0095] Embodiment 5 of the present invention further provides a storage medium containing computer executable instructions, and the storage medium can be used for a computer to execute a device control method, the method comprising:
[0096] The controlled device receives the local linkage rules sent by the cloud, and forwards the linkage rules to the cloud;
[0097] The cloud performs linkage rule judgment: if the linkage rule sent by the cloud is consistent with the linkage rule received, the linkage rule issuance process is completed, otherwise the local linkage rule is resent to the controlled device;
[0098] Enter matching initialization, the control end sends the encrypted control command to the controlled device through the local MAC address, and the encrypted key is stored in the cloud and the control end;
[0099] After the controlled device receives the control instruction, it matches the local MAC address with the control instruction according to the stored linkage rules. If the match is successful, the control instruction is decrypted and executed through the key, and the matching initialization is successful. The key is sent to the controlled device when the cloud sends the local linkage rules; otherwise, the matching initialization fails.
[0100] Of course, the computer executable instructions of a storage medium containing computer executable instructions provided by an embodiment of the present invention are not limited to the method operations described above, and can also execute related operations in the device-based method provided by any embodiment of the present invention.
[0101] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for an electronic device (which can be a mobile phone, a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0102] For those skilled in the art, various other corresponding changes and deformations can be made according to the technical solutions and concepts described above, and all of these changes and deformations should fall within the protection scope of the claims of the present invention.
Claims
1. A device control method, characterized in that: The following steps are involved: The controlled device receives the local linkage rule sent by the cloud, and forwards the linkage rule to the cloud; forwarding the linkage rule to the cloud also includes: sending the linkage rule and its corresponding CRC to the cloud; the cloud stores the CRC corresponding to the local linkage rule; The cloud performs linkage rule judgment: if the linkage rule sent by the cloud is consistent with the received linkage rule, the linkage rule issuance process is completed, otherwise the local linkage rule is resent to the controlled device; the cloud performs linkage rule judgment, including: the cloud compares the stored CRC with the received CRC, the received CRC is the CRC sent by the controlled device, if the CRCs are the same, the linkage rule issuance process is completed, otherwise the local linkage rule is resent to the controlled device; Entering matching initialization, the control end sends encrypted control instructions to the controlled device through the local MAC address, and the encrypted key is stored in the cloud and the control end; After the controlled device receives the control instruction, it matches the local MAC address with the control instruction according to the stored linkage rules. If the match is successful, the control instruction is decrypted and executed through the key, and the matching initialization is successful. The key is sent to the controlled device when the cloud sends the local linkage rules; otherwise, the matching initialization fails.
2. The device control method according to claim 1, characterized in that: The local linkage rule includes a local MAC address of a control device and a device control logic, and the local linkage rule uses a TLV protocol.
3. The device control method according to claim 1 or 2, characterized in that: Before the controlled device receives the local linkage rule sent by the cloud and forwards the linkage rule to the cloud, the following steps are also included: The cloud receives and stores the information and control rules of the control device and the controlled device; The cloud replaces the preset device information in the control rule according to the information of the control device and the controlled device, generates a local linkage rule and sends it to the controlled device.
4. The device control method according to claim 1, characterized in that: After the matching is successfully initialized, it also includes: The control end receives the control instruction; When the control instruction is a remote control instruction issued by the cloud, the local linkage rule is not triggered and the control instruction is executed, and the control result is reported to the cloud; when the control instruction is a local control instruction, the local linkage rule is executed.
5. The device control method according to claim 4, characterized in that: The control end reports the control result to the cloud through the global MAC address; when reporting the control result to the cloud, the controlled device simultaneously obtains the control result and performs MAC address judgment. If the MAC address is a global MAC address, no operation is performed; If the MAC address is a local MAC address, the local linkage rule is executed.
6. A device control system, characterized in that: It includes: Control side, cloud side and device side; The device end is used to receive the local linkage rules sent by the cloud end, and forward the local linkage rules to the cloud end; Forwarding the linkage rule to the cloud also includes: sending the linkage rule and its corresponding CRC to the cloud; the cloud stores the CRC corresponding to the local linkage rule; when receiving the control instruction, matching the local MAC address with the control instruction according to the stored local linkage rule, if the match is successful, decrypting the control instruction by using the key and executing the control instruction, and the matching initialization is successful; otherwise, the matching initialization fails; The cloud is used to perform local linkage rule judgment: if the local linkage rule sent by the cloud is consistent with the received local linkage rule, the local linkage rule issuance process is completed, otherwise the local linkage rule is resent to the device end; the cloud performs linkage rule judgment, including: the cloud compares the stored CRC with the received CRC, the received CRC is the CRC sent by the device end, if the CRCs are the same, the linkage rule issuance process is completed, otherwise the local linkage rule is resent to the device end; The control end is used to send encrypted control instructions to the device end through the local MAC address. The encrypted key is stored in the cloud and the control end, and is sent to the device end along with local rules.
7. An electronic device comprising a processor, a storage medium and a computer program, wherein the computer program is stored in the storage medium, wherein: When the computer program is executed by a processor, the device control method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the device control method according to any one of claims 1 to 5 is implemented.
