Device Offline Control Method, Device, Equipment and Storage Medium

By binding agent devices in the smart home system, using online devices to upload offline status messages to the cloud and transmit control instructions through, the problem of smart home devices being offline uncontrollable and unable to connect to the network caused by the limit on the number of routers is solved, and effective control of offline devices is achieved.

CN116112303BActive Publication Date: 2025-08-01ジャン州立達信光電子科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211292594.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-21
Publication Date
2025-08-01
Estimated Expiration
2042-10-21

AI Technical Summary

Technical Problem

In existing smart home systems, due to the limited number of routers, smart home devices are often offline and uncontrollable and cannot be connected to the network.

Method used

When the target device is offline, the offline status message is uploaded to the cloud through the online device in the same area, and the proxy device is bound according to the signal strength of the online device, and the proxy device is used to transmit control instructions through the proxy device to achieve control of the offline device.

Benefits of technology

It solves the problems of smart home devices being offline and uncontrollable and unable to connect to the network due to the limitation of router carrying amount, and realizes effective control of offline devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116112303B_ABST
    Figure CN116112303B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and storage medium for off-line control of equipment. The method includes: when the target equipment is in an off-line state, uploading the off-line state message of the target equipment to the cloud through any on-line equipment in the same area; in the cloud, according to the off-line state message of the target equipment, obtaining the current signal strength of all on-line equipment in the same area, and binding the proxy relationship between the target equipment and at least one on-line equipment according to the current signal strength of all on-line equipment to obtain at least one proxy equipment; when a control instruction needs to be sent to the target equipment, sending the control instruction to the proxy equipment through the message channel of the proxy equipment, and triggering the proxy equipment to transparently transmit the control instruction to the target equipment. Based on the above method, through the way of equipment proxy, the problems that smart home equipment is often off-line and uncontrollable due to the limitation of the number of routers carried and that smart home equipment cannot connect to the network can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of device control, and in particular, to a method, device, equipment and storage medium for offline control of devices. Background Art

[0002] With the emergence and development of cloud, wireless networks, and intelligent devices, the "cloud + terminal" smart home model is being used more and more widely. Existing smart home devices use Bluetooth through a mobile terminal to configure WIFI network information for the devices, enabling the smart home devices to connect to the cloud through a router at home, thereby realizing the control of smart home devices through the mobile terminal, which greatly facilitates the user's remote control. However, when there are multiple smart home devices connected to the router at the same time at home, due to the heavy load on the router, some smart home devices may not be able to connect to the cloud, resulting in problems such as frequent offline and uncontrollable smart home devices and smart home devices being unable to connect to the network due to the limited number of devices that the router can carry. Summary of the Invention

[0003] In view of this, embodiments of this application provide a method, device, equipment and storage medium for offline control of devices, aiming to at least solve one of the problems in the prior art such as frequent offline and uncontrollable smart home devices and smart home devices being unable to connect to the network due to the limited number of devices that the router can carry in the smart home system.

[0004] The first aspect of the embodiments of this application provides a method for offline control of devices, including:

[0005] When the target device is in an offline state, upload the offline state message of the target device to the cloud through any online device in the same area;

[0006] In the cloud, according to the offline state message of the target device, obtain the current signal strength of all online devices in the same area, and according to the current signal strength of all online devices, bind the proxy relationship between the target device and at least one online device to obtain at least one proxy device;

[0007] When a control instruction needs to be sent to the target device, send the control instruction to the proxy device through the message channel of the proxy device, and trigger the proxy device to transparently transmit the control instruction to the target device.

[0008] In combination with the first aspect, in the first possible implementation manner of the first aspect, the step of uploading the offline state message of the target device to the cloud through any online device in the same area when the target device is in an offline state includes:

[0009] When the target device is in an offline state, trigger the target device to perform message broadcasting and send a broadcast data packet to online devices in the same area, where the broadcast data packet contains the offline status message of the target device;

[0010] When any online device in the same area receives the broadcast data packet, trigger the online device to perform primary authentication processing on the broadcast data packet. If the authentication passes, use the message channel of the online device to transparently transmit the broadcast data packet to the cloud.

[0011] Combined with the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect, the step of triggering the online device to perform primary authentication processing on the broadcast data packet includes:

[0012] Use the user-level key pre-stored in the online device to decrypt the broadcast data packet. If the decryption is successful, it is determined that the authentication passes.

[0013] Combined with the second possible implementation manner of the first aspect, in the third possible implementation manner of the first aspect, before the step of using the user-level key pre-stored in the online device to decrypt the broadcast data packet, further includes:

[0014] Trigger the online device to detect its current signal strength and obtain the first signal strength;

[0015] Compare the first signal strength with a preset signal strength threshold to determine whether the first signal strength is greater than the preset signal strength threshold. If not, directly determine that the authentication fails.

[0016] Combined with the first possible implementation manner of the first aspect, in the fourth possible implementation manner of the first aspect, after the step of when any online device in the same area receives the broadcast data packet, triggering the online device to perform primary authentication processing on the broadcast data packet, and if the authentication passes, using the message channel of the online device to transparently transmit the broadcast data packet to the cloud, further includes:

[0017] Trigger the cloud to perform secondary authentication processing on the target device and the online device that uploads the offline status information of the target device to the cloud, and determine whether the target device and the online device have the same user identifier. If so, it is determined that the authentication passes.

[0018] Combined with the first aspect, in the fifth possible implementation manner of the first aspect, after the step of obtaining at least one proxy device, further includes:

[0019] Store the proxy relationships bound between the target device and each of the proxy devices in a preset cache in the cloud, and sort them according to the signal strength of each proxy device to obtain a proxy device list, so that the user terminal determines the proxy device for issuing control instructions according to the proxy device list.

[0020] Combined with the fifth possible implementation manner of the first aspect, in the sixth possible implementation manner of the first aspect, after the step of obtaining the proxy device list, it further includes:

[0021] Perform an update process on the proxy device list according to a preset update rule, where the preset update rule includes:

[0022] If the target device sends an unbinding request to the cloud, clear all binding relationships related to the target device in the proxy device list; and / or

[0023] If the proxy device sends an unbinding request to the cloud, delete the binding relationship between the proxy device and the target device in the proxy device list; and / or

[0024] If the cloud detects that the proxy device is in an offline state, update the binding relationship between the proxy device and the target device in the proxy device list to unavailable; and / or

[0025] If the cloud detects that the binding relationship between the proxy device and the target device is unavailable and the unavailable duration reaches a preset duration threshold, delete the binding relationship between the proxy device and the target device.

[0026] Combined with the first aspect, in the seventh possible implementation manner of the first aspect, after the step of obtaining at least one proxy device, it further includes:

[0027] Trigger the proxy device to send a first online status change instruction to the target device, so that the target device changes the device status to the online status according to the first online status change instruction and maintains the heartbeat of the target device; and

[0028] Trigger the proxy device to send a second online status change instruction containing the target device identity information to the cloud, so that the cloud changes the device status of the target device currently recorded in the cloud to the online status according to the second online status change instruction; and

[0029] Trigger the proxy device to monitor the receiving duration interval of the status information of the target device, and when the receiving duration interval exceeds a preset interval threshold, send a first offline status change instruction to the target device, so that the target device changes the device status to the online status according to the first online status change instruction; and

[0030] Trigger the proxy device to monitor the receiving duration interval of the status information of the target device, and when the receiving duration interval exceeds a preset interval threshold, send a second offline status change instruction including the identity information of the target device to the cloud, so that the cloud determines whether to change the device status of the target device currently recorded in the cloud to the online status according to the second offline status change instruction and other proxy devices.

[0031] Combined with the first aspect, in the eighth possible implementation manner of the first aspect, after the step of triggering the proxy device to pass the control instruction to the target device, it further includes:

[0032] Trigger the target device to perform filtering processing on the received control instruction, so that the target device retains one control instruction when receiving multiple identical control instructions.

[0033] The second aspect of the embodiments of the present application provides a device offline control device, including:

[0034] An upload module, configured to upload the offline status message of the target device to the cloud through any online device in the surrounding area when the target device is in the offline state;

[0035] An acquisition module, configured to acquire the current signal strength of all online devices in the surrounding area in the cloud according to the offline status message of the target device;

[0036] A binding module, configured to bind the target device to at least one online device to obtain at least one proxy device according to the current signal strength of all the online devices;

[0037] A control module, configured to, when a control instruction needs to be sent to the target device, send the control instruction to the proxy device through the message channel of the proxy device, and trigger the proxy device to pass the control instruction to the target device.

[0038] The third aspect of the embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the electronic device, and when the processor executes the computer program, it implements the steps of the device offline control method provided in the first aspect.

[0039] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the device offline control method provided in the first aspect are implemented.

[0040] A device offline control method, device, electronic device, and storage medium provided by the embodiments of the present application have the following beneficial effects:

[0041] In the present application, when the target device is in an offline state, the offline state message of the target device is uploaded to the cloud through any online device in the same area; in the cloud, according to the offline state message of the target device, the current signal strengths of all online devices in the same area are obtained, and based on the current signal strengths of all online devices, the target device is bound to at least one online device in a proxy relationship to obtain at least one proxy device; when a control instruction needs to be issued to the target device, the control instruction is sent to the proxy device through the message channel of the proxy device, and the proxy device is triggered to transparently transmit the control instruction to the target device. Based on the above method, through the device proxy method, the problems that smart home devices are often offline and uncontrollable due to the limited number of routers they can support and that smart home devices cannot connect to the network can be solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.

[0043] Figure 1 It is a flowchart for implementing a device offline control method provided by the embodiments of the present application;

[0044] Figure 2 It is a schematic flowchart of a method for uploading the offline state message of a target device to the cloud through any online device in the same area in the device offline control method provided by the embodiments of the present application;

[0045] Figure 3 It is a flowchart of a method for performing primary authentication in the device offline control method provided by the embodiments of the present application;

[0046] Figure 4 It is a basic structural block diagram of a device offline control device provided by the embodiments of the present application;

[0047] Figure 5 It is a basic structural block diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0048] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] Please refer to Figure 1 , Figure 1 which is a flowchart of the implementation of a device offline control method provided by an embodiment of the present application. Details are as follows:

[0050] S11: When the target device is in an offline state, upload the offline state message of the target device to the cloud through any online device in the same area.

[0051] In this embodiment, the target device and the online device represent different smart home devices in the same area. For example, different smart home devices in the same smart home system, and these smart home devices can be home appliances such as smart lights, smart sockets, smart speakers, and smart sweeping robots. In this embodiment, the smart home device is a device using an IOT Wi-Fi / Ble dual-mode Combo chip.

[0052] Since there are more and more smart devices in the smart home system, the load on the router will become larger and larger, which may cause some smart home devices to disconnect from the router, or be unable to access the external network, resulting in being unable to connect to the smart home cloud service and unable to perform data communication, making the smart home device uncontrollable and unable to synchronize the status to the smart home control App (application program) on the user terminal, thus being in an offline state.

[0053] In this embodiment, in a smart home system, if a smart home device is in an offline state, that is, the smart home device is the target device. At this time, the target device can be triggered to generate an offline state message and send the offline state message to an online device, which is any smart home device that is in the same smart home system as the target device and is in an online state. Then, the online device uploads the offline state message of the target device to the cloud to inform the cloud that the target device is currently in an offline state. It can be understood that one cloud corresponds to one smart home system.

[0054] S12: In the cloud, according to the offline state message of the target device, obtain the current signal strength of all online devices in the same area. According to the current signal strength of all online devices, bind the proxy relationship between the target device and at least one online device to obtain at least one proxy device.

[0055] In this embodiment, the cloud receives the offline status message of the target device through the message channel established with the online device by adopting the Mqtt protocol. After the cloud receives the offline status message of the target device, in the cloud, the offline status message triggers the cloud to determine all the online devices in the same area as the target device, and perform signal strength detection on all the online devices in the same area as the target device to obtain the current signal strength of each online device. The current signal strength of each online device is compared one by one with the signal strength threshold preset in the cloud as the proxy condition to determine whether each online device meets the proxy condition, and then the online devices that meet the proxy condition are bound to the target device in a proxy relationship, so that the online devices that meet the proxy condition become the proxy devices of the target device. It can be understood that there can be one or more online devices that meet the proxy condition.

[0056] S13: When it is necessary to send a control instruction to the target device, the control instruction is sent to the proxy device through the message channel of the proxy device, and the proxy device is triggered to transparently transmit the control instruction to the target device.

[0057] In this embodiment, the user can perform corresponding operations on the smart home control App (application program) of the user terminal to assemble and generate a control instruction for controlling the target device. After the APP generates the control instruction, it can send the same message containing the control instruction to the target device and the proxy device at the same time through the message channel established by the target device itself and the message channel established by the proxy device that has a proxy relationship with the target device. In this way, when the target device is in the offline state, the message channel established by itself cannot send a message to the target device, and the message numbers are the same. The instruction is sent to the proxy device through the message channel established by the proxy device. After the proxy device receives the message, it triggers the proxy device to perform a transparent transmission judgment on the message. If it is judged that the message needs to be transparently transmitted, the message is assembled into a Ble message and transparently transmitted to the offline target device through Ble broadcast, so as to realize the transparent transmission of the control instruction to the target device.

[0058] Exemplarily, in this embodiment, in the smart home control App of the user terminal, the user can select several proxy devices with the best signal from the proxy devices that have a proxy relationship with the target device, preferably 2, and send the generated control signal to the target device and the two proxy devices with the best signal at the same time. Among them, the signal quality of the proxy device can be expressed as a score, and the score corresponding to each proxy device can be obtained through comprehensive calculation of the signal strength, signal stability and the distance from the target device.

[0059] As can be seen from the above, in the device offline control method provided by the embodiments of the present application, when the target device is in an offline state, the offline state message of the target device is uploaded to the cloud through any online device in the same area; in the cloud, according to the offline state message of the target device, the current signal strength of all online devices in the same area is obtained, and according to the current signal strength of all online devices, the target device is bound to at least one online device in a proxy relationship to obtain at least one proxy device; when a control instruction needs to be sent to the target device, the control instruction is sent to the proxy device through the message channel of the proxy device, and the proxy device is triggered to transparently transmit the control instruction to the target device. Based on the above method, through the device proxy method, the problems that smart home devices are often offline and uncontrollable due to the limited number of routers and that smart home devices cannot connect to the network can be solved.

[0060] In some embodiments of the present application, please refer to Figure 2 , Figure 2 which is a schematic flow chart of a method for uploading the offline state message of the target device to the cloud through any online device in the same area in the device offline control method provided by the embodiments of the present application. Details are as follows:

[0061] S21: When the target device is in an offline state, trigger the target device to perform message broadcasting and send a broadcast data packet to the online devices in the same area, where the broadcast data packet contains the offline state message of the target device;

[0062] S22: When any online device in the same area receives the broadcast data packet, trigger the online device to perform primary authentication processing on the broadcast data packet. If the authentication passes, use the message channel of the online device to transparently transmit the broadcast data packet to the cloud.

[0063] In this embodiment, the target device can be triggered to generate an offline state message, and based on this offline state message, message broadcasting is performed, and a broadcast data packet indicating that the target device is in an offline state is sent out through the Bluetooth (Ble) network. In this embodiment, the offline state message data in the broadcast data packet is encrypted using the user-level key pre-stored in the target device. It should be noted that all smart home devices in the same smart home system use the same user-level key.

[0064] In this embodiment, any online device in the same area as the target device can receive the broadcast data packet sent by the target device through the Bluetooth (Ble) network. In this embodiment, the online device that receives the broadcast data packet can be one or more. When any online device in the same area receives the broadcast data packet, it can trigger the online device that receives the broadcast data packet to perform a first-level authentication process on the broadcast data packet. Exemplarily, the first-level authentication process includes decrypting the broadcast data packet using the user-level key pre-stored in the online device. If the decryption is successful, the authentication passes; otherwise, the authentication fails. In the case where the authentication passes, the broadcast data packet is transparently transmitted to the cloud through the message channel of the online device. The message channel of the online device is a message channel established between the online device and the cloud through the Mqtt protocol for data interaction. In the case where the authentication fails, the online device is triggered to discard the broadcast data packet without uploading it.

[0065] In some embodiments of the present application, please refer to Figure 3 , Figure 3 which is a flowchart of a method for performing first-level authentication in the device offline control method provided by the embodiments of the present application. Details are as follows:

[0066] S31: Trigger the online device to detect its current signal strength to obtain a first signal strength;

[0067] S32: Compare the first signal strength with a preset signal strength threshold to determine whether the first signal strength is greater than the preset signal strength threshold. If not, directly determine that the authentication fails.

[0068] In this embodiment, a signal strength threshold can be set in the cloud as a proxy condition, and only the online devices that meet this proxy condition can proxy the offline device to perform relevant data processing. The online device can load the proxy condition from the cloud to the device local through data loading. In this embodiment, when the online device needs to perform a first-level authentication process on the broadcast data packet, it can also detect its current signal strength to obtain a first signal strength, and then compare the first signal strength with the signal strength threshold loaded by the online device to the device local to determine whether the first signal strength is greater than the signal strength threshold. If it is not greater, it means that the online device does not meet the proxy condition, and at this time, it can be directly determined that the authentication fails. If it is greater, further decrypt the broadcast data packet using the user-level key pre-stored in the online device to determine whether the authentication passes.

[0069] In some embodiments of the present application, after receiving the offline status message of the target device in the cloud, a secondary authentication process can also be performed on the target device and the online device that uploaded the offline status information of the target device to the cloud. Specifically, the first user identifier corresponding to the target device and the second user identifier corresponding to the online device are obtained from the local cloud record. The first user identifier and the second user identifier are compared to determine whether the first user identifier and the second user identifier are consistent. If they are consistent, it is determined that the target device and the online device have the same user identifier. In this case, the secondary authentication result is determined to be authentication passed. At this time, the target device can be bound to the online device in a proxy relationship. Otherwise, the cloud is triggered to discard the offline status message of the target device and abandon the proxy binding operation.

[0070] In some embodiments of the present application, after obtaining at least one proxy device in the cloud, the proxy relationship between the target device and each of the proxy devices may be stored in a preset cache in the cloud, such as a Redis cache. Furthermore, a score representing the signal strength of each proxy device is calculated based on the signal strength parameter, signal stability parameter, and distance parameter between each proxy device and the target device. The proxy devices are then sorted by score to obtain a proxy device list. It will be appreciated that in this embodiment, the user terminal can determine the proxy device to be used to issue control instructions based on the proxy device list.

[0071] In some embodiments of the present application, in the cloud, for the obtained proxy device list, the proxy device list can also be updated according to preset update rules, wherein the preset update rules may include at least one of the following rules: The first rule is that if the target device sends an unbinding request to the cloud, all binding relationships related to the target device in the proxy device list are cleared. The second rule is that if the proxy device sends an unbinding request to the cloud, the binding relationship between the proxy device and the target device is deleted from the proxy device list. The third rule is that if the cloud detects that the proxy device is offline, the binding relationship between the proxy device and the target device in the proxy device list is updated to unavailable. The fourth rule is that if the cloud detects that the binding relationship between the proxy device and the target device is unavailable and the unavailable duration reaches a preset duration threshold, the binding relationship between the proxy device and the target device is deleted.

[0072] In some embodiments of the present application, after obtaining at least one proxy device, the status of the target device can be maintained through the proxy device. Exemplarily, in this embodiment, when binding the proxy relationship between the target device and at least one online device to obtain at least one proxy device initially, it can trigger the proxy device to send a first online status change instruction to the target device, so that the target device changes its device status to the online status according to the first online status change instruction and maintains the heartbeat of the target device; and trigger the proxy device to send a second online status change instruction containing the identity information of the target device to the cloud, so that the cloud changes the device status of the target device currently recorded in the cloud to the online status according to the second online status change instruction.

[0073] Further, in this embodiment, after changing to the online status, it can trigger the proxy device to monitor the receiving duration interval of the target device status information, and when the receiving duration interval exceeds the preset interval threshold, send a first offline status change instruction to the target device, so that the target device changes its device status to the online status according to the first online status change instruction; and trigger the proxy device to monitor the receiving duration interval of the target device status information, and when the receiving duration interval exceeds the preset interval threshold, send a second offline status change instruction containing the identity information of the target device to the cloud, so that the cloud determines whether to change the device status of the target device currently recorded in the cloud to the online status according to the second offline status change instruction and other proxy devices.

[0074] It should be noted that, in this embodiment, the proxy device will report to the smart home cloud service only when the status of the target device is reversed, and maintain the heartbeat locally without reporting to the smart home cloud service when the status has not changed, thereby reducing the pressure on the smart home cloud service.

[0075] In some embodiments of the present application, after the target device receives a message containing a control instruction and when the target device processes the control instruction, it can also trigger the target device to perform message filtering processing on the received message containing the control instruction, and only retain one for the same message. In this way, it can avoid the problem of repeated processing when multiple proxy devices transparently transmit the same message to the target device.

[0076] It can be understood that the magnitudes of the sequence numbers of the above steps in the embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0077] In some embodiments of the present application, please refer to Figure 4 , Figure 4This is the basic structural block diagram of a device offline control device provided by an embodiment of the present application. In this embodiment, each unit included in the device is used to execute each step in the above method embodiment. For specific details, please refer to the relevant description in the above method embodiment. For the sake of convenience, only the parts related to this embodiment are shown. As Figure 4 shown, the device offline control device includes: an information upload module 41, a binding module 42, and a control module 43. Among them: the upload module 41 is used to upload the offline status message of the target device to the cloud through any online device in the surrounding area when the target device is in an offline state. The binding module 42 is used to obtain the current signal strength of all online devices in the surrounding area according to the offline status message of the target device in the cloud, and bind the target device to at least one online device in a proxy relationship according to the current signal strength of all online devices to obtain at least one proxy device. The control module 43 is used to, when a control instruction needs to be issued to the target device, issue the control instruction to the proxy device through the message channel of the proxy device, and trigger the proxy device to transparently transmit the control instruction to the target device.

[0078] It should be understood that the above device offline control device corresponds one-to-one with the above device offline control method, and details are not described herein again.

[0079] In some embodiments of the present application, please refer to Figure 5 , Figure 5 This is the basic structural block diagram of an electronic device provided by an embodiment of the present application. As Figure 5 shown, the electronic device 5 in this embodiment includes: a processor 51, a memory 52, and a computer program 53 stored in the memory 52 and executable on the processor 51, such as a program for the device offline control method. When the processor 51 executes the computer program 53, the steps in each embodiment of the above various device offline control methods are implemented. Or, when the processor 51 executes the computer program 53, the functions of each module in the corresponding embodiment of the above device offline control device are implemented. For specific details, please refer to the relevant description in the embodiment, and details are not described herein.

[0080] Exemplarily, the computer program 53 can be divided into one or more modules (units), and the one or more modules are stored in the memory 52 and executed by the processor 51 to complete the present application. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 53 in the electronic device 5. For example, the computer program 53 can be divided into an upload module, a binding module, and a control module, and the specific functions of each module are as described above.

[0081] The electronic device may include, but is not limited to, a processor 51 and a memory 52. Those skilled in the art can understand that Figure 5 These are merely examples of the electronic device 5 and do not constitute a limitation on the electronic device 5. It may include more or fewer components than those shown in the figure, or combine certain components, or have different components. For example, the electronic device may also include input / output devices, network access devices, a bus, etc.

[0082] The processor 51 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0083] The memory 52 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. The memory 52 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 5. Further, the memory 52 may also include both the internal storage unit and the external storage device of the electronic device 5. The memory 52 is used to store the computer program and other programs and data required by the electronic device. The memory 52 may also be used to temporarily store data that has been output or is to be output.

[0084] It should be noted that for the content such as information interaction and execution process between the above-mentioned device / units, since it is based on the same concept as the method embodiment of the present application, for its specific functions and the technical effects brought, reference may be specifically made to the method embodiment part, and details are not described herein again.

[0085] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented. In this embodiment, the computer-readable storage medium may be non-volatile or volatile.

[0086] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, it enables the mobile terminal to execute steps in the above-mentioned method embodiments when implemented.

[0087] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.

[0088] If the above-mentioned integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned method embodiments of the present application, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps in the above-mentioned method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0089] In the above embodiments, the descriptions of each embodiment have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0090] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included within the protection scope of the present application.

Claims

1. A method for offline control of a device, characterized in that, Including: When the target device is in an offline state, uploading the offline state message of the target device to the cloud through any online device in the same area; In the cloud, according to the offline state message of the target device, obtaining the current signal strength of all online devices in the same area, and according to the current signal strength of all online devices, binding the proxy relationship between the target device and multiple online devices that meet the proxy conditions to obtain multiple proxy devices; When a control instruction needs to be sent to the target device, sending the control instruction to the proxy device through the message channel of the proxy device, and triggering the proxy device to transparently transmit the control instruction to the target device; The sending the control instruction to the proxy device includes: Selecting several proxy devices with strong signals from the proxy devices that have a proxy relationship with the target device, and sending the generated control signal to the several proxy devices; After the step of obtaining the proxy device, it further includes: Triggering the proxy device to send a first online status change instruction to the target device, so that the target device changes the device status to the online state according to the first online status change instruction, and maintains the heartbeat of the target device; and Triggering the proxy device to send a second online status change instruction containing the identity information of the target device to the cloud, so that the cloud changes the device status of the target device currently recorded in the cloud to the online state according to the second online status change instruction; and Triggering the proxy device to monitor the reception duration interval of the target device status information, and when the reception duration interval exceeds a preset interval threshold, sending a first offline status change instruction to the target device, so that the target device changes the device status to the online state according to the first online status change instruction; and Triggering the proxy device to monitor the reception duration interval of the target device status information, and when the reception duration interval exceeds a preset interval threshold, sending a second offline status change instruction containing the identity information of the target device to the cloud, so that the cloud determines whether to change the device status of the target device currently recorded in the cloud to the online state according to the second offline status change instruction and other proxy devices.

2. The method for offline control of the device according to claim 1, wherein The step of uploading the offline state message of the target device to the cloud through any online device in the same area when the target device is in an offline state includes: When the target device is in an offline state, triggering the target device to perform message broadcasting and sending a broadcast data packet to the online devices in the same area, where the broadcast data packet contains the offline state message of the target device; When any online device in the same area receives the broadcast data packet, triggering the online device to perform primary authentication processing on the broadcast data packet. If the authentication passes, the broadcast data packet is transparently transmitted to the cloud through the message channel of the online device.

3. The method for offline control of the device according to claim 2, wherein The step of triggering the online device to perform primary authentication processing on the broadcast data packet includes: Use the user-level key pre-stored in the online device to decrypt the broadcast data packet. If the decryption is successful, it is determined that the authentication is passed.

4. The method for offline control of the device according to claim 3, wherein Before the step of using the user-level key pre-stored in the online device to decrypt the broadcast data packet, it further includes: Trigger the online device to detect its current signal strength to obtain the first signal strength; Compare the first signal strength with a preset signal strength threshold to determine whether the first signal strength is greater than the preset signal strength threshold. If not, it is directly determined that the authentication fails.

5. The method for offline control of the device according to claim 2, wherein After any online device in the same area receives the broadcast data packet and triggers the online device to perform primary authentication processing on the broadcast data packet, if the authentication is passed and the broadcast data packet is uploaded to the cloud through the message channel of the online device, it further includes: Trigger the cloud to perform secondary authentication processing on the target device and the online device that uploads the offline status information of the target device to the cloud, and determine whether the target device and the online device have the same user identifier. If so, it is determined that the authentication is passed.

6. The method for offline control of the device according to claim 1, wherein After the step of obtaining at least one proxy device, it further includes: Store the proxy relationship bound between the target device and each proxy device in a preset cache in the cloud, and sort them according to the signal strength of each proxy device to obtain a proxy device list, so that the user terminal can determine the proxy device for issuing control instructions according to the proxy device list.

7. The method for offline control of the device according to claim 6, wherein After the step of obtaining the proxy device list, it further includes: Perform update processing on the proxy device list according to a preset update rule, where the preset update rule includes: If the target device sends an unbinding request to the cloud, clear all binding relationships related to the target device in the proxy device list; and / or If the proxy device sends an unbinding request to the cloud, delete the binding relationship between the proxy device and the target device in the proxy device list; and / or If the cloud detects that the proxy device is in an offline state, update the binding relationship between the proxy device and the target device in the proxy device list to unavailable; and / or If the cloud detects that the binding relationship between the proxy device and the target device is unavailable and the unavailable duration reaches a preset duration threshold, delete the binding relationship between the proxy device and the target device.

8. The device offline control method according to claim 1, characterized in that, After the step of triggering the proxy device to transparently transmit the control instruction to the target device, it further includes: Trigger the target device to filter the received control instruction so that the target device retains one control instruction when receiving multiple identical control instructions.

9. An offline control device for a device, characterized in that, It includes: An upload module for uploading the offline status message of the target device to the cloud through any online device in the surrounding area when the target device is in an offline state; A binding module, used in the cloud to obtain the current signal strength of all online devices in the surrounding area according to the offline status message of the target device, and bind the target device to multiple online devices that meet the proxy conditions according to the current signal strength of all online devices, so as to obtain multiple proxy devices; A control module, used to send the control instruction to the proxy device through the message channel of the proxy device and trigger the proxy device to transparently transmit the control instruction to the target device when the control instruction needs to be sent to the target device; The sending the control instruction to the proxy device includes: Selecting several proxy devices with strong signals from the proxy devices that have a proxy relationship with the target device, and sending the generated control signal to the several proxy devices; After the step of obtaining the proxy device, it further includes: Triggering the proxy device to send a first online status change instruction to the target device, so that the target device changes its device status to the online status according to the first online status change instruction and maintains the heartbeat of the target device; and Triggering the proxy device to send a second online status change instruction containing the identity information of the target device to the cloud, so that the cloud changes the device status of the target device currently recorded in the cloud to the online status according to the second online status change instruction; and Triggering the proxy device to monitor the receiving time interval of the target device status information, and when the receiving time interval exceeds a preset interval threshold, sending a first offline status change instruction to the target device, so that the target device changes its device status to the online status according to the first online status change instruction; and Triggering the proxy device to monitor the receiving time interval of the target device status information, and when the receiving time interval exceeds a preset interval threshold, sending a second offline status change instruction containing the identity information of the target device to the cloud, so that the cloud determines whether to change the device status of the target device currently recorded in the cloud to the online status according to the second offline status change instruction and other proxy devices.

10. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Device maintenance method, maintenance device, storage medium and computer program product

    CN110958142A

  • Communication method and system, equipment and storage medium

    CN112672330A