OEDDBOS: An Efficient Data Distributing Strategy with Energy Saving in Sensor-Cloud Systems

Sensor-cloud is a developing technology and popular paradigm for various applications. It integrates wireless sensor into a cloud computing environment. On the one hand, the cloud o ﬀ ers extensive data storage and analytical and processing capabilities not available in sensor nodes. On the other hand, data distribution (such as time synchronization and con ﬁ guration ﬁ les) is always an important topic in such sensor-cloud systems, which leads to a rapid increase in energy consumption by sensors. In this paper, we aim to reduce the energy consumption of data dissemination in sensor-cloud systems and study the optimization of energy consumption with time-varying channel quality when multiple nodes use the same channel to transmit data. Suppose that there is a certain probability that the nodes send data for competing channel. And then, they decide to distribute data in terms of channel quality for saving energy after getting the channel successfully whether or not. Firstly, we construct the maximization problem of average energy e ﬃ ciency for distributing data with delay demand. Then, this maximization problem transferred an optimal stopping problem which generates the optimal stopping rule. At last, the thresholds of the optimal transmission rate in each period are solved by using the optimal stopping theory, and the optimal energy e ﬃ ciency for data distribution is achieved. Simulation results indicate that the strategy proposed in this paper can to some extent improve average energy e ﬃ ciency and delivery ratio and enhance energy optimization e ﬀ ect and network performance compared with other strategies.


Introduction
With the rapid development of sensor networks, different wireless sensor networks are quickly becoming popular. Wireless sensors equipped with a variety of wireless interfaces such as Wi-Fi, Bluetooth, and cellular networks have powerful wireless communication capabilities. In particular, by combining wireless sensor networks and the cloud, the concept of sensor-cloud systems appeared [1][2][3][4][5][6]. The cloud provides extensive data storage and analytical and processing capabilities, while wireless sensors are responsible for collecting data. Despite the fact that the cloud has helped to break through lots of wireless sensor network limitations, there are still other challenges to be solved. The major problem is that data (time synchronization and configuration files) to be distributed and transmitted can significantly affect the sensor-cloud systems' performance due to limited energy supply. Sensor-cloud systems have been deployed in many applications fields such as agriculture, military, healthcare, environmental monitoring, and manufacturing, in particular, for remote mountainous area or a large area of forest, where the power cannot be recharged or the sustained power cannot be provided. A sensor node can perform various types of data communication with others and distribute shared data to others within its transmission range, for example, sensed data is sent to some sinks and the cloud. The sinks distribute synchronous data to all sensors and so on. On the other hand, distributing a great deal of data will rapidly exhaust the power and impact the normal operation of the sensor or the sink, and especially at certain place where timely supply of power cannot be realized. Therefore, data distributing strategies with energy saving and performance guarantee is an important subject in the study of energy consumption and performance optimization in such sensorcloud systems.
In the nodes' communication of sensor-cloud systems, the wireless channel's quality changes randomly with time because of its essential attributes, multipath propagation, and environmental interference and so on. If one node (sensor/sink) is selected to disseminate data when the channel quality is in good condition, the energy consumption generated in data dissemination will be effectively reduced. In some applications, multiple nodes use the same channel to distribute data, but only one node is allowed to use it in a given time period which will cause transmission collisions and data distribution failure if multiple (more than one) nodes use one channel to distribute data at the same time. In order to reduce energy waste caused by transmission collisions, the sending nodes must detect the channel service condition by successfully receiving a response signal from the receiving nodes within a given time when they distribute data to the receiving nodes [7,8]. And the channel service quality is evaluated on the basis of the power of the signal. When only one node is detected to use the channel, the sending node decides whether or not to continue to distribute data in terms of the channel service quality, in order to avoid the increase in the energy consumption of the distribution data when the channel service quality is in poor condition. This process is named channel competition as the sending node detects the channel service condition. It is the key to save energy as the sending node selects the optimal channel service quality to distribute data in the context of successfully competing for the channel. In [7], the authors use the optimal stopping theory to study the energy efficiency issue when multiple mobile nodes compete for the same channel to distribute data. But they do not consider the delay requirements of data distribution. Therefore, the energy optimization effect under the delay constraint scenario is poor. In addition, it has a fixed time length of the data transmission. The transmission energy efficiency will vary if the channel quality changes during data transmission.
In this paper, we consider the data distribution delay requirements in sensor-cloud systems. And it is also consistent with the realistic situation that the random varying channel quality has a certain holding time. The channel variation model is used in [8] as well. The sending node determines the length of the distribution time according to the amount of data to be distributed and the channel holding time. In [9], the authors used the game theory to study the optimal probability of multiple mobile nodes competing for the same channel, and then reducing the energy waste of transmission collisions. But it does not take into account the impact of channel quality on distribution energy consumption, which will affect the energy saving of the data distribution. Therefore, this paper proposes an optimal energy efficiency distribution strategy for data distributing in sensorcloud systems when the node competes for the same channel. And the maximum distribution delay constraint of the data distribution is also considered. In sensor-cloud systems, the sending node participates in channel competition with a cer-tain probability, observes the channel quality after successfully competing to the channel, then decides whether or not to distribute data based on the channel quality condition. The optimal energy efficiency moment is selected for the data distribution so as to realize energy saving. Optimal energy efficiency means that the average amount of the data distribution per unit of energy consumption reaches a maximum. The problem of stopping observation and distributing data through the sending node constantly observing the channel quality to select a good channel quality is an optimal stopping rule [10,11] problem. In this stop-rule problem, the sending node continuously observes the variation of the channel quality and obtains the stopping time when the expected reward of energy efficiency is maximized. Then, it takes the action of distributing data to achieve the goal of maximizing the expected reward.
The paper is organized as follows. Section 2 reviews the related research work. Section 3 presents the sensor-cloud model and optimization issues. Section 4 introduces the optimal energy efficiency data dissemination strategy based on the optimal stopping theory. Section 5 shows simulation results and analysis. At last, we make a conclusion and point out some possible directions for further work in Section 6.

Related Research Work
Data distribution is always a hot topic in distributing networks, and its applications are applied widely in various networks, such as ad hoc networks, social networks, and wireless sensor networks. Researchers pay extensive attention to data distribution applications and their research goals include reducing distribution energy consumption, increasing throughput, and reducing delay.
At present, the integration of wireless sensor networks and the cloud have been proposed in many architectures and research frameworks [1,2,12]. The majority of these works study a three-layer architecture with the focus on publish/subscribe communication between the sinks and cloud layers, trying to push communication between sensors and sinks layers. In [13][14][15], the authors mainly focus on improving the sensor-cloud performance by raising an optimization problem.
In [13], the authors put forward a three-tier architecture named CEB (cloud, edge, and beneath). To enhance scalability and energy efficiency, CEB uses two algorithms in optimizing data transmission rates between cloud and edge layers as well as edge and sensor layers, respectively. The optimization is performed with respect to energy consumption of sensor nodes. In [14], the authors focused on push-pull hybrid communication between the sensor and cloud layers through the edge layer. They come up with an optimization algorithm for sensor and sink nodes concerning different objectives. The purpose is to find the optimal transmission rate of each node. The optimization is conducted in terms of data yield, bandwidth, and energy consumption. In [15], the paper discusses how to solve the problem of energy constraints of sensor-cloud infrastructure so as to improve its performance and prolong its lifetime, which is really necessary in practice. On this basis, a 2 Wireless Communications and Mobile Computing sensor-cloud optimization strategy is proposed to improve its lifetime and energy efficiency. Formulated as integer linear programming, the strategy can determine the optimal number of push or pull periods for data collection or requesting and thus maximize the lifetime of sensors layer. Furthermore, it optimizes sensor-cloud lifetime with regard to energy consumption of sensors and sinks under the different push and pull mechanisms. On the other hand, another research work has been mentioned in different literature, such as in [7][8][9]16]. In [7], the authors assumed that multiple sending terminals take part in channel competition with equal probability and transmit data within a given time. They use the optimal stopping theory to deduce the optimal transmission rate of the data dissemination by the sending terminal so as to achieve greater amount of data dissemination per unit of energy consumption and higher energy efficiency. In [9], the authors studied the energy optimization problem of data dissemination from the perspective of the probability of participating in wireless network channel competition. Game theory is applied to derive the optimal probability that multiple sending terminals participate in channel competition to reduce the energy consumption of data transmission collision and data dissemination. In [16], the authors studied the optimal control from the perspective of flood data dissemination in mobile social networks. What is more, through the dynamic programming, the time dissemination problem of the optimal control signal is solved and the total network cost is minimized.
In [8], the authors study the distributed opportunity scheduling problem that multiple sending terminals compete for the same channel for data dissemination in mobile ad hoc networks. Based on the optimal stopping theory, the paper proposed an optimal stopping problem in order to maximize network throughput. And it also calculates the optimal transmission rate of the sending terminal by a backward induction method, thereby maximizing the throughput of the entire network. However, this paper does not consider the situation of data transmission delay and assumes that the sending terminal always has enough data to be distributed at any time. In [17], the authors study the data dissemination problem when the channel quality changes randomly in mobile networks. In this paper, the optimal transmission rate threshold is solved based on the optimal stopping theory to achieve the maximum network throughput. To this end, it also uses noncooperative games to develop the users' best response strategy.
In general, the researchers addressed the issue of data dissemination in different network backgrounds, such as ad hoc networks and social networks, and used different optimization methods, such as the optimal stopping theory, game theory, and heuristic algorithm. But the final goal is to reduce data dissemination energy consumption and optimize network performance. However, some researches do not consider the problems of data transmission delay, while others do not take into account random variation of channel quality.
In [18,19], we study the energy consumption of data transmission for that the channel quality changes randomly in wireless networks and get an optimal transmission rate using the optimal stopping theory to solve a constant data generated rate and variable data generated rate. Therefore, based on our previous work, we apply our approaches and models to study the energy efficiency issues with delay constraint data in sensor-cloud systems in which some similar issues exist. Energy consumption is also a serious concern for users and researchers, and the characteristics of channel quality changes with time. So, in this paper, our goal is to improve network energy efficiency while ensuring sensorcloud systems' performance. The main contributions of this paper include the following aspects. (1) Considering the case where the channel quality changes randomly with time and having a certain holding time, an energy efficiency model and an optimal energy efficiency model in which multiple nodes compete for the same channel for data dissemination are constructed in sensor-cloud systems. (2) Construct the optimal stopping rule problem based on optimal average energy efficiency to obtain the approximate optimal stopping rule. And within the maximum transmission delay, use the optimal stopping theory to solve the optimal transmission rate threshold for data transmission during channel quality maintenance period.

Network Model and Problem Description
3.1. Network Model. In a sensor-cloud system, such as the sink node sends a Q d data with the maximum delay D m . to sensors at intervals of T diss . Sensors which are beyond the transmission range of the sink node cannot directly receive the data, and other sensors receiving the data need to distribute data to them. The data distribution model in a sensorcloud system is shown in Figure 1.
The conflicting of the transmission and the failure of the data distribution will appear if multiple sinks use the same channel to disseminate data and multiple (more than one) sensors are enclosed in the transmission interference range. However, the data transmission will be successful if only one sink uses the channel to transmit data at the same time. The channel will be idle if there is no data to be transmitted. In order to detect the status of the channel, the sending sink transmits data to the receiving sensor for duration of τ. And the transmission is successful if the acknowledgment signal from the receiving sensor is returned successfully in time τ. This successful transmission is regarded as a successful competition channel of a sending node, and τ is the channel competition period. Assume that the channel quality is held on for a time T. That means the sending sink competes successfully with the channel and obtains the opportunity to continue to disseminate data for a period T. Indeed, the period T is called a period of one-channel competition and data dissemination. Obviously, the channel competition period τ satisfies τ ≪ T. Since the channel quality changes randomly with time, the sending sink has competed successfully the channel and detected the channel quality according to the acknowledgment signal power value sent back by the receiving nodes. The data will be disseminated if the channel quality is good. Otherwise, the opportunity is given up. The other nodes have to wait for the next cycle T to participate in the channel competition again if the sending node chooses to 3 Wireless Communications and Mobile Computing distribute data. On the other hand, the sending node could not participate in the channel competition for the remaining time of the current round if it gives up the channel, but the other nodes could continue to compete for the channel. One round of channel competition and data dissemination process is shown in Figure 2.

Problem Description.
It is assumed that the number of sending nodes using the same channel is K within the transmission interference range. These nodes participate in the channel competition with an equal probability p, and the value is 1/K. At the beginning of each round of channel competition, K sending nodes compete for the channel with probability p. If there is only one node competing for the channel, then the channel competition turns out to be successful, which is called the first round channel competition success, and the sending node is represented by A. On the condition that the current channel quality is good, A continues to disseminate data, while the others wait to compete for the channel in the next round. Or node A stops dissemi-nating data, quits this round of channel competition, and waits to participate in the next round, while the remaining K − 1 sending nodes continue the competition. When there is only one node competing for the channel, the second round is declared successful, and that node is represented by B. Then, B performs the same operation as A. Obviously, node A successfully competes for the first round and continues to disseminate data if the channel quality is good in the current cycle. Otherwise, each node that successfully occupies the channel has to give up using the channel which is thereby successfully competed for K times. Therefore, the probability of successful channel competition in ith round is The total times of expected channel competition is b i = 1/ρ s i in the ith round successful competition process. The number of competition expectations for each sending node is b i · p in ith competition. And in each round of K time competition, competition expectations total

Cloud applications
Virtual sensor Sensors Figure 1: A data distribution model for sensor-cloud system. 0 A node will stop detecting and transmit data if it has detected good channel quality.
A node will stop detecting and transmit data until the maximum delay.  Wireless Communications and Mobile Computing transmission power consumption of the sending node being P and the duration of each competition being τ, the competition energy consumption is P · τ. Therefore, the expected competition power consumption of the sending node is ∑ K i=1 b i pPτ in each round of channel competition. The sending node which wins the channel competition disseminates data in the 1st round if the channel quality is good. The expected duration of competition is b 1 τ and the time length of the remaining transmission is Under normal circumstances, data dissemination is subject to a certain deadline in practical applications and the data not yet transmitted within the deadline will be discarded. This paper assumes that the maximum data delay is D m . If a sending node successfully competes for the channel and carries the data to be distributed which is going to reach the maximum delay D m , then it distributes data regardless of the channel quality to avoid discarding the data due to timeout. Obviously, the competing expectations of the sending node add up to b 1 · p, and accordingly the expected competition energy is b 1 · p · P · τ. The expected competition time is b 1 · τ; therefore, the time length of the remaining transmis- According to the Shannon formula, when the sending node's transmission power consumption is given, the channel quality is better and the transmission rate is bigger. That means the more data is disseminated by the sending node at the same time, and the more data is transmitted by using the same power. Defining the energy efficiency is the amount of data bits that can be disseminated in per unit of joule energy. Our goal is to obtain the maximum or optimal energy efficiency when the sending node competes successfully to the channel for data dissemination and to improve the energy efficiency of data dissemination with guarantee of data transmission delay.

Optimal Energy Efficiency Data
Dissemination Strategy Based on Optimal Stopping Theory

Construction of Optimal Energy Efficiency Problems.
Assume that the sending node successfully obtains the channel in the ith competition of one round channel contention and set the channel transmission rate as R. Then, the energy efficiency of the node for data dissemination is Here, R is the transmission rate, and E total is the total competing and reference energy consumption before the sending node gets ith transmission opportunity. And it is called the total detection energy consumption, which is calculated from the next round of channel competition after the last successful data transmission and includes competing and reference energy consumption in this round. The reference energy consumption P 0 is the basic energy consumed by each current device of the sending node in the active state (including the idle and transmission state).t represents the actual transmission time which is determined by the amount of data to be distributed and the transmission rate R. It is defined as follows: In order to reduce energy consumption, each sending node maximizes its own energy efficiency to achieve optimal energy efficiency. Therefore, the optimal energy efficiency γ op of the sending sensor can be defined as follows: Each sending node competes for the channel with probability p. And after obtaining successfully the channel, it decides to disseminate data immediately or give up the use of the channel according to the current channel transmission rate and the amount of data to be disseminated. The dissemination data will be discarded if the sending node has the expectation to obtain greater energy efficiency. Otherwise, the data is disseminated immediately. The sending node, based on the amount of data to be disseminated, continuously observes the quality condition of the successfully competing channel and makes a decision whether or not to use the channel for data dissemination. Obviously, this problem is the optimal stopping rule problem that the sending node chooses the optimal time to stop observing and distribute data for obtaining the optimal energy efficiency. The optimal stopping theory provides the theoretical analysis base and practical solutions.

Optimal Stopping Rule Problem of Optimal Energy
Efficiency. After the sending node receives the data with the maximum delay of D m , the node starts to compete for the channel and observes the quality of the channel being successfully competed for. If the channel quality is up to the optimal energy efficiency standard, it will disseminate data; otherwise, it will wait for the next round of the competition. If the sending node carrying the data keeps observing until the maximum delay D m reaches the deadline, it must disseminate data after occupying the channel so as to avoid the data discarding due to the excessive delay. Therefore, the sending node participates in channel competition with M = bD M /Tc rounds. If the sending node obtains the channel and distributes the data in the Nth (1 ≤ N < M) round, its energy efficiency is In (5), R N represents the transmission rate obtained by the sending node in the Nth round;t N is the actual time length of data dissemination at this moment, which is defined in (3); ∑ K i=1 b i pPτ represents the expected competing energy consumption. P 0 is the reference power consumption of the 5 Wireless Communications and Mobile Computing sending node and P 0 · T is the reference energy consumption. Since the sending node has to disseminate data after successfully competing for the channel in the Mth round, the energy efficiency of the Mth round shall be It is called one data dissemination, which refers to the process from the sending node competing for the channel to winning the competition and disseminating data. Indeed, one data distribution includes one or more rounds of channel competition and one data dissemination. N y is defined as the number of channel competition rounds of data dissemination in the yth. That is, the time is the period when channel competition stops and data dissemination starts, which is referred to the stop time. If the sending node repeatedly disseminates data for Y times, the corresponding stop time sequence is fN 1 , And the detected total energy consumption sequence is fE total,N 1 , E total,N 2 , ⋯, E total,N y , ⋯, E total,N Y g. Among them, R N y , t N y , and E total,N y represent the transmission rate, actual transmission time length, and total energy consumption of the data dissemination after the sending node competing for the channel N y times in the yth round, respectively. Based on (5) and (6), the average energy efficiency of the sending node is According to the law of large numbers, (7) is transformed into the following: Here, E½• and N, respectively, represent the mathematical expectation and the number of competition rounds before data dissemination, which is also the stop time of the channel competition. With the data to be disseminated being subject to the maximum delay D m , the maximum stop time of the channel contention is represented by M. The stop time set for channel contention is defined as Ω = fN : 1 ≤ N ≤ Mg. So the biggest problem about the average energy efficiency in this paper is According to (11) and (12), the optimal average energy efficiency (the average value of the maximum amount of data per unit energy transmission) is Furthermore, formula (13) is transformed by an equation transformation into the following: Formula (14) is an average energy efficiency maximization problem concerning the maximization of expected reward E½Φ N ðχÞ about χ, where the reward function Φ N ðχÞ is Therefore, the average energy efficiency maximization problem of (12) is converted into an optimal stopping problem.
The aim of (16) is to gain the optimal stopping time N * = Nðχ * Þ of the channel competition, so as to obtain the optimal average energy efficiency χ * . So, we have The average energy efficiency maximization problem of formula (17) is a limited-range optimal stopping problem which follows an optimal stopping rule (as shown in literature [4]). This paper solves the optimal stopping problem by inverse induction. And the sending node obtains an optimal transmission rate threshold when it stops competing for the channel and disseminates data in each period T.

Optimal Stopping Rule of Optimal Energy Efficiency.
The sending node takes part in the channel competition in each period T, observes the channel quality after obtaining the channel, and then determines whether the current moment is the optimal energy efficiency moment for disseminating data. And the decision is made dependent on the expected value of the future channel quality. The sending node's 6 Wireless Communications and Mobile Computing reward for stopping channel competition and disseminating data is Φ n ðχÞ = R ntn − χðPt n + E total,n Þ when it successfully competes for the channel at time n. If it gives up disseminating data, the sending node will expect to receive reward.
Here, n = 1, 2, ⋯, M − 1 and F n represents that the transmission rate sequence values R 1 , ⋯, R n . According to the optimal stopping rule [5,12], if the actual reward Φ N ðχÞ of the data dissemination is equal to or greater than the expected reward E½Φ N ðχÞ | F n after the sending sensor achieves the channel competition success at time n, the data will be disseminated. Instead, the sending node gives up using the channel and continues to take part in the next competition round. Therefore, the condition that the sending node disseminates data after obtaining the channel at time n satisfies Proposition 1. When N * ðχÞ = min fM > n ≥ 1 : Φ n ðχÞ ≥ E½Φ n+1 ðχÞjF n g and the approximate stopping rule satisfies R n ≥ R th,n ðχÞ, the rule is optimal, where Proof. According to (15), there is E½E c,n+1 | F n represents the expected competition energy consumption of the sending sensor at n + 1. Its value is Since the data has the maximum delay D m , the sending node does not need to consider the transmission rate after successfully competing to the channel at time M, i.e., the transmission rate threshold of M is 0. Then there is wheret M is defined in (7). F R ðrÞ is the cumulative dissemination function of the transmission rate, and R max represents the maximum transmission rate. Therefore, the transmission rate of the data dissemination after the transmission node successfully competes for the channel at time M − 1 satisfies According to (7), we can see thatt M−1 ≤ T − b 1 τ. As a result, the transmission rate threshold at which the sending node stops the channel competition and starts disseminating data at M − 1 is So there is t M−1 is defined in (7). According to (19), the transmission rate threshold at which the sending node stops channel competition and starts to disseminate data at M − 2 is

Wireless Communications and Mobile Computing
Similarly, the transmission rate threshold obtained from M − 3 to 1 is R th,M−3 ðχÞ, ⋯, R th,1 ðχÞ.
In summary, the transmission rate threshold of the transmission sensor at time n ð1 ≤ n ≤ MÞ is defined as (20). When the transmission rate satisfies R n ≥ R th,n ðχÞ, (19) is monotonous. Therefore, the myopic stopping rule in Proposition 1 is optimal.

Optimal Energy Efficiency Data Dissemination Strategy
Based on Optimal Stopping Theory-OEDDBOS. According to the optimal myopia stopping rule in Subsection 4.3, the optimal stopping rule for optimal stopping problem (16) is Here, R th,n ðχ * Þ is the optimal transmission rate threshold of the sending sensor at n, which is defined in (20). Next, we solve the optimal average energy efficiency χ * according to (13).
Given the cumulative dissemination function F G ðgÞ of the random gain variable G of the channel, the cumulative dissemination function of the random variable R of the channel transmission rate is derived as F R ðrÞ. The probability that the sending node competes successfully to the channel is 1/K at time n. Therefore, the probability that the sending node disseminates data at time 1 is ð1 − F R ðR th,1 ðχ * ÞÞÞ/K, while the probability that data cannot be disseminated is F R ðR th,1 ðχ * Þ + ð1 − F R ðR th,1 ðχ * ÞÞÞðK − 1Þ/K. If the sending node does not disseminate data at time 1, then it continues to participate in channel competition at time 2, and so on. The probability that the sending node disseminates data at time n is The transmission rate expected value and the expected time length of the sending node data dissemination at the time n are The expected value of transmission data, the expected energy consumption, and the expected detection total energy consumption of the sending node from 1 to M are where E c,x is defined in (7). Finally, the optimal average energy efficiency χ * is obtained by solving (13). The solution process for χ * can be described in detail as follows.
Step 2. Calculate the transmission rate threshold R th,M ðχ 0 Þ in terms of formula (20), and let n = M − 1.
Step 4. Calculate R th,n ðχ 0 Þ in terms of formula (20), and let n = n − 1, then return to Step 3.
Step 6. End. Therefore, the flowchart of OEDDBOS is shown in Figure 3.
The above algorithm uses the Newton iteration method to calculate the optimal average energy efficiency χ * according to the given initial value χ 0 . This iterative method quadratically convergences to the optimal value and the result tends to be stable after three times iterations. According to the optimal average energy efficiency χ * , an optimal transmission rate threshold R th,n ðχ * Þ for the data dissemination is obtained after the sending sensor successfully competes for the channel at n in the optimal stopping rule (30).
The optimal rate threshold R th,n ðχ * Þ is a threshold for disseminating data after the sending sensor obtains a channel using opportunity at n. And it is also the rate threshold when the average value of the data dissemination per unit of energy consumption is the largest. This threshold controls effectively the timing at which the sending node disseminates data. The sending node participates in the channel competition in each round T. The optimal stopping rule strategy is to verify Wireless Communications and Mobile Computing whether the current transmission rate reaches the optimal transmission rate threshold R th,n ðχ * Þ after winning the channel competition. The sending node disseminates data if the current transmission rate value is greater than or equal to the optimal threshold. Otherwise, it abandons the use of the channel and continues the channel competition in the next round. The sending node performs continuously channel competition and data dissemination according to a given optimal stopping strategy and increases the average data volume per unit of energy consumption and the data transmission rate, so as to achieve the energy optimization effect under the premise of guaranteeing the data dissemination throughput.

Experimental Results and Analysis
This section compares the optimal energy efficiency data dissemination strategy based on optimal stopping theory proposed in this paper with other data dissemination strategies in related studies, then analyzes and evaluates the average energy efficiency and the average transmission rate of each strategy. The strategies being compared in this paper include the following three.
(1) Energy-Efficient Optimization for Distributed Opportunistic Scheduling Strategy (EEODOS). K sending nodes participate once in the channel competition with a probability 1/K every other period τ. And the competition is successful when only one node competes for the channel. Then, the node decides to disseminate data immediately or to aban-don dissemination and continue to compete for the channel according to whether the current transmission rate is greater than or equal to the optimal transmission rate threshold. The duration of time that the sending node disseminates data is T trans (2) Energy Efficient Data Dissemination Strategy Based on Game Theory (EEDDBG). K sending nodes participate in channel competition for one time with an optimal probability every other period τ. And it is successful for competition when only one node competes for the channel. Then, the node disseminates data. Indeed, the duration of the dissemination depends on the size of the transmission rate and the capacity of the data packets to be distributed, where the optimal probability relies on the number K of nodes participating in the competition (3) Randomly Competing Data Dissemination Strategy (Random). K sending nodes participate in a channel competition with a probability 1/K every other period τ. And the competition succeeds when only one node competes for a channel. Then, the node disseminates data in the remaining time of the holding time of the current channel quality. The duration of data dissemination depends on the transmission rate and the capacity of the data packets to be distributed. The fading of wireless channels is a small-scale fading. And its fading model is usually modeled as the Rayleigh distribution or the Rician distribution [20]. In simulation, the sending node and the receiving node have the same channel condition cumulative Calculate R th,n ( 0 ) according to formula (17), and let n = n-1   Wireless Communications and Mobile Computing distribution function. According to the channel gain probability density function in [15], combined with the Shannon formula [(4)], the cumulative distribution functions of the transmission rate r against the maximum rate R max under the Rayleigh and Rician distributions are as follows: where σ 2 is the channel gain variance correlation value. W is the channel bandwidth. N 0 is the noise power spectral density. A is the peak of the main signal amplitude. And Q 1 ð•Þ is the first type of the Marcum Q-function. The value of each parameter in the simulation experiment is shown in Table 1.
According to the analysis in Section 4, the sending node's transmission rate threshold R th,n ðχ * Þ is closely related to the value of parameters such as the amount of data to be disseminated Q d , the number of nodes of participating in competing K, the channel holding period T, the channel contention period τ, reference power consumption P 0 , and so on. Figure 4 shows the relationship between the optimal average energy efficiency χ * and the parameters for the Rayleigh and Rician distributions.
First of all, when the amount of the data to be distributed Q d is small, the ratio of the competition energy consumption to the transmission energy consumption of the transmission node is large, and the value χ * is small. If the value of Q d is too large, the sending node continuously reduces the trans-mission rate threshold in order to ensure data transmission delay, reducing the value of χ * . Secondly, as the number of nodes K increases, the values of the transmission rate threshold and χ * decrease. And then, as the channel retention period T is extended, the available transmission time after successful acquisition of the channel increases. And the ratio of the competition energy consumption to the transmission energy consumption within the period decreases, while the value of χ * increases. Next, the smaller the competition period τ, the lesser the competition energy consumption is and the greater the value of χ * . Finally, P 0 is the continuous power consumption of the sending node in the open state. So the larger the value of P 0 is, the smaller the value of χ * is.

Average Energy Efficiency.
Energy efficiency is the ratio of the total amount of data disseminated by the sending node to the total energy consumption. And the average energy efficiency refers to the average energy efficiency of each sending node, which represents the average amount of data dissemination per unit of energy consumption as well as the data dissemination efficiency by the unit energy consumption. The higher the average energy efficiency is, the greater amount of data dissemination per unit of energy consumption is achieved and the more energy is saved. Figure 5 compares the average energy efficiency of each strategy when the Rayleigh and Rician distributions have different parameters.
In Figure 5, OEDDBOS-1 shows the OEDDBOS situation under the Rician distribution, as OEDDBOS-2 is under the Rayleigh distribution. And the other three strategies are the same. From Figure 5, OEDDBOS achieves the greatest average energy efficiency. That is, its saving effect is the best. OEDDBOS obtains the optimal transmission rate threshold of the sending node by taking advantage of the optimal stopping theory at each period T, which is based on the amount of data to be distributed Q d , the number of sensors participating in the competition K, the channel holding period T, the channel competition period τ, and the value of the reference power consumption P 0 . It is proven that the highest average energy efficiency can be achieved with this threshold. Based on the game theory, EEDDBG obtains the optimal probability of the sending node participating in the competition. This strategy aims to reduce the conflict energy consumption of the channel competition. However, it does not take into account the random variation of channel quality and its average energy efficiency is related to the probability distribution of channel transmission rate. Random has neither obtained the optimal probability of participating in the competition, nor selected the transmission rate when the channel quality is in good condition. In addition, its average energy efficiency is comparatively lower. On the basis of the optimal stopping theory, EEODOS obtains the optimal transmission rate threshold. However, the maximum transmission delay of the data is not considered at the threshold, resulting in some data being discarded because of exceeding the deadline and thereby lacking the transmittable data when there is a higher transmission rate threshold. EEODOS does not also consider the length of the channel quality holding time. The sending node participates in the channel competition all the time after the data transmission is completed if  Wireless Communications and Mobile Computing the transmission rate is not reaching to the threshold. And its competitive energy consumption greatly increased. Meanwhile, the time length of the data transmission is given, which will result in the data transmission rate changing during the dissemination process, affecting the average energy efficiency.

Average Transmission Rate.
The transmission rate is the ratio of the amount of data being successfully disseminated by the sending node to the amount of data to be disseminated. Because data has the maximum delay requirement, the data that exceeds the delay will be discarded. The average transmission rate is the average of the transmission rate of each transmission node. It represents the proportion of the data that is disseminated within the delay requirement in the network. And the average transmission rate is also the probability of successful data dissemination. The greater the average transmission rate, the less data discarded due to timeout. Figure 6 shows the mean comparison of the average transmissibility for each strategy as the Rayleigh and Rician distributions have different parameters.
The description of Figure 6 has the same meaning as Figure 5. The mean value refers to the average value of the average transmission rate when the parameter values are within a certain range. The value ranges for each parameter are the same as shown in Figure 5. From Figure 6, OEDDBOS has a higher average transmission rate. The OEDDBOS selects the time when the channel quality is good (i.e., the transmission rate is high) to transmit data according to the amount of data to be disseminated Q d and to reduce the amount of data that is discarded due to the delay. As long as the sending node has the amount of data to be disseminated, it will participate in the channel competition and disseminate the data after obtaining the channel, thereby increasing the transmission rate. In Random, the sending node participates in the channel competition with a period of T. The sending node which obtains the channel occupies the remaining time of T, regardless of the amount of data to be disseminated. This will cause some data to be discarded before getting a transmission opportunity due to beyond the delay. The average transmission rate when the number of sending node K changes is the smallest. Because when the K increases, the transmission opportunity of each transmission node decreases, thus the transmission rate decreases. The average transmission mean value is smaller when the data volume Q d is variable. As Q d keeps increasing, the amount of data that can be disseminated by each sending sensor is limited. And some data are discarded due to excessive delays, resulting in a decrease in the transmission rate. The change in the channel holding period T, the competition period τ, and the reference power consumption P 0 does not affect the mean value of the average transmission rate but mainly affects the average energy efficiency. The average transmission rate is small when the data dissemination period T diss changes. Because T diss keeps declining, the amount of data to be disseminated continues to increase, and the amount of data that is discarded beyond the delay increases, thus the transmission rate decreases.

Conclusion
In sensor-cloud systems, multiple sensors/sinks usually use the same channel to transmit data at the same time in the transmission interference range, which will bring transmission collisions and result in data transmission failure. Aiming at reducing energy consumption for data dissemination in sensor-cloud systems, this paper mainly focuses on the energy consumption optimization problem with timevarying channel quality when multiple sensors use the same channel to disseminate data. The sensor sends data with a certain probability to compete for channel. The sensor decides whether or not to distribute data in terms of channel quality for saving energy after getting channel successfully. We construct the maximization problem of average energy efficiency for distributing data with delay demand. Then, this maximization problem is transferred to an optimal stopping problem which generates the optimal stopping rule. At last, the thresholds of the optimal transmission rate in each period are solved by using the optimal stopping theory, and the optimal energy efficiency for data distribution is achieved. Simu-lation results indicate that the strategy proposed in this paper can to some extent improve average energy efficiency and delivery ratio and enhance energy optimization effect and network performance compared with other strategies.

Data Availability
The figure's data used to support the findings of this study are included within the article.

Conflicts of Interest
The authors declare no conflict of interest.