Congestion and Computer Program Control Algorithm Strategy for Wireless Sensor Networks Based on Cloud Model

Cloud model and sensor network are the research hotspots in recent years. This paper proposes a congestion and rate control strategy for wireless sensor networks based on cloud model. It adjusts the input rate of nodes based on cloud model through node congestion detection. Aiming at the problem of network congestion control, two congestion adjustment algorithms based on red are improved. Congestion threshold and congestion degree are used as the basis of packet transmission rate adjustment to realize network support plug control. In this paper, the congestion control strategy NP starts to alleviate congestion at about 40 s and controls the packet loss rate at about 116 packets/s, which is 45.3% lower than the multipath congestion control strategy and is more stable. However, when β = 0 , the packet loss rate of the double congestion threshold algorithm is 20% lower than that of the single congestion threshold algorithm. The reason is that the double congestion threshold algorithm allows a stronger source rate control mechanism earlier than the single congestion threshold algorithm a large number of packets are lost in a point, but this also makes the network performance relatively low.


Introduction
With the large-scale development of microelectronic system, radio communication technology, and low-power electronic circuit technology, the network is mainly composed of lowcost, small-scale wireless communication sensor nodes, lowpower, and short-distance gradually from theoretical research to practical application. These sensor nodes integrate sensor technology, communication technology, and microcomputer technology, which can collect, process, and transmit the information of monitored objects. The operation is implemented and maintained by the cloud. From the convenience and timeliness of mobile Internet, cloud computing can be used as a way to improve the performance of mobile terminals.
Congestion has an extremely negative impact on the performance of wireless sensor networks. Kandris et al. proposed a new congestion mitigation and avoidance protocol COALA, which can not only actively avoid congestion in wireless sensor networks but also take reactive measures to alleviate the impending congestion diffusion through alter-native paths. Its operation is based on the utilization of the cumulative cost function, which considers both static and dynamic metrics to send data over paths that are less likely to be congested. Kandris et al. verified the effectiveness of COALA through simulation experiments and proves that it can significantly reduce the loss ratio, transmission delay, and energy consumption. However, adjusting the weight of cumulative cost function makes the algorithm more complex and the operation cost is higher [1]. Kimura et al. discussed the reliability of window flow control scheme with explicit congestion notification (ECN) in communication systems, which is an important issue in remote transmission such as cloud computing. In order to solve the congestion problem caused by the reduction of network transmission efficiency, Kimura et al. proposed a high-performance flexible protocol (HPFP), and its effectiveness was verified by simulation, but its stability was not high in the experiment [2]. Yu [3].
This paper proposes a congestion and rate control strategy for wireless sensor networks based on cloud model. By detecting node congestion, an algorithm strategy is proposed to adjust node input rate based on cloud model. Address the problem of network congestion control, a congestion control mechanism based on red is proposed. Congestion threshold value and congestion degree are used as the basis of packet sending rate adjustment to realize network congestion control [4].

Cloud Model Theory and Congestion
Algorithm in Wireless Sensor Networks 2.1. Cloud Model Theory. Cloud model is the concrete implementation method of cloud and also the basis of cloud-based operational reasoning and control. The process from qualitative concept to quantitative representation, namely, the concrete realization of cloud droplets generated by the digital features of cloud, is called forward cloud generator [5,6]. The ratio of the same physical quantity of similar phenomena in cloud model theory is called similarity coefficient, or similarity ratio. The Internet is mainly responsible for the communication between wireless access network and cloud. On the one hand, it is responsible for transmitting the user's business requests to the cloud; on the other hand, it effectively transmits the business data provided by the cloud to the access network server [7,8]. Cloud data is mainly assigned to cloud controller based on virtual machine to run user requested operation and store relevant business data [9]. The application of one-dimensional normal cloud generator algorithm is as follows [10,11]: Input: three numerical eigenvalues Ex, En, He, and cloud drop number n of stereotype concept A.
Output: the quantitative value of N cloud drops and the certainty of concept A represented by each cloud drop. Steps: (1) A normal random number with expectation value En and standard deviation He is generated (2) A normal random number with expectation value Ex and standard deviation abs (EN ′ ) is generated (3) Calculation formula (1): (4) Let ðx, yÞ be a cloud drop, which is a concrete realization of the linguistic value represented by the cloud in quantity, where x is the numerical value corresponding to the qualitative concept in the universe this time, and is a measure of the degree to which the linguistic value belongs (5) Repeat steps (1) to (4) until the required number of cloud drops is generated 2.2. Reverse Cloud Generator. Reverse cloud generator is a conversion model from quantitative value to qualitative concept. It can transform a certain number of precise data into qualitative concepts represented by digital features (Ex, En, and He), see Figure 1.
The algorithm of one-dimensional reverse normal cloud generator is implemented as follows: Input: the quantitative value of N cloud drops and the definition of each cloud drop ðx, yÞ.
Output: the expected values Ex, entropy En, and super entropy He of qualitative concept A represented by N cloud drops. So as to effectively combine the concept of cloud quality to generate the next generation of cloud. Finally, by testing nine benchmark functions, the average fitness and standard variance of a series of optimal solutions are obtained, which fully demonstrates the superiority and effectiveness of the interval cloud optimization model. Steps: (1) According to formula (4), calculate the sample mean value of this group of data According to formula (7), the absolute central moment of the first-order sample is calculated, Wireless Communications and Mobile Computing Calculate the sample variance according to formula (10); (2) It can be concluded that the expectation is equal to the sample mean value (3) At the same time, entropy can be obtained from sample mean and formula (11); (4) From the sample variance in (1) and the entropy in (3), the super entropy He can be obtained, as shown in the following formula 2.3. Wireless Sensor Networks. Wireless sensor network (WSN) is a multihop wireless network short-range communication, which is composed of a large number of low-cost microsensor nodes. The number of nodes developed in the monitoring area is usually very large. Each node not only has data acquisition and information processing capabilities but also has wireless communication, routing, and promotion functions [12,13].

Interference Control Technology for Wireless Sensor
Networks. Congestion control is a key technology in wireless sensor networks, which directly affects the performance of the network, such as network quality of service, the use of system bandwidth, and network energy efficiency [14].

Congestion Control in Wireless Sensor
Networks. In the application of wireless sensor networks, the increase of network traffic exceeds the possibility of processing and upgrading nodes and routing devices, which makes the nodes and routing devices on the network unable to process and enhance packets in time and start to discard packets [15]. Congestion in wireless sensor networks will seriously affect the energy efficiency of the network and the quality of network services [16,17]. Therefore, in order to avoid network congestion or promote network congestion as soon as possible, it is necessary to effectively control the congestion of sensor networks [18].

Criteria of Congestion Control Algorithm.
Congestion control performance evaluation criteria for wireless sensor networks are used to evaluate the availability and effectiveness of congestion control strategies or algorithms, and the results can be quantified for analysis and comparison [19,20]. In addition to energy efficiency and network scalability, the evaluation criteria of congestion control algorithms should also include the following.
(1) Packet Loss Rate. Packet loss rate refers to the proportion of data packets lost in the total number of transmission in

Algorithm
Computational procedure The expected value is En The expected value of the generation is Ex The standard deviation is abs (En) normal random number 3 Wireless Communications and Mobile Computing wireless sensor networks. The formula is (15).
where P is the loss rate of a package, T is the total number of packages, and N is the number of rejected packages. Packet loss rate reflects the impact of congestion control mechanism on network traffic and can be used to measure the effect of algorithm processing. If the packet is lost, the network delay will be further aggravated, and even the desired effect cannot be achieved in time.
(2) Network Delay. Network delay refers to the time required to transmit data (message or packet, or even a point) from one end of the network (or connection) to the other (or some parts), sometimes called delay or delay. Network delay should include scheduling delay, scheduling delay, processing delay, and queue delay. The calculation method of network delay is shown in Equation (8).
where T is the network delay, A is the transmission delay, B is the transmission delay, C is the processing delay, and D is the queuing delay [21].

Performance Evaluation Index of Congestion Control
Mechanism. Blocking control is a multiobjective task. Its main task is to unclog the network, and when congestion occurs, congestion control technology needs to repair the network immediately. It is mainly used in communication network, Internet of things and Internet, and other network fields. There will be compensation between different performance indicators. It is necessary to find the best solution under a certain index from a set of possible solutions [22]. Of course, the above design objectives are proposed from the perspective of system. From the user's point of view, more worrying is the completion time of the data stream.

High Efficiency.
High efficiency means no waste of bandwidth resources, and congestion control algorithm must make full use of network resources. If the bandwidth of connection 1 is Cl and the entrance concentration rate of connection 1 is ly, high performance refers to the ability of congestion control algorithm to keep the average total entrance rate of entry stream close to or equal to the bandwidth [23,24]. 2.4.3. Stability. Stability refers to the system originally in equilibrium state will deviate from the original equilibrium state after being disturbed. If the system disappears after the disturbance effect, it can still return to the original equilibrium state after a transitional process and the ability to correctly handle fluctuations caused by transient effects.
Global stability refers to the convergence from the equilibrium point under any initial condition, and the local stability refers to the convergence of the equilibrium point near the equilibrium point [25,26].

2.4.4.
Convergence. The convergence of congestion control algorithm is usually measured by the time from the initial state to the target state. The shorter the convergence time on the balance sheet, the faster the convergence speed. The time required to achieve optimal performance is compared to other streams [27].

2.4.5.
Affordability. The main advantage of congestion control algorithm is that the algorithm can maintain a certain stability under random and other uncertain factors. In other words, the algorithm should be able to withstand noise, such as no response service and short-term explosion service interference [28,29].
2.4.6. Scalability. Scalability refers to the ability of the system to expand smoothly by increasing users and increasing network bandwidth. The congestion control algorithm must have better adaptability to different scale networks, and the network size will not be significantly reduced due to the increase of traffic. This requires the algorithm to be a distributed application.

Experimental Method
In this study, NS2 is used to simulate and analyze the congestion situation of wireless sensor networks, and a computer program-based policy control algorithm is based on cloud model (such as packet loss rate, energy efficiency, congestion control fairness, etc.). A = 0:5, b = 0:3, c = 0:2. In the experiment, 5 nodes were randomly selected as source nodes to create 180 packets/s data source. In order to make the simulation results more representative, different topologies are simulated for 50 times, and the simulation time is 100 seconds. The simulation results lower than these topologies should be taken as the experimental results.

Selection of Performance Indicators.
The simulation experiment will show and measure the network performance and the results of algorithm implementation through the following two indicators. The two indicators of achievement are as follows: (2) Network throughput In the research, we choose the network throughput as another performance index. Network throughput refers to the amount of data passing through a network (or channel or interface) in unit time. The calculation formula is shown as follows where s is the network throughput, n is the number of packets passing through the network, and t is the network communication time.

Simulation Experiment Settings.
In the simulation experiment, the number of source nodes is m, the number of intermediate nodes is n, and the number of sink nodes is k. Matlab software is used to simulate the algorithm and establish the tree network topology. In the algorithm simulation, the set of source nodes is marked as the set of S = fS 1,⋯, S m g intermediate nodes is marked as M = fM 1,⋯, M n g.

Comparison of Packet Loss Rate under Congestion and
Rate Control Strategies in Wireless Sensor Networks Based on Cloud Model. In order to solve the problem of network congestion control, node input rate adjustment based on cloud model is carried out through node congestion detec-tion. The simulation results are shown in Table 1 and Figure 1.
It can be seen from Table 1 and Figure 1 that the congestion control strategy np starts to alleviate congestion at about 40 s, and the packet loss rate is controlled at about 116 packets/s. The multipath congestion control strategy ncc also starts to alleviate congestion at about 40 s and controls the packet loss rate at about 208 packets/s, without congestion control, the data packet loss rate of mcc is very high and unstable.

Influence of β Variation on Network Throughput and
Packet Loss Rate. In a separate congestion threshold control level, only one congestion level is defined. Once the number of hidden packets exceeds the blocking degree, the number of dropped packets will increase. β1 and β2 are the congestion threshold values set in this paper, but β2 does not work. The mathematical expressions of β and breg are shown in the following formula (11): For the single congestion threshold algorithm, the influence of β1 change on network throughput and packet loss rate is studied when the rate ratio remains constant. In the experiment, set the parameters: m = 200, n = 20, k = 1, b1 = 200, b2 = 400, b3 = 500, and ratio = 3. β1 is 0.1, 0.2, …, 0.9, respectively. The impact of packet loss rate on the network throughput is shown in Table 2 and Figure 2.
The description of other experimental parameters is shown in Table 3.

Wireless Communications and Mobile Computing
In Table 4, 44~64 s, the average throughput at the end of the congestion period shows that the FCA throughput is still the highest and remains consistent with the congestion period. This is because the FCA channel fair allocation algorithm can guarantee the minimum packet loss during the congestion period, resulting in the remaining congestion at the end of the period. The number of data packets is the largest, so it is still in a state of decongestion.
The average throughput during the congestion period from 4 to 44 s in Table 5 shows that CODA and PCCP adopt a rate adjustment strategy, which is consistent with the congestion control performance in the burst stream. The binary backoff strategy of 802.11 makes the throughput unstable. The step flow environment is slightly higher than the burst flow environment. Table 6 shows that the data bits of 802.11 reserved control information are 010000~011001, and the code of ACK control frame is 011101. This article chooses 011001 as the code of C-ACK control frame.
On the main axis (left), segment represents the change of single congestion level β1, and segment represents the change of network performance. It can be seen from Figure 2 that with the gradual increase of β1, the network efficiency gradually decreases and tends to be stable.

Impact of Single Congestion Threshold Algorithm and Double Congestion Threshold Algorithm on Network
Performance. When the ratio is stable, the influence of single congestion threshold algorithm and double congestion level       Figure 4: Impact of two algorithms on network throughput. (1) Impact on network throughput The impact of single congestion threshold algorithm on network throughput is shown in Figure 3.
For congestion threshold algorithm, the abscissa in Figure 3 represents the change of β1, and the string represents the change of network performance. The abscissa in Figure 3 represents the change of the difference between β 1 = 0:1 and β2 from 0.1 to 0.8, and the voltage represents the change of network performance.
(2) Influence on packet loss rate The impact of single congestion threshold algorithm on packet loss rate is shown in Figure 4.
For congestion threshold algorithm, the graph in Figure 4 represents the change of β1, and the string represents the change of packet loss rate. The decomposition in Figure 4 represents the variation of the difference between β1 = 0:1 and β2 from 0.1 to 0.8, and the voltage represents the change of network performance. In terms of shape, the two curves continue to decrease with the increase of β.
In the 0-4 s period without congestion, the trend of 802.11, CODA, PCCP, and FCA is the same. In 4-44 s, which is the initial stage of congestion, the 802.11 queue buffer length changes most disorderly and fluctuates greatly. The simulation result changes are shown in Figure 5.
The growth rate of the buffer length of all nodes in FCA is basically the same, because the fair channel allocation algorithm can allocate channels to neighbor nodes in an orderly manner, and the consistency is the best, which again verifies the effectiveness of the fair channel allocation strategy. The rate adjustment mechanism adopted by CODA and PCCP reduces congestion to a certain extent, and the buffer length increases more steadily compared with 802.11, but it is far less than FCA. The situation of buffer occupancy is shown in Figure 6.
44-64 s is the end of congestion. The binary backoff algorithm in 802.11 gives higher priority to the nodes that interact successfully, which causes the buffer length of some nodes to change horizontally within a period of time, that is, the channel cannot be competed for a long time. The situation of buffer occupancy is shown in Figure 7. There are

Conclusion
Through the spread and application of computers and the rapid development of network technology, people's demand for cloud computing is increasingly strong, which promotes the vigorous development of cloud service technology. In the cloud environment, network management should provide network performance isolation and network monitoring functions. This paper mainly studies the flow control algorithm in the computing cloud environment and is committed to improving the congestion problem of wireless sensor networks. This paper proposes a network congestion strategy and wireless network control sensor based on cloud model. In this paper, two congestion adjustment algorithms based on red are improved, and good network performance is achieved. Simulation results show that when β = 0, the network throughput of single congestion threshold algorithm is 17.3% higher than that of double congestion threshold algorithm and then tends to be equal and stable at about 650.
With the development of cloud network environment, the future use scenarios will become more and more complex, and users' requirements for network performance will be higher and higher. In the cloud environment, there are still many valuable problems worth studying and solving and strive to achieve a better network environment.

Data Availability
The data that support the findings of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.   Wireless Communications and Mobile Computing