Dynamic Detection and Placement for VSFs over Edge Computing Scenarios: An ACO-Based Approach

As an extension of cloud computing, the edge computing has become an important pattern to deal with novel service scenarios of the Internet of Everything (IoE), especially for the rapidly increasing different kinds of service requests from edge equipment. It is still a great challenge to satisfy the demands of delay-sensitive applications, so as to optimize the service provision delay for edge equipment under 5G. In this paper, by introducing virtualized service functions (VSFs) into edge computing pattern, the mechanism of service function detection and placement among multiple Edge Computing Servers (ECSs) is proposed. We firstly improve the Ant colony optimization (ACO) method to adapt to the situation that the service requests may frequently change from different edge network domains. Based on the improved ACO, a scheme of searching for the locations (i.e., ECSs) of the requested service functions is devised, so as to optimize the service searching delay. )en, a service function placement scheme is presented, and it deploys most of appropriate service functions in each ECS by predicting the future requested frequencies of functions, which further reduces the overall service provision delay. In addition, it also improves the ECS computing capacity utilization. )e simulation results show that the proposed mechanism is feasible and effective.


Introduction
e 5th-generation mobile system (5G) is gradually integrating into people's daily life. e requirements of the novel service scenarios brought by the 5G have changed significantly [1]. For example, the delay sensitivity has become one of the most important service demands of edge equipment. Many types of research have been done on providing services mainly by the cloud computing center due to its powerful computing capacity, which enables almost all kinds of virtualized service functions (VSFs) [2,3] to be placed and performed there. However, the cloud computing servers are usually located far away from most of network edges. With the rapid increasing service requests from mobile equipment that mainly locates at the network edges, the service provision based on the conventional cloud computing may lead to problems such as much higher transmission delay and serious congestion [4]. As an extension of cloud computing, the edge computing deploys the service provision capability near to network edges where most of service requests generate [5,6]. Its distributed edge computing servers (ECSs) locate much closer to edge equipment so as to adapt to the service provision delay demand. e 5G is able to support high-speed data transmission, which significantly decreases the service delivery delay of ECSs [7]. However, comparing to the service cluster (SC) in the cloud computing center, each ECS's limited computing capacity means that it can only provide some kinds of services due to the limited number of VSFs placed in it [8]. It is hard for an ECS to satisfy all kinds of service requests for edge equipment, because the corresponding VSFs may have not yet been placed in this ECS when such requests arrive. And the method, by which all such service requests are dealt with by the remote SC or the corresponding VSFs are instantly migrated from the remote SC to this ECS, is obviously unsustainable, especially when the network load is heavy [9]. Considering the fact that other ECSs locating much closer than the SC may have already been placed such VSFs, the corresponding services can be provided by one of these ECSs. How to effectively find an ECS that currently contains a certain VSF becomes a key issue. In practice, a tremendous amount of different kinds of service requests are constantly generated and delivered, which leave the changing traces of recent service provision information in corresponding equipment [10]. In this paper, the VSF concentration on links is presented by leveraging the above changing traces, based on which an improved ACO-inspired service function detection scheme is devised further to effectively search for the placed locations (i.e., nearby ECSs) of the requested VSFs. It optimizes the concentration updating efficiency to overcome the high delay problem caused by several rounds of iteration of the conventional ACO method.
In addition, an ECS should adapt to the frequent changes in service requests by deploying appropriate VSFs in it in time. It is impossible for an ECS to contain all VSFs due to its limited computing capacity [9]. In fact, a lot of service requests are regional and periodic for an ECS [11]. at is, an ECS may often provide some certain kinds of services due to the working features of its nearby equipment [12]. However, the ECS also may be requested the VSFs that have not yet been placed in it because new applications become popular recently. We take the recent frequencies of the VSFs being performed and requested into account, and the VSF placement scheme is devised in this paper. It enables an ECS to retain the already deployed VSFs with higher being performed frequencies in it and migrate the not yet deployed VSFs with higher being requested frequencies to it, respectively. In this approach, the VSF detection delay and the service delivery delay can be further optimized.
Some types of research have been done on service placement and migration over edge computing scenarios (e.g., [13][14][15][16]). In [13], it introduces a framework for optimal placement of service replicas proactively in the 5G edge network. It deploys the multimedia service instances on the trajectory edge nodes by integrating the user's path prediction model, so as to provide an optimal deployment technique that traded off between maximizing the QoE and minimizing the deployment cost. In [14], it studies the container-based service migration problem in edge computing and proposes a service migration mechanism based on mobility awareness. Its service migration mechanism firstly triggers the service migration according to the service density of the current node and then selects the service and the corresponding destination node for the optimization object to minimize the service delay. In [15], it proposes a novel service migration policy method based on deep reinforcement learning and dynamic adaptation in multiaccess edge computing. It innovatively analyzes the different states of edge network quantitatively and applies deep Q-learning to migration methods, which can adjust the learning rate adaptively to implement rapid convergence in the learning process. In [16], it combines prediction mechanism and migration research together to optimize the migration of VNF. It built a system cost evaluation model integrating bandwidth utilization and migration time, and devised a heuristic algorithm to obtain the near-optimal solution. However, they mainly focus on instantly deploying functions on real-time service demands or migrating functions based on long-term iterative learning, which cannot well adapt to the service requests with frequent changes and delay sensitivity.
In this paper, the mechanism of ACO-based VSF detection and placement (AVDP) is proposed, so as to minimize the service provision delay to the edge equipment and optimize the ECS computing capacity utilization.
e major contribution and innovations can be summarized as follows. e VSF concentration on links is presented to reflect the frequencies of VSFs being detected recently, and the improved ACO-inspired VSF detection scheme based on the VSF concentration is devised to efficiently search for the placed locations of the requested VSFs. It adapts to the novel service scenarios that the service requests for edge equipment and the deployed locations of VSFs may frequently change under 5G. Furthermore, the scheme of dynamically deploying appropriate VSFs in each ECS is devised, and it places VSFs by predicting the future requested frequencies of VSFs according to the variations of VSFs concentration on links and VSFs requested number in ECSs.
us, the overall service provision delay is significantly optimized and the ECS computing capacity utilization is efficiently improved. e remainder of this paper is structured as follows. In Section 2, we present the system framework and workflow of the proposed AVDP. In Section 3, we define the VSF detection ant and the VSF concentration, and devise the scheme of searching for VSFs among multiple ECSs based on them. In Section 4, we devise the scheme of placing appropriate VSFs in suitable ECSs with the ECS computing capacity utilization considered. In Section 5, we present simulation experiments and results. Finally, Section 6 concludes the paper.

System Framework
e system framework is shown in Figure 1. e conventional cloud computing center is usually located far away from network edges. It can provide almost all kinds of services due to the powerful computing capacity of the service cluster (SC), and VSFs placed in it can be dispatched to ECSs. ECSs are distributed in end network domains (ENDs) where most of service requests generate to efficiently meet the delay sensitivity demand of edge equipment. e service function pool (SFP) in each ECS only contains some VSFs because of the limited computing capacity. e VSFs already deployed in an ECS can be replaced by other VSFs due to the changing service scenarios in practice, and VSFs can be migrated from the SC or other ECSs. In addition, each switching equipment (SE) updates a table named VSFs detection record (VDR). e VDR is to reflect the current probabilities of successfully finding the locations of the requested VSFs by different next hops, so as to efficiently determine the suitable ECSs that can provide corresponding services. e overall workflow of the system is shown in Figure 2; here, the number is the action order.

VSFs Detection
In order to minimize the service provision delay for edge equipment, most of services should be provided by the near ECSs rather than mainly by the SC that is far away from ENDs. It is a key issue to find the ECSs that have already been placed in the requested VSFs as soon as possible. In this section, the VSF detection ant and the VSF concentration are defined in our proposed scheme. e VSF detection ants are sent by the source SE that receives the service request to search for the locations (i.e., ECS) of the requested VSF according to this VSF concentration on links.
e information on detecting the VSF is laid over the ants' trails, and the accumulated amount of information is regarded as the VSF concentration that is recorded and updated in the VDR.
In practice, the VSF concentration on links decreases with time. It also increases according to the ants' feedback if these ants have found the locations (i.e., ECSs) of the requested VSF. For instance, if the requested VSF is found by any of the VSF detection ants within the ant's living period, the ant returns back to the source SE, and the VSF concentration on the corresponding links increases. Comparing to the conventional ACO method, our presented VSF concentration updating does not depend on multiple iterations of the same group of ants. In the actual network environment, because of a large number of ongoing service requests for edge equipment, different VSF detection ants can be generated by SEs at any time, which enables different VSF concentrations continuously and efficiently to change in practice combined with the devised detection ant's feedback method.

e VSF Detection Ant. In this paper, a VSF detection ant is defined as a four-tuple
Here, DA i is the unique identifier of a detection ant; VSF k indicates the VSF that is detected by DA i ; SSE i is the set of SEs that DA i has passed; HDA i denotes the number of survival hops of DA i .
In detail, DA i is one of the ants generated by the source SE that receives the service request and is forwarded to search for VSF k according to the VSF k concentration on links. e SEs passed by DA i are orderly recorded in SSE i to avoid loopback. Meanwhile, once DA i finds VSF k , it returns back to the source SE according to SSE i . In addition, an ant is not allowed to detect the ECSs that are far away from the . . .

e VSF Detection Concentration.
We assume two factors will influence the VSF concentration on links, which are time and ants' feedback. VCL is defined as the VSF k concentration on the link from the SE SE u to the SE SE v at time t, and its value changes with time. At time t + 1, its value is shown as follows: (1) are the remaining concentration after volatilizing and the additive concentration after ants' feedback from t to t + 1, respectively. ey are defined as follows: (2) Different from the conventional ACO method, the VSF remaining concentration volatilizes faster and faster with time, because the frequent changing service requests from edge equipment may lead to the frequent migrating of VSFs. RVCL VSF k SE u ,SE v (t, t + 1) is designed to be continuously differentiable, and c is a positive constant. e VSF additive concentration can only be brought by the survival ants that have found the requested VSF. e closer the link to the ECS that contains the requested VSF, the more this VSF concentration on the link increases. AVCL VSF k SE u ,SE v (t, t + 1) is designed to promote the searching efficiency for the following ants. m is the number of the VSF k detection ants that have returned back between t and t + 1. And x w is related to the sequential position of SE u in SSE i , and it is defined as follows:

e Forwarding Probability.
SE v is defined as an adjacent SE of SE u if a detection ant can be forwarded by SE u to SE v by only one hop. Not all adjacent SEs of SE u can receive the detection ants from SE u due to the limited number of the ants generated by the source SE. According to 〈DA i , VSF k , SSE i , HDA i 〉, we define SASE u is the set of adjacent SEs of SE u , and SASE VSF k u is the set of adjacent SEs that can receive the VSF k detection ant (e.g., DA i ) at the next hop from SE u , which are shown as follows: When searching for VSF k , DA i stops searching without any feedback if SASE VSF k u is empty. We assume FP VSF k SE u ,SE v (t + 1) is the forwarding probability that DA i is forwarded from SE u to SE v , SE v ∈ SASE u . Here, the adjacent SE with higher FP VSF k SE u ,SE v (t + 1) only means that it can be forwarded more VSF k detection ants rather than be forwarded all VSF k detection ants. e FP VSF k SE u ,SE v (t + 1) is defined as follows: Especially, FP |. e working process of searching for the VSF k is shown as Algorithm 1. In detail, firstly, when an SE receives the service request, as the source SE, it generates a certain number of detection ants to search for the requested VSF that is VSF k here (line 2). Secondly, the same kinds of ants are divided into several groups in each arriving SE, with SSE i of each ant being considered to avoid the loopback, the numbers of ants in different groups are determined according to the current concentrations of VSF k on different links. en, different groups of ants are forwarded to adjacent nodes of the current node (lines [3][4][5]. irdly, if an VSF k detection ant finds VSF k , it adds the current node into its SSE i and returns back to the source SE. Meanwhile, the VSF k concentrations on the corresponding searching links update and the current node (i.e., ECS) is added into ECS VSF k (lines [6][7][8][9][10][11]. Else if HDA i of the ant is not zero, the ant adds this node into its SSE i and joins to the nexthop searching (lines [12][13][14]. Otherwise, the ant dies without any feedback (lines [15][16]. Finally, the set of ECSs that are found currently contain VSF k (i.e., ECS VSF k ) is obtained (line 20).

VSFs Placement
In order to optimize the service delivery delay, the ECSs locating near to the ENDs where the service requests generate should have been deployed in or migrated to the requested VSFs. In this paper, two kinds of VSFs that should have been placed in each ECS are considered, which are deployed VSFs (DVSFs) and migrated VSFs (MVSFs). DVSFs are the VSFs that have already been deployed in the ECS and are still being massively requested recently. MVSFs are the VSFs that should be migrated to the ECS due to the rapidly growing requests for them recently. erefore, due to the ECS limited computing capacity, the VSFs that have already been deployed but rarely be requested recently in this ECS should be replaced by the MVSFs. e performed frequencies of the already deployed VSFs in an ECS can be estimated according to these VSFs' current concentrations on the links around this ECS. Assume that SASE q is defined as the set of adjacent SEs of the ECS, ECS q . e ratio of performed frequency of VSF k to the performed frequencies of all already deployed VSFs in ECS q from t to t + 1 is defined as RPF VSF k q (t, t + 1), shown as follows: Here, SVSF q (t, t + 1) is the set of VSFs that have been performed in ECS q from t to t + 1.
Let CS VSF k q (t + 1 − m, t + 1) be the concentration stability of VSF k on the links around ECS q during the recent m time periods, shown as follows: Assume RTV and CTV are the threshold values of the VSF's ratio of performed frequency and concentration stability, respectively. e current set of DVSFs that can be retained in ECS q is defined as CSD q , obviously, CSD q ⊆SVSF q (t, t + 1). e VSFs in CSD q should satisfy the following conditions: or RPF VSF k q (t, t + 1) < RTV, Let SCV q (t + 1) be the set of candidate VSFs that have been requested but not yet been deployed in ECS q during the recent m time periods, these VSFs may replace the VSFs in SVSF q (t, t + 1) − CSD q with SCV q (t + 1) ∩ SVSF q (t, t + 1) � ∅ satisfied. Let CSM q be the current set of MVSFs that should be migrated to ECS q , obviously, CSM q ⊆SCV q (t + 1). For the VSF VSF d VSF d ∈ SCV q (t + 1), its total requested number in ECS q during the recent m time periods is defined as TRN VSF d q , and its incremental requested number in ECS q in each recent time period is denoted as follows: Furthermore, the requested number growth rate of VSF d in ECS q in the (h)th day is denoted as follows: In this approach, the VSFs in CSM q can be selected from SCV q (t + 1) by comparing the VSF's requested number growth rate from high to low with the ECS's available computing capacity considered. And these VSFs can be migrated from the SC in the cloud computing center or other ECSs. In addition, a VSF in CSM q may become one element of CSD q if it satisfies the conditions of equations (8) and (9), or equations (10) and (11) in the following time periods.
erefore, the VSFs that should be placed in ECS q before the next time period are the ones belonging to CSD q ∪ CSM q .

e Simulation Setup.
In the simulation, the proposed schemes are implemented in Python and all experiments are performed on a computer with one Intel(R) Core(TM) i7-6700 CPU @ 3.40 GHz and 16 GB of RAM. We evaluate the approaches in two typical and real network topologies (e.g., ISP and backbone networks) with different numbers of nodes and links, called Geant and Interroute, which can be obtained from the Internet Topology Zoo [17]. Specifically, Geant is a middle-scale network topology with 41 nodes and 65 links, and Interroute is a large-scale network topology with 110 nodes and 148 links. ey are shown in Figure 3.

Security and Communication Networks
We assume that the network topology is divided into 6 edge network domains, and one ECS is placed among 10 nodes in the simulation. A variety of VSFs are simulated by ClickOS [18], and it can create small virtual machines, each of which is able to host a VSF. We assume that the computing capacity of each ECS follows a uniform distribution between 100 and 200 units. e number of VSFs requested by each request follows a uniform distribution between 2 and 4, and the type of each VSF is random. e ECS computing capacity needed to support each VSF follows the uniform distribution between 5 and 10 units. e simulation parameters and the corresponding distribution model are motivated by the literature [19,20] that studies the network function provision problem. We compare the proposed AVDP with the scheme of AI-enabled mobile multimedia service instance placement (AMSP) according to [13]. We use the following performance metrics: the service provision delay (SPD), the computing capacity utilization (CCU), and the service access success ratio (SASR).

e Simulation Results.
We compare the SPDs of the two approaches of AVDP and AMSP under Geant and Interroute. e SPD is defined as the time interval from receiving the service request to successfully providing the service. e results are shown in Figures 4 and 5.
As shown in Figures 4 and 5, the SPD of AVDP is always lower than that of AMSP with the number of service requests increasing (i.e., Figure 4). In addition, we also compare the SPDs of the two approaches with the time period increasing under the network load of 10000 service requests (i.e., Figure 5). In more detail, when the number of service Input: SE u / * the source switching equipment * /, VSF k / * the service function that is requested * / Output: ECS VSF k / * the set of ECSs that contain VSF k , * / (1) Begin (2) SE u generates detection ants, each of which is defined as 〈DA i , VSF k , SSE i , HDA i 〉; (3) while the set of VSF k detection ants is not empty do (4) Divide ants into several groups according to the SSE i of each ant and the distributed VSF k concentration (5) Forward different groups to different adjacent nodes of the current node according to equation (5); (6) for each DA i do (7) ifVSF k is found then (8) Add this node into SSE i ; (9) Return back to SE u according to SSE i ; (10) Update VSF k concentrations on links according to equation (2); (11) Add this node (i.e., ECS) into ECS VSF k ; (12) else ifHDA i ≥ 1then (13) Add this node into SSE i ; (14) Join the next-hop searching; (15) else ifHDA i � 0then (16) Die without any feedback; (17) end if (18) end for (19) end while (20)   requests is low, the SPDs of AVDP and AMSP are 0.079 s and 0.085 s, respectively. When the number of service requests reaches the maximum, the SPD of AVDP just increases by 0.061 s, while the SPD of AMSP increases by 0.125 s. Moreover, when the network load is the heaviest, the SPD of AVDP reduces to 0.132 s with the time period increasing; that is, the SPD of AVDP is optimized with time, while that of AMSP increases to 0.235 s in the same situation. e reasons are as follows. In AVDP, the improved ACO method enables the VSF concentration on links to be updated in time by efficiently accelerating volatilization and enhancing feedback. us, the requested VSFs can be quickly found from the nearest ECSs, which significantly reduces the time overhead of searching for services. Furthermore, AVDP continuously optimizes the deployed locations of VSFs over time, which enables the VSF searching delay of AVDP to be reduced over time. us, the SDP of AVDP is further improved. However, AMSP barely changes over time, it mainly provides services on demands by instantly deploying service functions rather than leveraging already deployed functions. Real-timely deploying most of requested service functions leads to large delay for AMSP to provide new services, especially when the network load becomes heavy.
We compare the CCUs of the two approaches of AVDP and AMSP under Geant and Interroute. e CCU is defined as the ratio of the VSFs performed in an ECS to the total already deployed VSFs in this ECS. e results are shown in Figures 6 and 7.
As shown in Figures 6 and 7, the CCU of AVDP increases with the number of service requests increasing, while that of AMSP decreases when the network load becomes heavy (i.e., Figure 6). We also compare the CCUs of the two approaches with the time period increasing under the network load of 10000 service requests (i.e., Figure 7). In more detail, when the number of service requests is low, the CCUs of AVDP and AMSP are about 77% and 84%,  respectively. With the network load becoming heavy, the CCU of AVDP increases and it reaches about 94% under the network load of 10000 service requests, while that of AVDP drops to 72% at the same network status. Moreover, when the network load is the heaviest, the CCU of AVDP increases from 71% to 93% with the time period increasing while that of AMSP is always keeping about at 72%. at is, the CCU of AVDP continuously optimizes while that of AMSP barely changes over time. e reasons are as follows. AVDP dynamically deploys VSFs by taking the frequencies of the VSFs being requested and performed in an ECS into account. With the number of service requests increasing, the VSFs rarely performed recently can be replaced by the ones with higher requested frequencies in an ECS; thus, the computing capacity of each ECS can be fully used. In addition, the requested VSFs can be efficiently found by AVDP, which enables the appropriate VSFs to be more frequently performed in each ECS. us, the CCU of AVDP is significantly optimized. However, AMSP mainly makes full use of some VSFs that are currently requested frequently in an ECS, and it does not consider replacing already deployed VSFs that are rarely requested by new popular VSFs, which cannot further optimize the ECS computing capacity utilization. In addition, AMSP does not have the ability to achieve the VSF future popularity prediction, and the CCU of AMSP cannot be improved over time.
We compare the SASRs of the two approaches of AVDP and AMSP under Geant and Interroute. e SASR is defined as the ratio of the requests that successfully obtain services to the total requests asking for services. e results are shown in Figures 8 and 9.
As shown in Figures 8 and 9, the SASR of AVDP is much higher than that of AMSP when the number of service requests increases rapidly (Figure 8). We also compare the SASRs of the two approaches with the time period increasing under the network load of 10000 service requests (Figure 9).

Conclusions
In this paper, by introducing VSFs into edge computing pattern, we propose the mechanism of improved ACO-inspired VSFs detection and placement. By efficiently detecting the already deployed locations of VSFs and dynamically placing appropriate VSFs in suitable ECSs, the service provision delay to the edge equipment and the computing capacity utilization of each ECS under the edge computing scenario are significantly optimized. In this mechanism, the approach of searching for the requested VSFs from multiple ECSs is devised, and it improves the ACO method to adapt to the edge computing scenario by defining the VSF detection ant and the VSF concentration on links. Furthermore, the approach of deploying VSFs in each ECS is devised, and it takes the frequency variations of the VSF being performed and being requested in an ECS into account, so as to select the most appropriate VSFs to place in the ECS with this ECS computing capacity utilization considered. Simulation results show that the proposed mechanism has significant improvements in the service provision delay optimization and the computing capacity utilization improvement compared with the current state of the art.
Data Availability e data used in this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.