{'fraction_non_alphanumeric': 0.03107234170551963, 'fraction_numerical': 0.010618138065874567, 'mean_word_length': 4.679108302015716, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Distributed Virtual Network Function Placement Approach in Satellite Edge and Cloud Computing

Satellite edge computing has become a promising way to provide computing services for Internet of Things (IoT) devices in remote areas, which are out of the coverage of terrestrial networks, nevertheless, it is not suitable for large-scale IoT devices due to the resource limitation of satellites. Cloud computing can provide sufficient available resources for IoT devices but it does not meet the service requirements of delay sensitive users as high network latency. Collaborative edge and cloud computing is to facilitate flexible service provisioning for numerous IoT devices by incorporating the advantages of edge and cloud computing. In this paper, we investigate the virtual network function (VNF) placement problem in collaborative satellite edge and cloud computing to minimize the satellite network bandwidth usage and the service end-to-end delay. We formulate the VNF placement problem as an integer non-linear programming problem and propose a distributed VNF placement (D-VNFP) algorithm to address it, as the VNF placement problem is NP-hard. The experiments are conducted to evaluate the effectiveness of the proposed D-VNFP algorithm. The results show that the proposed D-VNFP algorithm outperforms the existing baseline algorithms of Greedy and Viterbi for solving the VNF placement problem in satellite edge and cloud computing.

For computation offloading in cloud computing, LEO satellite networks are responsible for collecting the data produced by remote IoT devices and transmitting them to ground cloud data centers via inter-satellite links (ISLs) [5]. The computation tasks from remote IoT devices are processed by cloud servers and the processing results will be sent back by satellite networks to these remote IoT devices. Cloud computing can provide sufficient available resources for remote IoT devices on-demand by introducing software-defined network (SDN) and network function virtualization (NFV) [9], [10]. Nevertheless, cloud data centers are usually deployed far away from IoT devices. When computation tasks from IoT devices are offloaded to cloud servers by satellite networks, it will lead to high network latency as well as heavy network load, which can significantly degrade their processing performance [11].
Satellite edge computing has been considered as a new paradigm to provide computing services on the side of near IoT devices [6]. Specifically, we can deploy edge servers on LEO satellites and provide satellite edge computing services for remote IoT devices without the coverage of terrestrial networks, which can significantly improve the real-time processing performance of computation tasks [7]. As a result, satellite edge computing is suitable to provide edge computing services for delay sensitive devices in some remote areas. However, LEO satellites have the resource limitation of computing, storage, and bandwidth due to satellite physical constraints (e.g., satellite volume, energy, weight, etc.) [4]. That is, satellite edge computing can not support edge computing services very well for large-scale IoT services. If the resource requirements of IoT devices exceed the resource capacities of satellites, the deployment failure of tasks will happen [12].
Considering that cloud computing has sufficient available resources and can provide flexible service provisioning for IoT devices while edge computing can support computing services for delay sensitive devices, collaborative edge and cloud computing has been investigated by combining the advantages of edge and cloud [13], [14]. The collaborative edge and cloud computing framework is composed of IoT devices, edge servers, and cloud centers, where computing resources can be provided for computation tasks in a hierarchical way [15]. Delay sensitive services can be preferentially offloaded to edge servers, while other services can be offloaded to cloud data centers by transmission networks for further processing.
Note that the resource limitation of satellites is more serious compared with traditional edge computing. In order to improve the resource utilization of satellite networks in satellite edge and cloud computing, NFV combined with SDN has been a promising approach in orchestrating virtual network functions (VNFs) and managing network resources, where NFV can facilitate the decoupling of software and hardware, enable network functions to run on commercial servers, and abstract the available resources of satellite networks to be a resource pool to provide computing services for IoT devices on-demand. Specifically, a computation task can be divided into several interdependent network functions to deploy on different satellites, the data between adjacent network functions will be steered by inter-satellite links and we need to guarantee that the data flow can traverse all network functions in specific order. Thus, a computation task can be carried out by multiple satellites in a cooperative way. In addition, for centralized network resource management approaches, there exists high processing delay in satellite edge computing environment due to the property of satellite networks and the real-time computing service can be not satisfied for IoT devices. Furthermore, centralized network resource management controllers on the ground can be easily destroyed as disastrous events happen, such as earth quake, tsunami, and war. As a result, decentralized network resource management approaches are worth to investigating in satellite edge and cloud computing. However, to the best of our knowledge, no existing work focuses on the VNF placement problem by decentralized optimization algorithms in collaborative satellite edge and cloud computing [3].
In our previous work [16], we proposed a potential game approach to address the VNF placement problem in satellite edge computing, where the satellite coverage for IoT devices is not considered as well as collaborative satellite edge and cloud computing. In this paper, we study the VNF placement problem in collaborative satellite edge and cloud computing, where the architecture consists of three-layer computing services including IoT devices, edge servers, and cloud servers, as shown in Fig. 1. IoT devices, which have low computing capacity and battery power, are distributed to offer environment observation and local computing in remote areas. Satellites can realize traffic routing and edge computing for computation tasks. Cloud servers can provide computing services for delay insensitive tasks. We consider a IoT device as a user and its task as a user request, which consists of several VNFs in order and is viewed as a service chaining [17].
For satellite edge computing, we can deploy the VNFs from a user request to multiple satellite edge servers to be executed in a collaborative way and the data between different VNFs will be routed by inter-satellite links. If user requests can not be deployed to edge servers as the resource limitation of satellites, then such deployment failed user requests will be offloaded by satellite networks to cloud servers for further processing. We assume that a IoT user can be covered by multiple satellites and thus there are various strategies related to user access and VNF placement, which have a significant influence on the performance in terms of network bandwidth usage and user end-to-end delay, so we consider the impact of different satellite coverage areas on the VNF placement solution. In addition, if a user request is not covered by any satellites or the resource requirements are not satisfied, then the user request will be considered to carry out locally.
In collaborative satellite edge and cloud computing, we formulate the VNF placement problem as an integer nonlinear programming problem and our aim is to minimize the satellite network bandwidth usage and the user end-to-end delay. Considering that centralized optimization approaches have high processing delay for satellite edge and cloud computing, we propose a distributed virtual network function placement (D-VNFP) algorithm to address the VNF placement problem, which is viewed as NP-hard [18], [19]. For the proposed D-VNFP algorithm, each satellite is considered as an agent and can independently make the VNF deployment decision for each user request according to the current satellite network state and the resource requirements. These deployment strategies for user requests can be performed by competing available resources with each other in parallel. In this instance, some user requests may experience deployment failure as the available resources of satellites are used by other user requests. For such deployment failed user requests, we can update the satellite network resource state and then run the D-VNFP algorithm again to obtain new deployment strategies. When all user requests are deployed or any user request can no longer be deployed due to the resource limitation of satellites, the D-VNFP algorithm will terminate. In order to evaluate the performance of the proposed D-VNFP algorithm, the experiments are conducted in collaborative satellite edge and cloud computing environment. The main contributions are summarized as follows.
• We study the VNF placement problem in collaborative satellite edge and cloud computing and build the hierarchical satellite edge and cloud computing framework. • We formulate the VNF placement problem as an integer non-linear programming problem to minimize the network bandwidth usage and the user end-to-end delay. Then we propose a distributed virtual network function placement algorithm to tackle the problem. • We evaluate the performance of the proposed D-VNFP algorithm in collaborative satellite edge and cloud computing environment. The results show that the proposed D-VNFP algorithm has better performance than the two existing baseline algorithms of Greedy and Viterbi.
The remainder of this paper is organized as follows. Section II briefly reviews related work concerning satellite-based IoT, satellite edge computing, and collaborative edge and cloud computing. Section III introduces the system model in collaborative satellite edge and cloud computing. We formulate the VNF placement problem in Section IV. We propose a distributed virtual network function placement algorithm for addressing the VNF placement problem in Section V. In Section VI, we evaluate the performance of the proposed D-VNFP algorithm in static and dynamic environments. Finally, we provide the conclusion of this paper in Section VII.

II. RELATED WORK
In this section, we firstly introduce satellite-based IoT applications. Then we present the related work about computation offloading in satellite edge computing. Finally, we review the literature related to collaborative edge and cloud computing.

A. Satellite-based IoT
Satellite networks can provide global seamless coverage and agile service provisioning for remote IoT devices, where satellite networks can provide access and transmission services for IoT devices which are lack of terrestrial networks [2]- [4], [20]- [23]. LEO satellites, which have low deployment cost and transmission delay, make a wide range of IoT services possible, such as remote sensing, earth observation, and ocean transportation [4]. Considering that computation tasks of IoT devices need to be offloaded to cloud servers, the authors in [2] proposed an energy efficient random access scheme for IoT devices to minimize energy consumption of user sides, the authors in [20] proposed a random pattern multiplexing approach for random access to improve the performance of satellite-based IoT networks. The authors in [23] presented the green data collection approach by LEO satellites in geodistributed IoT networks. The existing work did not discuss satellite edge computing. In this paper, we study the problem of edge and cloud computing in satellite-based IoT networks.

B. Satellite Edge Computing
Satellite edge computing can provide flexible edge computing services for remote IoT devices by deploying edge servers on LEO satellites and introducing network virtualization [6]- [8]. In [5], the authors discussed an architecture of satelliteterrestrial integrated edge computing networks, where they integrated mobile edge computing with the satellite network in order to implement satellite edge computing, and provided a task processing procedure in detail. The authors in [7] jointly optimized the resource allocation of communication and computation for mobile edge computing to minimize the resource utilization and the end-to-end delay in maritime networks, and designed a deep reinforcement learning approach to address the problem. The authors in [11] considered that computing servers can be deployed on edge nodes (e.g., LEO satellites and base stations) in software-defined satelliteterrestrial networks and used a deep Q-Learning approach to jointly optimize the resource allocation of network, cache, and computation. The authors in [8] discussed computation offloading in satellite-based vehicle-to-vehicle communication systems, where they considered the optimization problem of offloading decision, computing and communication resource allocation to minimize the end-to-end delay cost and proposed a markov decision process approach to tackle the problem. For these existing work, a computation task is considered as a whole to allocate network resources. In this paper, we assume that a user request consists of several VNFs in order and is viewed as a service chaining, and the VNF placement problem is investigated to jointly optimize the network bandwidth usage and the user end-to-end delay.

C. Collaborative Edge and Cloud Computing
Collaborative edge and cloud computing can significantly improve the quality of experience for IoT users and enhance their processing performance [14], [15], [24]- [26]. In [15], the authors proposed a three-tier edge-cloud collaborative residential energy management architecture for reducing network latency and energy cost, and presented a priority-based demand ratio scheduling strategy to deal with the energy management problem. The authors in [14] discussed a joint resource allocation problem of communication and computation while minimizing the network latency in collaborative edge and cloud computing. The authors in [25] proposed a dynamic deep-learning-based virtual edge node placement scheme in an edge and cloud environment, where the pay-as-you-go and spot instance model of cloud computing was applied to provide computing resources with minimum cost, and they used the long short-term memory in order to predict the information of user requests and resource prices. The authors in [26] jointly optimized offloading decision, transmission power, and radio resource allocation on the uplink channel in multi-tier edge and cloud computing, and minimized the network computational cost and the user energy consumption. However, in this paper, we discuss the VNF placement problem in collaborative satellite edge and cloud computing, where we jointly consider the coverage of satellites, VNF deployment, and traffic routing in the system model, and formulate the resource allocation problem of computing, communication, and storage. We also propose a decentralized virtual network function placement algorithm to address the problem.

III. SYSTEM MODEL
In this section, we firstly provide the hierarchical architecture of collaborative satellite edge and cloud computing and the computation offloading model. Then we discuss the user request model and the VNF placement problem in collaborative satellite edge and cloud computing.

A. Satellite Edge and Cloud Computing Architecture
For the VNF placement problem in collaborative satellite edge and cloud computing, we consider a hierarchical computation offloading architecture, which includes IoT users, LEO satellites, and a ground cloud data center, as shown in Fig. 1 transmitted by inter-satellite links to satellite edge servers and a ground cloud data center for further processing. Edge servers on LEO satellites can provide computing services for delay sensitive user requests on the side of users. A ground cloud data center can offer sufficient resource provisioning for user requests on-demand but there exists high processing delay due to the property of satellite networks. Fig. 2 describes the computation offloading strategy in collaborative satellite edge and cloud computing. Due to the disadvantages of local user computing and cloud computing, satellite edge computing has a high priority to deploy computation tasks. When the resource requirements of user requests are more than the resource limitation of satellites, we consider to offload user requests to the remote cloud data center for further processing while guaranteeing their service quality. However, some user requests will have deployment failure as they are not in the coverage of satellites or their resource requirements can not be satisfied by satellite edge and cloud, deployment failed user requests will be performed locally [12]. Furthermore, centralized controllers are not used to orchestrate service functions and manage network resources in the proposed collaborative satellite edge and cloud architecture. To this end, we present a distributed resource allocation algorithm to manage the network resources and deploy VNFs for user requests. We assume that the network state and the user deployment strategy can be shared by a message synchronization mechanism. We denote the LEO satellite network as a graph ( , ), where the parameters and represent the set of satellites and the set of inter-satellite links, respectively. The number of satellites in the set is and indicates the -th LEO satellite. The set of resource types supported by the satellite is indicated as = { , } due to that we just consider central processing unit (CPU) and memory for computing service in this paper. The -th resource capacity for the satellite is expressed by , where the parameter represents the supported resource type, e.g., CPU and memory. There are four inter-satellite links for a satellite, in which two links are from adjacent satellites in the same orbit and the other two links are from inter-orbit adjacent satellites. For the intersatellite link , ∀ ∈ , we indicate the bandwidth capacity as and the transmission delay as , respectively. Furthermore, we assume that there are sufficient resources for user requests in the cloud data center . We use , to indicate the link between the satellite and the cloud data center , , to indicate the bandwidth capacity, and , to indicate the transmission delay. We also assume that the cloud data center is in the coverage of at least one LEO satellite and can communicate with these satellites, which cover the cloud data center, by the satellite-ground link.

B. User Requests
The set of user requests is represented as , where the number of user requests is and the -th user request is indicated as . We describe a user request as a service chaining, which is composed of multiple VNFs in particular order, the user request can be considered as a directed graph ( , ). We use to indicate the set of VNFs for the user request , where the VNF , , , ∈ , represents the -th VNF of the user request , the VNF ,1 = , represents the source access function, and the VNF , | | = , represents the destination access function. For the user request , we indicate the source as a sensor to collect the data and the destination as an actuator to interact with the environment by the processing results. We assume that the source and the destination may be different but known in advance. All the VNFs except the source access function and the destination access function have the requirements of CPU, memory, and the computing time. We denote the -th resource requirements for the VNF , as , and the computing time as , , respectively. We use to indicate the set of edges for the user request , where we indicate the edge between the adjacent VNFs , 1 and , 2 as ℎ 1 , 2 and the bandwidth requirements of the edge ℎ 1 , 2 as 1 , 2 . The maximum acceptable delay for the user request is denoted as . Supposing that all IoT users are distributed in remote areas that are out of the coverage of terrestrial networks, only these IoT users in the coverage of satellites can offload their computation tasks to satellite edge and cloud servers. Each IoT user can communicate with these satellites which cover the IoT user, IoT users without the coverage of satellites will perform their tasks locally. We consider the number of user requests to come in a time slot as a Poisson distribution ( ) and the running time of each IoT user request as an Exponential distribution ( ).

C. VNF Placement in Satellite Edge and Cloud Computing
In this paper, we discuss the VNF placement problem in collaborative satellite edge and cloud computing, where our aim is to deploy user requests = { 1 , 2 , · · · , } to satellite edge servers = { 1 , 2 , · · · , } and a cloud data center during a time slot while minimizing the network bandwidth usage and the user end-to-end delay. Similar to existing work on edge and cloud computing [12], [27], [28], we consider the VNF placement problem in a quasi-static scenario, where both the LEO satellite network topology and the set of user requests remain unchanged during the computing service period. The number and service requirements of user requests should vary over different computing service periods. All available satellite network resources are virtualized to provide service provisioning for user requests on-demand. Then we use a batch processing model to deploy these user requests to satellite edge and cloud servers during a time slot in dynamic environment.   Sat 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3  at 2 2  at 1   at 6  at 4 4  at 5 { } , , , , For the VNF placement during a time slot, we firstly collect the new user requests to appear in the next time slot and update the current satellite network state as per the availability of the resources used by the completed user requests in the previous time slot. As IoT users have low computing capacity and battery power, the procedure of making the VNF placement decisions can be performed on LEO satellites to improve the real-time processing performance. To be more specific, we send the access information of each user request to one of the source neighbouring satellites and make the VNF placement decision for the user request based on the current satellite network state and the resource requirements, where the neighbouring satellite can be defined as follows.
Definition 1 (Neighbouring Satellite) The user request includes a source and a destination. The source is in the coverage of LEO satellites ( , ), then we consider that these LEO satellites ( , ) are the source neighbouring satellites for the user request . Similarly, the destination is in the coverage of LEO satellites ( , ), then we consider that these LEO satellites ( , ) are the destination neighbouring satellites for the user request .
The VNF placement strategy with minimum network bandwidth usage and end-to-end delay will be sent back to the user. These source neighbouring satellites can share the VNF placement strategy by a message synchronization mechanism to build the service chaining for the user request, where the VNF , is deployed on one source neighbouring satellite as an access function for offloading the task to satellite edge and cloud, and the VNF , is deployed on one destination neighbouring satellite as an access function for forwarding the processing results to the destination. However, different VNF placement strategies for a user request have a significant influence on the deployment cost in terms of network bandwidth usage and user end-to-end delay.
In order to better describe the VNF placement problem in collaborative satellite edge and cloud computing, we provide an example of deploying user requests in collaborative satellite edge and cloud computing, as shown in Fig. 3. There are 6 LEO satellites, e.g., 1 , 2 , · · · , 6 . Each LEO satellite, which hosts an edge server, can cover a particular ground area and provide computing services for user requests. These LEO satellites are connected with inter-satellite links and can steer the data flow from user requests with each other. There are also 10 user requests, e.g., 1 , 2 , · · · , 10 , and a cloud data center distributed in the ground area, where the data center is in the coverage of the satellite 5 . Considering that a user request can just communicate with its neighbouring satellites, the VNFs 1, , 1,2 , 1,3 , and 1, for the user request 1 , which is in the coverage of the satellite 1 , will be deployed to the satellite 1 . The user request 5 is in the coverage of the satellites 1 and 4 , and can communicate with the two neighbouring satellites, respectively. The user request 5 can communicate with the satellite 4 to deploy the VNF 5,2 to the satellite 4 and the VNF 5,3 to the satellite 1 , where we deploy the VNFs 5, and 5, to the satellites 4 and 1 , respectively, the processing results will be sent back to the user request 5 by the satellite 1 . When the available resources of the satellite network are less than the resource requirements of user requests, these user requests will be offloaded to the cloud data center by the satellite network. For example, the user request 9 can be offloaded to the cloud data center by the satellites 6 and 5 , and the user request 2 can be offloaded to the cloud data center by the satellites 2 and 5 . The VNFs 2,2 , 2,3 , 9,2 , and 9,3 for the two user requests 2 and 9 can be executed in the cloud data center, where the VNFs 2, and 2, are deployed to the satellite 2 , and the VNFs 9, and 9, are deployed to the satellite 6 . However, the user request 10 will be carried out locally as it is out of the coverage of any satellites.

IV. PROBLEM FORMULATION
In this section, we formulate the VNF placement problem to jointly minimize the network bandwidth usage and the user end-to-end delay in collaborative satellite edge and cloud computing. User requests distributed in some remote areas are deployed to satellite edge servers and cloud servers while minimizing the satellite network bandwidth usage and the user end-to-end delay, and guaranteeing the service quality of user requests. The main symbols for the proposed VNF placement problem are summarized in Table I.
We use a binary variable = {0, 1} to indicate whether the user request is deployed to satellite edge and cloud servers. The variable = 1 if the user request is deployed to satellite edge and cloud servers, otherwise = 0. We assume that the user request is successfully deployed to satellite edge and cloud servers, then we use another binary variable = {0, 1} to indicate whether satellite edge servers provide computing service for the user request . The variable = 1 if satellite edge servers provide computing service for the user request , otherwise = 0. If the user request is deployed to edge servers, we use a binary variable , = {0, 1} to indicate whether the VNF , is deployed to the satellite . The variable , = 1 if the VNF , is deployed to the satellite , otherwise , = 0.
We assume that the shortest paths between any two satellites 1 and 2 are known in advance and the path set can

Satellite Network ( , )
The satellite network with satellites and links . The set of resources offered by satellite , ∈ . The -th resource capacity of satellite , ∈ . , Bandwidth and delay of link , ∈ . The cloud data center.
, Bandwidth capacity of the link between and .

1
Set of the shortest paths between 1 and 2 .
User Requests The set of user requests. , VNFs and edges of user request . , The -th VNF of user request . , Source and destination of user request . , The -th resource requirements of , . , The computing time of , .
The bandwidth requirements of edge ℎ 1 , 2 . Maximum acceptable delay of user request . Binary Variables = 1 if is deployed to satellite edge and cloud. = 1 if edge servers provide service for . , Objective Variables Average satellite network bandwidth cost. Average user end-to-end delay cost. be indicated as 2 1 . We use a binary variable 1 , 2 , = {0, 1} to indicate whether the path is used by the edge ℎ 1 , 2 . The variable 1 , 2 , = 1 if the path is used by the edge ℎ 1 , 2 , otherwise 1 , 2 , = 0. For the path , it consists of multiple inter-satellite links. We use a binary variable = {0, 1} to indicate whether the link is used by the path . The variable = 1 if the link is used by the path , otherwise = 0. Furthermore, the source of a user request can just only communicate with its neighbouring satellites. We assume that the source of the user request is in the coverage of the satellite , that is where the parameter ( ) indicates the coverage of the satellite . Then the set ( , ) of neighbouring satellites for the source of the user request can be described as In the same way, the set ( , ) of neighbouring satellites for the destination of the user request can be described as We also denote the neighbouring satellites for the cloud data center as When user requests are deployed to satellite edge servers and cloud servers, these neighbouring satellites for user requests and the data center will be considered as access nodes to offload computation tasks and receive the processing results, where the VNFs , and , for the user request will be deployed the source and destination neighbouring satellites to rout the traffic flow, respectively. So we need to specify which one neighbouring satellite is used to be an access node in satellite edge and cloud computing.
For satellite edge and cloud computing, a binary variable , = {0, 1} is used to indicate whether the source neighbouring satellite is an access node for the user request to offload the task, the variable , = 1 if the neighbouring satellite is an access node for the user request to offload the task, otherwise ,1 = 0. Similarly, another binary variable , = {0, 1} is used to indicate whether the destination neighbouring satellite is an access node for the user request to obtain the processing results, the variable , = 1 if the neighbouring satellite is an access node for the user request to obtain the processing results, otherwise , = 0. For cloud computing, the satellite network is just considered as a communication network and can not provide edge computing services for user requests, all computation tasks will be offloaded to the cloud data center for further processing. We use a binary variable , , = {0, 1} to indicate whether the neighbouring satellite of the data center is an access node for the user request to offload the task to the data center, the variable , , = 1 if the neighbouring satellite of the data center is an access node for the user request to offload the task to the data center, otherwise , , = 0. We use another binary variable , , = {0, 1} to indicate whether the neighbouring satellite of the data center is an access node for the user request to send back the processing results, the variable , , = 1 if the neighbouring satellite of the data center is an access node for the user request to send back the processing results, otherwise , , = 0. When we deploy a user request to satellite edge servers and cloud servers, there are multiple physical constraints to be considered, such as network resource capacity, user service quality, and deployment implementation.
If a user request is offloaded to satellite edge servers and cloud servers, we need to indicate one source neighbouring satellite to offload the task and one destination neighbouring satellite to receive the processing results, respectively. Therefore, it is guaranteed that only one source and destination neighbouring satellite for the user request can be used. For ∀ ∈ , ∀ 1 ∈ ( , ), ∀ 2 ∈ ( , ), the access constraint of neighbouring satellites can be represented as When the user request is deployed to satellite edge servers, we consider that each VNF , can be deployed to only one edge server. For ∀ ∈ , the VNF placement constraint can be indicated as For the user request offloaded to satellite edge servers, when the two adjacent VNFs , 1 and , 2 are deployed to the edge servers on the satellites 1 and 2 , respectively, it needs to be guaranteed that one of the shortest paths between the satellites 1 and 2 can be used to route the traffic flow from the VNF , 1 to the VNF , 2 . The path selection constraint can be expressed as As satellite edge servers have the limited resource capacity in terms of CPU and memory, the resource requirements of user requests for each satellite should be less than the available resources. The -th used resources of the satellite is indicated as , . For ∀ ∈ , ∀ ∈ , we can indicate the satellite resource constraint as , + , , · , ≤ , ∀ ∈ , ∀ , ∈ . (8) Furthermore, we also need to guarantee that the bandwidth requirements of user requests should not exceed the available bandwidth resources. When user requests are deployed to satellite edge servers, where ∀ ∈ , ∀ℎ 1 , 2 ∈ , ∀ 1 , 2 ∈ , and ∀ ∈ 2 1 , the bandwidth requirements ,1 of the link , ∀ ∈ , can be represented as If the available resources of satellite edge servers are less than the resource requirements of user requests, we will consider to offload these unassigned user requests to the cloud data center for further processing while guaranteeing their service quality.
To simplify the proposed VNF placement problem, we assume that all the VNFs of a user request except the source access function and the destination access function will be deployed to the cloud data center if a user request needs to be offloaded to the cloud data center. Specifically, the satellite network is responsible for routing the data flow from the source to the cloud data center and sending the processing results back from the cloud data center to the destination. When computation tasks of user requests are offloaded to the cloud data center, the bandwidth requirements for ∀ ∈ , ∀ ∈ 2 1 , and ∀ 1 ∈ ( , ), ∀ 2 ∈ ( ) can be indicated as When the processing results of user requests are sent back from the cloud data center to their destinations, the bandwidth requirements for ∀ ∈ , ∀ ∈ 2 1 , and ∀ 1 ∈ ( ), ∀ 2 ∈ ( , ) can be indicated as Then the bandwidth requirements for user requests, which are deployed to cloud servers, can be indicated as We denote the used bandwidth resources of the link as , , then the bandwidth resource constraint of the link can be represented as , When the user request is deployed to cloud servers, we need to guarantee that there exists available neighbouring satellites for the cloud data center to offload the task and receive the processing results. The neighbouring satellite constraint for ∀ ∈ , ∀ 1 , 2 ∈ ( ) can be described as We also ensure that there exists an available path between the user request and the cloud data center by the satellite network in cloud computing, where the path select constraint for ∀ ∈ , ∀ ∈ 2 1 can be described as Furthermore, the bandwidth requirements between the cloud data center and the neighbouring satellite , ∈ ( ), should be less than the available bandwidth resources. We denote the used bandwidth resources of the link as , , the bandwidth resource constraint for the satellite-ground link , , ∈ ( ) can be indicated as , where , denotes the bandwidth requirements of user requests and can be indicated for ∀ ∈ as , = · (1 − ) · ( ,2 · , , + | |−1, · , , ). (17) When we deploy user requests to satellite edge servers and the cloud data center, we also need to ensure that the processing delay of a user request, which is the sum of the computing delay and the transmission delay, can not exceed the maximum acceptable delay. The computing delay of the user request can be described as We denote the transmission delay from the source to the source neighbouring satellite as , and the transmission delay from the destination neighbouring satellite to the destination as , , respectively. When the user request is deployed to satellite edge servers, for ∀ 1 ∈ ( , ), ∀ 2 ∈ ( , ), the transmission delay ,1 can be indicated as where the transmission delay of inter-satellite links for the user request is denoted as ,1 . For ∀ℎ 1 , 2 ∈ , ∀ ∈ 2 1 , ∀ 1 , 2 ∈ , and ∀ ∈ , ,1 can be described as To simplify the proposed VNF placement problem, we just consider the computing delay of the VNFs for user requests and neglect the processing delay of switches and links in the cloud data center. We assume that the transmission delay between the cloud data center and the neighbouring satellite for computation offloading is , and the transmission delay between the cloud data center and the neighbouring satellite for receiving the processing results is , . When the user request is deployed to the cloud data center , we indicate the transmission delay ,1 ,2 from the source to the cloud data center and the transmission delay ,2 ,2 from the cloud data center to the destination as then the transmission delay ,2 for the user request , which is deployed to cloud servers, can be indicated as The total processing delay constraint of the user request can be expressed as In this paper, our optimization goal is to jointly minimize the average satellite network bandwidth usage and the average user end-to-end delay. According to the above discussion, we indicate the average satellite network bandwidth cost as We indicate the average user end-to-end delay cost as For the VNF placement optimization problem in collaborative satellite edge and cloud, we formulate two optimization subproblems of the satellite network bandwidth cost in equation (25) and the user end-to-end delay cost in equation (26) within the physical network resource and service quality constraints in equations (1)- (24). We can indicate the satellite network bandwidth cost optimization sub-problem as We can also indicate the user end-to-end delay cost optimization sub-problem as In order to address the VNF placement problem, which consists of two sub-optimization problems in equations (27) and (28), we put the user end-to-end optimization problem as the primary optimization objective and the network bandwidth optimization problem as the secondary optimization objective. When we find an optimal solution for the VNF placement problem, we need to firstly ensure the user end-to-end delay minimum and then optimize the network bandwidth cost.

V. PROPOSED ALGORITHM
As shown in existing related work [17]- [19], [29], the VNF placement problem is a NP-hard problem, where the classical NP-hard problems, e.g., Quadratic Assignment Problem (QAP) [30] and Capacitated Plant Location Problem with Single Source Constraints (CPLPSS) [31], can be reduced to the VNF placement problem. Then the optimal solution for the VNF placement problem can only be obtained in small scale problems, but the time for finding the optimal VNF placement solution is unacceptable in large scale problems. Therefore, heuristic algorithms, e.g., DPVC [29], Greedy and Simulation Annealing [17], Viterbi [18], and Genetic Algorithm [32], have been widely used for the VNF placement problem to find an approximate solution in a low computational time.
In this section, we propose a distributed VNF placement (D-VNFP) heuristic algorithm to address the VNF placement problem of minimizing the satellite network bandwidth usage and the user end-to-end delay, as the VNF placement problem is NP-hard. For centralized VNF placement algorithms, satellite network resource state and user requests can be collected to a centralized controller for making the VNF placement decisions and then the strategy results will be sent back by satellite networks. For this reason, there is a high processing delay for making the VNF placement decisions in centralized VNF placement algorithms, especially for satellite networks. As a contrast, the proposed D-VNFP algorithm can make the VNF placement decisions for user requests on LEO satellites in a distributed manner and better provide real-time computing services for delay sensitive user requests. Then we analyze the computation complexity of the proposed D-VNFP algorithm.

A. Distributed VNF Placement Algorithm
For the proposed D-VNFP algorithm, we consider that the satellite hosts the agent , which has the characteristics of environment-aware, autonomy, and social behavior, neighbouring satellites of user requests and the cloud data center serve as their neighbouring agents. The agents can share the network state by a message synchronization mechanism, make their own VNF placement decisions in a self-interested way, and perform user requests in a collaborative way [33]. To better describe the proposed D-VNFP algorithm, we provide the following characteristics of the agents [10].
• Environment-aware: Each agent can obtain the current satellite network state including network topology and available network resources by a message synchronization mechanism. When user requests are to arrive in the next time slot, their neighbouring agents can also obtain the information concerning new user requests. Besides, the agents can acquire the VNF placement strategies of user requests by communicating with each other. • Autonomy: Each agent can make the own VNF placement decisions independently for user requests according to the  current satellite network resource state. Furthermore, each agent can autonomously realize its resource management, data forwarding, and service function running depending on the VNF placement strategy. • Social behavior: Each agent can interact with other agents to obtain the satellite network state and the VNF placement strategy. When the neighbouring agent makes the VNF placement decision for a user request, its multiple neighbouring agents can share the VNF placement strategy. In addition, when a user request is deployed to multiple agents, these related agents can perform the user request in a collaborative way.
The procedure of the proposed D-VNFP algorithm includes two parts of strategy decision and service deployment. For the strategy decision, each agent firstly updates the local information about the current satellite network state by a message synchronization mechanism. When a new user request is to arrive, the access information will be randomly sent to one of the source neighbouring agents. The source neighbouring agent can make the VNF placement decision by the proposed D-VNFP algorithm, which jointly minimizes the network bandwidth usage and the user end-to-end delay. When a user request has multiple neighbouring agents, these neighbouring agents can share the VNF placement strategy with each other. It should be noted that the neighbouring agent, which makes the VNF placement decision, may be not the agent to steer the data produced by the user request.
For the service deployment, a user request usually needs multiple agents to execute in a collaborative way, that is, the VNF placement strategy for a user request may include multiple agents. Therefore, the neighbouring agent with the optimal VNF placement strategy needs to share the VNF placement strategy with other related agents. Based on the VNF placement strategy, we can place the VNFs to the corresponding agents, respectively, and build the service chaining. Each agent is responsible for running service functions and forwarding data independently, all related agents can collaborate to accomplish the user request. When a user request is end, we will break the service chaining and release the used resources, e.g., network bandwidth, CPU, and memory, to be available for new user requests in the next time slot. Furthermore, the VNF placement decisions for all user requests are made on different agents concurrently and thus the agents does not know the VNF placement strategies with each other. As a result, there are potential resource conflicts, which will cause the resource requirements of user requests to exceed the available resources of the satellite network, for these VNF placement strategies of user requests. In order to address the potential resource conflict problem, we use a resource competition mechanism based on a first-comefirst-serve procedure in the proposed D-VNFP algorithm, where each agent can give priority to providing the available resources for the VNF placement strategies that come first. When the required resources of user requests are greater than the agent available resources, then their neighbouring agents will update the local network resource state and perform the proposed D-VNFP algorithm again to find new approximate VNF placement strategies. Fig. 4 illustrates an example of the proposed D-VNFP algorithm. There are 12 satellite agents, e.g., 1 , 2 , · · · , 12 , and each agent can directly communicate with four adjacent agents in the same orbital plane and adjacent one. Three user requests 1 , 2 , and 3 are in coverage of the agent 4 , the agents 5 and 6 , and the agent 12 , respectively. We assume that each user request includes the source access function, the destination access function, and two other service functions, and the user request , = 1, 2, 3, can be represented as { , , ,2 , ,3 , , }. For the user request 1 , the neighbouring agent 4 firstly updates the local network resource state and obtains the user request information. Then the agent Algorithm 1 Proposed Distributed VNF Placement Algorithm.
The proposed D-VNFP algorithm is shown in Algorithm 1. At the beginning, all the agents should share the current network resource state by a message synchronization mechanism. Then the source neighbouring agents for user requests will search their approximate VNF placement strategies by the Viterbi algorithm in satellite edge computing and by the Path Selection algorithm in cloud computing in parallel, where the Viterbi and Path Selection algorithms will be described in detail later. In the proposed D-VNFP algorithm, we give priority to deploying user requests on satellite edge computing by the Viterbi algorithm for reducing the user end-to-end delay. If the available resources on satellite edge servers are insufficient, then we will consider to deploy user requests to cloud servers by the Path Selection algorithm. For the service deployment, the VNF placement strategies for user requests can be executed on the agents simultaneously. When there exists resource conflict for the user request , we will initialize the strategy as = ∅ and put the user request into the list , which is initialized as = ∅. When there is no resource conflict for the user request , then we can deploy the user request to satellite edge and cloud by the strategy * = and update the network state. After all user requests are deployed, we will reconsider the set of user requests as ← and perform the proposed D-VNFP algorithm again. When none of user requests needs to be deployed in satellite edge and cloud computing, that is, == ∅, the iteration will terminate. When edge and cloud servers have insufficient resources for deploying user requests, these user requests will be performed locally.
For the VNF placement problem in satellite edge computing, the Viterbi algorithm [16], [18], is used to jointly minimize the satellite network bandwidth usage and the user end-to-end delay, where the Viterbi algorithm is a heuristic optimization algorithm and can find a near-optimal solution in a relatively shorter time. In order to optimize the network bandwidth cost while guaranteeing the minimum user end-to-end delay, one of the source neighbouring agents for a user request firstly obtains the shortest paths between the source and the destination. To be more specific, one source neighbouring agent of the user request can be randomly considered as the decision-making node to calculate the path end-to-end delay by traversing the source and destination neighbouring agents. The total number of traversed paths for the user request is indicated as ( , ) · ( , ) · and the shortest paths will remain to be the candidate paths for further processing. We assume that the number of paths remaining for the source neighbouring agent of the user request is represented as , , then , = , ∈ ( , ). We sort the remaining paths by delay cost in ascending order. The source neighbouring agent can traverse the remaining paths from low delay to high delay and then deploy the VNFs by the Viterbi algorithm to optimize the network bandwidth cost.
For the Viterbi algorithm, each deployment strategy of the VNF is considered as a possible state and all possible states for the same VNF make up the state set Ω of the VNF in a stage. The edge between different states from adjacent stages represents the network bandwidth cost, and the cumulative bandwidth cost for the VNF placement strategy is saved in the state node. The number of stages for a user request is equal to the number of the VNFs. After all the VNFs are deployed, the final cumulative network bandwidth costs can be found in the last destination state nodes, where the most likely path with the minimum bandwidth cost can be considered as the optimal VNF placement strategy. Note that the Viterbi algorithm is performed under the multiple physical constraints as shown in the equations (1)- (24). Furthermore, To reduce the computational complexity of the Viterbi algorithm, we remain the optimal possible states of each stage to participate in the VNF placement decisions of the next stage. When the source neighbouring agent finds the first VNF placement strategy with the minimum bandwidth and delay costs, the search procedure for the user request will terminate. The procedure of the Viterbi algorithm is shown in Algorithm 2.
For the VNF placement problem in remote cloud computing, we assume that all the VNFs except the source access function and the destination access function for a user request will be deployed to cloud servers and the processing delay of switches and links in the cloud data center is not considered. The satellite network is just responsible for routing original data from the source to the cloud data center and returning the processing results from the cloud data center to the destination. In this scenario, our aim is to find the best available paths Sort the VNFs except , by topology as Γ ; 9: 10: for each , ∈ Γ do 11: for each ∈ Ω do 13: Update the current network resource state by ; 14: List the candidate edge servers , ; 15: for each ∈ , do 16: Calculate the required resources; 17: if the required resources are satisfied then 18: Obtain the bandwidth cost and the VNF deployment strategy ′ ; 19: Sort Ω ′ by bandwidth cost in ascending order; 24: Ω ← Ω ′ [: ]; 25: end for 26: if Ω! = ∅ then 27: Obtain the optimal strategy and break; 28: end if 29: end for 30: return ; between the source and the cloud data center and the cloud data center and the destination, respectively. Then we will route the data flow produced by a user request to the cloud data center for further processing and the processing results will be sent back to the destination by the satellite network.
In this paper, we use the Path Selection algorithm to find the optimal available path with the minimum end-toend delay cost for a user request. The procedure of the Path Selection algorithm is shown in Algorithm 3. For the user request , initially, we consider the neighbouring agents ( , ) of the source as the access points and calculate the path end-to-end delay from the source to the cloud data center by traversing the neighbouring agents of the cloud data center, respectively. Then we can obtain ( , ) · ( ) · paths between the source and the cloud data center and sort all the paths by end-to-end delay in ascending order to select the shortest paths. We indicate the remaining paths for the source neighbouring agent as Calculate the bandwidth and service requirements; 6: if the required constraints are satisfied then 7: Obtain the optimal path strategy and break; 8: end if 9: end for 10: for each ∈ do 11: Calculate the bandwidth and service requirements; 12: if the required constraints are satisfied then 13: Obtain the optimal path strategy and break; destination and indicate the remaining paths for the neighbouring agent of the cloud data center as , , where , = , ∈ ( ). The source neighbouring agent can traverse the paths from low delay to high delay and calculate the network bandwidth and service requirements. If the bandwidth and service requirements are satisfied, we can consider the current path as the optimal path strategy and break the search procedure. For the neighbouring agents of the cloud data center, similar to the procedure of finding the optimal path strategy for the source neighbouring agents, we can obtain the optimal path strategy . If ! = ∅ and ! = ∅, the optimal VNF placement strategy can be indicated as = { , }. By using the proposed D-VNFP algorithm to address the VNF placement problem in equations (27) and (28), we improve the network bandwidth cost and the user end-to-end delay compared with the Greedy and Viterbi algorithms.

B. Algorithm Complexity
For the proposed D-VNFP algorithm, we assume that user requests need to be provided computing services in a time slot. In the worst case, only one user request is successfully deployed to satellite edge and cloud in each iteration because of resource competition. Thus, the procedure of VNF placement for user requests should be run for ( +1) 2 times. The computation complexity of the Viterbi and Path selection algorithms can be indicated as ( ) and ( ), where we indicate the maximum number of VNFs for a user request as . Therefore, we can obtain the computation complexity of the proposed D-VNFP algorithm to be ( 2 ). However, the computation complexity of the two baseline algorithms ). The main difference between the proposed D-VNFP algorithm and the two baseline algorithms is that the proposed D-VNFP algorithm is a distributed algorithm and without a centralized controller, but the two baseline algorithms are centralized algorithms and a centralized controller is necessary to obtain the network state and the information about user requests.

VI. PERFORMANCE EVALUATION
For the VNF placement problem in satellite edge and cloud computing, we make the experiments to evaluate the performance of the proposed D-VNFP algorithm in static and dynamic environments, respectively. Two existing centralized optimization algorithms, i.e., Greedy [17] and Viterbi [18], are considered as the baseline algorithms, which are used to address the VNF placement problem. For Greedy, we traverse the shortest paths between the source and the destination by end-to-end delay in ascending order and also deploy the VNFs for a user request by a greedy way. The Viterbi-only procedure, as shown in Algorithm 2, is considered as the other baseline algorithm. As shown in the simulation results, the proposed D-VNFP algorithm outperforms the two baseline algorithms of Greedy and Viterbi.

A. Simulation Setup
A satellite network with = 12 LEO satellites is used in our simulation experiments, where there are 3 orbital planes and each orbital plane has 4 LEO satellites. For each satellite, the altitude is 780 km, the available resources include 96 vCPUs and 112 GB memory, and the number of inter-satellite links is 4. We assume that the delay time of the inter-satellite link for the same orbital plane is 7.25 ms and 12.6 ms, respectively, for the adjacent orbital planes is 13.4 ms, and for the satelliteground link is 13.1 ms [34]. The bandwidth capacity of each inter-satellite link is 1 Gbps. We assume that the cloud data center is in the coverage of the satellites 6 and 7 , where there are sufficient CPU and memory resources and the satelliteground link bandwidth capacity is 10 Gbps.
For a user request, we assume the number of the VNFs follows a truncated power-law distribution, where the exponent is 2, the minimum value is 2 and the maximum value is 7, respectively [35]. The resource requirements for each VNF are randomly generated from [1,2] vCPUs and [2,4] GB memory, and the computing time for each VNF is [20,30] ms. The bandwidth requirements for each edge between the neighbouring VNFs are [1,5] Mbps. The source and the destination are randomly generated in the coverage of satellites. We also assume that the maximum acceptable delay time for each user request can guarantee that user requests can be offloaded to the cloud data center for further processing. In dynamic environment, the running time of each user request follows the Exponent distribution with = 3 and the number of user requests per time slot follows the Poisson distribution. The main simulation parameters are summarized in Table II. According to the parameter evaluation results in [16], we set the number of the shortest paths between two satellites as = 8 and the search width of the Viterbi algorithm as = 4.

B. Performance Comparison with the Baseline Algorithms
Based on the above simulation parameters, we conduct the following experiments to evaluate the performance of the proposed D-VNFP algorithm by comparing with the two baseline algorithms of Greedy and Viterbi. The number of user requests for the experiments is set as = {10, 30, · · · , 590}, where all user requests for each experiment can be deployed to the satellite edge and cloud. Each experiment is run for 30 times and we obtain the average results in terms of network bandwidth and user end-to-end delay. The simulation results for different number of user requests are shown in Fig. 5. Fig. 5(a) illustrates the average network bandwidth costs for different user requests. We can observe that the proposed D-VNFP algorithm outperforms the Greedy algorithm for all cases. When the number of user requests is small, e.g., = 70, 90, and 110, the proposed D-VNFP algorithm performs similar to the Viterbi algorithm. As the number of user requests increases, the performance of the proposed D-VNFP algorithm is better than that of the Viterbi algorithm. In the case of = 110, the bandwidth costs for D-VNFP, Greedy, and Viterbi are 19.10 Mbps, 27.99 Mbps, and 18.98 Mbps, respectively, the average bandwidth cost obtained by the proposed D-VNFP algorithm reduces by 31.75% for Greedy. For = 290, the average bandwidth cost obtained by the proposed D-VNFP algorithm reduces by 27.38% for Greedy and 18.43% for Viterbi, respectively. For all cases, the proposed D-VNFP algorithm can reduce the average bandwidth cost by 21.14% for Greedy and 13.51% for Viterbi, respectively. Fig. 5(b) describes the user end-to-end delay costs for different user requests. We can observe that the performance of the proposed D-VNFP algorithm is very close to that of Greedy and Viterbi for the small number of user requests, e.g., = 70, 90, and 110. As the number of user requests increases, the proposed D-VNFP algorithm outperforms Greedy and Viterbi, where the performance of the Viterbi algorithm is slightly better than that of the Greedy algorithm. That is due to the fact that the satellites can provide sufficient available computing resources for user requests with small , but the available resources of satellites will be less than the resource requirements of user requests as increases and then the user requests will be deployed to the remote cloud data center, which can lead to the high network transmission delay. For = 290, the user end-to-end delay costs for D-VNFP, Greedy, and Viterbi are 72.34 ms, 77.98 ms, and 77.16 ms, respectively. The user end-to-end delay obtained by the proposed D-VNFP algorithm reduces by 7.23% for Greedy and 6.24% for Viterbi. On average, the proposed D-VNFP algorithm can improve the performance of the user end-to-end delay by 4.38% for Greedy and 3.80% for Viterbi, respectively.

C. VNF placement in Dynamic Environment
To evaluate the on-line performance of the proposed D-VNFP algorithm for deploying user requests, we conduct the following experiments in dynamic environment. We assume that the number of user requests to come in a time slot follows the Poisson distribution with = {10, 30, · · · , 310} and the number of time slots for each experiment is 50. We run each experiment for 30 times and obtain the average results.
For an example of = 290, the simulation results for different time slots are shown in Fig. 6. Fig. 6(a) depicts the network bandwidth costs for deploying the user requests over different time slots. We can observe that the proposed D-VNFP algorithm performs better than the two baseline algorithms of Greedy and Viterbi for all time slots. The performance improvement of the proposed D-VNFP algorithm for Greedy and Vertbi is 4.78% and 3.26%, respectively. Fig. 6(b) describes the user end-to-end delay costs for deploying the user requests over different time slots. We can observe that the performance of the proposed D-VNFP algorithm is better than that of Greedy and Viterbi. The user end-to-end delay obtained by the proposed D-VNFP algorithm reduces by 2.54% for Greedy and 2.24% for Viterbi, respectively. Fig. 6(c) illustrates the percentages of allocated user requests over different time slots. As the number of user requests deployed to the satellite edge and cloud increases, the satellite network can not meet the resource requirements of new user requests, e.g., CPU, memory, and bandwidth. For this reason, some user requests may fail to deploy to the satellite edge and cloud and the percentages of allocated user requests will decrease. However, the proposed D-VNFP algorithm also outperforms the two baseline algorithms of Greedy and Viterbi. The performance improvement of the proposed D-VNFP algorithm is 4.19% for Greedy and 3.29% for Viterbi, respectively.
In addition, to further demonstrate the effectiveness of the proposed D-VNFP algorithm, we provide the average simulation results for different user requests in dynamic environment, as shown in Fig. 7. Fig. 7(a) describes the average network bandwidth costs for different user requests in dynamic environment. We can observe that the proposed D-VNFP algorithm outperforms the two baseline algorithms of Greedy and Viterbi for all cases, where the Greedy algorithm has the worst performance and is followed by the Viterbi algorithm. In the case of = 90, the network bandwidth costs for D-VNFP, Greedy, and Viterbi are 121.05 Mbps, 151.11 Mbps, and 140.54 Mbps, respectively. The performance improvement of the proposed D-VNFP algorithm is 19.89% for Greedy and 13.86% for Viterbi. On average, the network bandwidth cost obtained by the proposed D-VNFP algorithm reduces by 9.12% for Greedy and 5.87% for Viterbi, respectively. Fig. 7(b) illustrates the average user end-to-end delay costs for different user requests in dynamic environment. It is observed that the proposed D-VNFP algorithm performs better than the two baseline algorithms of Greedy and Viterbi. For an example of = 90, the user end-to-end delay costs for D-VNFP, Greedy, and Viterbi are 77.92 ms, 82.28 ms, and 81.85 ms, respectively. The user end-to-end delay obtained by the proposed D-VNFP algorithm reduces by 5.30% for Greedy and 4.79% for Viterbi. For all cases, The proposed D-VNFP algorithm reduces the user end-to-end delay by 3.06% for Greedy and 2.70% for Viterbi on average. Fig. 7(c) describes the average percentages of allocated user requests in dynamic environment. We can observe that the satellite edge and cloud can provide available computing resources for user requests when the number of user requests is small, and then all user requests can be deployed to the satellite edge and cloud for the proposed D-VNFP algorithm and the two baseline algorithms. As the number of user requests increases, the available computing and bandwidth resources of the satellite network are gradually decreasing. When the required resources of user requests can not be satisfied by the satellite network, the user requests can not be deployed to the satellite edge and cloud. Due to the fact that the performance of the Greedy algorithm is the worst, the percentage of allocated user requests obtained by the Greedy algorithm firstly begins to decline and is followed by the Viterbi algorithm. For an example of = 290, the percentages of allocated user requests for D-VNFP, Greedy, and Viterbi are 0.87, 0.83, and 0.84, respectively. The performance improvement of the proposed D-VNFP algorithm is 4.19% for Greedy and 3.29% for Viterbi. For all cases, the average percentage of allocated user requests of the proposed D-VNFP algorithm improves by 0.83% for Greedy and 0.62% for Viterbi, respectively.

VII. CONCLUSION
In this paper, we investigate the VNF placement problem in collaborative satellite edge and cloud computing with jointly minimizing the satellite network bandwidth usage and the user end-to-end delay, and we formulate the VNF placement problem as an integer non-linear programming problem. As the VNF placement problem is NP-hard, we propose a distributed VNF placement algorithm to address the problem. For each user request, we use the Viterbi algorithm and the Path Selection algorithm to find an approximate VNF placement solution in satellite edge and cloud computing, respectively. All user requests can be deployed to satellite edge and cloud in a distributed manner and we use a resource competition mechanism based on the first-come-first-serve basis to solve the possible resource conflict problem.
To evaluate the performance of the proposed D-VNFP algorithm, we conduct the experiments in static and dynamic environments and compare the performance with two baseline centralized algorithms of Greedy and Viterbi. The simulation results show the proposed D-VNFP algorithm performs better than the two baseline algorithms. Specifically, in static environment, the proposed D-VNFP algorithm improves the network bandwidth cost by 21.14% for Greedy and 13.51% for Viterbi, and reduces the user end-to-end delay cost by 4.38% for Greedy and 3.80% for Viterbi, respectively. In dynamic environment, the proposed D-VNFP algorithm reduces the network bandwidth cost by 9.12% for Greedy and 5.87% for Viterbi, reduces the user end-to-end delay cost by 3.06% for Greedy and 2.70% for Viterbi, and improves the average percentage of allocated user requests by 0.83% for Greedy and 0.62% for Viterbi, respectively.