# DRL-Based Dynamic SFC Orchestration Algorithm for LEO Satellite Networks
## 3 System Model
### Service Function Chain Modeling  
This study considers user service requests with static traffic demands that arrive dynamically. Static user service traffic demand means that the traffic requirement is constant, determined upon service arrival, and does not change over time. Dynamic arrival of user service requests indicates that the number of requests received by the LEO satellite communication network at any time varies dynamically. The study assumes that user service request arrival rates follow a Poisson distribution.  
A single-user service request can be represented as an SFC with constant traffic flow from the source to the destination node. Any SFC can be described as an undirected graph \(sfc_{i}=(V_{i},E_{i})\), where the input traffic demand is represented by \(\delta_{i}\), and \(lifecycle_{i}\) represents the number of time slots from successful deployment until the removal and release of underlying physical resources.  
For the undirected graph \(sfc_{i}\), \(V_{i}=\{vn_{i}^{in},vnf_{1},\cdots,vnf_{j},vn_{i}^{out}\}\) represents the ordered set of all virtual nodes in the i-th SFC, including the source node \(vn_{i}^{in}\), the destination node \(vn_{i}^{out}\), and VNFs \(vnf_{j}\). For any VNF virtual node \(vnf_{j}\), input traffic \(\delta_{j}^{in}\) and output traffic \(\delta_{j}^{out}\) represent the data traffic requiring processing and the output traffic size after processing, respectively. The traffic scaling factor \(ratio_{j}\) measures the relationship between input and output traffic after processing by virtual node \(vnf_{j}\), calculated as follows:  
\[\delta_{j}^{out}=\delta_{j}^{in}\cdot ratio_{j} \tag{1}\]For source and destination nodes, which only provide network access services without data processing, the traffic scaling factor remains 1.  
Any VNF virtual node \(vnf_{j}\) in the SFC consumes physical resources when deployed, represented by \(R^{r}_{j},r\in\{CPU,\mathit{Memory},\mathit{Storage}\}\). The resource consumption is related to the input traffic size, with resource consumption coefficients \(coeff^{r}_{j},coeff^{m}_{j},coeff^{s}_{j}\) for unit input traffic. The actual physical resource consumption is calculated as follows:  
\[R^{r}_{j}=coeff^{r}_{j}\cdot\delta^{in}_{j},r\in\{CPU,\mathit{Memory}, \mathit{Storage}\} \tag{2}\]  
Unlike virtual network function embedding in NFV technology, SFC virtual nodes have strict sequential dependencies. For any adjacent virtual nodes \(vn_{j},vn_{k}\in V_{i}\), their output and input traffic \(\delta^{out}_{j},\delta^{in}_{k}\) must satisfy the following:  
\[\delta^{out}_{j}=\delta^{in}_{k},k=j+1 \tag{3}\]  
This indicates that traffic scaling only occurs when traffic passes through virtual nodes, not during routing.  
The virtual link set \(E_{i}=\{e_{jk}\}\) represents links between virtual nodes, with bandwidth requirement \(bw_{j,k}\) equal to the output traffic of the starting virtual node. End-to-end delay constraints are treated as a whole, with maximum allowable delay \(Delay_{i}\) for each service request \(sfc_{i}\). If the routing path delay exceeds \(Delay_{i}\) at any time, the SFC requires readjustment to meet service quality requirements. If the readjusted path still exceeds the delay constraint, the SFC deployment request is considered failed.