Method, device and system for processing device based on decentration

Through the decentralized device processing method, the parent device relationship is automatically updated between devices, solving the problem of out-of-control caused by the failure of the main control device, and achieving efficient coordination and orderly cooperation between devices.

CN120295186APending Publication Date: 2025-07-11FOSHAN VIOMI ELECTRICAL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510373318.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the prior art, coordination between devices depends on the master control device, which makes it difficult to select a new master control device when communication fails, and it is prone to lose control of the device, especially in complex environments that orderly collaboration is difficult to achieve.

Method used

By adopting the decentralized method, the device automatically updates the parent device according to the associated parameters by receiving messages from other devices, without the need for a master control device, and automatically adjusts the parent device relationship to form a stable decentralized network.

Benefits of technology

It improves the coordination accuracy and efficiency between equipment, reduces the out-of-control situation between equipment, and achieves orderly cooperation between equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295186A_ABST
    Figure CN120295186A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of equipment control, and particularly discloses a method, equipment and a system for processing equipment based on decentration, through decentration, main control equipment is not needed, redundant control or coordination operation between the main equipment and slave equipment is omitted, and no matter what situation the equipment is in, the equipment can be processed more accurately. If equipment moves or breaks down or new equipment comes or exits, as long as the equipment is in the current scene, the parent equipment of the equipment is automatically and autonomously decided and updated according to the conditions of the surrounding equipment, so that a stable decentralized network is quickly formed among the equipment, the coordination accuracy and efficiency among the equipment are improved, and the user experience is improved. Therefore, the situation that the equipment is out of control is reduced, and the equipment can cooperate in order.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of device control, and particularly to a method, device and system for processing devices based on decentralization. Background Art

[0002] When it is necessary to control multiple devices to perform orderly collaborative behaviors, the current conventional method is to adopt a centralized or master control idea. That is, first select a master device, and then coordinate other devices through the master device, so as to achieve cooperation between devices.

[0003] However, it is found in practice that when the master device is lost, a new master device needs to be reselected. And reselecting a new master device highly depends on the communication situation between devices. Once the device communication fails, it may lead to the situation that the master device cannot be selected or multiple master devices are selected, resulting in difficulties in coordinating devices and even out-of-control situations, especially in complex environments. Therefore, how to develop a new multi-device processing method to improve the coordination accuracy and efficiency between devices, thereby reducing the out-of-control situations between devices and enabling orderly cooperation between devices is particularly important. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method, device and system for processing devices based on decentralization, which can improve the coordination accuracy and efficiency between devices, thereby reducing the out-of-control situations between devices and enabling orderly cooperation between devices.

[0005] To solve the above technical problem, in a first aspect of the present invention, a method for processing devices based on decentralization is disclosed. The method is applied to a decentralized system composed of multiple devices, and all the devices are communicatively connected. For any one of the devices, the method includes:

[0006] The device receives messages broadcast by all other devices in the current scenario. The message broadcast by each other device includes the identifier of the current parent device corresponding to the other device and the current association parameter between the other device and the current parent device;

[0007] The device obtains the current association parameter between the device and each other device;

[0008] The device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all other devices and the current association parameter corresponding to the device.

[0009] As an alternative implementation, in the first aspect of the present invention, the device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameters corresponding to the device, including:

[0010] The device determines, according to the current association parameters corresponding to all the other devices and the current association parameters corresponding to the device, whether there is a device among all the other devices that meets the currently determined current parent device update condition;

[0011] When it is determined that there is a device that meets the current parent device update condition, the device determines the device that meets the current parent device update condition according to the identifier of the current parent device corresponding to each of the other devices, and uses it as the current parent device of the device;

[0012] When it is determined that there is no device that meets the current parent device update condition, the device determines the root device corresponding to all the other devices as the current parent device of the device;

[0013] Wherein, the root device is the device at the starting position among all the other devices and the device.

[0014] As an alternative implementation, in the first aspect of the present invention, after the device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameters corresponding to the device, the method further includes:

[0015] The device broadcasts the current state parameters of the device externally, and the current state parameters of the device include the identifier of the current parent device of the device and the current association parameters with the current parent device;

[0016] Wherein, the current state parameters of the device are used for all other devices existing in the current scenario to obtain and update their corresponding current parent devices.

[0017] As an alternative implementation, in the first aspect of the present invention, the types of all other devices in the current scenario include the types that have already been in the current scenario and / or the types that newly enter the current scenario.

[0018] As an alternative implementation, in the first aspect of the present invention, after the device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameters corresponding to the device, the method further includes:

[0019] The device determines the position of the current parent device of the device and the current parent devices of each of the other devices in the current decentralized network;

[0020] The device determines whether the hierarchical relationship between the device and all the other devices is used to represent that the device and all the other devices are connected to the root devices corresponding to the device and all the other devices through the hierarchical relationship according to the current parent device of the device and the current parent devices of each of the other devices in the current decentralized network.

[0021] When the judgment result is negative, the device re-executes the operation of receiving messages sent by all the other devices in the current scenario until the hierarchical relationship between the device and all the other devices is used to represent that the device and all the other devices are connected to the root device through the hierarchical relationship.

[0022] As an optional implementation manner, in the first aspect of the present invention, the method further includes:

[0023] When it is determined that the hierarchical relationship between the device and all the other devices is used to represent that the device and all the other devices are connected to the root devices corresponding to the device and all the other devices through the hierarchical relationship, the device obtains the current association parameter between it and the updated current parent device, the current association parameter between the current parent device and the root device, and the current association parameter between it and the root device.

[0024] The device determines the target connection manner between the device and its current parent device according to the current association parameter between it and the updated current parent device, the current association parameter between the current parent device and the root device, the current association parameter between it and the root device, and the pre-determined optimal path determination method.

[0025] The device performs an adjustment operation on its connection relationship with the current parent device and its connection relationship with the root device according to the determined target connection manner.

[0026] As an optional implementation manner, in the first aspect of the present invention, before the device receives messages broadcast by all the other devices in the current scenario, the method further includes:

[0027] The device broadcasts a message indicating the existence of the device in the current scenario, and the message of the device is used for all the other devices in the current scenario to know the existence of the device.

[0028] The device broadcasts the identifier of the current parent device of the device and the current association parameter between the device and the current parent device in the current scenario.

[0029] After broadcasting the identifier of the current parent device of the device and the current association parameters between the device and the current parent device externally, the device monitors the duration.

[0030] When the duration reaches the preset duration, the device performs the operation of receiving messages broadcast by all other devices in the current scene.

[0031] As an optional implementation manner, in the first aspect of the present invention, when the current association parameter corresponding to each of the other devices is the current distance between the other device and its corresponding current parent device, and the current association parameter corresponding to the device includes the current distance between the device and each of the other devices, the device determines whether there is a device that meets the currently determined current parent device update condition among all the other devices according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device, including:

[0032] The device screens out the target device with the shortest current distance from all the other devices according to the current distance between the device and each of the other devices;

[0033] The device obtains the position of the target device in the current decentralized network, and determines whether the current link where the target device is located is connected to the root devices corresponding to all the other devices and there is no such device on the current link according to the position corresponding to the target device;

[0034] When the judgment result is yes, the device determines that there is a device that meets the currently determined current parent device update condition, and the target device is the current parent device of the device;

[0035] When the judgment result is no, the device updates the other device with the second shortest current distance to the target device, and re-performs the operation of obtaining the position of the target device in the current decentralized network, and determining whether the current link where the target device is located is connected to the root devices corresponding to all the other devices and there is no such device on the current link;

[0036] When the current link where the other device with the largest current distance among all the other devices is located is not connected to the root device and / or there is such device on the current link, the device determines that there is no device that meets the current parent device update condition, and the root device is the current parent device of the device.

[0037] The second aspect of the present invention discloses a decentralized system for processing devices based on decentralization. The decentralized system is composed of multiple devices, and all the devices are communicatively connected. For any one of the devices, the device includes:

[0038] A communication module, configured to receive messages broadcast by all other devices in the current scenario, where each message broadcast by each of the other devices includes an identifier of the current parent device corresponding to the other device and a current association parameter between the other device and the current parent device;

[0039] An acquisition module, configured to acquire the current association parameter between the device and each of the other devices;

[0040] An update module, configured to perform an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device.

[0041] As an optional implementation manner, in the second aspect of the present invention, the specific manner in which the update module performs an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device includes:

[0042] According to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device, determine whether there is a device among all the other devices that satisfies a pre-determined current parent device update condition;

[0043] When it is determined that there is a device that satisfies the current parent device update condition, determine the device that satisfies the current parent device update condition according to the identifier of the current parent device corresponding to each of the other devices, and use it as the current parent device of the device;

[0044] When it is determined that there is no device that satisfies the current parent device update condition, determine the root devices corresponding to all the other devices and use them as the current parent device of the device;

[0045] Wherein, the root device is the device in the starting position among all the other devices and the device.

[0046] As an optional implementation manner, in the second aspect of the present invention, the device further includes:

[0047] A first broadcast module, configured to broadcast the current state parameters of the device after the update module performs an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device, where the current state parameters of the device include the identifier of the current parent device of the device and the current association parameter with the current parent device;

[0048] Wherein, the current state parameters of the device are used for all other devices existing in the current scenario to acquire and update their corresponding current parent devices.

[0049] As an alternative implementation, in the second aspect of the present invention, the types of all other devices in the current scenario include the types that are already in the current scenario and / or the types that newly enter the current scenario.

[0050] As an alternative implementation, in the second aspect of the present invention, the device further includes:

[0051] A determination module, configured to determine the positions of the current parent device of the device and the current parent devices of each of the other devices in the current decentralized network after the update module performs an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameters corresponding to the device;

[0052] A judgment module, configured to judge whether the hierarchical relationship between the device and all the other devices is used to represent that the device and all the other devices are connected to the root device corresponding to the device and all the other devices through the hierarchical relationship according to the positions of the current parent device of the device and the current parent devices of each of the other devices in the current decentralized network; when the judgment result is no, trigger the communication module to re - execute the operation of receiving messages sent by all the other devices in the current scenario until the hierarchical relationship between the device and all the other devices is used to represent that the device and all the other devices are connected to the root device through the hierarchical relationship.

[0053] As an alternative implementation, in the second aspect of the present invention, the acquisition module is further configured to, when it is judged that the hierarchical relationship between the device and all the other devices is used to represent that the device and all the other devices are connected to the root device corresponding to the device and all the other devices through the hierarchical relationship, acquire the current association parameter between it and the updated current parent device, the current association parameter between this current parent device and the root device, and the current association parameter between it and the root device;

[0054] The determination module is further configured to determine the target connection mode between the device and its current parent device according to the current association parameter between it and the updated current parent device, the current association parameter between this current parent device and the root device, the current association parameter between it and the root device, and the pre - determined optimal path determination method;

[0055] The device further includes:

[0056] An adjustment module, configured to perform an adjustment operation on the connection relationship between it and the current parent device and the connection relationship between it and the root device according to the determined target connection mode.

[0057] As an alternative implementation manner, in the second aspect of the present invention, the device further includes:

[0058] A second broadcast module, configured to broadcast a message indicating the existence of the device in the current scenario before the communication module receives messages broadcast by all other devices in the current scenario, where the message of the device is used for all other devices in the current scenario to know the existence of the device;

[0059] The second broadcast module is further configured to broadcast, in the current scenario, an identifier of the current parent device of the device and current association parameters between the device and the current parent device;

[0060] A monitoring module, configured to monitor a duration after broadcasting the identifier of the current parent device of the device and the current association parameters between the device and the current parent device; when the duration reaches a preset duration, trigger the communication module to perform the operation of receiving messages broadcast by all other devices in the current scenario.

[0061] As an alternative implementation manner, in the second aspect of the present invention, when the current association parameter corresponding to each of the other devices is the current distance between the other device and its corresponding current parent device, and the current association parameter corresponding to the device includes the current distance between the device and each of the other devices, the specific manner for the update module to determine whether there is a device that meets the currently determined current parent device update condition among all the other devices according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device includes:

[0062] According to the current distance between the device and each of the other devices, screen out a target device with the shortest current distance from all the other devices;

[0063] Obtain the location of the target device in the current decentralized network, and determine whether the current link where the target device is located is connected to the root devices corresponding to all the other devices and the device is not on the current link according to the location corresponding to the target device;

[0064] When the judgment result is yes, determine that there is a device that meets the currently determined current parent device update condition, and the target device is the current parent device of the device;

[0065] The current parent device of the device;

[0066] When it is determined that the result is negative, update the other device that is currently the second closest to the target device to the target device, and re - execute the operation of obtaining the position of the target device in the current decentralized network, and determining whether the current link where the target device is located is connected to the root devices corresponding to all the other devices and there is no such device on this current link;

[0067] When the current link where the other device with the largest current distance among all the other devices is located is not connected to the root device and / or there is such a device on this current link, it is determined that there is no device that meets the current parent device update condition, and the root device is the current parent device of the device.

[0068] The third aspect of the present invention discloses a device. A plurality of such devices form a decentralized system, and all the devices are communicatively connected to each other. For any one of the devices, the device includes:

[0069] A memory storing executable program code;

[0070] A processor coupled to the memory;

[0071] The processor calls the executable program code stored in the memory and executes the method for processing a device based on decentralization disclosed in the first aspect of the present invention.

[0072] The fourth aspect of the present invention discloses a computer - readable storage medium. The computer - readable storage medium stores computer instructions, which are used to execute the method for processing a device based on decentralization disclosed in the first aspect of the present invention when the computer instructions are called.

[0073] The fifth aspect of the present invention discloses a decentralized system. The decentralized system includes a plurality of devices, and all the devices are communicatively connected to each other. For any one of the devices, the device is used to execute the method for processing a device based on decentralization disclosed in the first aspect of the present invention.

[0074] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0075] In the embodiments of the present invention, the decentralized system consists of multiple devices, and all devices are communicatively connected. For any device, the device receives messages broadcast by all other devices in the current scenario. The message broadcast by each other device includes the identifier of the current parent device corresponding to the other device and the current association parameter between the other device and the current parent device; the device obtains the current association parameter between the device and each other device; the device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all other devices and the current association parameter corresponding to the device, that is, through decentralization, without a master control device, and the redundant control or coordination operations between the master and slave devices are omitted. No matter what the situation is, if a device moves, fails, a new device appears, or a device exits, etc., as long as it is a device in the current scenario, it automatically makes a decision to update its parent device according to the situation of the surrounding devices, so that a stable decentralized network is quickly formed among the devices, improving the coordination accuracy and efficiency between the devices, thereby reducing the situation of out-of-control between the devices, and further enabling the devices to cooperate in an orderly manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0077] Figure 1 It is a schematic diagram of a scenario of a method for processing devices based on decentralization disclosed in the embodiments of the present invention;

[0078] Figure 2 It is a schematic flowchart of a method for processing devices based on decentralization disclosed in the embodiments of the present invention;

[0079] Figure 3 It is a tree diagram of a decentralized system disclosed in the embodiments of the present invention;

[0080] Figure 4 It is a schematic diagram of another decentralized network disclosed in the embodiments of the present invention;

[0081] Figure 5 It is a schematic diagram of yet another decentralized network disclosed in the embodiments of the present invention;

[0082] Figure 6 It is a schematic diagram of the structure of a device disclosed in the embodiments of the present invention;

[0083] Figure 7 It is a schematic diagram of the structure of another device disclosed in the embodiments of the present invention;

[0084] Figure 8 It is a schematic structural diagram of another device disclosed in an embodiment of the present invention. Detailed implementation manners

[0085] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0086] The terms "first", "second", etc. in the specification and claims of the present invention and the above accompanying drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or terminal that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or terminals.

[0087] Referring to "embodiment" herein means that a specific feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0088] The present invention discloses a method, device and system for processing devices based on decentralization. Through decentralization, there is no need for a master device, and redundant control or coordination operations between the master and slave devices are eliminated. In any case, if a device moves, fails, a new device appears, or a device exits, etc., as long as it is a device in the current scenario, it automatically makes a decision to update its parent device according to the situation of the surrounding devices, so that a stable decentralized network, even a loop-free decentralized network, is quickly formed among the devices, improving the coordination accuracy and efficiency among the devices, thereby reducing the situation of out-of-control among the devices, and further enabling the devices to cooperate in an orderly manner. The following will be described in detail respectively.

[0089] To better understand the method, device and system for processing devices based on decentralization described in the present invention, first, the scenarios applicable to the method for processing devices based on decentralization are described. Specifically, the schematic diagram of the scenario can be as Figure 1As shown, Figure 1 FIG. 1 is a schematic diagram of a scenario of processing a device based on decentralization according to an embodiment of the present invention. Figure 1 As shown in the figure, taking the smart home scene as an example, the decentralized system corresponding to the scene diagram consists of smart lamp 1, smart air conditioner, smart lamp 2, smart cleaning equipment and smart music box, and they are connected to each other in communication. Among them, smart lamp 1, smart air conditioner, smart lamp 2 and smart music box are already online, and smart cleaning equipment is newly online. Taking smart cleaning equipment as an example, the execution process of smart lamp 1, smart air conditioner, smart lamp 2 and smart music box is the same as that of smart cleaning equipment. The smart cleaning device (mobile) broadcasts that it is online, and identifies smart lamp 1, smart air conditioner, smart lamp 2, and smart music box. Based on the current distance between itself and each of the devices in smart lamp 1, smart air conditioner, smart lamp 2, and smart music box, it initially determines the smart air conditioner with the shortest current distance as its current parent device, and broadcasts that the parent device is the smart air conditioner and its current distance is 5m. Smart lamp 1, smart air conditioner, smart lamp 2, and smart music box all receive the broadcast of the smart cleaning device that its current parent device is the smart air conditioner. After a delay of 3 minutes, the smart cleaning device receives the message from smart lamp 1 that its current parent device is the smart air conditioner and the distance is 4m, the message from smart lamp 2 that its current parent device is the smart air conditioner and the distance is 6m, and the message from the smart air conditioner that its current parent device is the smart music box and the distance is 8m At this time, the current distance between the smart cleaning device and the smart music box is 3m and the current distance between the smart air conditioner and the smart air conditioner is 4m. The smart air conditioner is still determined as its latest parent device and connected to the smart music box. That is, at this time, the decentralized network with a hierarchical relationship composed of smart lamps 1, smart air conditioners, smart lamps 2, smart cleaning devices and smart music boxes is that smart lamps 1 and smart lamps 2 hierarchically point to smart air conditioners, smart air conditioners hierarchically point to smart cleaning devices, and smart cleaning devices hierarchically point to smart music boxes, so as to achieve decentralization without the need for a master control device, and eliminate unnecessary control or coordination operations between master and slave devices. No matter what the situation is, as long as it is a device in the current scene, it automatically makes independent decisions to update its parent device according to the situation of its surrounding devices, so that a stable decentralized network is quickly formed between the devices, or even a loop-free decentralized network.

[0090] It should be noted that Figure 1 The scenario diagram shown is only for the purpose of illustrating the applicable scenarios of the method for processing devices based on decentralization. All the devices involved, the communication relationships between the devices, and the current distances are only schematically shown. Figure 1 The scenario shown does not limit this. The following is a detailed description of the method, device and system for processing devices based on decentralization.

[0091] Embodiment 1

[0092] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a method for processing devices based on decentralization disclosed in an embodiment of the present invention. Among them, Figure 2 the described method can be applied to any scenario that requires cooperation among multiple devices, such as multi-device linkage control in a smart home scenario, multi-device networking in a disaster relief scenario, or multi-device formation in a drone scenario, etc. And this scenario is provided with a decentralized system, where the decentralized system consists of multiple devices, and all devices are communicatively connected. As Figure 2 shown, for any device, the method may include the following operations:

[0093] 101. The device receives messages broadcast by all other devices in the current scenario. The message broadcast by each other device includes the identifier of the current parent device corresponding to the other device and the current association parameter between the other device and the current parent device.

[0094] In an embodiment of the present invention, optionally, the specific content included in the current association parameter corresponding to different current scenarios is different. For example, for a smart home scenario, its current association parameter may be distance, that is, the distance between two lighting devices; for an outdoor wind power generation scenario, its current association parameter may be direction, that is, the orientation between two power generation devices. The embodiment of the present invention does not make a limitation.

[0095] In an embodiment of the present invention, optionally, the message broadcast by each other device further includes its own identifier and / or device type. Among them, regarding the identifier, it may be a device identifier and / or a MAC identifier; regarding the device type, for a smart home scenario, it may be a lighting type, an air conditioner type, etc.

[0096] 102. The device obtains the current association parameter between the device and each other device.

[0097] In an embodiment of the present invention, optionally, the description of the current association parameter here can be found in the above relevant description.

[0098] 103. The device performs an update operation on the current parent device of the device according to the current association parameter corresponding to all other devices and the current association parameter corresponding to the device.

[0099] In an embodiment of the present invention, optionally, regarding the understanding of performing an update operation on the current parent device of the device, if the device already has a corresponding parent device currently, it can be understood as updating the current parent device, and the updated parent device may still be the current parent device or may be other devices; if the device does not have a corresponding parent device currently, it can be understood as allocating a corresponding parent device. This situation is especially applicable to a new device entering the current scenario.

[0100] It can be seen that by decentralizing the implementation of the embodiments of the present invention, there is no need for a master device, and the redundant control or coordination operations between the master and slave devices are eliminated. Regardless of the situation, such as when a device moves, fails, a new device appears, or a device exits, as long as it is a device in the current scenario, it automatically updates its parent device according to the situation of the surrounding devices, enabling a stable decentralized network to be quickly formed among the devices, improving the coordination accuracy and efficiency among the devices, thereby reducing the situation of out-of-control among the devices, and further enabling the devices to cooperate in an orderly manner.

[0101] In the embodiments of the present invention, optionally, the device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all other devices and the current association parameters corresponding to the device, including:

[0102] The device determines, according to the current association parameters corresponding to all other devices and the current association parameters corresponding to the device, whether there is a device among all other devices that meets the currently determined current parent device update condition;

[0103] When it is determined that there is a device that meets the current parent device update condition, the device determines, according to the identifier of the current parent device corresponding to each other device, the device that meets the current parent device update condition as the current parent device of the device;

[0104] When it is determined that there is no device that meets the current parent device update condition, the device determines the root device corresponding to all other devices as the current parent device of the device.

[0105] In the embodiments of the present invention, similarly, the current parent device update conditions corresponding to different current scenarios are also different.

[0106] In the embodiments of the present invention, the root device is the device at the starting position among all other devices and the device, that is, the root device is a device that does not point to any device. As Figure 3 shown, Figure 3 is a tree diagram of a decentralized system disclosed in the embodiments of the present invention. As Figure 3 shown, the decentralized system includes devices DEV1 - DVE5. Among them, devices DEV2 and DEV3 hierarchically point to device DEV1, device DEV1 hierarchically points to device DEV4, device DEV4 hierarchically points to device DEV5, and device DEV5 has no pointing, that is, device DEV5 is the root device.

[0107] It can be seen that by first analyzing the data received from all other devices in the embodiments of the present invention, if there is a device that meets the update condition of the current parent device, it is updated to the required current parent device. Otherwise, the root device is directly updated to the current parent device, which improves the accuracy and timeliness of updating the current parent device of each device in the group, and at the same time ensures that the corresponding current parent device is successfully updated for each device in the group.

[0108] In the embodiments of the present invention, further optionally, when the current association parameter corresponding to each other device is the current distance between the other device and its corresponding current parent device and the current association parameter corresponding to the device includes the current distance between the device and each other device, the device determines whether there is a device that meets the pre-determined current parent device update condition among all other devices according to the current association parameters corresponding to all other devices and the current association parameter corresponding to the device, including:

[0109] The device filters out the target device with the shortest current distance from all other devices according to the current distance between the device and each other device;

[0110] The device obtains the position of the target device in the current decentralized network and determines whether the current link where the target device is located is connected to the root devices corresponding to all other devices and there is no device on the current link according to the position corresponding to the target device;

[0111] When the judgment result is yes, the device determines that there is a device that meets the pre-determined current parent device update condition, and the target device is the current parent device of the device;

[0112] When the judgment result is no, the device updates the other device with the second shortest current distance to the target device and re-executes the above operations of obtaining the position of the target device in the current decentralized network and determining whether the current link where the target device is located is connected to the root devices corresponding to all other devices and there is no device on the current link;

[0113] When the current link where the other device with the largest current distance among all other devices is located is not connected to the root device and / or there is a device on the current link, the device determines that there is no device that meets the current parent device update condition, and the root device is the current parent device of the device.

[0114] In an embodiment of the present invention, optionally, for example, assume that in the current scenario, there are devices DEV6 - DEV10, where device DEV10 is the root device. Taking device DEV6 as an example, sort the devices in ascending order of their current distances from device DEV6, which are device DEV7, device DEV9, and device DEV8 in sequence. First, obtain the location of device DEV7 in the decentralized network, and based on the location of device DEV7, determine whether the current link where device DEV7 is located is connected to the root device DEV10 and there is no device DEV6 on this current link. If so, device DEV7 is the current parent device of device DEV6. If the current link where device DEV7 is located is not connected to the root device DEV10 or there is a device DEV6 on this current link, then continue to obtain the location of device DEV9 in the decentralized network, and based on the location of device DEV9, determine whether the current link where device DEV9 is located is connected to the root device DEV10 and there is no device DEV6 on this current link. If so, device DEV9 is the current parent device of device DEV6. If the current link where device DEV9 is located is not connected to the root device DEV10 or there is a device DEV6 on this current link, then continue to obtain the location of device DEV8 in the decentralized network, and based on the location of device DEV8, determine whether the current link where device DEV8 is located is connected to the root device DEV10 and there is no device DEV6 on this current link. If so, device DEV8 is the current parent device of device DEV6. If the current link where device DEV8 is located is not connected to the root device DEV10 or there is a device DEV6 on this current link, then the root device DEV10 is the current parent device of device DEV6. For the processes of determining the current parent devices of other devices DEV7 - DEV9, please refer to the process of determining the current parent device of device DEV6, which will not be elaborated here.

[0115] It can be seen that in the embodiment of the present invention, for any device in the group, analyze in sequence whether the current links where other devices are located are connected to the root device and whether there is itself, in ascending order of the current distances between it and all other devices. If it is analyzed that the current link where the other device farthest from itself is located is still not connected to the root device or there is itself, then it is determined that there is a device that does not meet the current parent device update condition, otherwise it is determined that there is a device that meets the current parent device update condition, which improves the probability that the current parent devices of each device in the group are updated to the required current parent devices in a timely and accurate manner.

[0116] In an optional embodiment, after the device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all other devices and the current association parameters corresponding to the device, the method may further include the following steps:

[0117] The device broadcasts the current status parameters of the device externally. The current status parameters of the device include the identifier of the current parent device of the device and the current association parameter between the device and the current parent device.

[0118] Among them, the current status parameters of the device are used for all other devices existing in the current scenario to obtain and update their corresponding current parent devices.

[0119] In this optional embodiment, optionally, the types of all other devices in the current scenario include the types that have already been in the current scenario and / or the types that newly enter the current scenario. Among them, the types that have already been in the current scenario include the always-online type or the type that reconnects after going offline.

[0120] It can be seen that for any device in the group in this optional embodiment, after it updates its current parent device, it broadcasts the data of the latest parent device externally in a timely manner, so that other devices in the current scenario can timely know who has made the update and the data of the updated parent device and follow to update their own parent devices, so that all devices in the group can reach the device steady state in a timely manner, which is beneficial to further improving the cooperation efficiency and accuracy among devices.

[0121] In another optional embodiment, after the device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all other devices and the current association parameter corresponding to the device, the method may further include the following steps:

[0122] The device determines the positions of the current parent device of the device and the current parent devices of each other device in the current decentralized network;

[0123] The device determines whether the hierarchical relationship between the device and all other devices is used to represent that the device and all other devices are connected to the root devices corresponding to the device and all other devices through the hierarchical relationship according to the positions of the current parent device of the device and the current parent devices of each other device in the current decentralized network;

[0124] When the judgment result is no, the device re-executes the operation of receiving messages sent by all other devices in the current scenario until the hierarchical relationship between the device and all other devices is used to represent that the device and all other devices are connected to the root device through the hierarchical relationship.

[0125] In this optional embodiment, optionally, when the judgment result is yes, it broadcasts its own current parent device data regularly (such as every 1 minute or 3 minutes), so that when there is a device going offline or having a fault or a new device entering the group or the devices in the group move, the corresponding current parent devices can be updated in a timely manner based on the latest parent device data of each other to quickly reach the steady state again.

[0126] It can be seen that in this group of alternative embodiments, if a device updates its current parent device, continue to analyze that each device is connected to the root device in sequence through the hierarchical relationship based on the position of the current parent device of the device in the current decentralized network. Otherwise, continue to execute the update operation of the current parent device to make each device in the group reach a steady state, thereby further improving the coordination and stability of the coordinated work of each device.

[0127] In yet another alternative embodiment, the method may further include the following steps:

[0128] When it is determined that the hierarchical relationship between a device and all other devices is used to represent that the device and all other devices are connected to the root device corresponding to the device and all other devices through the hierarchical relationship, the device obtains the current association parameter between it and the updated current parent device, the current association parameter between the current parent device and the root device, and the current association parameter between it and the root device;

[0129] The device determines the target connection method between the device and its current parent device according to the above three current association parameters and the pre-determined optimal path determination method, and performs adjustment operations on the connection relationship between it and the current parent device and the connection relationship between it and the root device according to the determined target connection method.

[0130] In this alternative embodiment, after the device establishes the connection relationship with its current parent device, if the above target connection method is used to represent that the device hierarchy points to the current parent device, the device does not need to establish a connection with the root device, and the current parent device does not need to disconnect the connection with the root device; if the above target connection method is used to represent that the current parent device hierarchy points to the device, the device needs to establish a connection with the root device, and the current parent device needs to disconnect the connection with the root device. Optionally, taking the current distance as an example, Figure 4 is a schematic diagram of another decentralized network disclosed in the embodiments of the present invention, as Figure 4 shown, device DEV1 is the current parent device of device DEV4. The current distances between device DEV4 and device DEV1, device DEV4 and root device DEV5, and device DEV1 and root device DEV5 are 5m, 2m, and 8m respectively. And the device DEV4 hierarchy points to the device DEV1, and the device DEV1 hierarchy points to the root device DEV5. At this time, although the relationship between the devices is hierarchical and points to the root device, the connection between the devices in the entire decentralized system is not the optimal path. Therefore, it is necessary to make the device DEV1 hierarchy point to the device DEV4, the device DEV4 hierarchy point to the root device DEV5, and disconnect the connection between the device DEV1 and the root device DEV5 to form an optimal path as Figure 3 shown.

[0131] In this alternative embodiment, further, for the case where the current parent device needs to disconnect the connection with the root device, after the current parent device disconnects the connection with the root device, if the current parent device has a hierarchical reference to another device and this other device has another device that it references, then the other device needs to hierarchically reference the current parent device. Optionally, taking the current distance as an example, Figure 5 is a schematic diagram of another decentralized network disclosed in an embodiment of the present invention. As Figure 5 shown, device DEV1 is the current parent device of device DEV4. Device DEV1 hierarchically references device DEV3, and device DEV2 hierarchically references device DEV3. Since device DEV1 needs to hierarchically reference device DEV4, device DEV3 needs to hierarchically reference device DEV1 to form a better path.

[0132] It should be noted that "→" represents hierarchical reference.

[0133] It can be seen that this alternative embodiment, through further analysis of the optimal path of the decentralized system that has already formed hierarchical connections to reference the root device, if the devices are not connected in an optimal path (such as the shortest path), adjustment continues until the decentralized system is connected in an optimal path manner, further improving the steady-state connection between devices in the decentralized system, which is beneficial to further improving the coordination, accuracy, and efficiency of the work between devices.

[0134] In another alternative embodiment, before the device receives the messages broadcast by all other devices in the current scenario, the method may further include the following steps:

[0135] The device broadcasts a message indicating the existence of the device in the current scenario, and this message is used for all other devices in the current scenario to be aware of the existence of the device;

[0136] The device broadcasts the identifier of the current parent device of the device and the current association parameter between the device and the current parent device in the current scenario;

[0137] After broadcasting the identifier of the current parent device of the device and the current association parameter between the device and the current parent device, the device monitors the duration;

[0138] When the duration reaches the preset duration, the device performs the operation of receiving the messages broadcast by all other devices in the current scenario as described above.

[0139] In this alternative embodiment, optionally, the preset duration can be a fixed duration, such as 2 minutes, or a random duration, such as 1 minute or 2 minutes. Among them, when the preset duration is a random duration, the preset durations of different devices in the decentralized system can be different.

[0140] It can be seen that when the optional embodiment device goes online, especially for devices newly entering the group, it first broadcasts its own existence and the data of its current parent device to other devices in the group so that other devices can know, and after a certain delay, it receives the data of the current parent device of other devices, leaving enough time for other devices in the group to update the current parent device, reducing the occurrence of decision-making conflicts caused by multiple devices making decisions simultaneously, so that each device in the group can make the decision of the current parent device in an orderly and efficient and accurate manner.

[0141] In yet another optional embodiment, the method may further include the following steps:

[0142] The device obtains the maximum reception delay duration, the minimum reception delay duration, and the reception delay duration at the median within a past historical time period (such as the past 2 hours);

[0143] The device monitors the load of the current channel and the channel congestion value, and calculates the delay duration difference between the maximum reception delay duration and the minimum reception delay duration;

[0144] The device calculates the average delay duration between the delay duration difference and the reception delay duration at the median;

[0145] The device determines the corresponding channel idle value according to the load of the current channel and the channel congestion value, and divides the average duration by the channel idle value to obtain the target duration;

[0146] Calculate the target sum duration of the minimum interval duration and the target duration as the above preset duration.

[0147] It can be seen that for any device in the group in this optional embodiment, by analyzing its delay duration data and current channel data in the past period of time, the accuracy of determining the required delay duration for this time is improved, and further reduces the occurrence of decision-making conflicts caused by multiple devices making decisions simultaneously.

[0148] In yet another optional embodiment, the method may further include the following steps:

[0149] The device obtains the location situation of the device in the decentralized network within a historical time period, where the location situation includes all locations of the device in the decentralized network within the historical time period;

[0150] The device determines the hierarchical depth of the location in the decentralized network according to each location corresponding to the device, where the root device is the first level;

[0151] The device calculates the average hierarchical depth of all hierarchical depths of the device, and performs a correction operation on the target sum duration based on the average hierarchical depth to obtain the corrected target sum duration as the preset duration;

[0152] Among them, the deeper the mean hierarchical depth, the longer the preset duration.

[0153] It can be seen that for any device in the group, this optional embodiment corrects the obtained delay duration by considering all hierarchical depths of the device in the decentralized system when receiving data in the past period of time, further improving the determination accuracy of the delay duration required by the device for this time, and further reducing the occurrence of decision conflicts caused by multiple devices making decisions simultaneously, so that each device in the group can orderly and efficiently and accurately make the current parent device decision.

[0154] Embodiment 2

[0155] The embodiment of the present invention discloses a decentralized system for processing devices based on decentralization. Among them, this decentralized system can be applied to any scenario that requires multi-device collaboration, such as multi-device linkage control in a smart home scenario, multi-device networking in a disaster relief scenario, and multi-device formation in a drone scenario, etc. Among them, the decentralized system is composed of multiple devices, and all devices are communicatively connected. For any device, please refer to Figure 6 , Figure 6 which is a schematic structural diagram of a device disclosed in the embodiment of the present invention. The device may include:

[0156] A communication module 201, configured to receive messages broadcast by all other devices in the current scenario. The message broadcast by each other device includes the identifier of the current parent device corresponding to the other device and the current association parameter between the other device and the current parent device;

[0157] An acquisition module 201, configured to acquire the current association parameter between the device and each other device;

[0158] An update module 203, configured to perform an update operation on the current parent device of the device according to the current association parameters corresponding to all other devices and the current association parameter corresponding to the device.

[0159] It can be seen that the Figure 6 described decentralized system through decentralization, without a master control device, and omits the redundant control or coordination operations between the master and slave devices. In any case, such as when a device moves, fails, a new device appears, or a device exits, etc., as long as it is a device in the current scenario, it automatically makes a decision to update its parent device according to the situation of the surrounding devices, enabling each device to quickly form a stable decentralized network, improving the coordination accuracy and efficiency between devices, thereby reducing the situation of out-of-control between devices, and further enabling the devices to cooperate in an orderly manner.

[0160] In an optional embodiment, the specific manner in which the update module 203 performs an update operation on the current parent device of the device according to the current association parameters corresponding to all other devices and the current association parameters corresponding to the device includes:

[0161] According to the current association parameters corresponding to all other devices and the current association parameters corresponding to the device, determine whether there is a device among all other devices that satisfies the previously determined current parent device update condition;

[0162] When it is determined that there is a device that satisfies the current parent device update condition, determine the device that satisfies the current parent device update condition according to the identifier of the current parent device corresponding to each other device, and use it as the current parent device of the device;

[0163] When it is determined that there is no device that satisfies the current parent device update condition, determine the root device corresponding to all other devices and use it as the current parent device of the device;

[0164] Among them, the root device is the device at the starting position among all other devices and the device.

[0165] It can be seen that implementing Figure 6 The described decentralized system can also analyze the data of all other devices received first. If there is a device that satisfies the current parent device update condition, update it to the required current parent device. Otherwise, directly update the root device to the current parent device, improving the accuracy and timeliness of updating the current parent device of each device in the group, and at the same time ensuring that the corresponding current parent device is successfully updated for each device in the group.

[0166] Further optionally, when the current association parameter corresponding to each other device is the current distance between the other device and its corresponding current parent device and the current association parameter corresponding to the device includes the current distance between the device and each other device, the specific manner in which the update module 203 determines whether there is a device among all other devices that satisfies the previously determined current parent device update condition according to the current association parameters corresponding to all other devices and the current association parameters corresponding to the device includes:

[0167] According to the current distance between the device and each other device, filter out the target device with the shortest current distance from all other devices;

[0168] Obtain the position of the target device in the current decentralized network, and according to the position corresponding to the target device, determine whether the current link where the target device is located is connected to the root device corresponding to all other devices and there is no device on this current link;

[0169] When the determination result is yes, determine that there is a device that satisfies the previously determined current parent device update condition, and the target device is the current parent device of the device;

[0170] When it is determined that the result is negative, the other devices that are currently at the second-closest distance to the target device are updated to the target device, and the above operations of obtaining the location of the target device in the current decentralized network and, based on the location corresponding to the target device, determining whether the current link where the target device is located is connected to the root devices corresponding to all other devices and whether there is no device on the current link are re-executed.

[0171] When the current link where the other device with the maximum current distance among all other devices is located is not connected to the root device and / or there is a device on the current link, it is determined that there is no device that satisfies the current parent device update condition, and the root device is the current parent device of the device.

[0172] It can be seen that in implementing Figure 6 the described decentralized system, for any device in the group, it analyzes in turn whether the current link where each other device is located is connected to the root device and whether it has itself according to the current distance between it and all other devices from near to far. If it is analyzed that the current link where the other device farthest from itself is located is still not connected to the root device or has itself, it is determined that there is a device that does not satisfy the current parent device update condition, otherwise it is determined that there is a device that satisfies the current parent device update condition, which increases the probability that the current parent device of each device in the group can be updated to the required current parent device in a timely and accurate manner.

[0173] In an alternative embodiment, Figure 7 is a schematic structural diagram of another device disclosed in an embodiment of the present invention. As Figure 7 shown, the device may further include:

[0174] A first broadcast module 204, configured to broadcast the current state parameters of the device outward after the update module 203 performs an update operation on the current parent device of the device according to the current association parameters corresponding to all other devices and the current association parameters corresponding to the device, where the current state parameters of the device include the identifier of the current parent device of the device and the current association parameters with the current parent device;

[0175] Among them, the current state parameters of the device are used for all other devices existing in the current scenario to obtain and update their corresponding current parent devices.

[0176] In this alternative embodiment, optionally, the types of all other devices in the current scenario include the types that have already been in the current scenario and / or the types that newly enter the current scenario. Among them, the types that have already been in the current scenario include the always-online type or the type that reconnects after going offline.

[0177] It can be seen that in implementing Figure 7For any device in the described decentralized system, after it updates its current parent device, it broadcasts the data of the latest parent device in a timely manner, so that other devices in the current scenario can promptly know who has updated and the data of the updated parent device, and then update their own parent devices accordingly, enabling each device in the group to reach a device steady state in a timely manner, which is conducive to further improving the cooperation efficiency and accuracy among devices.

[0178] In another optional embodiment, as Figure 7 shown, the device may further include:

[0179] A determination module 205, configured to determine the positions of the device's current parent device and the current parent devices of each other device in the current decentralized network after the update module 203 performs an update operation on the device's current parent device according to the current association parameters corresponding to all other devices and the current association parameters corresponding to the device;

[0180] A judgment module 206, configured to judge whether the hierarchical relationship between the device and all other devices is used to represent that the device and all other devices are connected to the root devices corresponding to the device and all other devices through the hierarchical relationship based on the positions of the device's current parent device and the current parent devices of each other device in the current decentralized network; when the judgment result is negative, trigger the communication module 201 to re - execute the operation of receiving messages sent by all other devices in the current scenario until the hierarchical relationship between the device and all other devices is used to represent that the device and all other devices are connected to the root device through the hierarchical relationship.

[0181] It can be seen that in the described decentralized system group, if there is a device that updates its current parent device, continue to analyze that each device is connected to the root device through the hierarchical relationship based on the position of the device's current parent device in the current decentralized network. If not, continue to perform the update operation of the current parent device to enable each device in the group to reach a steady state, thereby further improving the coordination and stability of the coordinated work of each device. Figure 7 In another optional embodiment, the acquisition module 201 is further configured to, when it is determined that the hierarchical relationship between the device and all other devices is used to represent that the device and all other devices are connected to the root devices corresponding to the device and all other devices through the hierarchical relationship, acquire the current association parameter between it and the updated current parent device, the current association parameter between the current parent device and the root device, and the current association parameter between it and the root device;

[0182]

[0183] ​The determination module 205 is further configured to determine the target connection mode between the device and its current parent device according to the current association parameter between it and the updated current parent device, the current association parameter between the current parent device and the root device, the current association parameter between it and the root device, and the pre-determined optimal path determination method;

[0184] As Figure 7 shown, the device further includes:

[0185] The adjustment module 207 is configured to perform an adjustment operation on its connection relationship with the current parent device and its connection relationship with the root device according to the determined target connection mode.

[0186] In this optional embodiment, after the device establishes a connection relationship with its current parent device, if the above target connection mode is used to indicate that the device hierarchy points to the current parent device, the device does not need to establish a connection with the root device, and the current parent device does not need to disconnect the connection with the root device; if the above target connection mode is used to indicate that the current parent device hierarchy points to the device, the device needs to establish a connection with the root device, and the current parent device needs to disconnect the connection with the root device.

[0187] In this optional embodiment, further, for the case where the current parent device needs to disconnect the connection with the root device, after the current parent device disconnects the connection with the root device, if the current parent device has a hierarchy pointing to another device and the other device has another device that is pointed to, then the other device hierarchy needs to point to the current parent device.

[0188] It can be seen that this optional embodiment further analyzes the optimal path of the decentralized system that has already formed a hierarchical connection pointing to the root device. If the devices are not connected in the optimal path (such as the shortest path), adjustments will continue until the decentralized system is connected in the optimal path mode, further improving the steady-state connection between devices in the decentralized system, which is beneficial to further improving the coordination, accuracy, and efficiency of the work between devices.

[0189] In another optional embodiment, as Figure 7 shown, the device may further include:

[0190] The second broadcast module 208 is configured to broadcast a message indicating the existence of the device in the current scenario before the communication module 201 receives messages broadcast by all other devices in the current scenario, and this message is used for all other devices in the current scenario to know the existence of the device;

[0191] The second broadcast module 208 is further configured to broadcast the identifier of the current parent device of the device and the current association parameter between the device and the current parent device in the current scenario.

[0192] The monitoring module 209 is configured to monitor the duration after broadcasting the identifier of the current parent device of the device and the current association parameter between the device and the current parent device to the outside; when the duration reaches a preset duration, trigger the communication module 201 to perform the operation of receiving the messages broadcast by all other devices in the current scene as described above.

[0193] It can be seen that when the devices of the described decentralized system are on-line, especially for the devices newly entering the group, they first broadcast their existence and the data of their current parent devices to other devices in the group so that other devices can know, and after a certain delay duration, they receive the data of the current parent devices of other devices, leaving enough time for other devices in the group to update the current parent devices, reducing the occurrence of conflicts in decision-making caused by multiple devices making decisions simultaneously, so that each device in the group can make decisions about the current parent device in an orderly and efficient and accurate manner. Figure 7 As described above, when the devices of the decentralized system are on-line, especially for the devices newly entering the group, they first broadcast their existence and the data of their current parent devices to other devices in the group so that other devices can know, and after a certain delay duration, they receive the data of the current parent devices of other devices, leaving enough time for other devices in the group to update the current parent devices, reducing the occurrence of conflicts in decision-making caused by multiple devices making decisions simultaneously, so that each device in the group can make decisions about the current parent device in an orderly and efficient and accurate manner.

[0194] In yet another alternative embodiment, the method may further include the following steps:

[0195] The device obtains the maximum reception delay duration, the minimum reception delay duration, and the reception delay duration at the median within a past historical duration period (such as the past 2 hours);

[0196] The device monitors the load of the current channel and the channel congestion value, and calculates the delay duration difference between the maximum reception delay duration and the minimum reception delay duration;

[0197] The device calculates the average delay duration between the delay duration difference and the reception delay duration at the median;

[0198] The device determines the corresponding channel idle value according to the load of the current channel and the channel congestion value, and obtains the target duration by dividing the average duration by the channel idle value;

[0199] Calculate the target sum duration of the minimum interval duration and the target duration as the above-mentioned preset duration.

[0200] It can be seen that for any device in the group in this alternative embodiment, by analyzing the delay duration data and the current channel data of the device in the past period of time, the accuracy of determining the required delay duration for this time is improved, and further reduces the occurrence of conflicts in decision-making caused by multiple devices making decisions simultaneously.

[0201] In yet another alternative embodiment, the method may further include the following steps:

[0202] The device obtains the location situation of the device in the decentralized network within a historical duration period, where the location situation includes all locations of the device in the decentralized network within the historical duration period;

[0203] The device determines the hierarchical depth of the position in the decentralized network according to each position corresponding to the device, where the root device is the first level;

[0204] The device calculates the average hierarchical depth of all the hierarchical depths of the device, and based on the average hierarchical depth, performs a correction operation on the target and duration to obtain the corrected target and duration as the preset duration;

[0205] Among them, the deeper the average hierarchical depth, the longer the preset duration.

[0206] It can be seen that for any device in the group, in this alternative embodiment, by using all the hierarchical depths of the device in the decentralized system when receiving data in the past period of time to correct the obtained delay duration, the determination accuracy of the delay duration required by the device at this time is further improved, and the occurrence of decision conflicts caused by multiple devices making decisions simultaneously is further reduced, so that each device in the group can make the current parent device decision efficiently and accurately in an orderly manner.

[0207] Embodiment Three

[0208] Please refer to Figure 8 , Figure 8 which is a schematic structural diagram of another device disclosed in the embodiments of the present invention. Among them, multiple devices form a decentralized system, and all devices are communicatively connected. This decentralized system can be applied to any scenario that requires multi-device cooperation, such as multi-device linkage control in a smart home scenario, multi-device networking in a disaster relief scenario, and multi-device formation in a drone scenario. As Figure 8 shown, for any device, the device may include:

[0209] A memory 301 storing executable program code;

[0210] A processor 302 coupled to the memory 301;

[0211] The processor 302 calls the executable program code stored in the memory 301 and executes the steps in the method for processing the device based on decentralization described in Embodiment One of the present invention.

[0212] Embodiment Four

[0213] The embodiments of the present invention disclose a computer-readable storage medium storing computer instructions, which are used to execute the steps in the method for processing the device based on decentralization described in Embodiment One of the present invention when the computer instructions are called.

[0214] Embodiment Five

[0215] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the steps in the method for processing a device based on decentralization described in Embodiment 1.

[0216] Embodiment 6

[0217] An embodiment of the present invention discloses a decentralized system. The decentralized system includes a plurality of devices, which are communicatively connected to each other. For any device, the device is configured to execute the steps in the method for processing a device based on decentralization described in Embodiment 1 of the present invention, and the device includes a structural schematic diagram as Figure 6 or Figure 7 described.

[0218] The above-described embodiments of the decentralized system are merely illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.

[0219] Through the specific descriptions of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, and the storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disk memories, tape memories, or any other medium that can be used to carry or store data and is computer-readable.

[0220] Finally, it should be noted that: the method, device and system for processing devices based on decentralization disclosed in the embodiments of the present invention are only the preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention 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 make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for processing devices based on decentralization, characterized in that, The method is applied to a decentralized system, which consists of multiple devices and all the devices are communicatively connected. For any one of the devices, the method includes: The device receives messages broadcast by all other devices in the current scenario. The message broadcast by each of the other devices includes the identifier of the current parent device corresponding to the other device and the current association parameter between the other device and the current parent device; The device obtains the current association parameter between the device and each of the other devices; The device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device.

2. The method for processing a device based on decentralization according to claim 1, wherein The device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device, including: The device determines, according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device, whether there is a device among all the other devices that meets the currently determined current parent device update condition; When it is determined that there is a device that meets the current parent device update condition, the device determines the device that meets the current parent device update condition according to the identifier of the current parent device corresponding to each of the other devices as the current parent device of the device; When it is determined that there is no device that meets the current parent device update condition, the device determines the root devices corresponding to all the other devices as the current parent device of the device; Wherein, the root device is the device in the starting position among all the other devices and the device.

3. The method for processing a device based on decentralization according to claim 1 or 2, characterized in that After the device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device, the method further includes: The device broadcasts the current status parameter of the device. The current status parameter of the device includes the identifier of the current parent device of the device and the current association parameter between the device and the current parent device; Wherein, the current status parameter of the device is used for all other devices existing in the current scenario to obtain and update their corresponding current parent devices; Wherein, the types of all other devices in the current scenario include the types that have been in the current scenario and / or the types that newly enter the current scenario.

4. The method for processing a device based on decentralization according to claim 1 or 2, characterized in that, After the device performs an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device, the method further includes: The device determines the positions of the current parent device of the device and the current parent devices of each of the other devices in the current decentralized network; The device determines, according to the positions of the current parent device of the device and the current parent devices of each of the other devices in the current decentralized network, whether the hierarchical relationship between the device and all the other devices is used to represent that the device and all the other devices are hierarchically connected to the root devices corresponding to the device and all the other devices; When it is determined that the result is negative, the device re-executes the operation of receiving messages sent by all other devices in the current scenario until the hierarchical relationship between the device and all the other devices is used to represent that the device and all the other devices are connected to the root device through the hierarchical relationship.

5. The method for processing a device based on decentralization according to claim 4, wherein The method further includes: When it is determined that the hierarchical relationship between the device and all the other devices is used to represent that the device and all the other devices are connected to the root device corresponding to the device and all the other devices through the hierarchical relationship, the device obtains the current association parameter between it and the updated current parent device, the current association parameter between the current parent device and the root device, and the current association parameter between it and the root device; The device determines the target connection method between the device and its current parent device according to the current association parameter between it and the updated current parent device, the current association parameter between the current parent device and the root device, the current association parameter between it and the root device, and the pre-determined optimal path determination method; The device performs an adjustment operation on its connection relationship with the current parent device and its connection relationship with the root device according to the determined target connection method.

6. The method for processing a device based on decentralization according to any one of claims 1, 2, and 5, wherein Before the device receives messages broadcast by all other devices in the current scenario, the method further includes: The device broadcasts a message indicating the existence of the device in the current scenario, and the message of the device is used for all other devices in the current scenario to know the existence of the device; The device broadcasts the identifier of the current parent device of the device and the current association parameter between the device and the current parent device in the current scenario; After broadcasting the identifier of the current parent device of the device and the current association parameter between the device and the current parent device, the device monitors the duration; When the duration reaches the preset duration, the device executes the operation of receiving messages broadcast by all other devices in the current scenario.

7. The method for processing a device based on decentralization according to claim 2, wherein When the current association parameter corresponding to each of the other devices is the current distance between the other device and its corresponding current parent device and the current association parameter corresponding to the device includes the current distance between the device and each of the other devices, the device determines whether there is a device that meets the pre-determined current parent device update condition among all the other devices according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device, including: The device filters out the target device with the shortest current distance from all the other devices according to the current distance between the device and each of the other devices; The device obtains the position of the target device in the current decentralized network, and determines whether the current link where the target device is located is connected to the root devices corresponding to all the other devices and the device is not on the current link according to the position corresponding to the target device; When it is determined that the result is positive, the device determines that there is a device that meets the pre-determined current parent device update condition, and the target device is the current parent device of the device; When it is determined that the result is negative, the device updates the other device that is currently the second closest to the target device to the target device, and re-executes the operation of obtaining the position of the target device in the current decentralized network and determining whether the current link where the target device is located is connected to the root devices corresponding to all the other devices and there is no such device on the current link; When the current link where the other device with the largest current distance among all the other devices is located is not connected to the root device and / or there is such a device on the current link, the device determines that there is no device that meets the current parent device update condition, and the root device is the current parent device of the device.

8. A decentralized system for processing devices based on decentralization, characterized in that, The decentralized system consists of multiple devices, and all the devices are communicatively connected. For any one of the devices, the device includes: A communication module, configured to receive messages broadcast by all the other devices in the current scenario. The message broadcast by each of the other devices includes the identifier of the current parent device corresponding to the other device and the current association parameter between the other device and the current parent device; An acquisition module, configured to acquire the current association parameter between the device and each of the other devices; An update module, configured to perform an update operation on the current parent device of the device according to the current association parameters corresponding to all the other devices and the current association parameter corresponding to the device.

9. A device, characterized in that, Multiple devices form a decentralized system, and all the devices are communicatively connected. For any one of the devices, the device includes: A memory storing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory and executes the method for processing a device based on decentralization according to any one of claims 1-7.

10. A decentralized system, characterized in that, The decentralized system includes multiple devices, and all the devices are communicatively connected. For any one of the devices, the device is configured to execute the method for processing a device based on decentralization according to any one of claims 1-7.