Reliable Distributed Computing for Metaverse: A Hierarchical Game-Theoretic Approach

The metaverse is regarded as a new wave of technological transformation that provides a virtual space for people to interact through digital avatars. To achieve immersive user experiences in the metaverse, real-time rendering is the key technology. However, computing intensive tasks of real-time rendering from metaverse service providers cannot be processed efficiently on a single resource-limited mobile device. Alternatively, such mobile devices can offload the metaverse rendering tasks to other mobile devices by adopting the collaborative computing paradigm based on Coded Distributed Computing (CDC). Therefore, this paper introduces a hierarchical game-theoretic CDC framework for the metaverse services, especially for vehicular metaverse. In the framework, idle resources from vehicles, acting as CDC workers, are aggregated to handle intensive computation tasks in the vehicular metaverse. Specifically, in the upper layer, a miner coalition formation game is formulated based on a reputation metric to select reliable workers. To guarantee the reliable management of reputation values, the reputation values calculated based on the subjective logical model are maintained in a blockchain database. In the lower layer, a Stackelberg game based incentive mechanism is considered to attract reliable workers selected in the upper layer to participate in rendering tasks. The simulation results illustrate that the proposed framework is resistant to malicious workers. Compared with the baseline schemes, the proposed scheme can improve the utility of metaverse service provider and average profit of CDC workers.


I. INTRODUCTION A. Background and Motivations
The blossom of emerging technologies, such as real-time rendering technologies, digital twin, artificial intelligence, 6G communications and blockchain, has promoted the proliferation of the metaverse [1].The metaverse was first created in the science fiction named Snow Crash [2], which is a stereoscopic virtual space parallel to the physical world.Then, the successful broadcast of the famous film Ready Player One raises the public's attention in the metaverse again [3].To provide immersive experiences for people in the metaverse, real-time rendering technologies (e.g., extended reality and spatial sounding rendering) are considered to be the main interaction interfaces [4].For the medium graphic and audio rendering services in the metaverse, the providers may not have dedicated computing resources.Besides, the intensive computation from medium metaverse services may be unbearable for resource-limited mobile devices [1].As such, the distributed collaborative computing has been adopted to solve computing-intensive tasks in the metaverse [5].
For the distributed computing of metaverse services, multiple mobile devices work collaboratively to complete a largescale rendering task.One of the main challenges of the distributed computing system for metaverse services is the straggler effects.The stragglers refer to the mobile devices whose computing speed is observably slower than average because of their limited computing resources or poor communication link, thus causing long latency and bad immersive experience for the metaverse, especially the metaverse interactive services (e.g., online games Minecraft and Roblox).Coded Distributed Computing (CDC) is a promising distributed computing solution to alleviate the straggler effects and guarantee faulttolerance by aggregating the extra computing resources from mobile devices [6].CDC introduces computing redundancy to the metaverse by code techniques, and metaverse service providers (MSPs) only need to collect the computing results of graphic and voice rendering tasks from a subset of workers.Thus CDC can significantly reduce the computation latency and improve the data processing reliability, equivalently alleviate the straggler effects.However, there are two critical problems that need to be addressed: i) The mobile devices may be unwilling to participate in metaverse services without a reasonable incentive; ii) Some mobile devices may even misbehave to damage MSPs' benefits, thus resulting in bad user experience.How to select reliable mobile devices and incentivize them to participate in metaverse services are still challenging.

B. CDC Use Case in Vehicular Metaverse
The vehicular metaverse integrates extended reality technologies and real-time motion data seamlessly to blend virtual and real sapce for drivers and passengers in vehicles, which is an emerging in-vehicle entertainment segment for the automotive market.WayRay's Holograktor is striving to create the metaverse vehicle, where passengers and drivers are able to interact with a different reality during the vehicle ride.Figure 1 shows an example of CDC in the vehicular metaverse.With the vehicular metaverse services, passengers can entertain themselves with hybrid real and virtual environments, which may cause intensive computation for the resource-limited vehicles due to the graphic or audio rendering.In such condition, those vehicles can act as MSPs to cooperate with nearby vehicles that act as workers.However, this vehicular metaverse is vulnerable to stragglers due to not only the misbehavior, but also the highly mobile environments which can make some workers unable to complete computation tasks and return the results successfully.Based on the CDC technology, MSPs can decompose and assign the rendering tasks to workers, and MSPs only need to collect a subset of workers' computing results, which is beneficial for the immersive experience of users in vehicles.

C. Contributions
In this paper, we mainly investigate the use case of CDC in vehicular metaverse, but the proposed scheme is not limited to the vehicular sector.We first adopt reputation metric to assess the reliability of workers in CDC to support vehicular metaverse services, and a stable coalition of reliable workers is formed based on reputation values.Moreover, we apply a hierarchical decision making structure composed of coalition formation and Stackelberg game to design an efficient incentive mechanism for reliable CDC in the vehicular metaverse.Blockchain is used to achieve distributed secure reputation management and to maintain worker participation records in the vehicular metaverse.As blockchain can manage the interactions among entities in the metaverse by a decentralized, tamper-proof and transparent manner [7].We summarize the contributions of this paper as follows.
1) We propose a novel reliable distributed collaborative computing framework for the metaverse based on CDC and blockchain technologies, which can support the immersive user experiences in the metaverse.Especially, we consider the use case in the vehicular metaverse.2) We adopt the reputation values to evaluate the reliability of workers.The miners who form coalitions are responsible for the calculation of workers' reputation values, and the reputation metric is the abstraction and aggregation of multiple factors that affect the quality of coalitions.3) We propose a hierarchical game-theoretic approach to investigate the reliable and sustainable CDC scheme in the vehicular metaverse.In the upper layer, the coalition game is innovatively combined with the reputation metric to choose reliable CDC workers for MSPs.In the lower layer, the Stackelberg game is formulated to stimulate the reliable CDC workers to participate in metaverse services.4) Numerical results indicate that the proposed hierarchical game-theoretic scheme is resistant to the malicious workers.The MSP can obtain higher utility and CDC workers can obtain higher profits with the proposed scheme than those of the best-effort worker selection scheme.The strcture of this paper is shown as follows.Related works about CDC and metaverse services are introduced in Section II.The system model and problem formulations of the proposed reliable CDC scheme for the vehicular metaverse are presented in Section III.The worker selection process based on the reputation model and coalition game is presented in Section IV.Stackelberg game-based incentive mechanism is introduced in Section V. Section VI shows performance evaluation of reliable worker selection and CDC incentive mechanism.Section VII gives the conclusion of this paper.

A. Coded Distributed Computing
The research on CDC mainly focuses on mitigating the straggler effects and minimizing the communication cost.Coding theories are the popular methods to solve above issues.In [8], the authors explore the usage of coding theory to alleviate the straggler effect in matrix multiplication and reduce communication bottlenecks in data shuffling.The theoretical analysis proves that the coded schemes can obtain significant gains compared with uncoded schemes.In [9], the authors study the distributed matrix multiplication problem in heterogeneous environments, where a coding framework is designed to accelerate distributed matrix multiplication with straggling devices.In [10], the authors consider that the straggler phenomenon of wireless distributed computing networks is caused by local computation and wireless transmission.Besides, the straggling factor for each device is derived.In [11], a coded computing framework for federated learning is proposed, which uses structured coding redundancy to alleviate the straggler effects and speed up the training procedure.In [12], the authors design the incentive mechanism for the CDC tasks by formulating a game-theoretic approach.In [13], the authors design platforms' incentive mechanisms to encourage workers' participation in the coded machine learning.However, the existing works ignore the reliability of CDC workers when study CDC, which might negatively impact the performance of CDC.Besides, reliable CDC incentive mechanism for the metaverse has not been studied.

B. Metaverse Services
Metaverse-related research is still in its infancy.There are some works studying the metaverse services in graphic or audio rendering, extended reality technologies etc.In [14], the authors propose a vision of the metaverse native communications that includes encrypted address-based access model and blockchain.In order to realize the audio/visual and virtual/reality congruence in metaverse services, the authors in [15] design the 6-degree-of-freedom interactive audio engines based on objects.In [16], the authors give a comprehensive survey on computational arts that blend virtual and physical environment in the metaverse.The authors in [17] design a brain-to-speech scheme for smart communication in the real world, which is also presented as a potential application in the metaverse.The authors in [18] propose an operating system for the metaverse based on extended reality, which integrates hardware, computer vision and extended reality specific network.In [19], the authors propose a blockchainbased framework for the metaverse.The sharding scheme is used to improve the scalability of blockchain networks.The authors in [20] give a survey about the Artifical Intelligence (AI) for the metaverse, and they especially explore AI-based methods that have potentials for the metaverse.The above works have not considered the metaverse services in vehicular networks.As metaverse might have a profound impact in the automotive field, a great deal of research needs to be done on the vehicular metaverse, including the distributed computing that is meaningful for the user immersive experience in the vehicular metaverse.

III. SYSTEM MODEL AND PROBLEM FORMULATIONS A. System Model
The vehicular metaverse mainly includes the virtual world, the physical world, and the interaction layer that connects the virtual and physical world.The immersive user experience is a significant part in the interaction layer [3].To achieve the immersive user experiences, key technologies (e.g., graphic and spatial sound rendering) are adopted, which can easily lead to intensive matrix computation tasks to be processed by onboard units or devices in vehicles.Those vehicles can choose to execute rendering tasks by collaborating with other vehicles within a limited communication distance.In the metaverse, vehicles that distribute the large-scale matrix computation tasks (e.g., projection and shadow mapping in graphic rendering [21]) are called MSPs.The vehicles that execute the computation tasks of metaverse services are called workers.In order to realize the reliable distributed computing, the MSP first selects workers based on reputation values, and then allocates the rendering tasks to workers based on the CDC technology.Blockchain is used to manage reputation values and to record worker participation, realizing the decentralized CDC in the vehicular metaverse.RodeSide Units (RSUs) with sufficient computation and storage resources in vehicular networks act as miners to perform consensus algorithm.In addition, miners are stimulated to join the reputation calculation since they are more trustable entities than vehicles.Miners that have contributions to the reliable worker selection will be rewarded by blockchain (e.g., receiving some tokens or obtaining resource rewards).
Figure 2 shows the whole CDC process in the vehicular metaverse including the worker selection phase and CDC rendering task execution phase.In the worker selection phase, the MSPs select workers based on workers' reputation values recorded on blockchain.In the CDC task execution phase, MSPs distribute the rendering tasks to the selected workers.The workers process the computation tasks and transmit the final results to MSPs.Then MSPs update workers' reputation values and record the updated values on blockchain.Besides, all the resource interactions (e.g, workers contribute their computing resource to MSPs) among MSPs and workers are recorded on blockchain.The details about the CDC process are introduced as follows.
Step 1: The MSP sends a transaction to blockchain to recruit workers that are willing to serve for the rendering tasks in the vehicular metaverse.The transaction contains the requirements of the MSP, such as the reputation threshold T com th of workers.
Step 2: The workers that are willing to help the MSP with metaverse services send transactions to respond to the MSP.The worker set is denoted as W = {1, 2, . . ., w, . . ., W }. In the metaverse, users have many perception dimensions in immersive experience due to computations of graphic rendering and sound generation.Such perception can be qualitative and the subjective logical model is suitable.In order to select trustable workers, the blockchain needs to obtain the compositive reputation opinions of workers based on the subjective logical model [22].Miners are stimulated to compute workers' compositive reputation opinions.The miners that are selected by blockchain based on their contribution to workers' reputation calculation will be rewarded by blockchain.The set of miners is denoted as M = {1, 2, . . ., m, . . ., M }.Miners have no idea about the reliability of workers before they compute the reputation values of workers.Each miner randomly selects several workers and computes workers' compositive reputation opinions.The number of workers selected by miner m is denoted as |W m |.The workers whose compositive reputation opinions are lower than T com th are discarded by miners, and T com th is set based on MSPs' service requirements [22].We assume that the number of discarded workers is much smaller than those of workers that are not abandoned by miners.The set of workers selected by miner m is denoted as  identity number of the w-th worker selected by miner m.
Step 3: In order to increase a likelihood to be rewarded by blockchain, miners that obtain workers' compositive reputation opinions form coalitions.The coalition members in each coalition contain miners and their corresponding worker sets.When the coalition is selected by blockchain, the compositive reputation values of workers in the selected coalition will be recorded on blockchain by miners.Another benefit for the coalition formation is that multiple reliable workers evaluated by their reputation can offer larger computational resources to the MSP.
Step 4: The blockchain returns selected workers' information, including the location information and reputation opinions, to the MSP.
Step 5: The MSP distributes the rendering tasks to the selected workers based on Stackelberg game.In the game, the MSP acts as the leader to determine the reward strategy, and workers act as followers to adjust computing speed strategy.Specifically, we consider that MSP P i needs to render 2D images in RGB color into the needed Field of Views (FoV).The number of pixels is denoted as n p , and the resolution of the required FoV is n p × n p .With the CDC technology, the MSP allocates the rendering task to workers.The Maximum Distance Separable (MDS) code is adopted to alleviate the straggler effects in the distributed computing [6].The rendering task of MSP P i is expressed as y i = A i x i , and A i ∈ R (3×2×np)×np , where "3" is the number of colors in RGB model, which contains red, green and blue colors, "2" is the number of viewpoints [23].MSP × n p .Each submatrix is allocated to a worker.MSP P i can reconstruct the final rendering result when receiving the results from any K(K < N ) workers, which can mitigate straggler effects.
Step 6: The resource interactions between the MSP and workers are recorded on blockchain.Then, the workers can receive the deserved reward from the MSP.
Step 7: After finishing the CDC rendering tasks, the MSP updates the local reputation opinions of workers on blockchain.
To enable immersive vehicular metaverse experience and realize the CDC rendering task execution efficiently, the MSP can select workers with the help of blockchain in advance.When the MSP has distributed computing requirements, the MSP can distribute the rendering task to workers in time.

B. Transmission Model
We consider that the CDC rendering task execution mainly contains computing the tasks and transmitting the computing results to the MSP.Here we establish the transmission model that vehicle workers transmit the rendering task computation results to the MSP, where we adopt the orthogonal frequency division multiple access (OFDMA) scheme.MSP P i uses a set of resource blocks for the wireless transmission, and there is no interference between workers, this assumption is typically to simply the analysis, but the model can still be straightforwardly extended with interference.We also consider the effects of mobility on channel gain between the MSP P i and workers.To estimate an accurate mobile channel gain, the channel state information of mobile link is broadcast to workers with a period of T c .The channel states of the wireless mobile links in the previous and current time interval are denoted as g and ĝ, respectively.The relationship between g and ĝ is g = ĝ + κ , where = J 0 (2πf D T c ) (0 < < 1) is the channel correlation coefficient.J 0 (•) is the zero-order Bessel function.f D is the maximum Doppler frequency and is expressed as f D = |∆v| f c 3 × 10 8 .|∆v| is the relative vehicle speed between the MSP and workers.f c is the carrier frequency at 5.9GHz.κ is the channel discrepancy coefficient that follows CN 0, 1 − 2 [24], [25].Then the channel gain model between MSP P i and worker w is expressed as where G iw is the large-scale fading effect between MSP P i and worker w.The signal-to-noise between MSP P i and worker w is expressed as where p w is the transmitting power of worker w, σ2 is the variance of the Gaussian noise.The data rate between worker w and MSP P i is expressed as The communication delay of worker w is expressed as where s w is the packet size of computation results transmitted by worker w.

C. Computation Model
The computation time of each worker follows a 2-parameter shifted exponential distribution [8], [9].Then, the cumulative distribution function of the time T cmp w that worker w finishes the rendering task is expressed as where µ w is the average computation speed of worker w, a w is the start-up time to begin the rendering task computation, l is the amount of rendering task allocated to each worker, and l = 3 × 2 × n p /K.The probability density function of the above distribution is The average computation time for worker w is expressed as The average rendering task execution time of worker w is expressed as  The outline of the proposed hierarchical game is shown in Fig. 3. Blockchain is utilized to achieve the decentralized management for CDC in the vehicular metaverse.In order to realize reliable and sustainable CDC in the vehicular metaverse, we adopt a hierarchical game-theoretic approach based on coalition formation and Stackelberg game.The coalition-Stackelberg game makes the proposed framework suitable for reliable CDC in the vehicular metaverse.The description of the hierarchical game-theoretic approach is as follows: 1) Upper layer: In the upper layer, the coalition formation game is adopted to investigate the cooperative interactions among miners that contribute to the computation of workers' compositive reputation values.The miners compute workers' compositive reputation values based on reputation opinions stored on blockchain.Then the miners form coalitions by maximizing the coalition utility that includes workers' compositive reputation values and cost.In order to be selected by blockchain, each miner prefers to form coalitions with other miners to obtain higher coalition utility.Besides, considering the coalition formation cost, the grand coalition may not be stable.This is due to the fact that a high communication overhead discourage all the miners to participate and act as a coalition.The coalition with the highest coalition utility will be selected by blockchain, and the workers in the selected coalition will execute CDC rendering tasks.
2) Lower layer: In the lower layer, the Stackelberg game is used to incentivize workers selected in the upper layer to allocate more computing resource to the MSP's CDC rendering tasks.In the Stackelberg game, the MSP acts as a leader to adjust the reward to workers who finish the computing tasks in time, the workers act as followers to adjust the average computing speed.The strategies of workers also affect their local reputation values updated by the MSP.
3) Interactions between upper and lower layers: In the upper layer, the miners who compute workers' compositive reputation values form coalitions.The coalition with the highest coalition utility will be selected by blockchain, and the workers in the selected coalition will execute the CDC rendering tasks published by the MSP.Specifically, without forming coalitions, the MSP may not be able to identify the workers that are reliable, which may degrade the utility of the MSP.In order to motivate the selected workers to contribute their computing resource to the CDC rendering tasks and guarantee the highest utility of the MSP, the Stackelberg game is used in the lower layer.The MSP decides reward strategy, and the selected coalitions of workers, which are formed in the upper layer, contribute their computing resource to maximize their utilities.Besides, in order to increase probabilities to be selected in the next round of coalition formation game, the workers should also consider their local reputation values when adjusting the computing resource strategy.The hierarchical game theoretic approach ensures that the CDC rendering tasks can be executed by reliable workers and maximizing the MSP's utility.Meanwhile, the selected reliable workers are incentivized to contribute their computing resources to the CDC rendering tasks from vehicular metaverse services.

IV. RELIABLE WORKER SELECTION FOR VEHICULAR METAVERSE
In the worker selection phase, we mainly focus on two problems.The first one is how to obtain the overall reputation opinions from the interaction histories between MSPs and workers.Subjective logic is a popular tool to model the reliability of entities in the vehicular metaverse, as it quantifies belief, disbelief and uncertainty [26].Based on the subjective logic model, both direct and indirect reputations from other MSPs are combined to derive the compositive reputation opinions of workers.The second problem is how to select reliable workers based on the reputation opinions of workers in a distributed way.With the subjective logic model, the reputation calculation of workers may be not easy for the MSPs, as the MSPs need to search all the local and recommended reputation opinions of workers on blockchain, and then compute the workers' compositive reputation opinions.We motivate miners in blockchain to calculate workers' reputation opinions.Each miner in M selects several workers from W to compute the reputation opinions.The miners compute the selected workers' compositive reputation opinions based on the stored direct reputation opinions and subjective logic model.The workers whose compositive reputation opinions are lower than the reputation threshold T com th are discarded by miners.Then, miners form coalitions to increase their chance to be rewarded by blockchain.The blockchain selects the miner coalition with the highest coalition utility.In this section, the subjective logic model is introduced, then the miner coalition formation game is formulated.

A. Subjective Logic Model-Based
where p i→w and q i→w are the numbers of positive and negative interactions between MSP P i and worker w, respectively.
The MSP regards the resource interaction between itself and a worker as a positive event if the worker is not a straggler in the CDC, and returns the effective computation results that is important for enhancing immersive experience of the vehicular metaverse services (e.g., graph resolution or audio playback resolution).The weights of positive and negative interaction are denoted as σ 1 and σ 2 , respectively, and 0 < σ 2 < σ 1 < 1.
The local reputation value T local i→w is expressed as where γ ∈ [0, 1] is the effective coefficient of uncertainty on the reputation of worker w.
2) Recommended opinions: Apart from MSP P i 's local reputation opinions, the miners also need to search for selected workers' direct reputation opinions updated by other MSPs on blockchain to obtain the recommended reputation opinions.Suppose that miner m receives a number of recommended opinions of w on blockchain.
is also the number of recommenders.For recommender r ∈ , the weight factor ω r is expressed as [28] where b local r→w + d local r→w represents the familiarity value between recommender r and worker w.The higher familiarity value means that the recommended opinions of recommender r on worker w is more convincing.b i→r is the social tie strength between MSP P i and the recommender.When MSP P i and the recommender have the same worker set, we consider that the strength of social ties between MSP P i and the recommender is strong [29].The sets of workers that have provided computing services for MSP P i and recommender r are denoted as Γ (P i ) and Γ (r), respectively.Then, b i→r is expressed as [29] The overall recommended reputation opinion of w is denoted as (13) 3) Combining local opinions with recommend opinions: Based on the local opinion and recommended opinions from other MSPs.Miner m can obtain the final compositive reputation opinion of MSP P i to worker w.The compositive reputation opinion of MSP P i to worker w is represented as R com i→w = {b com i→w , d com i→w , u com i→w }.According to [22], b com i→w , d com i→w , u com i→w are expressed as follows: The compositive reputation value of MSP P i to worker w is expressed as For the initialization of workers' reputation values, the numbers of positive and negative interactions between MSPs and workers are set as 0. Then the initial reputation values of workers can be obtained based on the above model.According to the compositive reputation opinions, MSPs can recruit more workers with high reputation values, promoting the finish of CDC rendering tasks.After finishing a computing task, the MSP updates the selected workers' direct reputation opinions on blockchain.

B. Coalition Formation Game Formulations
In the proposed model, miners cooperate to select reliable workers for vehicular metaverse services.To achieve suitable cooperative strategies for miners, the coalition game theory is used.The combination of coalition game and reputation metric makes the coalition more multi-dimensional from the decision making perspective.The formulated model could be suitable than classical coalition formation game that relies only on a single value of utility, which may not be known precisely in reality.The cooperative worker selection problem among miners is modeled as a coalition formation game with nontransferable utility (NTU), which means that the value or the utility of a coalition cannot randomly be divided between the members in the coalitions [30].The NTU coalition game is modeled as G = {M, u}, and u is the utility function.The blockchain returns the compositive reputation opinions of the workers in the coalition with the highest utility.We denote the coalition of miners as G o ∈ M, and o is the index of the coalition [31].In the following, we give the definition of coalition partition for the coalition formation game.The worker set for the coalition G o is denoted as ∪ m∈Go W m , and the number of workers in ∪ m∈Go W m is denoted as |∪ m∈Go W m |.For the calculation of workers' reputation opinions, the contribution value of the coalition G o is expressed as where |∪ m∈Go W m |/W is the percent of workers that the coalition G o has computed, and the second term In order to satisfy the above requirements, the logarithmic barrier penalty function is adopted to model the coalition cost [34], [35].The communication cost C (G o ) is expressed as where õ is used to avoid an infinite value of C (G o ) when |M o | = M , and õ = 0.1 [34].Then, the coalition utility of the coalition G o is expressed as where δ is the communication cost coefficient.
For the coalition G o , whether the miners in G o can be rewarded by blockchain depends on the coalition utility u (G o ).We notice that, in the proposed coalition game, the coalition utility u (G o ) is not divisible among the miners, and the utility of each miner in the coalition G o is equal to u (G o ), instead of a fraction of u (G o ).Hence, the proposed coalition formation game has non-transferable utility.Each miner can choose the suitable coalition based on the received utility.The definitation of preference order is given as follows.
Definition 2: A preference operator is adopted to compare O that are partitions of the same subset A ⊆ M (i.e., the players in Π 1 and Π 2 are the same).Then, Π 1 Π 2 implies that partition Π 1 is better than partition Π 2 for subset A [36].
Different orders can be adopted to compare relationships between partitions.We adopt Pareto order in this paper to compare the preference relation between two partitions.Definition 3: For the two partitions O are denoted as u m (Π 1 ) and u m (Π 2 ), respectively.The partition Π 1 is better than Π 2 by the Pareto order, which is denoted as with at least one strict inequality (>) for a miner m.
A coalition formation algorithm based on the simple rules of merge and split is proposed by using the Pareto order.The coalition formation process usually needs to execute many rounds, and all the coalitions are involved in each round to make sure that the utilities of coalitions increase or remain stable.The rules of merge and split are given as follows [37]: 1) Merge Rule: The coalitions will merge or split if these actions can yield a preferred collection according to the pareto order.By using the Pareto order, a coalition will split only if the split operation makes at least one miner's utility improved without decreasing other miners' utilities.Similarly, the coalitions will merge only if at least one miner's utility can be increased without hurting other miners' utilities.With the merge-and-split rules, a stable coalition partition can be obtained, as any coalition formation algorithm designed with the merge-and-split rules always converges [32].Algorithm 1 is the coalition formation algorithm for miners.
then the partition Π can be modified through the merge rule, which is also in contradiction with the fact that Π is a final stable partition.Thus, the coalition partition under the proposed scheme is D hp -stable.

V. STACKELBERG GAME-BASED INCENTIVE MECHANISM FOR VEHICULAR METAVERSE
After the worker selection phase, MSP P i obtains the information of workers in the selected coalition G o .MSP P i selects N workers from the coalition G o based on the workers' reputation opinions.The set of selected workers is denoted as W sel = {1, 2, . . ., w, . . ., N }, and W sel ⊆ G o .In the CDC rendering task execution phase shown in Fig. 2, MSP P ×np , and then MSP P i has N encoded submatrices with the same size (3×2×np) K × n p based on the (N, K) MDS code.Each submatrix is allocated to a worker.The distributed computing resource interactions between MSP P i and workers is modeled as a single-leader multi-followers Stackelberg game.In the leader game, the MSP selects an optimal computation reward to motivate workers to execute CDC rendering tasks in the vehicular metaverse.In the follower game, the workers try to obtain higher profit by adjusting their computing speed.The Stackelberg game model can be extended to multiple MSPs with two approaches.The first one is that the MSPs make decisions on incentive indenpendently and they do not affect each other as the MSPs may use different applications.The second one is that MSPs can compete with each other and this forms a Nash game which can be investigated in the future work.

A. Profit Function of Workers
We consider that the CDC rendering task execution mainly contains computing the task and transmitting the computation result to MSP P i .In the following, the profit function of workers is studied.
In order to incentivize workers to join the CDC rendering task actively, the MSP P i gives the reward to workers that contribute to vehicular metaverse services.The reward contains two kinds, i.e., base reward R base and competition reward R com .The workers who participate in the CDC rendering task can receive the reward R base .The workers whose average task execution time is no more than the average task execution time of the K-th worker can receive the reward R com .Similar to the analysis in [38], we assume that the task execution time of workers follows a uniform distribution, where Tw Tmax ∈ (0, 1), and T max is the maximum value of the task execution time.The normalized task execution time of workers are ranked and represented by its order statistics, which are expressed as T 1,N , T 2,N , . . ., T N,N .T K,N is the K-th highest execution time among N workers.The cumulative distribution function of the normalized task execution time is F (T ) = T .The probability density function of the normalized task execution time is f (T ) = 1.Based on the order statistics, the probability density function of T k,N is given as which is also a beta distribution Beta (k, N − k + 1).Hence, the expectation of T k,N is given as The workers adopt the dynamic voltage scaling technology that allows workers to adaptively adjust and control the computing speed [39].Each selected worker tries to obtain a higher profit.The profit function of the worker w is expressed as where ε is the computing cost of the worker per CPU circle, and ζ is the communication cost of the worker per unit of communication time.P w is the probability of worker w getting the reward from MSP P i .P w is expressed as where is the average communication delay of the K-th worker, and Here, worker w selects the optimal computing speed µ w that maximizes u w .

B. Utility Function of Metaverse Service Provider
To motivate workers to contribute more to the CDC rendering tasks, MSP P i should adjust the reward R com to maximize its utility.The selected workers contribute their computing resources to MSP P i .The utility that MSP P i can gain depends on the computing resource that workers contribute, the reputation values of workers, and the reward paid to the workers.The utility function of MSP P i is expressed as where ν is a weight parameter, and f (µ w ) = log (1 + µ w ), which is the utility of MSP P i gained from the workers' computation contribution.The log of f (•) reflects MSP P i 's diminishing return on the computation speed of each selected worker [40]- [42].h (•) is the reputation utility of workers and is expressed as [43] where α is the default reputation utility for the worker with is the reputation threshold required by the MSP.T com max is the maximum reputation value.

C. Stackelberg Game-Based Incentive Mechanism
The interactions among the MSP and workers is formulated as a single-leader multi-followers Stackelberg game.In the leader game, the MSP sets the optimal computation reward to motivate workers to execute CDC rendering tasks.In the follower game, the coalition of workers adjust the computation speed to maximize their profits.The strategy optimization problems for the MSP and workers are formulated as follows.
1) Workers' computing speed strategies in Stage II: In Stage II, based on the reward strategy of the MSP, worker w (w ∈ W sel ) determines its computation speed µ w to maximize the profit that is given as The set of workers' computing speed is µ = {µ 1 , . . ., µ w , . . .µ N }, which are used to derive the computation delay of workers based on (7).The worker subgame problem is expressed as follows.Problem 1 (Worker w Subgame): where µ is the minimum computation speed, and μ is the maximum computation speed.
2) MSP's reward strategy in Stage I: In Stage I, according to workers' computation speed strategies µ, the MSP determines the reward strategy to maximize its utility that is expressed as The MSP subgame problem is expressed as follows.
where R com is the minimum computation reward, R com is the maximum computation reward.The Stackelberg game is formulated by combining Problem 1 and Problem 2, and the goal of the Stackelberg game is to find the Nash equilibrium solution.

D. Game Equilibrium Analysis
The Stackelberg equilibrium makes sure that the utility of the MSP is maximized considering that the workers contribute their computation resource to vehicular metaverse services based on the best response.This means that the computing speed strategy of each worker maximize its profit given the strategies of the other workers and the computing reward given by the MSP.The Stackelberg equilibrium is expressed as follows.
Definition 6: We denote µ * and R * com as the optimal computation speed of all the selected workers and optimal computation reward given by the MSP, respectively.Then, the strategy The backward induction is adopted to analyze the Stackelberg game.
1) Workers' optimal strategies as equilibrium in Stage II Based on the reward strategy R com given by the MSP, the workers determine the optimal computation speed strategy for profit maximization in Stage II.
Theorem 2: The sub-game perfect equilibrium in the workers' subgame is unique.
Proof: We give the first-order and second-order derivatives of the profit function of workers u w (•) with respect to worker's strategy µ w .The first-order derivative of u w (•) is shown as The second derivative of u w (•) is shown as As the second-order derivative of u w (•) is negative, so the profit function u w (•) is strictly concave with respect to worker's computing speed strategy µ w .Besides, based on the first-order derivative condition, there is Then, the best response function of the worker w, i.e., µ * w , is shown as We denote E w = 1 aw+Aw and F w = Aw εlaw .Thus, the sub-game perfect equilibrium of the workers' subgame is unique [44].
2) MSP's optimal reward strategy in Stage I Based on the optimal computing speed strategies of workers in Stage II, the MSP acts as the leader to optimize its utility in Stage I.
Theorem 3: The uniqueness of the proposed Stackelberg game's equilibrium can be guaranteed.
Proof: The utility function of the MSP can be transformed into (36), and The first-order derivative of the MSP's utility function is shown in (37).The second-order derivative of the MSP's utility function is shown in (38).As < 1, the second-order derivative of the MSP's utility function always satisfies com < 0, which indicates that u Pi is a concave function.Thus, the MSP has a unique optimal solution that can be efficiently obtained by bisection method [45].Based on the optimal strategy of the MSP, the workers' optimal strategies can be obtained.Then, the Stackelberg equilibrium can be obtained in the proposed model.The MSP can achieve optimal utility and workers can obtain optimal profit, and neither of them would alter their strategies to gain higher benefits.
We design Algorithm 2 to obtain the unique Stackelberg equilibrium for the proposed game.In algorithm 2, the MSP first searches the optimal reward strategy, and the complexity is O log 2 R com − R com .Then, each worker needs to decide its optimal computing speed strategy, the complexity is O (N ).So the algorithm complexity is

Algorithm 2 Bisection-based algorithm to find Stackelberg equilibrium
Input: Minimum computation reward R com , maximum computation reward R com , error Ξ ; Output: Optimal reward strategy of the MSP R * com and optimal computing speed of workers µ * ; 1: MSP find the optimal reward strategy based on the following steps.

VI. PERFORMANCE ANALYSIS
In this section, we give the numerical results of the coalition game-based worker selection and stackelberg game-based incentive mechanism for reliable CDC in the vehicular metaverse.The parameter values are given in Table I [11] [24].

A. Numerical Results for Reliable worker selection
First, the reputation calculation scheme is simulated and analyzed.Then, the coalition formation game is analyzed.For the reputation calculation scheme, we consider an unreliable worker, which performs well to all MSPs to increase its reputation value to 0.8 at first, and keeps such reputation value for a certain period of time.Then, the unreliable worker keeps performing well to several specific MSPs, but misbehaves to other MSPs with the probability of 90%.The proposed blockchainenabled reputation scheme is compared with the reputation scheme without blockchain, and the reputation scheme without blockchain and recommended opinions.For the reputation scheme without blockchain, such as the reputation scheme in [46], workers' reputation values are all stored in the centralized platform in which unreliable workers' negative interaction behaviors are manipulated into positive interaction behaviors with the probability of 25%.For the reputation scheme without blockchain and recommended opinions, workers' reputation values only depend on MSPs' local reputation opinions.Figure 4 shows the reputation values variation of an unreliable worker over time.As it can be seen from Fig. 4, when the unreliable worker begins to misbehave, the reputation value significantly decreases with the proposed blockchainenabled reputation scheme.For the reputation scheme without number of positive interaction events as 0 ∼ 120, and the number of negative interaction events as 0 ∼ 40.Then the compositive reputation values of workers are calculated by miners based on subjective logical model.Figure 5 shows the selected workers' average reputation value as a function of misbehavior ratio.Misbehavior ratio is the percentage of workers that are misbehaving to the total number of workers.From Fig. 5, compared with the scheme without coalition game, the selected workers' average reputation value of the proposed scheme decreases slightly with the growth of misbehavior ratio.The misbehavior ratio has little effect on the average reputation value of workers in the selected worker coalition, as the coalition game-based method helps to exclude the workers with low reputation values.When the weight of positive event σ 1 is fixed, the number of miners joining in the reputation calculation does not affect the average reputation values of selected workers.When the misbehavior ratio is fixed, the selected workers' average reputation value increases with the increase of σ 1 .Figure 6 shows the number of selected workers as function of misbehavior ratio.From Fig. 6, when the number of miners is fixed, the number of selected workers decreases with the rise of misbehavior ratio.When the misbehavior ratio is fixed, the number of selected workers increases with the growth of the number of miners.As more miners can calculate more workers' reputation values, which is benefical to the reliable worker selection.

B. Numerical Analysis for CDC Incentive Scheme
In this section, according to the reliable worker selection results obtained from coalition formation game, we analyze the numerical results about Stackelberg game-based CDC incentive mechanism in the vehicular metaverse.We assume that the strat-up time of workers follows the normal distribution.Figure 7 and Figure 8 show the effects of the size of rendering matrix on the reward given by the MSP and utility of the MSP, respectively.From Fig. 7, the reward given by the MSP increases with the size of rendering matrix.When the number of returned results K is fixed, a higher value of N results in higher reward given by the MSP.When N is fixed, the reward decreases with the growth of K.As the increase of K means that the MSP needs to reward more workers, which makes the reward reduced.From Fig. 8, the utility of the MSP increases slightly with the size of rendering matrix.A higher value of N results in higher utility for the MSP, which means that more workers' participation is beneficial to the MSP.However, a higher value of K makes the utility of the MSP reduced.This indicates that the MSP can achieve higher utility with the CDC scheme, as the MSP obtains the final computing result when receiving the computing results from K workers, and K < N .Figure 9 and Figure 10 show the effects of the size of rendering matrix on the selected workers' average computation speed and average profit, respectively.From Fig. 9, the average computation speed of workers increases with the size of rendering matrix.When K is fixed, a higher value of N results in higher average computation speed, as the workers need to increase their speed to obtain the competition reward.When N is fixed, a higher value of K results in lower average computation speed.This is because the increase of K reduces the competitiveness among workers.From Fig. 10, with the growth of the size of rendering matrix, the average profit of selected workers first increases to a peak point and then decreases.This indicates that when workers face many rendering tasks with different sizes, workers can choose to execute the rendering tasks that can maximize their profits.When K is fixed, the increase of N makes the workers' average utility increased.This is mainly because the MSP gives more reward when N increases.When the size of rendering matrix is less than 3300 for N = 45 and 3500 for N = 40, a lower value of K results in higher average profit of workers.Otherwise, a higher value of K results in higher average profit of workers.
Figure 11 shows the mean of workers' start-up time on the utility of the MSP.As shown in Fig. 11, when the computing cost ε is fixed, the utility of the MSP decreases linearly with the increase of the mean of workers' start-up time.Besides, the utility of the MSP decreases with the increase of ε. Figure 12 show the mean of workers' start-up time as function of average profit of workers.From Fig. 12, with the increase of the mean of workers' start-up time, the average profit of workers first  increases to a peak point and then decreases.The workers can select suitable strat-up time to execute the computing tasks from the MSP.Then, we compare the proposed scheme with the pre-defined worker selection scheme and best-effort worker selection scheme.In the pre-defined worker selection scheme, we preselect a fixed number of workers based on certain criteria, such as their similarity [47].In the best-effort worker selection scheme that is similar to [48], any workers available will be allowed to join the CDC progress.When the reputation values of workers is lower than the reputation threshold T com th , the repuatation utility of the worker is expressed as h (T com i→w ) = αe (T com i→w −T com th ) [43]. Figure 13 shows the utility of the MSP as a function of N under different schemes.From Fig. 13, the utility of MSP increases with N under all schemes.The utility of the MSP under the proposed reliable CDC scheme is higher than those under the pre-defined worker selection scheme and best-effort worker selection scheme.The utility of the MSP has been increased by 17% compared with the best-effort worker selection scheme.Figure 14 shows the average profit of selected workers as a function of N under different schemes.From Fig. 14, the average profit of workers increases with the increase of N under all schemes.The average profit of workers under the proposed reliable CDC scheme is higher than those under the pre-defined worker selection scheme and best-effort worker selection scheme.The average profit of workers has been increased by 14% compared with the best-effort worker selection scheme.

VII. CONCLUSION
In this paper, a distributed computing framework is proposed for the vehicular metaverse based on CDC and blockchain.The subjective logical model is used to compute the reputation values of vehicles.A hierarchical game-theoretic CDC framework is proposed for the vehicular metaverse, the coalition formation game is combined with the reputation metric in the upper layer to select reliable workers, and the Stackelberg game is designed in the lower layer to incentivize workers to join the CDC rendering tasks.Finally, the hierarchical game-based CDC reliable worker incentive mechanism is simulated and analyzed.Simulation results indicate that the proposed reliable CDC scheme is resistant to the malicious workers and is suitable for the decentralized CDC in the vehic-ular metaverse.The utility of the MSP has been increased by 17%, and the average profit of workers has been increased by 14% compared with the best-effort worker selection scheme.In future works, specific consensus mechanisms of blockchain for the vehicular metaverse might be studied.

Fig. 2 :
Fig. 2: System model: Worker selection and CDC rendering task execution in vehicular metaverse.

P
i first divides the rendering matrix A i into K equal-sized submatrices in R (3×2×np ) K ×np .Then, based on (N, K) MDS code, the MSP gets N encoded submatrices with the same size (3×2×np) K
u rec i→w }.The recommended reputation opinion of worker w is the combination of all the recommenders' local opinions with their weight ω r , r ∈ .b rec i→w , d rec i→w and u rec i→w are represented as follows:    b rec i→w = r∈ ω r b local r→w , d rec i→w = r∈ ω r d local r→w , u rec i→w = r∈ ω r u local r→w.

Definition 1 :
A group of mutually disjoint coalitions in M is represented as Π = {G 1 , G 2 , . . ., G o , . . ., G O }, where G o ∩ G o = φ for o = o , O is the number of coalitions.If the group covers all the players in M, i.e., ∪ O o=1 G o = M, the group is called a coalition partition of M [32].
i→w |∪ m∈Go W m | is the average reputation values of workers in the coalition G o .ρ c and ρ r are the coefficients that maintain the importance of the above two parts on the contribution value.The communication cost among miners increases with the growth of the number of miners in the coalition, because forming a miner coalition requires negotiation and information exchange that may bring the cost and reduce the gains from forming the coalition [33].For the coalition G o , the communication cost C (G o ) should reflect the negotiation and information exchange overhead, which are determined by the number of miners in the coalition G o .The communication cost C (G o ) should satisfy the following requirements.Firstly, the communication cost C (G o ) increases monotonically with respect to |M o | that is the number of miners in the coalition G o .Secondly, the slope of C (G o ) becomes steeper with the increase of |M o |.

Algorithm 1 1 :
Coalition formation algorithm for miners in the proposed model Input: Set of miners M = {1, 2, . . ., m, . . ., M }.Workers selected by miners W m = W m,1 , W m,2 , . . ., W m,|Wm| , 1 m M ; Output: The coalition with the highest coalition utility; 1: Initialization: The partition of miners, where all the miners are disjoint is selected as the initial state.Each miner selects several workers and computes selected workers' compositive reputation value; 2: Merge mechanism: The Coalition G o tries to merge with G o based on the merge rule; 3: Split mechanism: The Coalition G o tries to split with G o based on the split rule; 4: Until: Merge and split iteration terminates; 5: Return: The coalition with the highest coalition utility.For the designed coalition formation game G, the grand coalition of all the miners seldom forms due to the communication cost.Besides, the participation of miners that obtain the low reputation values of workers may degrade the coalition utility, which also prevents the grand coalition formation.Next, we use the defection function D hp to analyze the stability of the final coalition partition.Definition 4: A partition Π = {G 1 , G 2 , . . ., G o , . . ., G O } is stable if no coalition G o is incentivized to change the current partition Π by joining another coalition G o , where G o ∩ G o = φ, for o = o , or trying to split into smaller disjoint coalitions [31].Definition 5: A partition of coalitions Π = {G 1 , G 2 , . . ., G o , . . ., G O } is D hp -stable if it meets the following two conditions: 1) For o ∈ {1, . . ., O} and each partition {R 1 , . . ., R p } of coalition G o , we have {R 1 , . . ., R p } G o ; 2) For S ∈ {1, . . ., O}, we have o∈S G o {G o | o ∈ S}.where is the opposite rule of .Theorem The coalition partition under the proposed scheme is D hp -stable.Proof: We first consider the condition 1. Π = {G 1 , G 2 , . . ., G o , . . ., G O } is the final partition obtained from the coalition formation algorithm.If for o ∈ {1, . . ., O} and any partition {R 1 , . . ., R p } of G o , there has {R 1 , . . ., R p } G o , then the partition G o will split, which is in contradiction with the fact that Π is a final partition resulted from the mergeand-split iteration.For condition 2, we still consider the same final coalition set Π = {G 1 , G 2 , . . ., G o , . . ., G O }.If for each S ∈ {1, . . ., O}, there has o∈S

Fig. 7 :Fig. 8 :
Fig. 7: Reward strategy of MSP as function of size of rendering matrix.

Fig. 9 :Fig. 10 :
Fig. 9: Average computation speed of workers as function of size of rendering matrix.

Fig. 11 :
Fig. 11: Utility of MSP as function of the mean of start-up time.

Fig. 12 :
Fig. 12: Average profit of workers as function of the mean of start-up time.

Fig. 13 :Fig. 14 :
Fig. 13: Utility of MSP as function of number of selected workers.

MSP Any results 2 y Worker Selection Phase (Coalition game) CDC Rendering Task Execution Phase (Stackelberg game)
Reputation Calculation 1) Local opinions for subjective logic: The MSPs' direct reputation opinions to all workers are recorded on blockchain.MSP P i sends a transaction to blockchain to recruit workers.Then, the workers that are willing to help MSP P i send transactions to respond to MSP P i .Miners compute the workers' compositive reputation opinions by combining the direct reputation opinions updated by MSP P i , and those updated by other MSPs on blockchain.MSP P i 's direct reputation opinions are considered to be local reputation opinions, and other MSPs' direct reputation opinions are considered to be recommended reputation opinions.The local opinion of MSP P i to worker w in the subjective logic model is expressed as a vector R local i→w = 2: while ∂u Pi /∂R com × ∂u Pi ∂R com < 0 do if ∂u Pi /∂R com × ∂u Pi ∂R com < 0 then × R com + R com ; 14: Each worker w decides its computing speed strategy µ w based on (35); 15: Return: Optimal reward strategy of the MSP R * com and optimal computing speed of workers µ * ; u Pi (R com ; µ) = U (µ * 1 , . . ., µ * w , . . ., µ * N

TABLE I :
Parameter settings