## 2 Artificial Cobweb Routing Algorithm
### Artificial Cobweb Routing Algorithm
#### 2.2.1 Artificial Cobweb Routing Initialization Algorithm  
The flow chart of artificial cobweb routing algorithm is shown in Figure 3. In what follows, we illustrate the artificial cobweb routing initialization algorithm combined with Figure 1 and Figure 3:  
1. When a networking broadcast is sent by the BS, in order to explain the process of algorithm conveniently, we assume that it can only be intercepted by nodes 1 to 9, which have a close physical distance to the BS. These nodes send responses to the BS in turn and are assigned logical IDs (1 to 9) by the BS. A broadcast from the BS is received by nodes 1 to 9, which indicates that the link in the physical range of these nodes is in good condition and that the 9 nodes can directly or indirectly communicate with each other. BS selects a node \(h_{1}\) from these 9 nodes as the central node. 2. Node \(h_{1}\) sends a broadcast. The rest of the eight nodes receive the broadcast, record the logical ID of \(h_{1}\) (nodes without a logical ID do not respond to the broadcast), and send a response to \(h_{1}\). Central node \(h_{1}\) records the logical IDs of peripheral nodes to generate a routing table. The routing table is sent to the BS so that the artificial cobweb topology network of subnet (single-layer artificial cobweb structure) 1 is completed and records that the logical layer where the nine nodes are located, is layer 1. 3. Node \(h_{1}\) sends a networking broadcast, assuming that the broadcast is received by nodes 10-24, with the logical layer containing these nodes recorded as layer 2. Repeating step 1), node \(h_{1}\) assigns a logical ID and selects central node \(h_{2}\), assuming that \(h_{2}\) is any one of nodes 10-16. \(h_{2}\) sends a broadcast and repeat step (2). Nodes 17-24, which are located in different branches, do not receive the broadcast from \(h_{2}\), or if they do receive a broadcast, the broadcast is weak in  
Figure 3: Flow chart of algorithm. intensity as a result of signal attenuation. In this case, the composite index of signal strength \(\beta\) is introduced to make a further judgment. If \(\beta_{h1}<\beta_{h2}\), then the composite index of signal strength from \(h_{1}\) recorded by nodes 10\(\sim\)16 is less than that from \(h_{2}\), step 2 is repeated, \(h_{2}\) is selected as the central node to form a new network. If \(\beta_{h1}>\beta_{h2}\) or a broadcast from \(h_{2}\) is not received, then nodes 17-24 send a message to \(h_{1}\) and repeat step (1), and \(h_{1}\) selects a new central node \(h_{3}\) from these nodes to form a new cobweb network. This paper assumes that a broadcast from \(h_{2}\) is not received by nodes 17-24, which are located in another branch, and \(h_{3}\) is selected as the central node to form a new cobweb network. It is stipulated that the logical layer of the new cobweb network is layer 2. \(h_{2}\) and \(h_{3}\) send the routing table to the BS by selecting \(h_{1}\) as a relay. \(\beta=s\,\times\eta^{l}\), where \(s\) is the characterisation value of the physical signal strength, \(l\) is the layer number of the subnet to which the information sources belong, and \(\eta\) is the successful probability of communication between different nodes. \(\eta\) can be obtained from practical statistical values. A higher value for \(\eta\) indicates higher reliability of communication between layers. Conversely, a lower value for \(\eta\) indicates lower reliability. 4. \(h_{2}\) and \(h_{3}\) send a broadcast again, assuming that nodes 25-36 receive the broadcast from \(h_{2}\), repeat step 3, and select central nodes \(h_{4}\) and \(h_{5}\) to form new cobweb networks in different branches. When there are no nodes without a logical ID response to broadcast from \(h_{3}\) and an empty response is obtained, then stop networking. 5. \(h_{4}\) and \(h_{5}\) send a broadcast and repeat step (3). When there are no longer nodes without logical ID response to broadcast from \(h_{4}\) and \(h_{5}\) and an empty response is obtained, and then stop networking.