In this part, we will investigate three-stage STACKELBERG game approach for content processing.

## Problem formulation

In a three-stage Stackelberg game, the upstage acts as the leader, making the very first action. The follower is the downstage and reacts based on the leader's strategy. During stage I, an SBS $m$ serves as the leader and sets the resource price $z_m$. Based on the resource price, the CP decides how many computing resources and which SBS to purchase in stage II. The CP then determines the content price and sells it to users. In stage III, a user $n$ decides which quality level of content to invest from CP and how much power to acquire from SBSs.

## Stage 1: Resource Allocation Model for SBSs

Assume that each SBS is self-centered and only cares about maximizing revenue. The revenue of each SBS is determined by its own resource cost and price, as well as the prices offered by the other SBSs. To maximize revenue, each SBS must determine an optimal price $z_m$. See Algorithm 1 for more details.

## Stage 2: Content Price Model for CP

The profit of CP is determined by the quality of content required by users and the amount of computing resources consumed. Let $q_{nf} \in \{0, 1\}$ denotes whether user $n$ selects the content file $f$ or not. If user $n$ selects content file $f$ , $q_{nf} = 1$; otherwise, $q_{nf} = 0$. To maximize its profit, CP needs to find its content price $y$ and the resource computation cost $f_m$. The CP optimization problem can be written as:

where $\alpha_f$ and $\alpha_v$ denote weighted factors to represent the trade-off between the resource cost and content revenue. $\phi$ denotes the content cost of CP, such as caching cost and backhaul cost; $T_{n,thr}$ represents the maximum delay required by user $n$. The final term implies that we should ensure that users enjoy their video streaming service with a tolerable delay.

## Stage 3: Content Demand Model for Users

Taking the transmission rate and content quality level into account, the optimization problem for user $n$ can be stated as follows:

where $\mu_p$ and $\mu_v$ are weighted factors representing the power and content costs, respectively. We also assume that $\mu_p$ and $\mu_v$ are greater than zero. The final term implies that we must strike a balance between transmission rate and video content quality levels.

## Discussion

In the first three parts, we have explored the development of content transcoding, how AI can be applied in transcoding and the ste-of-the-art method for dealing with this task. In the next section, we will examine the effectiveness of introduced method for content transcoding task.