Method, device, equipment and storage medium for determining routing node level
By determining the root routing node in the Mesh network and filtering the target routing node based on the forwarding rate and duration, the problems of low efficiency and high power consumption in the prior art are solved, and efficient routing node hierarchical relationship determination and low power transmission are realized.
Patent Information
- Application Number
- CN202211285357.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-10-20
AI Technical Summary
The existing routing node level determination method is low in efficiency in Mesh networks and is accompanied by high power loss.
By determining the root routing node, sending data packets to the target node and determining the hierarchy probability based on the forwarding rate and duration, the lower routing node is cyclically filtered until the leaf routing node is determined.
It improves the efficiency of determining the hierarchical relationship of the routing node and reduces network transmission power consumption.
Smart Images

Figure CN115665821B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a method, apparatus, device and storage medium for determining a routing node hierarchy. Background Art
[0002] With the rapid development of wireless networking, mesh networking has become a very popular wireless communication technology. Mesh networking is a self-organizing wireless communication network developed from Bluetooth Low Energy. Mesh networks offer a wide communication range, high security, and built-in forward compatibility.
[0003] Currently, mesh networks often add new routing nodes or remove old ones, requiring a reconfiguration of the routing node hierarchy. However, existing methods for determining routing node hierarchy are inefficient, and the resulting hierarchy is accompanied by high power consumption. Summary of the Invention
[0004] The present invention provides a method, apparatus, device and storage medium for determining the hierarchy of routing nodes, so as to improve the efficiency of determining the hierarchy relationship of routing nodes and effectively reduce network transmission power consumption.
[0005] According to one aspect of the present invention, a method for determining a routing node level is provided, comprising:
[0006] Determine a root routing node in the area to be networked according to network configuration information of the area to be networked, and use the root routing node as the current routing node;
[0007] Sending a data packet to each target node connected to the current routing node, and determining a target routing node from each of the target nodes based on a target forwarding rate corresponding to the data packet returned by each of the target nodes;
[0008] Determining, based on a transmission time duration of a data packet sent by the current routing node to each of the target routing nodes, a probability that each of the target routing nodes does not belong to a next level of the current routing node;
[0009] Determining a lower-layer routing node of the current routing node from each of the target routing nodes according to the layer probabilities corresponding to each of the target routing nodes;
[0010] Each of the lower-layer routing nodes is used as the current routing node, and the operation of sending the data packet to each target node connected to the current routing node is returned to be executed until each of the lower-layer routing nodes is determined to be a leaf routing node.
[0011] According to another aspect of the present invention, there is provided a device for determining a routing node level, comprising:
[0012] A root routing node determination module is used to determine a root routing node in the area to be networked according to network configuration information in the area to be networked, and use the root routing node as the current routing node;
[0013] a target routing node determination module, configured to send a data packet to each target node connected to the current routing node, and determine a target routing node from each of the target nodes based on a target forwarding rate corresponding to a data packet returned by each of the target nodes;
[0014] a level probability determination module, configured to determine, based on a transmission time of a data packet sent by the current routing node to each of the target routing nodes, a level probability that each of the target routing nodes does not belong to a next level of the current routing node;
[0015] A lower-layer routing node determination module, configured to determine a lower-layer routing node of a current routing node from each of the target routing nodes according to the level probabilities corresponding to each of the target routing nodes;
[0016] The current routing node update module is used to take each of the lower-level routing nodes as the current routing node and return to execute the operation of sending a data packet to each target node connected to the current routing node until each lower-level routing node is determined to be a leaf routing node.
[0017] According to another aspect of the present invention, an electronic device is provided, comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the method for determining the routing node level according to any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining the routing node level according to any embodiment of the present invention when executed.
[0022] The technical solution of the embodiment of the present invention is to determine the root routing node in the area to be networked based on the network configuration information in the area to be networked, and use the root routing node as the current routing node in the first cycle; send a data packet to each target node connected to the current routing node, and determine the target routing node from each target node based on the target forwarding rate corresponding to the data packet returned by each target node, so that the target routing node can be quickly screened out from all target nodes connected to the current routing node based on the forwarding rate, thereby improving the efficiency of determining the hierarchical relationship of the routing nodes. According to the sending time of the current routing node sending a data packet to each target routing node, the hierarchical probability that each target routing node does not belong to the next level of the current routing node is determined; according to the hierarchical probability corresponding to each target routing node, the lower-level routing node of the current routing node is determined from each target routing node, so that based on the sending time, the next routing node with a suitable transmission distance can be screened out from all target routing nodes connected to the current routing node as the next level, thereby effectively reducing network transmission power consumption. By taking each lower-level routing node as the current routing node and returning to execute the operation of sending a data packet to each target node connected to the current routing node, the routing nodes of the next level belonging to the lower-level routing node can be determined cyclically until each determined lower-level routing node is a leaf routing node, thereby efficiently realizing the dynamic determination of the hierarchical relationship of routing nodes and reducing network transmission power consumption.
[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 This is a flowchart of a method for determining a routing node level according to a first embodiment of the present invention;
[0026] Figure 2 This is a flowchart of a method for determining a routing node level according to a second embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram of the structure of a device for determining the level of a routing node provided in accordance with a third embodiment of the present invention;
[0028] Figure 4 It is a structural diagram of an electronic device for implementing the routing node level determination method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Example 1
[0032] Figure 1 A flowchart of a method for determining the hierarchy of routing nodes is provided for the first embodiment of the present invention. This embodiment is applicable to the case of determining the hierarchical relationship between routing nodes that need to be networked in a Mesh network. The method can be executed by a routing node hierarchy determination device, which can be implemented in the form of hardware and / or software. The routing node hierarchy determination device can be configured in an electronic device. Figure 1 As shown, the method includes:
[0033] S110: Determine a root routing node in the area to be networked according to network configuration information in the area to be networked, and use the root routing node as the current routing node.
[0034] Among them, the area to be networked may refer to a network area where the hierarchical relationship of routing nodes needs to be determined by networking. For example, the network area where a new routing node is added or an old routing node is abolished in a Mesh network. The network configuration information may be the access interface information of the root routing node pre-configured based on business needs, which is used to indicate the root routing node in the area to be networked. The current routing node may refer to the routing node for which the next level needs to be determined. In the process of determining the hierarchical relationship between the various routing nodes in the area to be networked, each routing node may be dynamically and cyclically used as the current routing node to determine the hierarchical relationship.
[0035] Specifically, the network configuration information in the area to be networked can be obtained from the network communication protocol of the Mesh network, and the root routing node that matches the network configuration information can be determined. For example, if the network configuration information includes the location information of the root routing node, such as the IP address of the root routing node, the routing node corresponding to the location information of the root routing node in the area to be networked can be determined as the root routing node. If the network configuration information includes the type information of the root routing node, the routing node corresponding to the type information of the root routing node in the area to be networked can be determined as the root routing node. If the type information of the root routing node in the area to be networked corresponds to multiple routing nodes, a routing node can be randomly selected as the root routing node. The layer sequence number (such as the number of hops) corresponding to the root routing node in the area to be networked can be set to 0, that is, the first layer, or it can be set to a preset layer sequence number configured based on the network layer of the original networking area. After determining the root routing node, the root routing node can be used as the current routing node to perform subsequent operations so as to first determine the routing node belonging to the next layer of the root routing node.
[0036] S120: Send a data packet to each target node connected to the current routing node, and determine a target routing node from each target node based on a target forwarding rate corresponding to the data packet returned by each target node.
[0037] The target node may refer to a node that has a network communication connection with the current routing node. The number of target nodes may be one or more. The target node may be a routing node or a client node. The target forwarding rate includes a first forwarding rate and a second forwarding rate. The first forwarding rate may refer to the rate at which the routing node sends data packets. The second forwarding rate may refer to the rate at which the client node sends data packets. The first forwarding rate is greater than the second forwarding rate.
[0038] Specifically, the current routing node can use the first forwarding rate to transmit a data packet to each target node connected to it. After receiving the data packet, each target node will also return a data packet accordingly, thereby achieving data exchange communication. This embodiment can determine whether each target node is a routing node or a client node based on the different forwarding rates of the data packets returned by each target node.
[0039] Exemplarily, S120 may include: determining, for each target node, a target forwarding rate corresponding to data packets returned by the target node; if the target forwarding rate is a first forwarding rate, determining the target node as a target routing node; and if the target forwarding rate is a second forwarding rate, determining the target node as a target client node. This embodiment can accurately determine the routing node based on the differential forwarding rate, further improving the accuracy of determining the routing node hierarchy.
[0040] S130: Determine, based on a transmission time duration of a data packet sent by the current routing node to each target routing node, a probability that each target routing node does not belong to a next level of the current routing node.
[0041] The transmission duration refers to the time it takes for a data packet to be transmitted from the current routing node to the target routing node. Transmission duration is positively correlated with network transmission power consumption: shorter transmission durations indicate lower network transmission power consumption. Layer probability can be used to represent the probability that the target routing node is not in the next layer below the current routing node, ensuring low power consumption across the entire network.
[0042] Specifically, the duration of the data packet sent by the current routing node to each target routing node can be obtained based on the time when the current routing node sends the data packet and the time when the target routing node receives the data packet. Based on the different sending times, the probability that each target routing node does not belong to the next level of the current routing node can be determined.
[0043] Exemplarily, S130 may include: determining the total sending duration based on the sending duration of the data packet sent by the current routing node to each target routing node; and determining the ratio between the sending duration corresponding to each target routing node and the total sending duration as the level probability that the target routing node does not belong to the next level of the current routing node.
[0044] Specifically, the transmission duration of the data packets sent by the current routing node to each target routing node can be added together, and the sum obtained can be used as the total transmission duration. For each target routing node, the ratio of the transmission duration corresponding to the target routing node to the total transmission duration can be used to determine the level probability that the target routing node does not belong to the next level of the current routing node. The longer the transmission duration, the smaller the level probability of not belonging to the next level of the current routing node, and correspondingly, the greater the level probability of belonging to the next level of the current routing node.
[0045] S140 : Determine a lower-layer routing node of the current routing node from each target routing node according to the layer probability corresponding to each target routing node.
[0046] Specifically, the probability that each target routing node does not belong to the next level of the current routing node can be compared with a preset probability, and the target routing node with a probability less than the preset probability can be determined as the next level routing node of the current routing node. The preset probability can refer to the maximum level probability value of the next level of the current routing node. By screening out routing nodes with shorter transmission distances from all target routing nodes connected to the current routing node as next level routing nodes, low power consumption of network transmission between the current routing node and the next level routing nodes can be ensured.
[0047] It should be noted that after determining the lower-level routing node of the current routing node, the layer sequence number corresponding to the current routing node can be increased by 1 to obtain the layer sequence number corresponding to the lower-level routing node, so that the hierarchical relationship between each routing node can be represented based on the layer sequence number.
[0048] S150: Take each lower-layer routing node as the current routing node, and return to execute S120 operation until each lower-layer routing node is determined to be a leaf routing node.
[0049] Specifically, after determining the various lower-level routing nodes of the current routing node, each determined lower-level routing node can be used as the current routing node, and the process returns to execute steps S120-S140 to determine the routing nodes of the next lower level, and the process is executed in a loop in sequence until each determined lower-level routing node is a leaf routing node, indicating that there is no routing node of a lower level. At this time, the routing node hierarchy determination process is completed, the hierarchical relationship between the various routing nodes is obtained, and low-power network transmission is guaranteed.
[0050] The technical solution of this embodiment is to determine the root routing node in the area to be networked based on the network configuration information in the area to be networked, and use the root routing node as the current routing node in the first cycle; send a data packet to each target node connected to the current routing node, and determine the target routing node from each target node based on the target forwarding rate corresponding to the data packet returned by each target node, so that the target routing node can be quickly screened out from all target nodes connected to the current routing node based on the forwarding rate, thereby improving the efficiency of determining the hierarchical relationship of the routing nodes. Based on the sending time of the current routing node sending a data packet to each target routing node, the hierarchical probability that each target routing node does not belong to the next level of the current routing node is determined; based on the hierarchical probability corresponding to each target routing node, the lower-level routing node of the current routing node is determined from each target routing node, so that based on the sending time, the next routing node with a suitable transmission distance can be screened out from all target routing nodes connected to the current routing node as the next routing node of the next level, thereby effectively reducing network transmission power consumption. By taking each lower-level routing node as the current routing node and returning to execute the operation of sending a data packet to each target node connected to the current routing node, the routing nodes of the next level belonging to the lower-level routing node can be determined cyclically until each determined lower-level routing node is a leaf routing node, thereby efficiently realizing the dynamic determination of the hierarchical relationship of routing nodes and reducing network transmission power consumption.
[0051] Example 2
[0052] Figure 2 This is a flowchart of a method for determining routing node hierarchies, provided in Example 2 of the present invention. This example further optimizes the step of "determining, from among the target routing nodes, the lower-level routing nodes of the current routing node based on the hierarchical probabilities corresponding to the target routing nodes" based on the above-mentioned examples. Explanations of terms that are identical or corresponding to those in the above-mentioned examples are omitted here.
[0053] See also Figure 2 The method for determining the routing node level provided in this embodiment specifically includes the following steps:
[0054] S210: Determine a root routing node in the area to be networked according to network configuration information in the area to be networked, and use the root routing node as the current routing node.
[0055] S220: Send a data packet to each target node connected to the current routing node, and determine a target routing node from each target node based on a target forwarding rate corresponding to the data packet returned by each target node.
[0056] S230: Determine, based on a transmission time duration of a data packet sent by the current routing node to each target routing node, a probability that each target routing node does not belong to a next level of the current routing node.
[0057] S240 : Determine the Gini index according to the hierarchical probability corresponding to each target routing node.
[0058] The Gini index is a metric used to measure uneven distributions, and is a numerical value between 0 and 1. The Gini index can be used in the CART algorithm. The CART algorithm is a method for learning the conditional probability distribution of the output random variable Y given the input random variable X. A decision tree is equivalent to recursively bisecting each feature, dividing the feature space into a finite number of cells, and determining the predicted probability distribution—that is, the conditional probability distribution of the output given the input—over these cells.
[0059] Specifically, the CART algorithm may be used to determine the Gini index based on the hierarchical probability corresponding to each target routing node.
[0060] Exemplarily, S240 may include: squaring the hierarchical probability corresponding to each target routing node to obtain a hierarchical probability square value; adding the hierarchical probability square values, and determining the difference between 1 and the addition result as the Gini index.
[0061] Specifically, the Gini index Gini(p) can be determined based on the following formula:
[0062]
[0063] Among them, p k It refers to the probability that the kth target routing node does not belong to the next level of the current routing node; K refers to the number of target routing nodes.
[0064] S250: Determine the time variance according to the hierarchical probability, the Gini index, and the number of target routing nodes corresponding to each target routing node.
[0065] The time variance can be used to characterize the maximum level probability of being unsuitable as a lower-level routing node. For example, S250 may include: determining the difference between the Gini index and the level probability corresponding to each target routing node; summing the squares of the differences, and determining the ratio of the summed result to the number of target routing nodes as the time variance.
[0066] Specifically, the time variance σ can be determined based on the following formula: 2 :
[0067]
[0068] S260: Determine a lower-layer routing node of the current routing node from each target routing node according to the layer probability and time variance corresponding to each target routing node.
[0069] Specifically, by comparing the hierarchical probability corresponding to each target routing node with the time variance, the lower-level routing node with a suitable transmission distance can be determined more accurately, further effectively ensuring low power consumption of network transmission.
[0070] Exemplarily, S260 may include: comparing the level probability corresponding to each target routing node with the time variance; if the level probability corresponding to the target routing node is less than or equal to the time variance, determining that the target routing node is a lower-level routing node of the current routing node.
[0071] Specifically, all target routing nodes with a hierarchical probability less than or equal to the time variance can be determined as lower-level routing nodes of the current routing node, so that low-power lower-level routing nodes can be determined by using time synchronization, further ensuring the efficient and stable update of the Mesh network routing node hierarchy.
[0072] S270: Take each lower-layer routing node as the current routing node, and return to execute the operation of S220 until each lower-layer routing node is determined to be a leaf routing node.
[0073] The technical solution of this embodiment determines the Gini index based on the hierarchical probability corresponding to each target routing node; determines the time variance based on the hierarchical probability, Gini index and number of target routing nodes corresponding to each target routing node; and based on the hierarchical probability and time variance corresponding to each target routing node, the lower-level routing node of the current routing node can be more accurately determined from each target routing node, further effectively ensuring low power consumption of network transmission.
[0074] The following is an embodiment of a routing node level determination device provided by an embodiment of the present invention. The device and the routing node level determination methods of the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the routing node level determination device, please refer to the embodiment of the above-mentioned routing node level determination method.
[0075] Example 3
[0076] Figure 3 This is a schematic diagram of the structure of a routing node level determination device provided by the third embodiment of the present invention. Figure 3 As shown, the apparatus specifically includes: a root routing node determination module 310, a target routing node determination module 320, a layer probability determination module 330, a lower layer routing node determination module 340 and a current routing node update module 350.
[0077] Among them, the root routing node determination module 310 is used to determine the root routing node in the area to be networked based on the network configuration information in the area to be networked, and use the root routing node as the current routing node; the target routing node determination module 320 is used to send a data packet to each target node connected to the current routing node, and determine the target routing node from each target node based on the target forwarding rate corresponding to the data packet returned by each target node; the level probability determination module 330 is used to determine the level probability that each target routing node does not belong to the next level of the current routing node based on the sending time of the data packet sent by the current routing node to each target routing node; the lower-level routing node determination module 340 is used to determine the lower-level routing node of the current routing node from each target routing node based on the level probability corresponding to each target routing node; the current routing node update module 350 is used to use each lower-level routing node as the current routing node and return to execute the operation of sending a data packet to each target node connected to the current routing node until each lower-level routing node is determined to be a leaf routing node.
[0078] Optionally, the target routing node determination module 320 is specifically configured to:
[0079] For each of the target nodes, a target forwarding rate corresponding to the data packets returned by the target node is determined; if the target forwarding rate is a first forwarding rate, the target node is determined to be a target routing node; if the target forwarding rate is a second forwarding rate, the target node is determined to be a target client node; wherein the first forwarding rate is greater than the second forwarding rate.
[0080] Optionally, the hierarchical probability determination module 330 is specifically configured to:
[0081] The total sending duration is determined based on the sending duration of the data packet sent by the current routing node to each of the target routing nodes; and the ratio between the sending duration corresponding to each of the target routing nodes and the total sending duration is determined as the level probability that the target routing node does not belong to the next level of the current routing node.
[0082] Optionally, the lower-layer routing node determination module 340 includes:
[0083] A Gini index determination submodule, configured to determine a Gini index according to the hierarchical probability corresponding to each of the target routing nodes;
[0084] a time variance determination submodule, configured to determine the time variance according to the hierarchical probability corresponding to each target routing node, the Gini index, and the number of target routing nodes;
[0085] The lower-layer routing node determination submodule is configured to determine the lower-layer routing node of the current routing node from each of the target routing nodes according to the level probability corresponding to each of the target routing nodes and the time variance.
[0086] Optional Gini index determination submodule, specifically used for:
[0087] The hierarchical probability corresponding to each target routing node is squared to obtain a hierarchical probability square value; the hierarchical probability square values are added together, and the difference between 1 and the addition result is determined as the Gini index.
[0088] Optionally, the time variance determination submodule is used to:
[0089] Determine a difference between the Gini index and the level probability corresponding to each target routing node; square and sum each of the differences, and determine a ratio between the summation result and the number of target routing nodes as the time variance.
[0090] Optionally, the lower-layer routing node determines a submodule, specifically for:
[0091] Compare the level probability corresponding to each target routing node with the time variance; if the level probability corresponding to the target routing node is less than or equal to the time variance, determine that the target routing node is a lower-level routing node of the current routing node.
[0092] The routing node level determination device provided in the embodiment of the present invention can execute the routing node level determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the routing node level determination method.
[0093] It is worth noting that in the embodiment of the above-mentioned routing node hierarchy determination device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0094] Example 4
[0095] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0096] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0097] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0098] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. The processor 11 executes the various routing node level determination methods and processes described above.
[0099] In some embodiments, the routing node hierarchy determination method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the routing node hierarchy determination method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the routing node hierarchy determination method in any other appropriate manner (e.g., by means of firmware).
[0100] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0101] Computer programs for implementing the routing node hierarchy determination method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0102] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0104] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0105] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0106] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0107] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for determining the routing node level, characterized in that: include: Determine a root routing node in the area to be networked according to network configuration information of the area to be networked, and use the root routing node as the current routing node; Sending a data packet to each target node connected to the current routing node, and determining a target routing node from each of the target nodes based on a target forwarding rate corresponding to the data packet returned by each of the target nodes; Determining, based on a transmission time duration of a data packet sent by the current routing node to each of the target routing nodes, a probability that each of the target routing nodes does not belong to a next level of the current routing node; Determining a lower-layer routing node of the current routing node from each of the target routing nodes according to the layer probabilities corresponding to each of the target routing nodes; Each of the lower-layer routing nodes is used as the current routing node, and the operation of sending the data packet to each target node connected to the current routing node is returned to be executed until each of the lower-layer routing nodes is determined to be a leaf routing node.
2. The method according to claim 1, characterized in that Determining a target routing node from each of the target nodes based on a target forwarding rate corresponding to a data packet returned by each of the target nodes includes: For each of the target nodes, determining a target forwarding rate corresponding to the data packets returned by the target node; If the target forwarding rate is the first forwarding rate, determining the target node as a target routing node; If the target forwarding rate is the second forwarding rate, determining that the target node is a target client node; The first forwarding rate is greater than the second forwarding rate.
3. The method according to claim 1, characterized in that The determining, based on a transmission duration of a data packet sent by the current routing node to each of the target routing nodes, a probability that each of the target routing nodes does not belong to a next level of the current routing node, includes: Determine the total sending duration according to the sending duration of the data packet sent by the current routing node to each of the target routing nodes; The ratio of the sending duration corresponding to each target routing node to the total sending duration is determined as the level probability that the target routing node does not belong to the next level of the current routing node.
4. The method according to claim 1, wherein The determining, from each of the target routing nodes according to the hierarchical probabilities corresponding to each of the target routing nodes, a lower-layer routing node of the current routing node comprises: Determining a Gini index according to the hierarchical probability corresponding to each of the target routing nodes; Determining a time variance according to the hierarchical probability corresponding to each target routing node, the Gini index, and the number of target routing nodes; According to the level probability corresponding to each target routing node and the time variance, a lower-level routing node of the current routing node is determined from each target routing node.
5. The method according to claim 4, characterized in that Determining the Gini index according to the hierarchical probabilities corresponding to the target routing nodes includes: Squaring the hierarchical probability corresponding to each target routing node to obtain a hierarchical probability square value; The squared probability values of each level are added together, and the difference between 1 and the sum is determined as the Gini index.
6. The method according to claim 4, characterized in that The determining of the time variance according to the hierarchical probability corresponding to each target routing node, the Gini index, and the number of the target routing nodes includes: Determining a difference between the Gini index and the hierarchical probability corresponding to each of the target routing nodes; The squares of the differences are summed, and the ratio of the summation result to the number of the target routing nodes is determined as the time variance.
7. The method according to claim 4, characterized in that The step of determining a lower-layer routing node of a current routing node from each of the target routing nodes according to the layer probability corresponding to each of the target routing nodes and the time variance includes: Comparing the level probability corresponding to each of the target routing nodes with the time variance; If the level probability corresponding to the target routing node is less than or equal to the time variance, the target routing node is determined to be a lower-level routing node of the current routing node.
8. A routing node level determination device, characterized in that: include: A root routing node determination module is used to determine a root routing node in the area to be networked according to network configuration information in the area to be networked, and use the root routing node as the current routing node; a target routing node determination module, configured to send a data packet to each target node connected to the current routing node, and determine a target routing node from each of the target nodes based on a target forwarding rate corresponding to a data packet returned by each of the target nodes; a level probability determination module, configured to determine, based on a transmission time of a data packet sent by the current routing node to each of the target routing nodes, a level probability that each of the target routing nodes does not belong to a next level of the current routing node; A lower-layer routing node determination module, configured to determine a lower-layer routing node of a current routing node from each of the target routing nodes according to the level probabilities corresponding to each of the target routing nodes; The current routing node update module is used to take each of the lower-level routing nodes as the current routing node and return to execute the operation of sending a data packet to each target node connected to the current routing node until each lower-level routing node is determined to be a leaf routing node.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the routing node level determination method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the routing node level determination method according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
A wireless mesh network opportunity routing algorithm based on quality of service guarantee
CN109936866A
A method for routing information in a mesh communication network
WO2020067982A1