Bi-adjusting duty cycle for green communications in wireless sensor networks

Green communications is a challenging issue for communications and networking. In order to save energy, nodes of the wireless sensor networks (WSNs) usually adopt the low duty cycle mode which brings a large delay to the event detection and data transmission to the sink and deteriorates the network’s timely processing of the event. In this paper, bi-adjusting duty cycle schedule (BADCS) scheme is proposed to reduce event detection latency as well as data routing delay for low duty cycle wireless sensor networks. BADCS scheme consists mainly of two duty cycle adjustment algorithms: (a) active slot asynchronous adjustment algorithm for nodes in the same sensing area; (b) the continuous adjustment algorithm for two adjacent nodes on the routing path with one active slot interval. Specifically, the operations are 2-fold. First, perform asynchronous operations on the active slots of the nodes in the same sensing area, so that the active slots of the nodes in the same sensing area are distributed as evenly as possible without overlapping. In this way, it is possible to reduce the latency by the time the event is perceived after its occurrence. Secondly, active slots of the nodes on the routing path are adjusted to be with pipeline style, so that when the nodes receive the data packet, they can route through the continuous active slots, thus greatly reducing the delay of data routing. Two adjustment algorithms of active slot are given in detail in this paper. The performance of BADCS mode is discussed in detail, and its performance is better than the previous strategy. Comprehensive experiments are conducted, and the results demonstrate that the proposed BADCS scheme significantly improves event detection performance in terms of detection latency, detection probability, and routing delay. Detection delay and routing delay are reduced as high as 3.91% and 56.22% respectively.


Introduction
Green communications refers to a new generation communication conception that can save resources, reduce environmental pollution and environmental waste, and lessen harm to the human body and the environment from communication equipment. At present, innovative design of green communication network is mainly aimed at network deployment, network management, and wireless resource management. Wireless sensor networks (WSNs) are an important part of the Internet of Things (IoTs), which are composed of tiny wireless sensing nodes consisting of sensing device, data processing device, memory, battery, and communication device [1][2][3][4][5]. With the rapid development of microelectronic device technology, the processing power, sensing ability, and sensing accuracy of sensor nodes are getting higher and higher. Computing power of current sensor nodes had already exceeded computer a decade ago. On the other hand, the manufacturing cost of sensor nodes and the volume of the device become increasingly smaller. With the development of artificial intelligence technology and big data network, WSNs have gained new vitality and thus applied to increase fields [6][7][8]. One of the important applications of WSNs is the monitoring of events [9][10][11]. For example: sensor nodes are deployed in key places, such as treasury, to protect the important infrastructure by sensing various physical phenomena such as vibration, fire, and sound of the surrounding environment. In forest fire monitoring, wildlife protection, WSNs also play an important role. By deploying sensor nodes in the forest, the fire is detected in time to win time to minimize disasters [12][13][14].
Research areas of WSNs are really wide, such as energy consumption [15,16], lifetime [16], and network security [17][18][19][20]. This paper focuses on the important impacts of the following key research issues directly related to event detection performance on WSNs [21][22][23][24]: (1) The latency for sensor node detection the event is called event detection latency (EDL). EDL refers to the time elapsed after the event occurs and is sensed by the sensor nodes. Obviously, the smaller the EDL, the better. (2) The delay that sensing event's data routing to sink is called data routing delay (DRD). DRD refers to the time that a sensor node perceives an event and generates a data package embracing the event information until the data package is routed to sink. Obviously, the smaller the DRD, the better. (3) Lifetime generally refers to the time when the first node in the WSNs dies.
Obviously, the longer the lifetime, the better.
However, enabling EDL and DRD as small as possible and the lifetime as long as possible is a challenging issue [21][22][23][24]. Because whether it is to shorten the EDL or DRD time, it is necessary to increase the active (i.e., running) time of the sensing node or the transmitting node, which consumes a large amount of energy of the WSNs node, which causes the node to fail due to energy exhaustion and depletion, which in turn leads to a shortened lifetime of the WSNs. In other words, shortening the EDL or DRD time means shortening the lifetime of WSNs and vice versa. In WSNs, sensor nodes are powered by batteries. At the same time, sensor nodes are generally deployed in wild places. Therefore, it is unrealistic to charge the drained nodes [25][26][27][28]. This is because in practical application scenarios, the number of WSN nodes is huge. On the one hand, the deployment of charging facilities for a large number of nodes is very difficult because the node locations are difficult to reach. On the other hand, it takes considerable time to charge each node. The time it takes to charge a large number of nodes is unacceptable, and it is almost impossible to achieve. Therefore, how to extend lifetime becomes a key research topic of WSNs when node energy is limited. Researchers found that more than 70% of the sensor node energy is consumed by communication [3,8,18]. To maximize the lifetime of the wireless sensor network (WSN) which is a green computing problem of WSN, Khatri et al. [29] proposed a balance-based WSN lifecycle maximization framework, namely, the development of energy-based shift (E-shift) and load-based. The L-shift algorithm is used to maximize the lifetime of the network. Analysis and simulation experiments show that their method has significant advantages compared with existing similar methods. Considering that the existing research work has insufficient effects on the impact of multiple parameters on energy consumption, Aanchal et al. [30] studied the WSN life cycle maximization technology based on Huffman coding and ant colony algorithm. Their method considered the units of hops, path length, load residual energy, and minimum energy node of the path node. Due to the use of advanced ant (a-ant), regression ant (r-ant) algorithm, and Huffman coding to identify and select the best path, their method is superior to the existing methods in many important performance indicators, such as average residual energy, energy consumption, number of living sensors, and standard deviation of energy. Communication consumption consists of the following parts: energy consumption for receiving and sending data and energy consumption for idle waiting and energy consumption for sleep. The energy consumption when the node sends data, receives data, and waiting is several orders of magnitude more than the energy consumption of the node when it sleeps. Therefore, in order to save battery energy, the node should be kept in sleep state as much as possible. The duty cycle method is such a way to effectively save node energy [31][32][33]. In such a method, sensor nodes divide time into an equal period of time, which is composed of multiple slots. The node selects one slot to be in the active state, and the other slots to sleep to save energy. The duty cycle also refers to the ratio of the time the node is in the active state to the length of the entire cycle [3,31,[33][34][35].
However, when the node is in the sleep state, it will deteriorate the network performance, since the node cannot be aware of the event when the node is in the sleep state, and cannot receive and send data [36][37][38]. If the event occurs in the sleep state of the node, the node cannot sense the event at this time, and it is necessary to wait until the sensor node switches to the awaking state to sense the event. Therefore, the longer the node sleep is, the more latency it detects the event. For the occurrence of major events, if its sensing latency is large, it may cause significant losses. Obviously, in the duty cycle-based WSNs, the larger the duty cycle of the node, the more the energy consumption of the node, and the smaller the lifetime of the node, although the latency of the node detection event is small. And if the node uses a smaller duty cycle, although it can save energy, it will make the event's latency more.
On the other hand, the node's duty cycle method also affects the data routing delay. In a network where the node is always active, when the node has data to send, it can select a relay node from so called forwarding node set (FNS) whose nodes are closer than the sender to the sink. It can make the number of hops required to reach the sink minimum when the node closest to the sink is selected, so that the data routing delay is minimum [16,39]. But in duty cycle-based WSNs, there is another situation. Because of the periodic awake/sleep of nodes, when sender sends data, the worst case is that all nodes in FNS are in sleep state, so sender needs to wait for one of nodes in FNS to wake up before routing. But even when the sender transmits data, there exist at least one node in its FNS in the active state, but in this case, the nodes closest to the sink in the FNS are not necessarily in the active state [16,39]. When sender chooses relay node from FNS may be far from sink, which will make the distance of one-hop routing to sink direction smaller, and more hops are needed to route to sink, as a result, the delay increases. And if the sender waits for the nearest forwarding node to wake up, the waiting time will increase delay [16,39]. How to maximize lifetime in duty cycle-based WSNs while minimizing event detection latency and data routing delay is an issue with the challenge [16,39].
Some studies have been carried out to reduce delay. It is a very effective method to reduce delay by increasing the duty cycle. From the previous discussion, when the duty cycle of the node increases, the event detection latency and data routing delay become smaller. However, increasing the duty cycle will increase the node's energy consumption and thus reduce the lifetime, so this method reduces the delay at the expense of life. Therefore, a lot of research in reducing delay under the condition of not reducing lifetime, obviously this is a better way. Some studies have proposed adjusting the active slots between nodes in the sensing range to make these active slots evenly distributed to reduce event detection latency [40]. However, some studies have proposed adjusting the active slots of nodes on the routing path to be continuous, so that packet data can be continuously performed during routing, which reduces the data routing delay [41].However, there is no overall study on delay optimization, so we propose a biadjusting duty cycle schedule (BADCS) scheme which can simultaneously reduce event detection latency as well as data routing delay for low duty cycle wireless sensor network (WSNs). The main innovations of this work are: (1) A bi-adjusting duty cycle schedule (BADCS) scheme is proposed to reduce event detection latency as well as data routing delay. The BADCS scheme consists mainly of two duty cycle adjustment algorithms: (a) active slot asynchronous adjustment for nodes in the same sensing area and (b) the connection adjustment algorithm for two adjacent nodes on the routing path with one active slot. First, perform asynchronous operations on the active slots of the nodes in the same sensing area, so that the active slots of the nodes in the same sensing area are distributed as evenly as possible without overlapping. In this way, it is possible to reduce the latency by the time the event is perceived after its occurrence. Secondly, the active slots of the nodes on the routing path are adjusted to be sequentially arranged, so that when the nodes receive the data packet, they can route through the continuous active slots, thus greatly reducing the delay of data routing. (2) The performance of the BADCS mode is analyzed in detail, and its performance is better than the proposed strategy. Comprehensive experiments are conducted, and results demonstrate that the proposed BADCS scheme significantly improves event detection performance in terms of detection latency, detection probability, and routing delay. It reduces as high as 5.3% of detection delay and 53.7% of routing delay. The rest of this paper is organized as follows: in Section 2, the related work is stated. In Section 3, the network model and problem statement are introduced. Then, BADCS scheme is illustrated in Section 4. The theory analysis result of BADCS is presented in Section 5. The experimental comparison results are presented in Section 6. Finally, Section 7 provides conclusions.

Background and related work
Wireless sensor networks (WSNs) are often deployed in battles, fire-prone areas, rare animal protection, and monitoring of emergency event or target [20,21]. In such application scenarios, when the event or target appears, it is necessary to quickly monitor the occurrence of the event or target and deliver the data to the sink as fast as possible; otherwise, it may incur significant damage and disaster [7,20,21]. Therefore, some researchers have proposed various strategies for how to reduce event detection latency and data routing delay. This section will mainly review the related research on this paper.

Research on reducing event detection
The reason for the event detection latency (EDL) is that the sensor nodes work with a duty cycle that has the following properties: when the event occurs, all nodes may be in the sleep state, and the event cannot be detected. When there is a node switch from the sleep state to the active state, the event can be monitored, and the period from the occurrence of the event to the event be monitored by the node is EDL [3,31,[33][34][35]. Apparently, the size of the duty cycle will affect EDL. If the duty cycle is small, that is to say, when nodes are in the active state for a long time, the probability of event detection will be higher, so EDL will be smaller. In the case of the same duty cycle, the impact range of the event (meaning that the nodes in this range can monitor the event) is large, then the EDL is small, and the main reasons are the larger the impact range of event is, the more nodes can detect the event. And the event is not monitored when an event occurs because all nodes in this monitoring range are in sleep state, so event cannot be monitored. Therefore, the more nodes that can detect the event, the smaller the probability that these nodes are in the sleep state at the same time, so the EDL is smaller. At the same time, it also shows that the higher the density of deployed nodes, the smaller the EDL, but this will improve the cost of deploying the network [3,31,[33][34][35].
According to the above analysis, the range of the event is determined by the nature of the event, and its range is difficult to adjust [42][43][44][45][46].. For example, to perceive whether there are enemy tanks in the battlefield environment, vibration sensors are generally used in the monitoring network through which the personnel pass. The vibration range is determined by the properties of the monitoring object and the propagation properties of the vibration wave, which cannot be controlled [47][48][49][50][51]. Therefore, it is possible to reduce the event detection latency by increasing the node's duty cycle and node density. However, considerable research has been done to reduce the event detection latency by adjusting the node's duty cycle and node density [52,53].
Hu et al. [36] cleverly proposed a method to improve the quality of monitoring without reducing the network lifetime. The method they use is to use the wireless sensor network "multi-to-one" data collection process, the energy consumption of the near-sink area node is high, and the energy consumption of the low-sink area is low. Therefore, the duty cycle of the node in the far sink area is appropriately increased, so that the energy can be fully utilized, and monitoring quality can be improved without reducing the network life.
In fact, the event detection discussed above belongs to a non-cooperative monitoring mode. In the non-cooperative monitoring mode, each node monitors event independently. This mode of monitoring is suitable for applications where the position of the event is stationary. For instance, fire monitoring belongs to such a situation. When a fire occurs, the nodes that monitor the fire are independent monitoring, and the alarm information generated is sent to sink. Some studies use different priority groups according to the strength of the event signal received by the node to ensure that the data of the node with strong signal is first sent to the sink, the sink is connected to the edge network [54][55][56], or sent to the cloud network for processing [57][58][59]. Some studies use sensing information for data fusion before sending it to sink to reduce energy consumption and improve network lifetime [60,61], but these methods are not collaborative monitoring. The main goal of these methods is to make the information of event perception accurate, the data with large information transmit first [62,63], to reduce the amount of data, or to improve the network life.
In the mobile target detection, the collaborative monitoring method is often adopted, that is the nodes need to cooperate to complete the monitoring of the mobile target. Since the target to be monitored in such studies is mobile, when a target is detected by a node, it is necessary to predict the region to which the target will arrive at the next slot, and then increase the duty cycle of the node in the above region to reduce EDL. For instance, make its duty cycle is 1, in this way, once target enters the expected monitoring area, it can be immediately monitored, so that EDL is 0. Research based on the above ideas can be noted in [16,52]. The advantage of such studies is to adopt a lower duty cycle in the region nodes where the target does not appear, so as to save energy, and adopt a larger duty cycle in the region where the target appears, so as to reduce EDL. However, the key of this kind of method is to accurately predict the target movement. If the prediction is not accurate, the network performance will deteriorate. When the target is not at the predicted position, the detection quality is not improved as the duty cycles of the nodes around this position have not been changed. At the same time, the duty cycle of the nodes around the wrong predicted location increases, energy is wasted, and the network performance will deteriorate. Probability-based target prediction and sleep scheduling protocol (PPSS) is such a mobile target monitoring method [64]. In previous strategies, the failure of predicting the location of target movement will lead to the quality of target monitoring decline. Therefore, they adopted the target prediction method based on kinematics and probability. Nodes awake probability lies on the target pass probability. For regions with a high probability of target pass, the nodes being awakened with a high probability, in the opposite case, the nodes being awakened with a low probability. Because of the probability-based approach, the PPSS protocol does not predict failure in all cases and reduces the number of active nodes required to some extent. Xiao Liu et al. [65] improved the PPSS protocol. Their idea is that the data sensed in wireless sensor networks when target and event occur need to be transmitted to sink. Therefore, the energy consumption of the nodes near the sink area is large, while the energy of the nodes of the far-sink area is left. Thus, it is possible to make full use of the energy of the far-sink region node to wake up more nodes in advance in the area where the movable target may occur, thereby improving the quality of the target monitoring without reducing the network lifetime.
Hu et al. [8] studied the relationship between monitoring frequency and monitoring quality in monitoring the mobile target. In previous duty cycle WSNs, a time period of a node is divided into two continuous periods: the sleep period and awake period. Thus, when the event occurs just after the node is turned into sleep, the event detection latency will be the length of the time period of sleep. In this case, because the sleep and wake time of the node is long, it will lead to a large EDL. However, if we divide the longer sleep and active periods into smaller periods, and alternate the sleep and awake periods, in this way, even if the event happens when it just turns into sleep, its EDL time is small, which can reduce EDL.
In a sensor network where the node is always active, if the node can cover the entire monitored area, it can be immediately monitored by the node when the event occurs, and its EDL is 0. But in the duty cycle-based WSNs is another situation, due to the periodic sleep/awake of the node, even if the sensing range of the node can cover the entire network, when the node is in the sleep state, some areas cannot be detected when the node sleeps, thus affecting the monitoring quality. Therefore, some researchers have proposed how to ensure that the time interval of the monitoring area of the cover is not monitored by the node is less than certain ratios when the node is in sleep/awake rotation. The easiest way is to increase the density of the nodes, because when the density of the node is ρ, the entire monitoring area can be covered, then for the sensor network with a duty cycle of 1/k, the node density increases to the original k times, it is theoretically possible for each slot of the network to be covered by the node, but this way will increase deployment costs. Therefore, in order to save the network deployment cost, a certain detection of latency is often allowed, so that the number of nodes deployed can be reduced to reduce the cost. Hu et al. [66,67] proposed a novel heuristic subtraction deployment strategy that does not increase deployment costs but also improves monitoring quality. In their proposed strategy, because the energy consumption of nodes in far sink area is low and surplus, the method of reducing the number of deployed nodes and increasing duty cycle can be proposed to ensure that the deployment cost is reduced without decreasing the quality of monitoring.
In the above research methods, the proposed scheme mainly by increasing the duty cycle to improve monitoring quality. The following research does not change the duty cycle of the node, but only changes the active slot of the node to reduce the EDL. The basic idea of this method is that when an event occurs, there may be multiple nodes that can monitor the event. If the active slots of these nodes are synchronized, the event will not be perceived until the active slot arrives after the event occurs. If the active slots of the nodes in the event perceptions range are staggered, the delay between event occurrence and monitoring by one of the nodes will be smaller that will help to reduce EDL. For this kind of research, see Ref. [38].

Research on data routing delay optimization
Data routing delay (DRD) is another kind of delay in event monitoring. The EDL discussed above only represents the delay from the occurrence of an event to the time it is monitored, which mainly depends on the density of nodes and duty cycle. DRD refers to the time that the packet routing that detects the event occurs from the sensor node to the sink node. The main factors affecting DRD are as follows: duty cycle, node density, order of active slots, routing strategy, etc. The above factors are discussed separately below.
The impact of duty cycle on DRD is as follows: the node that monitors the event is called source node, and the generated data needs to go through multi-hop route to reach the sink, so that it is known by the control center, and then take measures to deal with the event in time. In fact, since the data packet containing the event occurrence message reaches the sink from the source node through multiple k hops, the delay of each hop is at the same level as the event detection latency. Therefore, the data routing delay has a greater impact on the quality of event monitoring. The main reason for data routing delay is that when a data packet (sender) is sent to the next hop node, the receiver node may be sleep because the node uses the duty cycle mode, so the sender needs to wait for the receiver to be awake before routing, which will result in delay. The worst case is when the sender has data to send, the receiver is about to sleep, in which case the delay is the largest. In order to decrease DRD, many researchers have also proposed some research. We make the following review: (1) Reduce DRD by selecting the appropriate node. In the routing process, when the sender forwards data, there are often multiple next hop nodes to choose from. These nodes that are closer to sink than sender and are within the sender's transmission radius are called sender's forwarding nodes set (FNS). Obviously, when the sender has data to transmit, the nodes closest to the sink should be selected, because the data packet is forwarded farther away, so that the sink can be reached with the fewest hops. However, when the sender has data to transmit, the node closest to the sink is not necessarily in the active state, so the sender cannot get the optimal relay node. At this time, the sender has two choices: the first choice is to select the forwarding node that is in the active state to transmit as the relay node. In this case, although the distance traveled to the sink is not the largest each time, since there is no waiting time, this scheme may route more hops, but the delay per hop is small. The second choice is that the sender continues to wait for the node closest to the sink to wake up and then selects this node as the relay node. The advantage of this scheme is that the number of hops required for routing is small, but the delay per hop may be larger. Based on the above analysis, Ref. [16] proposed a multi-objective optimization of the relay node selection strategy to improve performance. (2) Adjusting the duty cycle of the node. Similarly, increasing the duty cycle of the node can directly and effectively reduce the DRD. Similarly, increasing the duty cycle of the node can directly reduce DRD. Because the larger the duty cycle of the node is, the smaller the probability of relay node being in sleep state, thus reduce delay. However, the disadvantage of increasing the node duty cycle is that it increases the energy consumption of the node, which reduces its lifetime. Hu et al. [36] proposed an adaptive duty cycle strategy to reduce delays. In their strategy, the end-to-end delays are reduced by increasing the duty cycle of nodes that energy surplus and away from the sink. And the advantage of this strategy is that it reduces the delay without reducing the network lifetime. (3) Reduce DRD by adjusting the order of node active slots. The main idea of this method is as follows. The main reason for the large delay in the routing process is after the sender receives the data in its active slot, it will send it to the next hop in its next slot (set to the i -th slot). If the active slot of its next hop node happens to be the i -th slot, then the delay in this case is the least. Conversely, if the distance between the active slot of the next hop node and the i -th slot is k slots (i.e. i + k-th slot), then the next hop node needs to wait for k slots to receive data; in this case, the delay is larger in this case. However, if the active slot of the node can be adjusted so that the active slot of the adjacent nodes in the routing path can be arranged continuously, the DRD will be smaller. Such a study can be seen at Ref. [39].
Although numerous studies have been proposed to reduce EDL and DRD, to the best of our knowledge, there is no research that can effectively combine these two kinds of delays. For example, by adjusting the active slot strategy is a relatively good strategy without affecting lifetime, but the present research is independent, and the two strategies are not combined organically, so that the system performance is not very good. Therefore, this paper proposes a comprehensive and effective method to reduce delay.

The network model
The network model used in this paper is as follows. There is a sink node in the network, with the sink node as the center of the circle, and n identical sensor nodes are randomly located in a two-dimensional fan-shaped planar network. The network can be expressed as{s, v 1 , v 2 , v 3 , v 4 …v n }. v i is the id of the sensor node, the transmission radius of the sensor node is R t , and the sensing radius is R s .
The state of each node can be active or sleep, and each sensor node wakes up only once in a cycle. The function of the sensor node is to sense events, exchange information with neighbor nodes, and calculate data. The sensor node is energy limited, and the sink nodes are always awake, with unlimited energy, can receive, send information, and calculate data at any time. There are m slots in each cycle, and the sequence number of the time slot is 0~m-1. At the initial network, the active slot of the sensor node is randomly set. Assume that after the fire occurs, the node can monitor the event in the same slot. When the event occurs in 3 slots, if the node wakes up in 3 slots, the event detection delay is 0. If the node wakes up in 4 slots, the event detection delay is 1. In the transmission process, 1 hop needs 1 slot, and the successor node can receive the data at the earliest slot in the same period in which the predecessor node starts transmitting data or the first slot in the next cycle. For example, node 1 sends a packet at 3 slots. If node 2 is in an area with node 1 as the center and transmission range as the radius, the distance between two nodes is 1 hop. If node 2 wakes up at 4 slots, data routing delay is 1 slot; if node 2 wakes up at 5 slots, data routing delay is 2 slots. The initial wireless sensor network model is shown in Fig. 1, and the number in the node represents the initial active slot.

Definition 1
Minimizing total delay in wireless sensor networks without reducing lifetime. The total delay D consists of two parts: the first part is the event detection latency (EDL), which refers to the time elapsed after the event occurs and is sensed by the sensor nodes. The second part is data routing delay (DRD), which refers to the time when a sensor node perceives an event and generates a data package embracing the event information until the data package is routed to sink. Using S to represent EDL and using T to represent DRD, the formula for calculating total delay is as follows: The aim of this paper is to reduce and minimize the total delay of WSNs network; it can be calculated as follows.
In formula (2), the expression term of min(total delay) represents to minimize the total delay. The expression term of X i⊆route t i represents the summation of the data routing delays on the path for each path in the WSNs. Since the duty cycle is not adjusted, it will not affect the lifetime of the WSNs network. As is mentioned in Sections 1 and 2, shortening the EDL and DRD time and extending the network survival time are a pair of contradictory issues in the research field of WSN networks. Although many researchers have proposed many methods to reduce EDL and DRD, these methods either sacrifice the lifetime of the WSN network or the proposed method only focuses on one of the reduction indicators of EDL or DRD which still cannot meet the needs of practical applications. Therefore, it is an urgent and important scientific problem in the area of WSN network research to explore innovative methods to effectively shorten EDL and DRD without reducing the lifetime of WSN network, which is the main research work of this article.
The main notations which would be adopted later in this paper are listed in Table 1.

Research motivation
Specifically, some studies have studied ways to reduce event detection latency without reducing lifetime [8], and the method they use is to reduce the delay by properly arranging the node's active slot. When an event occurs, for a dense WSN network, there are multiple nodes in the scope of the event, among which only one node is needed sensing events. In this case, obviously, if the active slot of the node within the scope of the event is in the same slot, the expectation of its event detection latency is the largest. If the active slots of each node are different, the special case is that the number of nodes in the event perception range is n, and the number of slots in a time period of the node is n; in this arrangement, if each node's active slot is different, the event detection latency is 0 regardless of which slot event occurs. Therefore, if the active slot of the nodes in the event monitoring range is evenly distributed, the event detection latency can be minimized; based on this principle, some researchers have proposed corresponding algorithms.
In the WSNs of this paper, after the fire event occurs, the sensor within the range of the sensing radius of the wireless sensor can sense the fire event and generate data. The data package is then transmitted to the sink node through a pre-arranged network, so that the purpose of fire monitoring can be achieved.
Since the wireless sensor network is limited in energy, different sensors have different active slots in one cycle, so there will be delays in the sensing process and the transmission process. In order to reduce EDL, the active slots of each node and the nodes within its sensing range are asynchronous; that is, each node wakes up in different slots, rather than randomly. In order to reduce DRD, the active slots of each node and its successor nodes within the transmission radius are as continuous as possible, rather Table 1 Main notations adopted in this paper Notation Description

R s
The sensing radius

R t
The transmission radius

S
The event detection latency (EDL).

T
The data routing delay (DRD). than randomly set. Through the following two examples of the adjustment process, it can be stated that this adjustment method can effectively reduce the delay. Figure 2 (Note: please ignore the brackets and the numbers in brackets) shows WSNs with high node density, and the active slots of nodes are randomly allocated. For different fire spots and different fire slots, we calculate the expectation of event detection latency in the case of randomly allocated active slots. The time period from the fire point p i to the time when the sensor senses the event is called EDL S, and the calculation method of the event detection latency E p i S is as follows: The symbol term S c denotes the event detection latency of fire when c slot occurs. Fire may occur in any slot in the cycle. Therefore, the minimum value of c is 0 slot, i.e., fire occurs in 0 slot, the maximum value is M, i.e., fire occurs in M slot, and then the expectation of detection delay is obtained.
Through the adjustment of the active slot of the node, there is no node that wakes up at the same slot within the sensing range of the node, and the adjusted network situation is as shown in  It is calculated that the expected S for monitoring the fire is E . By comparing the expected values in the two cases, we can conclude that adjusting the active slot of the nodes in the sensing range can reduce EDL.
The following example is to illustrate that adjusting the active slot of adjacent nodes on the same route to continuously can reduce the data routing delay T. In Fig. 3 (Note: please ignore the brackets and the numbers in brackets), there are three fire points in the wireless sensor networks, p 1 , p 2 , p 3 . Assume that during the establishment of the routing process, the predecessor node selects the node farthest from itself as the successor node within its transmission range, forming the route shown in Fig. 3 (Note: for the node with bracket in the figure, the number of the node is the number in brackets). Three fire points p 1 , p 2 , p 3 fire in 9 slots, 5 slots, and 3 slots. Calculate the T of data packet to sink node when active slot is randomly arranged, and active slot is continuous.
In the case of randomly setting the active slot, By comparing DRD between the two cases, it can be concluded that arranging the active slots of adjacent nodes on the same route as continuously is helpful to reduce T.
In the next part, we will design the adjustment algorithms and demonstrate the algorithms. Fig. 3 The wireless sensor network with node active slot is randomly arranged (note: please ignore the brackets and the numbers in brackets), and the wireless sensor network with node active slot is continuous (note: for the node with bracket in the figure, the number of the node is the number in brackets)

Algorithm for adjusting the active slot
The previous parts introduced the research motivation of this paper. Two examples show that the operations of asynchronous and continuous adjustments for the nodes' active slots are beneficial to the reduction of EDL and DRD. In this part, we will design the active slot adjustment algorithm and routing algorithm according to the network conditions and demonstrate the algorithms through a WSN with 70 sensor nodes.
In order to compare the delay on the initial networks with the delay of the BADCSadjusted networks, fire points are placed at the same location of the two types of networks to simulate the fire occurrence and data transmission process. According to the simulation results, it can be concluded that after Bi-adjusting, the event detection latency can be reduced by 35.80%, for data routing delay is 45.13%, and for total delay is 43.62%; BADCS scheme is effective.

Asynchronous adjustment algorithm
In order to ensure that the active slots of each node are asynchronous within the sensing range, an asynchronous adjustment algorithm is designed.
The process of asynchronously adjusting the node active slot is the node obtains a random active slot during initialization. During the first cycle, the nodes interact with the neighbors to obtain and store neighbors' information. After that, the nodes that those do not satisfy the asynchronous condition send asynchronous time slot adjustment request messages to the neighboring nodes. The nodes that those receive the request messages make an adjustment action according to the data in the messages and simultaneously inform the neighbor nodes of the data of adjusted node. Until all nodes satisfy asynchronous conditions, the asynchronous adjustment ends. In order to store the information needed in the adjustment process, two tables are stored in each node. Table 2, table-a stores information such as id,flag, φ c , ξ, r, and v ! of the current node itself.

As shown in
flag ¼ 1; Traverse the active slots in table2; no repeat 0; Traverse the active slots in table2; repeat ð4Þ After the traversal, the repeated slots are added to the set r, and the value of v ! is assigned. The corresponding slot of the missing slot is 0, and the others are 1. ξ ≥ m: The id of the current node.
flag Binary-state variable, the flag that the node active slot is asynchronous in the sensing range.
φ c The active slot of the current node. ξ The number of neighbors of the current node (including itself).
r A set containing repeated active slots in the sensing range.
The value of v i is binary state, and v i =1 means that a node whose active slot is i exists in the current sensing range.
The flag in table-a is a binary-state variable, and the criterion for flag 0 or 1 is as follows: ξ < m: After the traversal, the repeated slots are added to the set r, and the value of v ! is assigned. The corresponding slot of the missing slot is 0, and the others are 1. As shown in Table 3, table-b stores the information about the id, d, and φ n of the neighbor node of the current node that is stored (the neighbor includes itself, that is, the neighbor with d = 0). Using the table-a and table-b stored in each node, the asynchronous adjustment process is completed through the interaction of information between the nodes. The specific algorithm is described as follows.
In Algorithm 1, we have the following conventions: 1. Asynchronous slot adjustment request message (ASAM) includes the adjustment request, the node's own id, active slot, r, and v ! 2. After each adjustment of the node's active slot, the following actions are taken: a) Sending a slot update message to neighbors those satisfy the condition of d ≤ R s b) Update table-a and table-b The asynchronous adjustment algorithm is described in the previous section, and this algorithm will be demonstrated in this section on the initial wireless sensor network as shown in Fig. 4 (note: please ignore the gray color of the sensor notes).
In the initial network, 70 sensor nodes are deployed. The numbers in the nodes represent the active slots of the nodes. They are randomly allocated. There are ten time slots in one cycle, that is, the cycle length is 10, and the time slot number is 0~9. The number of nodes waking up in each of the 10 time slots is as shown in Table 4. The initial active slot for each node in the initial network is shown in Table 5.
In the first cycle, all nodes interact with the neighbors of d ≤R s to initialize their own table-a and table-b. Since the number of nodes is large, this part of the process is not displayed.
After the two tables of the node are initialized, the nodes with flag = 0 are marked with grey colors in Fig. 4 (note: please pay attention to the node painted with gray), and their table-a is shown in Table 6. Table 6 shows the active slot, the number of neighbors, and the slot repeat set r for each node with flag 0. In the second cycle, when the node with flag 0 waking up, the asynchronous slot adjustment request messages (ASAM) are issued. That is, when the slot is 1, 4, 7, and 9, the corresponding node in the upper table sends a request message, and in other slots, no node sends ASAM. Since the data is exchanged within the sensing range, the node can receive the request sent by the neighboring node in the same time slot. Therefore, the ASAM transmission, reception, and slot adjustment can be completed simultaneously in this slot. During this cycle, the transmission and reception of ASAM and the time slot adjustment process of nodes are shown in Figs. 5, 6, 7, 8, and 9.
The adjustment process when slot = 1 is shown in Fig. 5. At this slot, v 51 and v 52 wake up and both flags are zero, and they send ASAM to the neighbor, while v 53 is in the sleep state and cannot receive messages. v 51 and v 52 received the request from the other nodes and judged if φ c ϵ r found that the two nodes are in compliance with the adjustment conditions. They adjust their own active slots to active slots with a value of 0 in v ! , i.e., 3 slots and 4 slots. Finally, they broadcast a message to the neighbor that they have changed the active slot and set the flag in their table-a to 1 with complete adjustment. When slot = 4, there are two regions on the wireless sensor networks to be adjusted, which are v 68 and v 69 as shown in Fig. 6 and v 8 , v 13 , v 14 as shown in Fig. 7. Slot = 4, the adjustment process of the first area is shown in Fig. 6. At this slot, v 68 and v 69 wake up and both flags are zero, they send ASAM to the neighbor, while v 69 and v 70 are in the sleep state and cannot receive messages. v 68 and v 69 received the request from the other nodes and judged if φ c ϵ r found that the two nodes are in compliance with the adjustment conditions. They adjust their own active slots to active slots with a value of 0 in v ! , i.e., 3 slots and 2 slots. Finally, they broadcast a message to the neighbor that they have changed the active slot and set the flag in their table-a to 1 with complete adjustment. Slot = 4, the adjustment process of the second area is shown in Fig. 7. At this slot, v 8 , v 13 , and v 14 wake up and flags are zero, and they send ASAM to the neighbor, while v 6 ,v 12 , and v 15 are in the sleep state and cannot receive messages.
In Fig. 7, v 8 , v 13 , and v 14 received the request from the other nodes and judged φ c ϵ found that the two nodes meet the adjustment conditions. They adjust their own active slots to active slots with a value of 0 in v ! , i.e., 6 slots, 5 slots, and 0 slot. Finally, they broadcast a message to the neighbor that they have changed the active slot and set the flag in their table-a to 1 with complete adjustment. The adjustment process when slot = 7 is shown in Fig. 8. At this slot, v 47 , v 64 , and v 66 wake up and flags are zero, and they send ASAM to the neighbor, while v 46 ,v 63 , and v 65 are in the sleep state and cannot receive messages. v 47 , v 64 , and v 66 received the request from the other nodes and judged if φ c ϵ r found that the two nodes are in compliance with the adjustment conditions. They adjust their own active slots to active slots with a value of 0 in v ! , i.e., 6 slots ,5 slots, and 4 slots. Finally, they broadcast a message to the neighbor that they have changed the active slot and set the flag in their table-a to 1 with complete adjustment. The adjustment process when slot = 9 is shown in Fig. 9. At this slot, v 19 and v 20 wake up and both flags are zero, and they send ASAM to the neighbor. v 19 and v 20 received the request from the other nodes and judged if φ c ϵ r found that the two nodes meet the adjustment conditions. They adjust their own active slots to active slots with a value of 0 in v ! , i.e., 6 slots and 2 slots. Finally, they broadcast a message to the neighbor that they have changed the active slot and set the flag in their table-a to 1 with complete adjustment.  So far, the second cycle has ended. Since there are no two active slot duplicate nodes or more than 10 nodes in the sensing range of a node, the flag of all nodes has been 1, and the asynchronous slot adjustment has been completed. The network after the asynchronous slot adjustment is shown in Fig. 10.

Routing algorithm and continuous adjustment algorithm
In the previous section, the asynchronous adjustment algorithm was described and demonstrated on the network of 70 nodes, so that the active slots of all nodes are asynchronous. In this section, we will design the routing algorithm and the continuous adjustment algorithm and demonstrate them on the network shown in Fig. 10.
The adjustment of the slot in the transmission range mainly involves the relationship between the active slots of two consecutive nodes on the same route. In order to enable the node to propagate data to the sink node with minimal cost, and to ensure that the number of successor nodes of each node is uniform, the routing of the wireless sensor network is established by algorithm 2. The algorithm 2 for establishing a route is based on the least cost routing algorithm and geographical-based opportunistic routing protocol [67]. The main process is as follows: First, sink sets its own cost to 0, and the rest of the nodes set their own cost to the sink to ∞. The sink node first sends a route request message; after the node in the transmission range receives the route request message, a route with the sink is Table 5 The initial active slot of the node established and updates the hop count k.Thereafter, the node whose hop number is not ∞ sends the route request message, and the layer by layer progresses until the hop number of all nodes is not ∞.
When establishing a route, in order to ensure a uniform route, the node should select an appropriate node according to the established routing condition of the target node, establish a route, and send a slot update message to the transmission range.
In order to complete the establishment of the route and the continuous adjustment of the slot, information such as the hop (cost) is added to the table-a stored in each node, and the adjusted table-a is as shown in Table 7.
In the routing algorithm (algorithm 2), we have the following convention: 1. At the beginning of algorithm 2, the active slot of each node in the network is adjusted by algorithm 1 2. Establishing a route request message (RRM) includes its own id, k, for convenience of description. In the algorithm, k f , C n ′ denotes represent the node receiving k, C n in RRM. 3. Creating a route message (CRM) includes two node ids of newly established routes and C n =1 of node with smaller hop. 4. Deleting a routed message (DRM) includes two node ids that need to be deleted and C n =− 1 of node with smaller hop. 5. k c indicates the current node hop. 6. ∑C n ′ indicates that the current node sums the C n in all received packets with the same id. 7. After each adjustment of the node's active slot, the following actions are taken: a) Sending a slot update message to neighbors those satisfy the condition of d ≤ R t b) Update table-a and table-b The routing algorithm has been described above. On the basis of the network adjusted by asynchronous slot, the routing algorithm is demonstrated in the v 1~v15 region shown in Fig. 11 (note: please ignore the gray color of the notes). Table 8 shows the details of each node from v 1 to v 15 . Initially, in the first cycle, each node exchanges data with the neighbors of d ≤ R t and initializes its own Table 1 and Table 2. In the last time slot of the first cycle, that is, slot = 9, the sink node sends a route request message (RRM). As shown in Fig. 11 (note: please see the entire whole figure), only v 1 , v 2 , and v 3 can receive this message.
In the second cycle, the three nodes of k = ∞,v 1 , v 2 , and v 3 receive the RRM from sink in slots 1, 2, and 6 in turn. Update k to 1, C t to sink's C n . The three nodes establish routing with sink respectively. The updated information of φ c , hop, and so on is shown in Table 9. In the third cycle, three nodes v 1 ,v 2 , and v 3 with k = k ′ = 1 send RRMs when they are active. The RRM reachable nodes of the three nodes are shown in Table 10. From the table, we can see that some nodes have received more than one RRM, so it is necessary to select a better node to establish a routing according to the established routing situation of the target node.
From the table, we can see that some nodes have received more than one RRM, so it is necessary to select a better node to establish a routing according to the established routing situation of the target node.
In the fourth cycle, when slot = 4, v 4 receives RRM from v 1 and v 2 and processes RRM according to the receiving order. Assuming that the closer the distance between two nodes is, the earlier RRM arrives, v 4 takes the lead in processing RRM from v 1 .Because k f + 1 < k c , v 4 , and v 1 establish routing and k c = 1, C t = 0 for v 4 broadcast CRM. Processing RRM from v 2 , ∑C n ′ = C t , and k f + 1 = k c does not satisfy the conditions of the algorithm, does not establish a routing, and ends the two RRM processing. Slot = 5, v 6 revives RRM from RRM, because k f + 1 < k c , v 6 , establishes a route with v 2 , k c = 1, C t = 0 for v 6 , broadcast CRM.
When slot = 7, v 5 receives RRM from v 1 and CRM from v 4 broadcasting, which contains the message of C n plus 1 of v 1 , so ∑C n ′ = 1, C t = ∞ of v 5 satisfies ∑C n ′ < C t , v 5 establishes routing with v 1 , k c = 1, C t = 1 for v 5 , broadcasting CRM.
When slot = 9, v 7 receives three RRMs from v 1 ,v 2 , and v 3 , and CRM broadcasted by v 6 . The RRM is processed in the order of reception, and the processing order is v 3 ,v 2 , and v 1 . At this time, the details of the three nodes are as Table 11 shows. Based on this information, v 7 will decide which node to establish the route with. The id of the current node flag Binary-state variable, the flag that the node active slot is asynchronous in the sensing range flag ′ Binary-state variable, the flag that the node active slot is asynchronous in the transmission range The value of v i is binary state, and v i =1 means that a node whose active slot is i exists in the current sensing range.

C n
The current node n c is connected to the number of nodesn t whose hop count is greater than the number of hops. The initial value is 0.

C t
The current node n c is connected to the number of nodes n t whose hop count is less than the number of hops. The initial value is ∞.
Li et al. EURASIP Journal on Wireless Communications and Networking (2020) 2020:166 v 7 first establishes a route with v 3 , k c = 1, at which time the C t of v 7 is 0. When v 7 processes the RRM from v 2 , the C n of v 2 is 1, which is greater than the C t of v 7 , and no route is established. Afterwards continuing to process the RRM from v 1 , since the requirement of the algorithm is not satisfied, none of route is established. After the end of the four cycles, the established route is shown in Fig. 12 (note: please ignore the route lines in the sector between the second arc and the third arc).
In the fifth cycle, four nodes v 4 ,v 5 ,v 6 , and v 7 , satisfying k = k ′ = 2, are sent to RRM at active time respectively. The nodes that can receive RRMs sent by previous four nodes and satisfy the condition of k = ∞ are shown in Table 12.   As can be referred from Table 12, five nodes v 9 , v 10 , v 11 , v 12 , v 13 receive only one RRM, so a route is established with the node that sends the RRM.
In the sixth cycle, when the slot is 0, v 10 , v 14 establish routes with v 5 , v 6 , respectively, and the hops are updated to 3.
When slot is 2, v 12 establishes a route with v 6 , and the hop is updated to 3. When slot is 3, v 11 , v 13 establish routes with v 5 , v 6 , respectively, and the hops are updated to 3.
When slot is 5, v 9 establishes a route with v 5 , and the hop is updated to 3. When slot is 6, since v 12 , v 13 , v 14 and v 6 have established routes before 8 slot, v 8 will establish a route with RRM from v 6 , but when dealing with the routing information from v 7 , it will broadcast DRM first, then CRM, and finally establish a routes with v 7 , and hop is updated to 3.
After six cycles, the established route is shown in Fig. 12 (Note: please see the entire whole figure).
In the seventh cycle, the six nodes with k = k ′ = 3 send RRMs when they are active. In the scope of our demonstration, only the hop of v_15 is ∞.It can receive RRMs from v 6 , v 8 , v 13 , v 14 .In the eighth cycle, when the slot 1, v 15 receives four RRMs. According to the distance, the processing order is v 14 , v 8 , v 13 , v 6 . According to the constraints in the algorithm, v 14 is finally established with v 15 .
After eight cycles, v 1~v15 can transmit information with the sink. Finally, the information about these 15 nodes is shown in Table 13.
After a number of cycles, the entire network has established routing, and the entire network topology is shown in Fig. 13.

Continuous adjustment algorithm
After algorithm 1 and algorithm 2, the nodes in the network have ensured that they are asynchronous within the sensing range, and a route suitable for continuous slot adjustment is established. In order to reduce the delay caused by the message transmission, a time slot continuous adjustment algorithm is designed.
The main process is as follows: Initially, multiple nodes with the largest hop send a request message for slot adjustment to the nodes within the transmission range. Nodes with smaller hops receive a new active slot based on the data of the message. When the calculated active slot Table 9 The updated information of v 1 , v 2 , and v 3 conflicts with the asynchronous condition required by algorithm 1, the average of two active slot is used as the node's new active slot. In the process of adjustment, two tables of itself should be updated, and slot update messages should be sent to nodes within the transmission range.
In algorithm 3, we have the following conventions: 1. At the beginning of algorithm 3, the active slots of each node in the network are adjusted by algorithm 1 and routed by algorithm 2. 2. The continuous time slot adjustment request message (CSAM) includes the adjustment request, the node's own id, and active slot (φ c ). For convenience, when a successor node receives multiple CSAMs, φ ci ′ is used to denote φ c in the ith message. 3. After each adjustment of the node's active slot, the following actions are taken:   The slot continuously adjustment algorithm has been described above. Based on the Fig. 13 network after the asynchronous slot adjustment and routing establishment, the following example is shown in Fig. 14 as an example to demonstrate the continuous slot adjustment algorithm.
The number in the lower right corner of the node in the figure represents the k of the current node.
In the first cycle, get the maximum k in the current network and get the initial k ′ = 8. In the second cycle, three nodes satisfying k = k ′ = 8, namely, v 59 , v 60 , v 61 send CSAM to their respective successors.
In the third cycle, two nodes v 43 , v 44 satisfying k = 7 and receiving the CSAM process the received message and calculate φ t which makes P C n i¼1 ðφ t − φ ci 0 þ mÞ modð m þ 1Þ to the minimum value. The two results are 0 and 7, and the constraints of algorithm 1 Table 13 State of each node after eight cycles can be guaranteed. Therefore, the active slots of v 43 and v 44 are updated to 0 and 7. At this time, part of the network status is shown in Fig. 15 (note: please ignore the brackets and the numbers in brackets).
In the fifth cycle, three nodes v 31 , v 45 , v 46 satisfying k = 6 and receiving the CSAM condition process the received message and calculate φ t which makes P C n i¼1 ðφ t − φ ci 0 þ mÞ modð m þ 1Þ to the minimum value. The three results are 1, 1, and 7, and the constraints of algorithm 1 can be guaranteed. Therefore, the active slots of v 31 , v 45 and v 46 are updated to 1, 1, and 7. At this time, part of the network status is shown in Fig. 15 (note: for the node with bracket in the figure, the number of the node is the number in the brackets).
In the sixth cycle, two nodes satisfying k = k ′ = 8 condition, namely, v 45 , v 46 send CSAM to their respective successors. In the seventh cycle, the node v 32 satisfying k = 5 and receiving the CSAM processes the received message and calculates φ t which makes P C n i¼1 ðφ t − φ ci 0 þ mÞ modð m þ 1Þ to the minimum value. The result is 2, and v 32 does not need updating.
After 7 cycles, all nodes in this part of the network are adjusted continuously.
After several cycles, all nodes in the network are adjusted continuously, and the network is shown in Fig. 16. So far, the adjustment of the initial network has been completed, and a wireless sensor networks with asynchronous active slot in the sensing range, continuous active slot in the transmission range, and uniform routing has been obtained.
In order to compare the event detection latency, data routing delay and total delay on the initial network and the adjusted network, three fire points are placed at the same location on both networks. It is stipulated that the three fire points are consistent, and the fire slots in one cycle is 1, 5 and 8. After the fire point is arranged, the fire is simulated and the fire occurs in different slots. Fig. 17 shows the sensor of the sensed event and the path of the data packet routing in the case of different fire slots on the initial network. As can be seen from the figure, in the current network state, no matter which slot of 1, 5, 8 fire occurs, the sending sensors and path are the same.
According to the above simulation situation, the delay of different positions and different fire occurrence slots are calculated and shown in Table 14.
The average detection latency ( S ), the average data routing delay ( T ), and average total delay (D) in the initial network and Bi-adjusted network are calculated according to Table 14, and the percentage of delay reduction after bi-adjusting is calculated as shown in Table 15.
From the table, we can see that the average event detection latency decreases by 35.80%, the average data routing delay decreases by 45.13%, and the total delay decreases by 43.62%.
This shows that in the current network situation, the Bi-adjusting has an effect on the delay reduction, and the effect is more obvious in reducing the data routing delay.
The main work of this part is to propose slot adjustment algorithms and routing algorithm. After each algorithm was described, it was demonstrated on a network of 70 nodes. Finally, the fire is simulated on the adjusted network and the initial network. The number of delayed slots is calculated, and the results are analyzed. It is found that BADCS can effectively reduce delay.

The theoretical analysis
The above analysis is based on the specific example, and in this part, we will theoretically analyze the effect of BADCS to reduce the event detection latency and data routing delay.
We stipulate that there are n sensor nodes in the perception range centered on the fire point, and m slots in a cycle, with slot numbers ranging from 0 to m-1.
In the case of randomly arranged node slots and randomly (0~m-1) fired slots, the formula for calculating event detection latency is S ¼ P m − 1 i¼0 i•P i . In the formula, i represents the number of delayed slots, and P i represents the probability of delaying i slots.
Assuming that the fire event occurs at 0 slot, to make the event detection latency zero, it is necessary to ensure that at least one of the n nodes wakes up at 0 slot that is: To make event detection latency be 1 slot, it is necessary to ensure that no node wakes up at slot 0, and at least one node wakes up at slot 1 that is: To make event detection latency be 2 slots, it is necessary to ensure that no node wakes up at slot 0 and 1, and at least one node wakes up at slot 2 that is: Then, we get the general formula: Regardless of the slot in which the fire occurs, the event detection latency can be calculated using the general formula. Therefore, if the fire occurrence time slot is a random slot in 0~m-1, the average event detection latency is: When the node time slot is asynchronously adjusted, the slots of the n sensor nodes are asynchronous in the sensing range centered on the fire point. In this case, if n ≥ m, meaning that the number of nodes is greater or equal to the length of the period, the event detection latency is 0. If n < m, n node slot arrangement situation has A n m kinds of possibilities and Therefore, the average event detection latency calculation formula after asynchronous adjustment is as follows: For data routing delay, we assume that there are n nodes (excluding sink) on a route, and there are m slots in one cycle in which the slot number is from 0 to m-1.
In the case of randomly arranging the node active slot, we give the formula for the data routing delay of a route where the information is sent from the node with the largest hop to the sink node: After simplifying, we get: After the continuous adjustment, the optimal situation is reached, and the data routing delay is n − 1.
According to the theoretical analysis, when the slots number m and the nodes number n are assigned different values, P i , event detection latency, data routing delay, and reduced delay can be observed.
It can be seen from Table 16 that a special case appears when n=1. And in this case, if there is only one wireless sensor node in the range of the sense of the fire point, then the probability of EDL for any number of slots is 5%. In the general case (n≠1), when the number of nodes is the same, the probability that the number of delayed slots is less corresponding to a larger probability. As the number of delay slots increases, the probability gradually decreases, until to 0.
Overall, the more nodes are, the greater the probability of obtaining a smaller value such as delay = 0, 1 is, which means that when the sensor node active slot is randomly arranged, the increase in the number of nodes is beneficial to the increase in low EDL probability.
Next, we will observe whether the above conclusion is established after asynchronous adjustment.
As can be seen from Table 17, when n = m, the probability percentage of EDL being zero is 100%, that is, no EDL. Like Table 16, when n=1, regardless of the slot, the delay probability is 5%. Observe the curve under normal conditions and find that the above conclusion is true. If the above conclusion is true, then according to the formula The average EDL should decrease as the number of nodes increases. It can be seen from Table 18 that when m is a fixed value, with the increase of n, the average EDL of randomly arranged active slots and asynchronously adjusted networks decreases gradually, and the average EDL of asynchronously adjusted networks is always less than that of the initial networks. The previous analysis is based on the case where the number of time slots is constant, and the number of nodes varies. Next, the Table 16 The EDL probability variation under the condition of randomly arranging the sensor node active slot, when m = 20 and n = 1, 10, 20, 30 Slots of delay n = 1 (randomly) n = 10 (randomly) n = 20 (randomly) n = 30 (randomly) case where the number of nodes n is fixed at 10 and the number of slots m is constantly changing will be discussed. From Table 19 and Table 20, we can see that the probability of low event detection latency gradually decreases with the increase of slots in the cycle within the sensing range with the fire point as the center of the circle, regardless of whether the active slots are adjusted asynchronously or not.
As can be seen from Table 21, when n is a fixed value, as m increases, the average EDL of the randomly arranged active slot and the network adjusted asynchronously gradually increases. In order to observe the effect of reducing the average EDL by the asynchronous adjustment of the nodes further, Table 22 and Table 23 are drawn.
As can be seen from Table 22, in the case where n is fixed, taking m=15 and m=25 as an example, as m increases, the probability of less delay decreases, and the probability of larger delay increases. For the asynchronous adjustment, it can be seen from the figure that in the case where both m and n are the same, after the adjustment, the probability of less delay is significantly increased, which is beneficial to reducing the average EDL.
As can be seen from Table 23, in the case where m is fixed, taking n = 10 and n=15 as an example, as m increases, the probability of event with less delay increases, while the probability of larger delay decreases. For the asynchronous adjustment, it can be seen from the figure that in the case where m and n are the same, the probability of event with less delay is significantly increased after adjusting, which is beneficial to reducing average EDL.  In Table 22 and Table 23, we have shown the average EDL in random active slot and asynchronous active slot. By subtracting the EDL after asynchronous adjustment from the EDL at random, we can get the reduced delay through asynchronous adjustment and get Table 24.
From Table 24, we can see that each curve has a maximum value in the existing range, and the number of slots m is equal to the number of nodes n. When m = n, the EDL that can be reduced by asynchronous adjustment is the largest.
When m < n, with the increase of m, the reduction of EDL is also increasing, but when m > n, with the increase of m, the reduction of EDL is decreasing. To demonstrate the role of asynchronous adjustment in reducing EDL, Table 25 shows the percentage of EDL reduced by asynchronous adjustment in the case of random different number of nodes and slots.
As can be seen from the figures, when n ≤ m, that is, when the number of sensor nodes is not more than the number of slots, the percentage of EDL reduced by asynchronous adjustment is 100%. Because in this case, the event detection latency adjusted asynchronously is always 0. With the increase of m, the percentage decreases gradually, which indicates that the more the number of slots is, the closer random layout is to asynchronous layout. As for DRD, the following analysis is carried out under the optimum conditions because it is more convenient to calculate the optimum conditions after successive adjustment.
It can be seen from Table 26 that when the number of slots m is constant, DRD increases with the increasing number of nodes in a routing, and when the number of nodes n is constant, DRD increases linearly with the increasing m.
As can be seen from Table 27, the reduction in DRD after continuous adjustment is similar to its change trend. When the number of time slots m is constant, as the number of nodes n on a route increases, the reduction of DRD increases. When the number of nodes is constant, the decrease of DRD increases linearly with the increase of slot number m.This is because the reduction is calculated according to the optimal condition after the subsequent adjustment, and the reduction is all n − 1 here.
As a distributed algorithm, we briefly introduce the message complexity of methods. In WSNs, when a node's active slot needs to be adjusted, the nodes communicate with each other. Within the sensing range, it is assumed that there are n nodes, and only one message is sent in each communication. Considering the worst case, the active slots of all nodes are the same, and each node needs to communicate with the rest of the neighborhood; then, n × (n − 1) communications are required, and the message complexity can be expressed as O(n 2 ). In a path, if there are n nodes and only one message is sent for each communication, each node needs to send message forward (n − 1), times of communication is required, and the message complexity can be expressed as O(n).

Experimental and results
In the experiment, we used a randomly generated WSNs to compare the performance of the BADCS scheme network with the initial network in terms of latency. The parameter settings of the WSNs used in the experiment are shown in Table 28.
Based on the set parameters, a wireless sensor network as shown in Fig. 4 is formed. Under the initial conditions, the active slots of the 90 sensor nodes on the WSNs are randomly set, and the details are shown in Table 29.
Firstly, algorithm 1 is executed, and each node exchanges data with the neighbors. In this step, the nodes of v 9 , v 16  v 88 , v 89 that do not satisfy the asynchronous condition are found, and their flag value is adjusted to 0. And at the same tine, the corresponding wireless sensor network is modified synchronously. After the asynchronous adjustment, the active slot of the sensing node in the WSNs changes as shown in Table 30. Secondly, apply algorithm 2 to establish routes based on the initial WSNs network, and the WSNs with routes being set up is shown in Fig. 18. And we also apply Table 21 The average EDL delay slots under the condition of randomly/asynchronously arranging the sensor node active slot, when n = 20, and m increased from 1 to 50  algorithm 2 to establish a route based on the wireless sensor network of the first step which is asynchronously adjusted by algorithm 1. Thirdly, apply algorithm 3 to continuously adjust the active slots of the nodes in the asynchronously adjusted wireless sensor network obtained in the previous second step. After the adjustment, the active slot of each sensor is shown in Table 31.
Fourthly, we simulate the sensing and routing procedure by using the algorithms proposed above. At first, fire points will be randomly placed on the network shown in Fig.  18 and Table 31. And fire events may occur in any slot during the cycle. To do so, eighteen fire points were placed on the initial network and the wireless sensor networks by our Bi-adjusting methods, as shown in Fig. 19 and Fig. 20, which respectively according to Fig. 18 and Table 31. Then, simulate the process of random fires through computer programming. For the nodes on the network, the average EDL ðS i Þ, the variance of EDL (σ 2 Si ), the average DRD ðT i Þ, the variance of DRD (σ 2 Ti ) on the initial network, the average EDLðS b Þ, the variance of EDL (σ 2 Sb ), the average DRD ðT b Þ, and the variance of DRD (σ 2 Sb ), on the bi-adjusting network, are calculated by program simulation. Use p to represent the fire point.
From Table 32, we can see that for the 18 fire points, after Bi-adjusting, the average EDL of six fire points decreases, the average EDL of seven fire points increases, and the EDL delay of five fire points is changeless. However, for the entire network, after biadjusting, the average EDL is reduced by 3.91%, which shows that bi-adjusting is effective for reducing the EDL. Variance represents the degree of deviation between the average EDL and EDL when the fire slots changes. According to the experiment, for different fire slots, the nodes that perceive events are different, and the more dispersed the active slot of the nodes that can perceive events, the larger the variance will be. From Table 32, the sum of the variance of EDL increases after the bi-adjusting, which indicates that the asynchronous adjustment works.
From Table 33, we can see that the average DRD of all fire points has decreased. For the entire network, after bi-adjusting, the average DRD is reduced by 56.22%. This shows that bi-adjusting is very effective for reducing DRD.
From Table 34, we can see that the average total delay of all fire points has decreased. For the entire network, the total average total delay decreased from 525.6 to 256.8, reduced by 51.14%. This shows that the bi-adjusting is effective for reducing the total delay. In order to prove that the bi-adjusting is better than the asynchronous adjustment method and the continuous adjustment method in reducing EDL and DRD, only make asynchronous adjustment or connection adjustment to the active slot of nodes in the same wireless sensor networks. From Table 35, we can see that for the 18 fire points, after bi-adjusting, the average EDL of five fire points decreases, the average EDL of six fire points increases, and the EDL delay of seven fire points is changeless. For the entire network, after bi-adjusting, the average EDL is increased by 0.82%. This indicates that for the network as shown in Table 39, continuous adjustment of nodes on the basis of asynchronous adjustment will increase the average EDL. From Table 36, we can see that the average DRD of all fire points has decreased. For the entire network, the average DRD decreased from 465.4 to 207.7, reduced by 55.37%. This shows that the bi-adjusting is effective for reducing the total delay. This indicates that the bi-adjusting is more beneficial to reduce DRD than only asynchronous adjustment.
From Table 37, we can see that the average total delay of all fire points has decreased. For the entire network, the total average total delay decreased from 514.1 to 256.8, reduced by 50.05%. This indicates that the bi-adjusting is better than only asynchronous adjustment in reducing delay.
From Table 38, we can see that for the 18 fire points, after bi-adjusting, the average EDL of five three points decreases, the average EDL of six fire points increases, and the EDL delay of nine fire points is changeless. For the entire network, after bi-adjusting, the average EDL is reduced by 2.77%. This indicates that the bi-adjusting is more beneficial to reduce EDL than only continuous adjustment. From Table 39, we can see that for the 18 fire points, after bi-adjusting, the average DRD of five nine points decreases, the average DRD of seven fire points increases, and the DRD of two fire points is changeless. For the entire network, after bi-adjusting, the average DRD is reduced by 5.76%. This indicates that the bi-adjusting is more beneficial to reduce DRD than only continuous adjustment, but the effect is not obvious.  Table 28 The parameter settings of the WSNs used in the experiment Parameters Setting The number of nodes(n) 9 0 The number of slots in one cycle(m) 1 0 From Table 40, we can see that for the 18 fire points, after bi-adjusting, the average total delay of ten points decreases, the average total delay of five fire points increases, and the total delay of three fire points is changeless. For the entire network, after biadjusting, the average total delay is reduced by 4.43%. This indicates that the biadjusting is better than only asynchronous adjustment in reducing delay.
According to the number and percentage of reductions in the above several tables and the distance between the location of the sink node and the fire point arranged in the network, we find that the further away from the sink node, the greater the total Table 29 The initial active slot of the 90 nodes according to Fig. 4  The wireless sensor network is initialized, and the experiment begins  delay reduced. In order to explore the relationship between the delay drop and the distance between the fire point and the sink node, the average hop k of the fire point is used to describe the distance between the fire point and the sink node: That is, the average hop of a fire point is equal to the sum of the hop of the nodes which is centered on the fire point and in the range of the sensing radius divided by the number of nodes. Table 41 shows the average hop of 18 fires in Fig. 4.
In Table 41, we can see that the average hop of some fire points is the same. In summarize, this section provides a complete description of the experiments the results, and analyses.
First, according to the setting of experimental parameters, the WSNs with 90 nodes are generated, and then active slots are randomly generated for 90 nodes. The asynchronous slot adjustment algorithm, routing algorithm, and continuous slot adjustment