Abstract

Resource allocation has always been a key technology in wireless sensor networks (WSN), but most of the traditional resource allocation algorithms are based on single interface networks. The emergence and development of multi-interface and multichannel networks solve many bottleneck problems of single interface and single channel networks, it also brings new opportunities to the development of wireless sensor networks, but the multi-interface and multichannel technology not only improves the performance of wireless sensor networks but also brings great challenges to the resource allocation of wireless sensor networks. Edge computing changes the traditional centralized cloud computing processing method into a method that reduces computing storage capacity to the edge of the network and faces users and terminals. Realize the advantages of lower latency, higher bandwidth, and fast response. Therefore, this paper proposes a joint optimization algorithm of resource allocation based on edge computing. We establish a wireless sensor allocation model and then propose our algorithm model combined with the advantages of edge computing. Compared with the traditional allocation algorithm (PCOA, MCMH, and TDMA), it can further improve the resource utilization, reduce the network energy consumption, increase network capacity, and reduce the complexity of the schemes.

1. Introduction

Wireless sensor networks (WSN) are a kind of distributed sensor network. Its terminal is the sensor that can sense and check the outside world. The sensors in WSN communicate through wireless mode, so the network settings are flexible, the location of devices can be changed at any time, and they can also connect with the Internet in wired or wireless mode. Because of its multihop, self-organization, low cost, and wide coverage area, it is widely used in military, computer, and communications, aerospace, and other fields. The application prospect of wireless sensor network is very broad, which can be widely used in environmental monitoring and forecasting, health care, smart home, building condition monitoring, complex machinery monitoring, urban traffic, space exploration, large workshop, and warehouse management, as well as airport, large industrial park safety monitoring, and other fields [13]. Therefore, scholars draw on the model of cloud computing and propose a computing model of cloud computing, which expands the physical medium of the device, so that it can meet the resource requirements of various applications.

The resources in wireless sensor networks usually refer to limited resources such as channels, energy, time slots, and radio frequencies [4]. The resource allocation of wireless sensor networks refers to the coordination of various resources through resource allocation schemes under limited resource constraints and then achieves improved resource utilization, reduced interference, improved service quality, and maximized network throughput and network capacity the goal of. Literature [5, 6] studied the stepwise algorithm of joint power control and rate adjustment. After the node is forwarding power allocation ratio was determined, the algorithm studied the iterative price method to stimulate the node to cooperate with other nodes. Literature [7] proposed a power-interference pricing model for multichannel networks, using a pricing mechanism based on optimal utility, and based on this model, proposed a stepwise related joint optimization algorithm. The power price and interference price adjust the channel and power allocation of the link to maximize the network utility. Literature [811] comprehensively considered factors such as link effective capacity, network interference and flow conservation, and established a congestion avoidance model for joint power control and channel allocation. Furthermore, a congestion avoidance mechanism based on genetic algorithm is proposed. However, the algorithm needs to collect global information, which increases the computational complexity of the algorithm and has a relatively large communication delay. In order to better reduce interference and balance network energy consumption, literature [12, 13] established a game model, which integrates interference and residual energy into the revenue function. Literature [14] not only considers the impact of power control and channel allocation on network performance but also considers the impact of node rate allocation and layer network frequency on the network and proposes a cross-layer resource configuration joint design method.

Many classic problems in cloud computing still exist in the field of edge computing. Management is one of the research hotspots, researching how to improve power efficiency, shorten task execution time, and increase task success rate through efficient resource management. However, unlike resource management in cloud computing, resource management in edge computing needs to combine its own characteristics and formulate corresponding management strategies [15]. From the perspective of research goals, although devices have developed rapidly in recent years, the battery life is always an unbreakable bottleneck, which largely restricts the development of devices. To this end, it is possible to further optimize resource management under the edge computing architecture, reasonably allocate resources to improve power efficiency, and use limited power as much as possible to perform more tasks. From the perspective of resource optimization methods, resource management in edge computing usually requires joint optimization of computing and communication resources. Unlike cloud computing, it has more access to cloud service providers through the Internet [1618]. As a key technology to solve bottlenecks in 5G, edge computing has developed rapidly in recent years and has received extensive attention. Literature [19] proposed the fistulous system, which provides a dynamic and automatically configurable “multidevice cloud system” that expands Cloudlet by coordinating multiple devices. Use nearby unused devices to provide computing services at the edge of the network, thereby reducing network delays in migrating computing to traditional cloud computing centres. Literature [20] considered that, in a scenario where multiple users with different computing workloads and local computing capabilities share an edge server, a convex optimization algorithm is used to control the size and time distribution of unloaded data is obtained. To minimize the energy consumption and delay cost of a multiuser MEC system with multiple tasks for each user, Literature [21] used a separable semidefinite relaxation method to optimize the cost of processing. Upload decisions, communication resources, and computing resources.

2.1. Overview of Edge Computing

Edge computing (EC) was first proposed by ETSI in 2014. 5G is regarded as the most closely related edge computing access network, 5G will be widely used in edge use cases, and the support rate is far higher than other network access technologies. Edge computing provides services for users. The system is characterized by short distance, low latency, and high bandwidth. It will provide localized cloud computing function and real-time wireless network and context information. On the one hand, EC can improve user experience and save bandwidth resources. On the other hand, EC can compute power to mobile edge server. By providing third-party application integration, it is possible for the service innovation of mobile edge. The latest development of edge computing, together with the clear goal of the new technology frontier of ecological positioning in China, has laid a solid foundation for the further development of edge computing. However, a lot of work needs to be done to tap the long-term potential of edge computing.

The EC reference architecture given by ETSI in the white paper is shown in Figure 1. The architecture can be divided into four parts: user equipment layer (UE), EC system level management layer, EC server level management layer, and EC server layer.

The user equipment running the application can directly access the EC system, and it supports third-party customers such as commercial enterprises to access the EC system through CFS portal. Whether it is the user equipment or the third-party user, the access first arrives at the MEC system level. In this layer, the application submitted by the user device first arrives at the application lifecycle, which is responsible for mediating requests, such as starting, terminating, or relocating the application of the user device in the EC system [22]. Next, the OSS decides whether to authorize the request and sends the authorized request to the mobile edge choreographer. Mobile Edge choreographer is mainly responsible for maintaining the global available resource view and EC services.

The enabling technologies of edge computing mainly include three aspects: cloud and virtualization, large capacity server, application, and service ecosystem. This transformation successfully decouples app, software platform, and lower hardware resources with supervision program. In one platform, multiple virtual machines can be deployed to share hardware resources in a controlled and flexible way. Cloud and virtualization technology has been used by telecom cloud and network function virtualization. They are changing the transformation mode of IT industry in the past 10 years and are the key technology of edge computing. High-capacity server refers to the hardware level, because edge computing is to move the centralized cloud platform, so the dependence of edge computing on server performance cannot be ignored. High-capacity IT hardware can promote the business success of edge computing.

2.2. Basic Framework and Application of Edge Computing

With the maturity and improvement of architecture design, EC technology continues to meet the diversified application needs in various fields. Several EC application scenarios are given in ETSI white paper [23], including content optimization and caching, video stream analysis, Internet of things, and Internet of vehicles, as shown in Figure 2.

2.2.1. Content Optimization and Caching

Content optimization refers to the dynamic optimization of the content according to the information provided by the network, such as cell ID, cell load, link quality, and data throughput, to improve the network efficiency. Video caching saves the bandwidth and processing time of the core network when the terminal requests video playback.

2.2.2. Augmented Reality

AR is a kind of technology to enhance or expand the real-world image that users see by using the additional elements generated by the device, including sound, picture, and video. AR application has the characteristics of large amount of data processing and high demand for computing power of equipment. It needs to obtain the user's position and angle information to realize image superposition.

2.2.3. Video Stream Analysis

Video stream analysis is a kind of computer vision technology, which is based on the separation of background and target in video scene, to achieve target tracking and recognition and to extract the characteristic attributes of the target or judge its behavior. The application of video stream is expressed: license plate recognition, face recognition, and security monitoring. Video analysis and detection algorithms usually have a high computational complexity.

2.2.4. Internet of Things

The IoT is a kind of network that connects goods with network through various intelligent technologies to transfer and exchange information effectively, to realize efficient management and intelligent control of goods. Unloading the computing intensive tasks generated by IOT devices to EC server is helpful to simplify IOT devices and reduce energy consumption, to extend the lifetime of devices. EC server usually has certain computing resources and the ability to collect distributed information within the coverage. The introduction of EC technology into the Internet of things can help the Internet of things devices free from the dilemma that they must have strong computing capacity to realize their functions.

2.2.5. Internet of Vehicles

The Internet of vehicles is a communication system that realizes the information exchange between vehicles and network through the interaction between vehicles, vehicles and pedestrians, and vehicles and roadside units. By giving the roadside base station computing and storage capacity, the vehicular application service can be transferred from CN to the network edge node for processing. To reduce the round-trip delay of data processing, EC server can receive, analyse, and process the information of nearby vehicles and roadside sensors, early warn the road danger, and timely inform other vehicles in the area, so that the driver can respond in advance. The application of this technology also makes automatic driving possible.

2.3. Related Technologies of WSN

Wireless network is a network data transmission system which is independent of the location of computer equipment by using radio waves instead of cables. It is an important direction in the development of modern data communication systems. Wireless sensor network is one of the research hotspots in the field of information, which can be used for signal acquisition, processing, and transmission in special environment. Wireless sensor network (WSN) is a new technology of information acquisition and processing. It has been applied more and more widely in real life. At present, as a new technology to obtain and process information, wireless sensor network is being widely studied. With the development of communication technology, embedded technology, and sensor technology, sensors are gradually developing towards intellectualization, miniaturization, and wireless networking. Then, the information is transmitted to the data processing centre or base station through wireless mode and finally sent to the observer to realize the connection of physical world, computer world, and human society. Wireless sensor networks usually include sensor nodes, sink nodes, and management nodes, as shown in Figure 3.

Wireless sensor network is mainly composed of a sensor unit, data processing unit, wireless receiving unit, and battery unit. It has the advantages of multifunction, low energy consumption, high utilization rate, and low cost. In the process of practical use, a large number of sensor nodes are distributed in the middle of the monitoring area, forming a good network system through self-organization. At this time, the monitoring data collected by the sensor nodes can be transmitted through the nearby sensor nodes. These data may be processed by multiple sensor nodes and gathered in the nodes after multiple transmission, Finally, through the satellite or Internet channel to the management node, the technical personnel configure and manage the data in the management node, obtain the monitoring data, and analyse the monitoring results. Combined with the actual situation of wireless sensor network, we can find that it has some characteristics. In the process of practical application, in order to obtain the most accurate information in the largest range, technicians often arrange a large number of sensor nodes in the monitoring area, set up thousands of nodes, and form a large scale of sensor network nodes, Technicians usually need to place sensor nodes in the area without infrastructure. They can connect with the surrounding sensor nodes to form a node network, build a topology control mechanism, automatically form a sensor monitoring data network system, and give play to the advantages of self-organization. In the process of practical application, the running state of sensor network is not invariable but will gradually change with the change of the surrounding environment and the passage of time, which is dynamic. Data are one of the important elements in the process of sensor network operation. Sensor network is a task-based network structure, which mainly uses the data information obtained by sensor nodes to complete the operation task.

3. Network Resource Allocation Algorithm Based on Edge Computing

3.1. MRMC-WSN Resource Allocation Model

Most of the models are based on single interface multichannel environment, which is not suitable for multi-interface multichannel network. In such case, this section takes the interference and conflicts of links as constraints, for purpose of extending the network life, maximizing the network capacity, and improving the balance of resource allocation and constructs a multiobjective optimization model of resource allocation. The formula is as follows:

In the above model, equation (1) represents the maximum network lifetime, where represents the lifetime of the node, and the expression is shown in the following equation:where means the energy consumption of node in a slot period. In general, the definition of network lifetime can be roughly divided into two kinds. The first one can define network lifetime as the duration of network until the percentage of dead nodes is lower than a given threshold. The second one can be defined as the lifetime of wireless sensor network, which is the lifetime of the sensor node that is the first to fail due to the depletion of battery energy. Using the second definition method, we first calculate the node with the minimum lifetime and then optimize the function to maximize the node with the minimum lifetime. In order to ensure the consistency of objective function in multiobjective optimization, equation (1) is transformed into a minimization problem, as shown in

The purpose of Equation (2) is to maximize the network capacity, where is the link capacity of link and the solution of link capacity is described in equation (9). The network capacity reflects the quality of communication to a certain extent. Similarly, equation (1) is transformed into the minimization problem shown in the following equation:

Equation (3) shows the balance of the total capacity of all links communicating in each time slot. If the resource allocation is not balanced, it will lead to the waste of resources and even network congestion, resulting in network communication delay. The standard deviation of the total capacity in each slot is used to represent the balance of resource allocation.

Equation (4) represents the interface constraints of each node. Each node has a limited number of interfaces, which are less than the number of orthogonal channels. The limited number of interfaces will make the links associated with nodes share the same interface, and two links on an interface cannot transmit in the same time, where is the set of all communication links of node and represents the number of interfaces of node . Equation (5) is the interference constraint. In order not to affect the normal communication, all links in the network should meet the SNR condition.

In MRMC-WSN, with the increase of interfaces, multiple links of a node can communicate at the same time. However, with the raise of the number of links communicating at the same time, the interference and communication conflicts in the network will also increase, which will lead to excessive energy consumption, limited network capacity, unbalanced resource allocation, and other problems. The resource allocation problem is shown in Figure 4. By analysing the interaction among slot scheduling, the energy consumption model of joint slot scheduling, information distribution and power adjustment, the interference and network capacity model, and the load balancing evaluation model are established.

3.2. Optimization Algorithm of MRMC-WSN Resource Allocation Based on Edge Computing

The joint resource optimization algorithm in wireless sensor network can improve the resource utilization, avoid the network communication conflict, reduce the interference, and improve the communication quality and network throughput. However, traditional resource allocation models and algorithms are designed for single interface single channel or single interface multichannel wireless sensor networks. With the introduction of sensor nodes with multiple RF interfaces into wireless sensor networks, the number of simultaneous communication links in the network will increase with the increase of interfaces. Therefore, the application of multi-information distribution technology can improve the network throughput. However, while improving all aspects of network performance, it also means that the complexity of resource allocation algorithm for wireless sensor networks is improved. Therefore, this section proposes a joint optimization algorithm of resource allocation based on edge computing for wireless sensor networks (ECROA), which solves the problem of communication conflict between links.

The analysis shows that transforming communication graph into conflict graph for solving the TDMA slot-scheduling problem, but this transformation process is based on single interface wireless sensor network. In this section, a joint allocation optimization scheme is to solve the previously proposed MRMC-WSN slot-scheduling model. Firstly, the adjacent links of nodes are coloured to avoid slot redundancy caused by out of order scheduling. In addition, it can not only increase the utilization of resources but also consider the fairness of slot allocation. Use to indicate the number of links allocated with slot . When slot is allocated to link , the fairness can be expressed as

The joint resource allocation optimization method with edge computing in this paper is summarized as shown in Figure 5. As is shown in the figure, the purpose of edge computing is to use the strategy of computing migration, which mainly migrates computing intensive tasks to the cloud computing centre with sufficient resources for implementation. But for massive edge devices and massive data, transmission is an important factor affecting its computing power, so the migration strategy of edge computing model is to reduce the amount of network transmission data for the purpose of migration strategy rather than the migration of computing intensive tasks to edge devices. In the process of sensor network distribution, it can solve the resource calculation of sensor network and improve the efficiency of calculation.

4. Simulation Results and Performance Analysis

In order to verify the performance of resource joint allocation optimization algorithm (ECROA) based on edge computing, MATLAB is used in this section to implement various performance simulation comparisons. First, by analysing the energy consumption, the load balancing constraint is determined. Secondly, using the joint control and optimization algorithm of Information distribution (PCOA), multichannel multihop algorithm (MCMH) and time division multiple access (TDMA) in the wireless sensor network to compare with the algorithm in this paper, the advantages of the algorithm in this paper ECROA are analysed. Finally, the influence of different edge computing resources on the allocation efficiency of the algorithm proposed in this paper is analysed.

4.1. Impact of Parameter on Network Capacity and Energy Consumption

Before performing comparative analysis, it is necessary to determine the value of ff in the load balancing evaluation model. The nodes are randomly distributed in the range of 40 m × 40  m. The network structure is shown in Figure 6(a). The number of nodes and links are 28 and 27. Numbers {1, 2, …, 30} represent the position represented by the node. It can be seen from the figure that this algorithm realizes conflict-free communication between links, and the number of links in each time slot is equal. This is because fairness is considered when allocating time slots.

A large number of experiments show that the scheme has no capability of converging due to the narrowing of the selection range, when . Therefore, they are set to 400, 450, 500, and 550, respectively, and 10 experiments are carried out for each parameter. It can be seen from the graph that the smaller the energy consumption will lead to larger network capacity. This is because all above factors are interacting and contradictory, and the greater is the impact. Therefore, the removal of load balancing constraints will improve network capacity and decrease energy consumption. Therefore, considering the above factors, it can be taken as  = 500.

Since the methods are various, the influence of different dominated solutions on network performance is analysed. The formula of the equilibrium solution mentioned above is obtained from the Pareto solution set already obtained. The results are shown in Figure 7. Among them, the left and right graphs, respectively, represent figures under the solution with the best network capacity and the nondominated solution with the best energy consumption. In the figure, the numbers {1, 2, ..., 30} indicate the link ID, and different channels are represented by different identifiers. It can be found from the figure that multifarious schemes are completely multifarious.

4.2. Comparison of Different Optimization Algorithms

In this section, first analyse the interference situation of each link in the network of the edge computing-based optimization algorithm of WSN resource allocation ECROA and algorithm PCOA, MCMH and TDMA, and the interference situation of each link in the network as shown in Figure 8(a).

It can be seen from the figure that the link interference of the ECROA algorithm is lower than that of the PCOA, MCMH [24], and TDMA [25] algorithms. In the ECROA algorithm, even some links have almost zero interference. This is because the ECROA algorithm jointly optimizes time slot scheduling. In order to further analyse the interference situation in the network, the average interference of all links in the network is recorded when the number of nodes gradually changes from 5 to 30, as shown in the Figure 8(b). The average interference in the PCOA, MCMH, and TDMA algorithms also increase, but in the ECROA algorithm, the average interference hardly changes with the number of nodes. In addition, the average interference of ECROA algorithm is always lower than that of PCOA, MCMH, and TDMA algorithms.

4.3. Analysis of Optimal Benefits of Different Edge Resource Scheduling

In order to more intuitively compare the impact of different edge resources on the joint allocation efficiency of wireless sensor network resources, here N = 5000,  = 2,  = 0.00003, and  = 0.0004 are used as the benchmark test scenarios in Figure 9 base solid line). Similarly, the life cycle of perception applications is still 100 seconds. By changing the two different parameters, it can be seen that the curve change trend in the figure is very different. In these two figures, the abscissa represents the execution time of the mobile swarm intelligence application used for edge computing. The ordinate represents the amount of sensing data that the wireless sensor can receive at the current time point. Therefore, the graph can intuitively reflect the stage during the execution of the edge-computing server that can harvest the most perceptual data. At the same time, the area of the graph formed by the curve and the horizontal axis in the figure is the total amount of sensory data collected under the corresponding scene parameters. The analysis results of the influence of various parameters on the efficiency of joint allocation of wireless sensor network resources are shown in Figure 9.

By comparing Figures 9(a) and 9(b), it can be found that the number of servers used for edge computing will affect the total amount of sensing data and the sensing efficiency. It is not the same as renting more base stations as the edge. It is obviously more cost-effective to serve nodes and increase the communication frequency of base stations and wireless sensor networks. When the communication frequency between the base station and the mobile device reaches a certain bottleneck, more base stations are rented as edge servers at this time, which is more cost-effective. On the other hand, renting more base stations means that the wireless sensor network covers a larger area. As the target area expands, increasing the number of mobile devices participating in-group intelligence perception can significantly improve the execution efficiency of group intelligence perception.

5. Conclusions

Aiming at the problem of resource allocation optimization in WSN, a resource allocation optimization algorithm is adopted. Through the analysis and understanding of the resource allocation tasks of wireless sensor networks, a multi-interface and multichannel sensor network is first proposed. At the same time, mobile edge computing and mobile cloud computing have many similarities and can even be regarded as a special form of mobile cloud computing. It disperses computing resources at the edge of the network and replaces centralized data centres. Combining these advantages of edge computing, our optimization algorithm model is employed. The simulation results exhibit that, compared with the traditional distribution algorithm, it can further guarantee the user's service quality and extend the equipment use time.

Data Availability

No data were used to support this article.

Informed consent was obtained from all individual participants included in the study references.

Conflicts of Interest

The authors declare that there are no conflicts of interest.

Acknowledgments

This work was supported by the Xiangyang Science and Technology Plan (High-tech field, Grant no. 2020ABH001191), Hubei University of Arts and Science Scientific Research Starting Foundation (Grant nos. 2059073 and 2059074), the Basic Soft Science Research Projects of Wenzhou Science and Technology Bureau (Grant no. R20180012), the Zhejiang Philosophy and Social Sciences Foundation (Grant no. 19NDJC145YB), and Zhejiang Public Welfare Technology Application Research Project (Grant no. LGG19F020004).