Optimal pricing allocation method for Docker resources based on Internet of Vehicles

By obtaining data from each participant in the edge computing environment of the Internet of Vehicles, solving the optimal offline utility maximization model, and searching for the optimal publication of pricing, the problem of multi-server and multiple Docker resource allocation is solved, and the overall system utility maximization under resource constraints and deployment constraints is achieved.

CN120047174APending Publication Date: 2025-05-27YUNNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510201203.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In the Internet of Vehicles Edge Computing Environment, it is difficult for the prior art to effectively allocate and price multiple Docker resources on multiple mobile edge computing servers, making it difficult to maximize the overall system utility.

Method used

A method of optimal pricing and allocation for Docker resources based on the Internet of Vehicles is proposed. By obtaining data from each participant, the optimal offline utility maximization model is solved, and a resource allocation plan that maximizes the overall utility of the system is generated based on the optimal pricing.

Benefits of technology

Under resource constraints and deployment constraints, the overall system effectiveness is maximized, the efficiency and stability of resource allocation are improved, and the time complexity is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120047174A_ABST
    Figure CN120047174A_ABST
Patent Text Reader

Abstract

The invention discloses a Docker resource optimal pricing allocation method based on the Internet of Vehicles, which comprises the following steps: firstly, acquiring data of each participant in the Internet of Vehicles, including a mobile edge computing server set, a provided docker resource set, a Docker inventory matrix on a mobile edge computing server, a user set and a user estimation set; a connectivity constraint matrix between the user and the mobile edge computing server and a queue of arrived users; and solving the optimal offline utility maximization model to obtain an initial resource allocation scheme, searching based on the initial resource allocation scheme to obtain an optimal publication price, and obtaining a resource allocation scheme for maximizing the overall utility of the system according to the optimal publication price. According to the method, the problem of allocation of various Docker resources on a plurality of mobile edge computing servers in the edge computing service of the Internet of Vehicles is solved, and the overall utility of the system is maximized under resource constraint and deployment constraint.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of vehicle networking edge computing. More specifically, it relates to an optimal pricing and allocation method for Docker resources based on vehicle networking. Background Art

[0002] The development of intelligent vehicle technology has enabled vehicle networking to carry more application scenarios, and edge computing is an essential part of realizing vehicle networking applications. However, the data processing capacity of vehicles themselves is limited. By deploying mobile edge computing servers (MCS) around vehicles, vehicles can offload computing tasks to Docker containers in MCS for computing and processing in real time, reducing the computing burden of vehicles and energy consumption, and providing a low-energy consumption network service solution for vehicle users. During the task offloading process, MCS service providers obtain benefits by providing computing resources, while users hope to use Docker at a lower price. To maximize the utility of both parties, it is indeed necessary to design a reasonable resource allocation and pricing mechanism.

[0003] Mechanism design, as a subfield of game theory, plays a key role in fields such as cloud computing, edge computing, and mobile crowdsensing. The integration of mobile edge computing (MEC) and mechanism design has received extensive attention from researchers. In practical applications, mechanism design usually involves pricing and allocation to ensure that the prices of goods or services are effectively determined and allocated to appropriate users. Currently, many scholars are studying resource allocation and pricing issues related to MEC, and these studies are used for pricing and allocation in the Internet of Things and mobile devices. Du et al. proposed an asynchronous advantage actor-critic (A3C) deep reinforcement learning algorithm to perform resource pricing and allocation, achieving a good balance between risk and return. He et al. proposed an auction-based incentive mechanism and optimized system welfare without knowing future information. Ma et al. proposed a truthful combinatorial bilateral auction mechanism that combines the filling concept and an efficient pricing strategy, ensuring expectations in a restricted MEC environment. The above studies show that using the auction mechanism as the pricing and allocation scheme for MEC is an effective approach.

[0004] Existing scholars have conducted extensive research on the combination of edge computing and mechanism design in the Internet of Vehicles. For example, Bahreini et al. proposed two resource allocation mechanisms: one based on the auction mechanism, which ensures natural individual rationality and envy-free allocation; the other based on linear programming (LP) approximation, which provides a solution with a certain error from the optimal solution. In the context of MEC as an online real-time scenario, although payment and allocation schemes can be calculated, they are difficult to solve within polynomial time. Although the mechanisms designed using the theory of monotonic allocation and pivotal payment pricing can ensure the efficiency of system operation, they may reduce the utility of ECS providers. Li et al. proposed a resource allocation and pricing mechanism for single-type edge servers, ensuring that each user is a winner. However, this sacrifices the total utility to ensure the utility of ECS providers. These methods adopt online real-time calculation of Docker pricing to ensure the efficiency of system operation, but time efficiency is still a problem. Additionally, it is worth mentioning that this mechanism only considers the single resource pricing and allocation on ECS and does not consider scenarios with multiple resources. On the other hand, Mashayekhy et al. considered the multi-dimensional resource scenario and combined the Vickrey-Clarke-Groves (VCG) payment with the pivotal payment pricing strategy, which also results in losses in efficiency and utility. In summary, traditional mechanism design encounters some problems when used in online environments, such as the need to obtain user bid information in advance, high algorithm complexity, or sacrificing provider utility.

[0005] In the design of incentive mechanisms, the Posted Price mechanism is a simple pricing strategy where the seller publicly announces the price of goods or resources in advance; due to its advantages such as natural rationality, fairness, and ease of implementation, it is widely adopted by enterprises and scholars. Combine the prophet inequality with the Posted Price mechanism and revenue maximization achieved through Bayesian settings. By collecting the information provided by users, calculate the price of goods in advance. Since the price is determined before the system starts, only allocation decisions need to be made throughout the process, effectively reducing the time complexity. Hu et al. proposed a novel Posted Price mechanism aimed at determining the task price in the prevalent microtask crowdsourcing scenario. This mechanism not only has better effects but also eliminates the need for a limited price range. Correa et al. proposed a Posted Price mechanism for multi-resource allocation, which theoretically guarantees an approximation ratio of 1 / (d + 1) to the optimal social welfare under any user arrival sequence, where d is the maximum number of goods purchased by users. However, this mechanism cannot be directly applied to mobile edge computing (MEC) because it only guarantees this approximation for single-dimensional resource scenarios and does not extend to multi-dimensional resources.

[0006] Combining the Posted Price mechanism with vehicle network edge computing is a novel idea. Figure 1 It is a schematic diagram of the resource allocation process in vehicle network edge computing combined with the Posted Price mechanism. As Figure 1 shown, the resource allocation process in vehicle network edge computing combined with the Posted Price mechanism includes the following steps:

[0007] 1. Calculate the pricing of Docker resources on each ECS according to the user's requirements and bids.

[0008] 2. Users enter the system in a random order and purchase Docker according to the pricing.

[0009] 3. The ECS provider allocates the corresponding Docker to the user for task offloading.

[0010] 4. The user's vehicle offloads the task to the allocated Docker.

[0011] 5. After each vehicle is allocated, the ECS provider updates the Docker inventory on the corresponding server.

[0012] According to the above steps, different from the traditional auction mechanism design, the Posted Price mechanism allows the Docker on the edge computing server (ECS) to be priced in advance based on user valuations. Since it is necessary to collect real user valuations in advance, this mechanism ensures authenticity and individual rationality. In addition, in real-time scenario decision-making, users can enter the system at any time, and this mechanism can directly allocate Docker to users without re-pricing, thus reducing the time complexity. However, this design faces two major challenges. The first challenge is Docker pricing, which acts as a lever between user utility and MEC provider utility. When the pricing is too low, the utility of the MEC provider will decrease; if the pricing is too high, it cannot match the valuations of most users, resulting in Docker not being allocated. The second challenge is the complexity of the vehicle network edge computing application scenario. Each ECS cannot cover all vehicles, and the ECS provider needs to deploy multiple ECSs to cover more vehicles. Vehicles will purchase Docker from connectable ECSs under deployment constraints, so existing pricing mechanisms cannot be directly applied to the MEC scenario. These two major challenges significantly increase the difficulty of designing a pricing mechanism in the MEC context. Summary of the Invention

[0013] The object of the present invention is to overcome the deficiencies of the prior art, provide an optimal pricing and allocation method for Docker resources based on the vehicle network, solve the problem of allocating various Docker resources on multiple mobile edge computing servers in the vehicle network edge computing service, and maximize the overall system utility under resource constraints and deployment constraints.

[0014] To achieve the above object, the optimal pricing and allocation method for Docker resources based on the vehicle network of the present invention includes the following steps:

[0015] S1: Obtain the data of each participant in the vehicle network, including:

[0016] The set of mobile edge computing servers provided by the service provider The set of Docker resources provided and the Docker inventory matrix Q on the mobile edge computing server:

[0017]

[0018] where q jk represents the quantity of the k-th Docker on the mobile edge computing server j,

[0019] The set of users in the vehicle network The valuation set b of each user i i =(b i1 , b i2 ,..., b iK ), b ik represents the valuation of user i for the k-th Docker; the connectivity constraint matrix Δ between the user and the mobile edge computing server:

[0020]

[0021] where δ ij =1 indicates that user i can connect to the mobile edge computing server j and can purchase Docker on this mobile edge computing server. Conversely, δ ij =0;

[0022] Obtain the queue σ of the currently arrived users, denote the number of users in the queue σ as T, and the original serial number of the t-th user as i t , t = 1, 2,..., T;

[0023] S102: Solve the optimal offline utility maximization model to obtain the initial decision variables corresponding to each user

[0024]

[0025] Among them, the initial decision variable indicates that a Docker of type k on the mobile edge computing server j is allocated to user i, and vice versa d represents the maximum number of Docks that a user can purchase;

[0026] S3: Search for the optimal announced price based on the preliminary resource allocation plan obtained in step S2. The specific steps include:

[0027] S3.1: Initialize the optimal announced price matrix P:

[0028]

[0029] Among them, p jk represents the price of the k-th Docker on the edge computing server j;

[0030] S3.2: Calculate the loss function h(P) using the following formula:

[0031]

[0032] Among them, represents the utility that user i can obtain under the current optimal announced price matrix P. The calculation formula is as follows:

[0033]

[0034] Among them, [·] + represents the positive part;

[0035] S3.3: Determine whether the search end condition is reached. If so, go to step S3.4; otherwise, the search ends;

[0036] S3.4: Update the optimal distribution price matrix P using the following formula:

[0037]

[0038] Among them, α represents the preset learning rate;

[0039] Then return to step S3.2;

[0040] S4: Generate the final Docker resource allocation plan. The specific steps include:

[0041] S4.1: Initialize the resource allocation matrix X = 0, that is, the decision variable x of each user ijk = 0.

[0042] Initialize the set of remaining resource binary tuples Each pair (j, k) represents the remaining k-th Docker on each edge computing server j when the first user arrives;

[0043] S4.2: Initialize the user arrival sequence number t = 1;

[0044] S4.3: Solve the following formula to obtain the set of allocation pairs for user i t where each pair (j, k) represents the edge computing server and Docker allocated to the current user: Each pair (j, k) represents the edge computing server and Docker allocated to the current user:

[0045]

[0046] S4.4: Determine whether If so, go to step S4.6; otherwise, go to step S4.5;

[0047] S4.5: For each allocation pair (j, k) in the set of allocation pairs let the corresponding decision variable x ijk = 1; go to step S4.6;

[0048] S4.6: Determine whether t < T. If so, go to step S4.7; otherwise, go to step S4.9;

[0049] S4.7: Update the set of remaining resource pairs t according to the set of allocation pairs for user i

[0050] S4.8: Let t = t + 1 and return to step S4.3;

[0051] S4.9: Generate the final resource allocation matrix X according to the decision variables x ijk of the current users.

[0052] The optimal pricing allocation method of Docker resources based on the vehicle-to-everything network of the present invention first obtains the data of each participating party in the vehicle-to-everything network, including the set of mobile edge computing servers, the set of Docker resources provided, the Docker inventory matrix on the mobile edge computing servers, the set of users, the set of user valuations, the connectivity constraint matrix between the users and the mobile edge computing servers, and the queue of the arrived users; solves the optimal offline utility maximization model to obtain the initial resource allocation plan, then searches for the optimal announced price based on the preliminary resource allocation plan, and then obtains the resource allocation plan that maximizes the overall system utility according to the optimal announced price.

[0053] The present invention has the following beneficial effects:

[0054] 1) The present invention proposes an optimal posted price mechanism for solving the allocation problem of multiple servers and multiple Docker resources in vehicle-to-everything (V2X) edge computing services, transforming this problem into an integer programming model to maximize the overall system utility under resource constraints and deployment constraints.

[0055] 2) When searching for the optimal posted price, the present invention designs a payment algorithm based on gradient descent to determine the optimal resource pricing, improving the search efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a schematic diagram of the resource allocation process in V2X edge computing combined with the posted price mechanism;

[0057] Figure 2 is a flowchart of the specific implementation manner of the optimal pricing allocation method of Docker resources based on V2X in the present invention;

[0058] Figure 3 is a flowchart of searching for the optimal posted price matrix in the present invention;

[0059] Figure 4 is a flowchart of generating a Docker resource allocation scheme in the present invention;

[0060] Figure 5 is a schematic diagram of the Docker resource allocation scenario in this embodiment;

[0061] Figure 6 is a comparison chart of the overall utility of the present invention and the comparative method under different numbers of users in this embodiment;

[0062] Figure 7 is a comparison chart of the provider utility of the present invention and the comparative method under different numbers of users in this embodiment;

[0063] Figure 8 is a comparison chart of the user utility of the present invention and the comparative method in this embodiment;

[0064] Figure 9 is a comparison chart of the number of winners of the present invention and the comparative method under different numbers of users in this embodiment;

[0065] Figure 10 is a comparison chart of the Docker utilization rate of the present invention and the comparative method under different numbers of users in this embodiment;

[0066] Figure 11 is a comparison chart of the overall utility of the present invention and the comparative method under different maximum purchase numbers of users in this embodiment;

[0067] Figure 12It is a comparison chart of the provider utility of the present invention and the comparative method under the maximum purchase quantity of different users in this embodiment;

[0068] Figure 13 It is a comparison chart of the user utility of the present invention and the comparative method under the maximum purchase quantity of different users in this embodiment;

[0069] Figure 14 It is a comparison chart of the number of winners of the present invention and the comparative method under the maximum purchase quantity of different users in this embodiment;

[0070] Figure 15 It is a comparison chart of the Docker utilization rate of the present invention and the comparative method under the maximum purchase quantity of different users in this embodiment. Detailed implementation manners

[0071] The following describes the detailed implementation manners of the present invention with reference to the accompanying drawings, so that those skilled in the art can better understand the present invention. It should be particularly noted that in the following descriptions, when the detailed descriptions of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.

[0072] To better illustrate the technical solution of the present invention, a brief description of the principle derivation of the present invention will be given first.

[0073] In the vehicle-to-everything network, it is recorded that the service provider provides M mobile edge computing servers (MCS) to store resources. Denote the set of mobile edge computing servers And there are K different types of Docker resources on each mobile edge computing server. Denote the set of Docker resources The quantity of the k-th Docker on the mobile edge computing server j is denoted by q jk to represent. Define the Docker inventory matrix Q of all mobile edge computing servers as:

[0074]

[0075] Denote the set of users composed of N users Each user i has a valuation set b i =(b i1 , b i2 ,..., b iK ), b ik represents the valuation of user i for the k-th Docker. Generally speaking, b i comes from the valuation distribution function of user i for different Docks, and this valuation distribution function can be statistically obtained from the historical statistical data of user bids.

[0076] Generally, service providers deploy multiple mobile edge computing servers, and each mobile edge computing server can only cover a certain area, which also restricts users to connect only to nearby mobile edge computing servers. Therefore, the connectivity constraint matrix between users and mobile edge computing servers is denoted as Δ:

[0077]

[0078] where δ ij = 1 indicates that user i can connect to mobile edge computing server j and can purchase Docker on this mobile edge computing server. Conversely, δ ij = 0. Due to the connection restrictions between users and mobile edge computing servers, d is used to represent the maximum number of Docker that users can purchase.

[0079] The service provider needs to set prices for each type of Docker on each mobile edge computing server. The price matrix is denoted as P:

[0080]

[0081] where p jk represents the price of the kth type of Docker on edge computing server j. For example, p 13 represents the price of the 3rd type of Docker on the 1st ECS. This price matrix is determined by the Posted Price mechanism described later.

[0082] In the prior art, the optimal offline utility maximization model can be used to solve the Docker resource allocation scheme This is the optimal allocation model without considering price factors. The decision variable x ijk = 1 means allocating one k-type Docker resource on server j to user i, and conversely x ijk = 0. In a real scenario, users may purchase more than one of the same type of Docker, but x ijk can only be equal to 0 or 1. The solution to this problem is that if a user purchases more than one of the same type of Docker, the Docks greater than one are regarded as other unique types of Docker for calculation. In , the maximized utility under the total resources, deployment constraints, and allocation constraints is considered. That is:

[0083]

[0084] x ijk = {0,1}(4d)

[0085] Among them, (4a) means that for any edge computing server, the total number of allocated Dockers does not exceed the available number of this type of Docker; (4b) means that for any user i, the total number of allocated Dockers does not exceed d; (4c) means that for user i, the number of the k-th type of allocated Docker is at most 1; (4d) means that this is an integer programming problem. It should be noted that there is no restriction in the system that requires users to allocate all the Dockers they want from the same ECS; in other words, the Dockers allocated by users (at most d) can come from any edge computing server they are connected to. The optimal offline utility maximization model is a commonly used allocation model in mechanism design, aiming to maximize social welfare and determine the payment price accordingly. However, since the resource allocation problem belongs to the NP-hard problem and cannot be solved in polynomial time, the application of these problems in real-time scenarios is not extensive.

[0086] The present invention proposes an offline utility maximization model under price constraints

[0087]

[0088] x ijk ={0,1}(5e)

[0089] p jk ∈R + ∪{0}(5f)

[0090] Among them, (5a)-(5d) are similar to the explanations in formula 1, and (5d) means that the total price of the Dockers allocated to any user is less than the total of its valuations. (5f) means that all the pricing is non-negative.

[0091] The difference between formula (5) and formula (4) is that the price constraint (5d) is added, which means that the user's final payment needs to be less than or equal to the user's bid for the allocated resources. Obviously In subsequent allocations, use as a benchmark for evaluation.

[0092] In a real-world environment, users enter the system in any order, which constitutes an online model. Therefore, the utility obtained by the provider depends on the order of user arrivals. In the present invention, users do not simply purchase Docker on a single server; instead, they consider purchasing from different servers, each of which may set different prices due to deployment constraints and user valuations. In the pricing mechanism, the service provider pre-sets a price matrix P and then considers any order of user arrivals. Suppose when a user i arrives, he selects a subset from the edge computing servers with remaining Docker to maximize the user's utility.

[0093]

[0094] Where, The set of remaining resource tuples, where each tuple (j, k) represents the remaining k-th type of Docker on each edge computing server j when user i arrives. For example, (1, 2) means that at least one inventory of the 2nd type of Docker on the 1st MCS exists when user i arrives, and (2, 2) means that at least one inventory of the 2nd type of Docker on the 2nd MCS exists, and so on. Represents the set of user allocation tuples, where each tuple (j, k) represents the edge computing server and Docker allocated to the current user. For example, (3, 2) in it represents that the current user is allocated the 2nd type of Docker on the 3rd MCS, and (2, 5) means that the current user is allocated the 5th type of Docker on the 2nd MCS, and so on. If no Docker is allocated when this user i arrives, that is That is, the set of (MCS, Docker) finally allocated by the user is an empty set. And when the user has multiple options to obtain the same benefit, the user can arbitrarily choose one option.

[0095] Since the order of users affects the system utility, σ is used to represent the order of user arrivals. Define the arrival time of user i in the order of σ as σ(i). At this time, the set of remaining resource tuples Represents the purchase set of user i on the premise that the order of user arrivals is σ The expression of is as follows:

[0096]

[0097] That is, according to the current set of remaining Docker Select the set with the maximum utility This:

[0098]

[0099] Denote the set of MCS tuples where the previous users have purchased but there are still remaining Dockers when user i arrives.

[0100] On this basis, define ALG(P) as the minimum value of the overall utility under any user sequence given the price matrix P.

[0101]

[0102] Next, it will be shown that there exists an item price matrix P such that the expected allocation revenue generated by ALG(P) is at least 1 / (d + 1) times the optimal utility.

[0103] Theorem 1. There exists a price matrix such that

[0104]

[0105] To prove this theorem, the optimal offline utility maximization allocation without price constraints will be obtained using CPLEX Meanwhile, define as the optimal utility when the set of edge computing servers is as the optimal allocation scheme when the set of edge computing servers is

[0106] When the price is P, define the user utility at this time as:

[0107]

[0108] Its meaning is that when the MCS set is the utility that user i can obtain under the pricing matrix P, where [·] + represents the positive part.

[0109] Lemma 1. For any pricing matrix P,

[0110]

[0111] The proof is as follows:

[0112] Divide the allocation welfare obtained by ALG(p) into two parts: revenue and utility, and get:

[0113]

[0114] Use the set to represent the set of servers with remaining Dockers after the entire Docker allocation process ends. It can be seen that ​​Denote the revenue obtained by the servers that have allocated all Dockers. The revenue includes the revenue obtained from the servers that have sold all and part of the Dockers. Therefore, the revenue Revenue satisfies the following formula:

[0115]

[0116] Meanwhile, the utility of the user satisfies

[0117]

[0118] because the utility generated by the Docker selected when the user arrives must be greater than or equal to the utility obtained by the user when solving the optimal solution in the final remaining set R

[0119] Then, the utilities of all users can be accumulated to deduce:

[0120]

[0121] Then, the two parts can be added together, and we can obtain

[0122]

[0123] Substitute with It can be known that:

[0124]

[0125] Moreover, for any set, it holds.

[0126] Lemma 2. For any pricing matrix P,

[0127]

[0128] The proof is as follows:

[0129] Because And according to formula (11), so It can be written as:

[0130]

[0131] Because the revenue obtained from selling Dockers in the optimal allocation plan must be less than or equal to the revenue obtained after all Dockers are sold out, so there is:

[0132]

[0133] Then it can be deduced that:

[0134]

[0135] Lemma 3. There exists a pricing matrix \(P\) such that the following equation is satisfied:

[0136]

[0137] The proof is as follows:

[0138] Define a field and a function \(\psi:L\rightarrow L\), for \(P\in L\) and then the coordinate of the \(j\)-th row and \(k\)-th column of the function \(\psi\) is:

[0139]

[0140] It can be seen that \(\psi\) jk (P) is a decreasing function of \(P\), and we can get Therefore, \(\psi(P)\in L\) for all \(P\in L\). According to the fixed-point theorem of the Brouwer theory, the lemma holds. And this fixed point of the function \(\psi\) is exactly the optimal pricing matrix \(P\) we are looking for. * .

[0141] Here we prove Theorem 1:

[0142] According to the above Lemma 1, we can get:

[0143]

[0144] Replace the set with We can get

[0145]

[0146] According to Lemma 3, we can obtain the optimal price matrix \(P\) * , and substituting it into Lemma 2, we can get

[0147]

[0148] From this, we can get:

[0149]

[0150] Because:

[0151]

[0152] Therefore, we can get:

[0153]

[0154] According to Theorem 1, compared with the static optimal welfare without price constraints, this method can still maintain at least 1 / (d + 1) times of it, and the same result also holds for the static optimal welfare with price constraints.

[0155] Assume that the optimal solution has been obtained. The bid b of each user i , and the Docker quantity matrix Q of the mobile edge computing server. Design an algorithm based on gradient descent (GD) according to Lemma 3 to obtain the optimal price matrix P. * . First, construct a loss function:

[0156]

[0157] Then use the gradient descent algorithm (GD) to make the equation h(P) = 0. At this time, the optimal price matrix P can be obtained. * .

[0158] Based on the above technical derivations, the present invention proposes an optimal pricing and allocation method for Docker resources based on the vehicle-to-everything network. Figure 2 It is the flowchart of the specific implementation manner of the optimal pricing and allocation method for Docker resources based on the vehicle-to-everything network of the present invention. As Figure 2 shown, the specific steps of the optimal pricing and allocation method for Docker resources based on the vehicle-to-everything network of the present invention include:

[0159] S201: Obtain vehicle-to-everything network data:

[0160] Obtain the data of each participant in the vehicle-to-everything network, including:

[0161] The set of mobile edge computing servers provided by the service provider The set of Docker resources provided and the Docker inventory matrix Q on the mobile edge computing server:

[0162]

[0163] where q jk represents the quantity of the k-th type of Docker on the mobile edge computing server j,

[0164] The set of users in the vehicle-to-everything network The set of valuations b of each user i i =(b i1 , b i2 ,..., b iK ), b ikDenote the valuation of user \(i\) for the \(k\)th type of Docker; the connectivity constraint matrix \(\Delta\) between the user and the mobile edge computing server:

[0165]

[0166] where \(\delta\) ij \( = 1\) indicates that user \(i\) can connect to mobile edge computing server \(j\) and can purchase Docker on this mobile edge computing server. Conversely, \(\delta\) ij \( = 0\).

[0167] Obtain the queue \(\sigma\) of currently arrived users. Denote the number of users in queue \(\sigma\) as \(T\), and the original serial number of the \(t\)th user as \(i\) t , \(t = 1, 2, \ldots, T\).

[0168] S202: Generate a preliminary Docker resource allocation plan:

[0169] Solve the optimal offline utility maximization model to obtain the initial decision variables corresponding to each user

[0170]

[0171]

[0172] where the initial decision variable indicates allocating one \(k\)-type Docker resource on mobile edge computing server \(j\) to user \(i\). Conversely, \(d\) represents the maximum number of Docker that a user can purchase.

[0173] The solution method of the optimal offline utility maximization model can be set according to actual needs. In this embodiment, the CPLEX optimization solver is used to solve this model.

[0174] S203: Search for the optimal announced price:

[0175] Next, based on the preliminary resource allocation plan obtained in step S202, search for the optimal announced price. Figure 3 is the flowchart for searching the optimal announced price matrix in the present invention. As Figure 3 shown, the specific steps for searching the optimal announced price in the present invention include:

[0176] S301: Initialize the optimal announced price matrix:

[0177] Initialize the optimal announced price matrix \(P\):

[0178]

[0179] where \(p\)jk Denote the price of the k-th Docker on the edge computing server j.

[0180] S302: Calculate the loss function:

[0181] Calculate the loss function h(P) using the following formula:

[0182]

[0183] where, Denote the utility that user i can obtain under the current optimal announced pricing matrix P, and the calculation formula is as follows:

[0184]

[0185] where, [·] + Denote the positive part;

[0186] S303: Determine whether the search end condition is reached. If so, go to step S304; otherwise, the search ends. The search end condition can be set according to actual needs. Generally, it is that the number of search iterations reaches the preset maximum value, or the loss function converges.

[0187] S304: Update the optimal announced pricing matrix:

[0188] Update the optimal distribution pricing matrix P using the following formula:

[0189]

[0190] where, α denotes the preset learning rate. In this embodiment, α = 10 -6 .

[0191] Then return to step S302.

[0192] S204: Generate the final Docker resource allocation plan:

[0193] Next, generate the final Docker resource allocation plan based on the optimal announced pricing. Figure 4 Is the flowchart of generating the Docker resource allocation plan in the present invention. As Figure 4 shown, the specific steps of generating the Docker resource allocation plan in the present invention include:

[0194] S401: Initialize the resource allocation parameters:

[0195] Initialize the resource allocation matrix X = 0, that is, the decision variable x ijk of each user = 0.

[0196] Initialize the set of remaining resource binary tuples Each binary tuple (j, k) represents the remaining k-th Docker on each edge computing server j when the first user arrives.

[0197] S402: Initialize the user arrival sequence number t = 1.

[0198] S403: Solve the set of user allocation binary tuples:

[0199] Solve the following formula to obtain the set of allocation binary tuples for user i t

[0200]

[0201] Among them, the number of binary tuples in the set of allocation binary tuples ≤ d, and each binary tuple (j, k) represents the edge computing server and Docker allocated to the current user.

[0202] S404: Judge whether If yes, go to step S406; otherwise, go to step S405.

[0203] S405: Change the user decision variable:

[0204] For each allocation binary tuple (j, k) in the set of allocation binary tuples , set the corresponding decision variable x ijk = 1. Go to step S406.

[0205] S406: Judge whether t < T. If yes, go to step S407; otherwise, go to step S408.

[0206] S407: Update the set of remaining resource binary tuples:

[0207] According to the set of allocation binary tuples of user i t Update the set of remaining resource binary tuples

[0208] S408: Let t = t + 1, and return to step S403.

[0209] S409: Determine the final Docker resource allocation plan:

[0210] According to the decision variables x of each current user ijk , generate the final resource allocation matrix X.

[0211] To better illustrate the technical solution of the present invention, specific examples are used to conduct experimental verification on the present invention.

[0212] In this embodiment, there are 2 mobile edge computing servers in the vehicle network, namely And there are 2 different types of Docker in each mobile edge computing server, namely And the inventory of each type of Docker is 1, so the inventory matrix

[0213] Suppose there are 3 users now, that is, the user set The valuation of each user for Docker is b 1 = [7, 3], b 2 = [4, 4], b 3 = [3, 8]. The connection constraints between users and mobile edge computing servers are δ 1 = [0, 1], δ 2 = [1, 0], δ 3 = [1, 1]. The maximum purchase quantity d set in this embodiment is 2.

[0214] According to Algorithm 1, the final pricing matrix The optimal total utility of the system without price constraints is And the optimal total utility of the system with price constraints is also

[0215] Table 1 is the utility table under different user arrival orders in this embodiment.

[0216]

[0217] Table 1

[0218] Next, the situation where the user arrival order is (u 3 , u 2 , u 1 ) will be described in detail. First, user u 3 enters the system. At this time, this user can be assigned any MCS. For the first type of Docker, since the price of the Docker on the second MCS is greater than the valuation of user u 3 , user u 3 can only be assigned by the first MCS. And for the second type of Docker, the Docker on the first MCS that makes the user utility greater is selected and assigned to user u 3 . At this time, the Docks assigned to user u 3 are (1, 1), (1, 2) respectively. Update the inventory matrix So the utility obtained by user u 3 is (3 - 2) + (8 - 2) = 7, and the income of the service provider is 2 + 2 = 4.

[0219] Next, user u2 Enter the system. Since user u 2 can only connect to the first MCS, and the Docker on this MCS has been sold out. At this time, user u 2 is not allocated resources, that is, both the user utility and the user payment are 0.

[0220] Finally, user u 1 enters the system. This user can connect to the second MCS. By comparing the user's valuation with the Docker pricing on the second MCS, u 1 The allocated Docker set is (2, 1). So u 1 The obtained utility is 7 - 3.5 = 3.5, and the payment received by the service provider is 3.5. When the above results are added, the income of the service provider is 3.5 + 4 = 7.5, and the total utility of the user is 7 + 3.5 = 10.5. At this time, the overall utility is 7.5 + 10.5 = 18. The analysis of other user orders is similar.

[0221] It can be seen from Table 1 that (u 1 , u 2 , u 3 ), (u 2 , u 1 , u 3 ) and (u 2 , u 3 , u 1 ) are the optimal user arrival orders and have the same overall utility as the optimal solution while (u 1 , u 3 , u 2 ), (u 3 , u 1 , u 2 ) and (u 3 , u 2 , u 1 ) are the worst cases, but still have an overall utility close to the optimal solution.

[0222] Next, the technical effects of the present invention are experimentally verified by building an experimental environment. To ensure the reliability of the experiment, various resource allocation scenarios are set in a real city in this embodiment. Figure 5 is the schematic diagram of the Docker resource allocation scenario in this embodiment. As Figure 5As shown, in this embodiment, 7 MCSs are established in the experimental area for resource sales, and 5 different types of Docker are set, with 3 in stock for each type of Docker. In this embodiment, data of 200 different users is used, and the bids of users for each type of Docker are extracted according to a Gaussian distribution with a standard value of 50 and a variance of 15. The number of connectable MCSs for users is randomly generated, with a minimum of no less than 1. Before resource allocation, users submit data such as obtained deployment constraints and quotes to the system. For each experimental metric, 5 sets of data samples of different users are extracted from the dataset, and the arrival order of each group of users is determined. Then these data are input into different algorithms for experimental evaluation, and the average values of the results are plotted.

[0223] In this embodiment, the present invention (Posted Price) is compared with the solution of, and the ODRAP algorithm (see the literature "Jixian Zhang, Xutao Yang, Ning Xie, Xuejie Zhang, Athanasios V Vasilakos, and Weidong Li. An online auction mechanism for time-varying multidimensional resource allocation in clouds. Future Generation Computer Systems, 111:27–38, 2020.") and the Fixed Price algorithm. In the Fixed Price algorithm, the price of Docker on each MCS is set based on the sum of all users' quotes for a certain type of Docker divided by 30% of the total number of users, and the allocation algorithm follows the allocation mechanism of the present invention. (For example, if the sum of all users' quotes for a certain type of Docker is 200 and there are 5 users, the price of this type of Docker on each MCS is set to 12). It should be noted that some improvements are made to ODRAP in this embodiment. In ODRAP, to enhance competition among users, it is assumed that the number of users arriving at each timestamp is 20. If the number of users is less than 20, all of them enter the system. Each user permanently holds the resources and does not return the resources. ODRAP will additionally obtain the set of Docks that each user really wants.

[0224] All methods in this embodiment are implemented in the Python language. The hardware configuration of the experimental platform is as follows: the processor is an AMD Ryzen 7 5900HX CPU, the memory is 32GB, and the storage device used is a 1024GB SSD.

[0225] First, a comparative experiment was conducted on the impact of the number of users on the pricing allocation result, that is, to analyze how the total utility, provider utility, user utility, the number of winning users, and the Docker selling rate of the system change under different methods when the number of users in the MCS system changes. The number of MCSs is 7, and the Docker purchase limit for each user is d = 3.

[0226] Figure 6 This is the comparative graph of the overall utility of the present invention and the comparative method under different numbers of users in this embodiment. The overall utility represents the total utility of both the buyer and the seller, and is the overall satisfaction degree of both parties in the whole process. As Figure 6 shown, Posted Price and both maintain a relatively high overall utility, and this situation also persists as the number of people increases. This is because the prices of both methods are based on the optimal pricing matrix P * to obtain the overall utility. It can be seen that regardless of the number of people, the present invention can enable the system to obtain a relatively high overall utility. The difference between the Posted Price algorithm and is that the Posted Price algorithm depends on the user arrival sequence. In contrast, the overall utility under ODRAP and Fixed Price is more affected by the number of people.

[0227] Figure 7 This is the comparative graph of the provider utility of the present invention and the comparative method under different numbers of users in this embodiment. Figure 8 This is the comparative graph of the user utility of the present invention and the comparative method in this embodiment. As Figure 7 and Figure 8 shown, the provider utility of Posted Price and is relatively higher, and as the number of people increases, the provider utility gradually increases. Relatively speaking, as the optimal pricing matrix P * serves as the lever for the utilities of both the buyer and the seller, some user utility will be sacrificed. In contrast, although the payments of ODRAP and FixedPrice first increase and then decrease. This is because as the number of users is too large, the competition becomes too large, and at this time, these two algorithms will lead to a decrease in provider utility and an increase in user utility instead. Thus, it can be seen that the optimal pricing matrix P * plays an important role in the system stability.

[0228] Figure 9 This is the comparative graph of the number of winners of the present invention and the comparative method under different numbers of users in this embodiment. As Figure 9 shown, in this embodiment It can maintain the highest number of winners because this is the case of the most ideal user sequence, and the present invention performs better than FixedPrice using the same allocation algorithm and lower than ODRAP. This is because the quotes submitted by users to us are not restricted by the maximum purchase quantity d, so the number of Docker with true quotes may be greater than d, resulting in more intense competition. And ODRAP will receive the additional set of Docker that users truly want, so in the same situation, the competition among users is smaller.

[0229] Figure 10 It is a comparison chart of Docker utilization rates of the present invention and comparative methods under different numbers of users in this embodiment. As Figure 10 shown, the present invention, will maintain a higher and more stable Docker utilization rate and can sell out all Docker earlier. In contrast, FixedPrice has the same effect because it follows the allocation mechanism of the present invention. And ODRAP sold out Docker when the number of people was 200.

[0230] The above results show that the present invention can ensure high system performance and stability even when the number of users changes greatly.

[0231] Next, an experiment is conducted on the influence of the maximum purchase quantity d of users. The main purpose of this experiment is to analyze how the total utility, provider utility, user utility, number of winning users, and Docker sales rate of the system change with the change of the maximum purchase quantity d of users under different algorithms. The number of MCS is 7 and the number of users is 100.

[0232] Figure 11 It is a comparison chart of the overall utilities of the present invention and comparative methods under different maximum purchase quantities of users in this embodiment. As Figure 11 shown, the present invention and can still maintain a relatively high overall utility. While FixedPrice and ODRAP achieved relatively low overall utilities. This shows that the optimal pricing matrix P * can enable the system to obtain a higher overall utility.

[0233] Figure 12 It is a comparison chart of the provider utilities of the present invention and comparative methods under different maximum purchase quantities of users in this embodiment. Figure 13 It is a comparison chart of the user utilities of the present invention and comparative methods under different maximum purchase quantities of users in this embodiment. As Figure 12 and Figure 13 shown, the user payments of the present invention and maintain relatively high indicators and finally tend to be stable. When d≥3, there is a situation of supply falling short of demand, resulting in gradual stability. And relatively speaking, the optimal pricing matrix P* As a lever for user utility and provider utility, the user utility will also decrease relatively. FixedPrice and ODRAP first increase and then decrease because as the number of users becomes too large, competition becomes excessive, and in this case, these two algorithms will cause the seller's payment to decrease, and the user utility will instead increase. It can be seen that the optimal pricing matrix P * plays an important role in system stability.

[0234] Figure 14 is a comparison chart of the number of winners of the present invention and the comparative method under different maximum purchase numbers of users in this embodiment. As Figure 14 shown, the present invention and maintain a larger number of winners. Since Fixed Price follows the allocation mechanism of the present invention, the utility is also obvious. For ODRAP, as the maximum purchase number d increases, user competition becomes more intense, and the number of winners gradually decreases.

[0235] Figure 15 is a comparison chart of the Docker utilization rates of the present invention and the comparative method under different maximum purchase numbers of users in this embodiment. As Figure 15 shown, the present invention will maintain a higher and more stable Docker utilization rate and can sell out all Docks earlier. In contrast, FixedPrice has a similar effect because it follows the allocation mechanism of the present invention. However, ODRAP does not sell out all Docks.

[0236] The above results prove that even when the maximum purchase number d of users changes greatly, the present invention can ensure high system performance and stability.

[0237] In summary, the experimental results show that by setting reasonable resource pricing, the present invention improves the operating efficiency of the system, as well as the provider utility and the overall utility.

[0238] Although the above describes the illustrative specific embodiments of the present invention for the convenience of those skilled in the art to understand the present invention, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions made using the concept of the present invention are within the scope of protection.

Claims

1. An optimal pricing allocation method for Docker resources based on Internet of Vehicles, characterized in that: The following steps are involved: S1: Obtain data from all participants in the Internet of Vehicles, including: A collection of mobile edge computing servers provided by the service provider A collection of Docker resources provided And the Docker inventory matrix Q on the mobile edge computing server: Among them, q jk represents the number of the kth type of Docker on the mobile edge computing server j, User collection in the Internet of Vehicles The valuation set b of each user i i =(b i1 ,b i2 ,...,b iK ), b ik represents the valuation of user i on the kth Docker; the connectivity constraint matrix Δ between the user and the mobile edge computing server: Among them, δ ij =1 means that user i can connect to mobile edge computing server j and can purchase Docker on this mobile edge computing server. ij =0; Get the queue of users that have arrived at the moment, record the number of users in the queue as T, and the original serial number of the t-th user as i t , t=1,2,…,T; S102: Solving the optimal offline utility maximization model Get the initial decision variables corresponding to each user Among them, the initial decision variables Indicates that a k-type Docker on the mobile edge computing server j is assigned to user i, and vice versa d represents the maximum number of Dockers a user can purchase; S3: Based on the preliminary resource allocation scheme obtained in step S2, the optimal published price is searched, and the specific steps include: S3.1: Initialize the optimal published pricing matrix P: Among them, p jk represents the price of the k-th Docker on edge computing server j; S3.2: The loss function h(P) is calculated using the following formula: in, It represents the utility that user i can obtain under the current optimal published pricing matrix P. The calculation formula is as follows: in,[·] + Indicates the positive part; S3.3: Determine whether the search end condition is met, if yes, go to step S3.4, otherwise the search ends; S3.4: Update the optimal distribution pricing matrix P using the following formula: Among them, α represents the preset learning rate; Then return to step S3.2; S4: Generate the final Docker resource allocation plan. The specific steps include: S4.1: Initialize the resource allocation matrix X = 0, that is, the decision variable x of each user ijk =0; Initialize the remaining resource tuple set Each tuple (j, k) indicates that the kth Docker is still available on each edge computing server j when the first user arrives. S4.2: Initialize user arrival sequence number t=1; S4.3: Solve the following formula to get user i t The set of allocated pairs Among them, the allocation of two-tuple sets The number of tuples in the tuple is ≤d, and each tuple (j, k) represents the edge computing server and Docker assigned to the current user; S4.4: Determine whether If yes, go to step S4.6, otherwise go to step S4.5; S4.5: For the allocation of a set of two-tuples For each assigned tuple (j, k) in ijk =1; go to step S4.6; S4.6: Determine whether t<T, if yes, proceed to step S4.7, otherwise proceed to step S4.9; S4.7: According to user i t The set of allocated pairs Update the remaining resource tuple set S4.8: Set t=t+1, and return to step S4.3; S4.9: Based on the current decision variables x of each user ijk , generate the final resource allocation matrix X.

2. The optimal pricing allocation method according to claim 1, characterized in that: The estimated set b of user i in step S1 i It is obtained by sampling the valuation distribution function of user i for different Dockers.

3. The optimal pricing allocation method according to claim 1, characterized in that: The optimal offline utility maximization model in step S2 is solved using the CPLEX optimization solver.