AI model transaction method and system in automatic driving scene
By designing AI model trading methods and systems in autonomous driving scenarios, using polynomial time algorithms to optimize the purchase and deployment of AI models, combined with model integration methods, the problem of model performance impact and online update in the existing technology is solved, and the optimal Reasoning results and minimizing social costs.
Patent Information
- Application Number
- CN202411155068.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-13
AI Technical Summary
The existing AI model trading system cannot effectively consider the impact of model performance on inference results in autonomous driving scenarios, and cannot update model weights in real time online, and cannot meet the requirements of high-speed workloads.
An AI model trading method and system was designed to optimize the service providers to purchase AI models from the model market through polynomial time algorithm, adopt model integration method to combine the inference results of different models, and update the model weights online to achieve social cost minimization and optimization of inference results.
By calculating the model weights online and weighting the inference results of multiple models, the optimal inference results are achieved, and the total social cost minimization and proof of authenticity are achieved through the design of online auction and polynomial time optimization algorithms.
Smart Images

Figure CN119129815A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of autonomous driving technology, and specifically relates to an AI model trading method and system in an autonomous driving scenario. Background Art
[0002] With the continuous development of current technology, autonomous driving is becoming more and more mature and highly praised by people. In the autonomous driving scenario, mobile vehicles need to offload image recognition tasks to nearby AI service providers, who provide inference services. The AI models held by the service provider itself may not be sufficient to complete a large number of image recognition tasks, and it is necessary to purchase AI models from model providers in the AI model market.
[0003] However, the existing AI model trading system does not take into account the impact of uneven model performance on the inference results, which makes the model with poor performance have a greater negative impact on the inference results. In addition, the existing technology cannot update the model weights online in real time and cannot meet the online high-speed workload requirements in autonomous driving scenarios. Summary of the invention
[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide an AI model trading method and system in an autonomous driving scenario, which solves the problems in the prior art.
[0005] The purpose of the present invention can be achieved through the following technical solutions:
[0006] An AI model trading method in an autonomous driving scenario comprises the following steps:
[0007] Considering the model hosting cost, model downloading cost, integrated reasoning loss, model purchase fee and model provider’s utility, the optimization problem of service providers purchasing AI models from the model market is constructed by minimizing social cost.
[0008] Solving the optimization problem by designing a set of polynomial time algorithms for the service provider;
[0009] Based on the solution of the optimization problem, the service provider conducts an auction with the model providers in the model market;
[0010] After the auction is completed, the service provider deploys the AI model and uses a model integration approach to perform reasoning on the vehicle's image recognition request by combining the reasoning results of different models.
[0011] Furthermore, the objective function of the optimization problem is:
[0012]
[0013] In the formula, Indicates whether model n wins the auction, represents the cost of purchasing the model, represents the download cost of model n, Indicates whether to deploy model n. An indicator variable indicating whether the current model is consistent with the model at the previous moment. represents the cost of holding model n, e t represents the cost of the service provider holding its own model, z t Indicates whether the service provider deploys its own model. represents the weight of model n when inferring data m, represents the weight of the service provider’s own model when reasoning about data m, represents the characteristic value of the data, Represents model n pairs of data The inference result, Represents the service provider's own model for data The inference result, Represents the true label of the data.
[0014] Furthermore, the constraints of the optimization problem include:
[0015]
[0016] In the formula, W represents the minimum number of models held, Q t represents the maximum auction purchase capacity, φ n represents the participation threshold of model n.
[0017] Furthermore, the polynomial time algorithm includes Algorithm 1 to Algorithm 5, and the steps of solving the optimization problem include:
[0018] S21, in each auction, given the model hosting decision, use Algorithm 1 to perform partial bid selection based on the alternating descent-ascent primal-dual steps for the reformulation that absorbs the long-term constraints into the objective through carefully designed proximal terms;
[0019] S22, using Algorithm 2, converts this fractional decision into a more specific integer bid selection in a random manner without violating the residual constraint;
[0020] S23, design Algorithm 3 to replace the VCG bidding mechanism and calculate the payment for the bid based on the actual score decision and bid price and the envisioned score decision with alternative bid prices;
[0021] S24, design Algorithm 4 to link repeated auctions over time and call Algorithms 1 and 2 to select and deploy models by comparing in real time the latest download cost of switching from the previous model to the current model with the cumulative hosting cost of keeping the current model since the last switching operation;
[0022] S25, design Algorithm 5, combine the inference results of the model in Algorithm 4 into a weighted sum, and form an integrated inference result for each data sample. At the same time, as new data samples arrive online, the weights are updated exponentially;
[0023] Furthermore, the specific steps of the auction are:
[0024] S31, in each time slot t∈T, each model provider n Submit a bid in the format; is the bid price, i.e., the amount the model provider wants to charge for selling the provided model; is the decision function of the provided model; is an indicator function indicating whether the model at the current moment is the same as that at the previous moment;
[0025] S32, after collecting all bids, the service provider determines the values of the following variables:
[0026] (1) Whether each model provider wins the bidding is represented by in Indicates successful bidding. Indicates that the bid failed and the successful bidder will be paid
[0027] (2) Whether to download and deploy the model, use express, Indicates downloading the model, otherwise, does not download the model; if the same model has not been downloaded before, or the model provided by the model provider is different from the last time the model was downloaded from the model provider, the service provider downloads the model from the winning bidder's facility;
[0028] (3) Whether to deploy the model provider’s own model, represented by z t ∈{0,1}, where z t =1 means deployment, otherwise it means no deployment.
[0029] Furthermore, the service provider performs joint reasoning using each purchased AI model and its own model, and the result of the joint reasoning is:
[0030]
[0031] in, is the weight of the purchased AI model n on the data sample m, is the weight of the service provider’s own model on data sample m, represents the characteristic value of the data, Represents model n pairs of data The inference result, Represents the service provider's own model for data The inference result, Represents the weighted inference result; the service provider updates the weights of all models corresponding to the next data sample m+1.
[0032] An AI model trading system in an autonomous driving scenario, comprising:
[0033] Optimization problem construction module: Considering the model hosting cost, model download cost, integrated reasoning loss, model purchase fee and model provider’s utility, the optimization problem of service providers purchasing AI models from the model market is constructed by minimizing social costs;
[0034] Algorithm design module: solves the optimization problem by designing a set of polynomial time algorithms for service providers;
[0035] Auction module: Based on the solution of the optimization problem, the service provider conducts an auction with the model providers in the model market;
[0036] And, the reasoning module: After the auction is completed, the service provider deploys the AI model and adopts a model integration approach to perform reasoning on the vehicle's image recognition request by combining the reasoning results of different models.
[0037] A computer storage medium stores a readable program, which, when the program is running, can execute the above-mentioned AI model trading method in an autonomous driving scenario.
[0038] An electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus;
[0039] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned AI model trading method in an autonomous driving scenario.
[0040] A computer program product includes computer instructions, wherein the computer instructions instruct a computing device to perform operations corresponding to the above-mentioned AI model trading method in an autonomous driving scenario.
[0041] Beneficial effects of the present invention:
[0042] 1. The present invention calculates the model weight for the next reasoning online based on the model reasoning results, and performs weighted combination of multiple model reasoning results. Through extensive real-world data experiments, it is proved that the method proposed by the present invention makes the reasoning results optimal.
[0043] 2. The present invention achieves the minimization of total social cost by designing online auctions and a set of polynomial time optimization algorithms.
[0044] 3. The present invention proves the authenticity of the designed online auction algorithm through rigorous theoretical proof. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0046] Figure 1 It is a flow chart of the AI model trading method of the present invention;
[0047] Figure 2 is a polynomial time algorithm relationship diagram of the present invention;
[0048] Figure 3 is an auction flow chart of the present invention;
[0049] Figure 4 It is the integrated learning flow chart of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] Example 1
[0052] like Figure 1 As shown, an AI model trading method in an autonomous driving scenario includes the following steps:
[0053] S1, constructs the optimization problem of service providers purchasing AI models from the model market by minimizing social costs;
[0054] In the process of constructing the optimization problem, the model hosting cost, model download cost, integrated inference loss, model purchase cost and model provider utility are taken into account. The optimization problem is shaped into a nonlinear mixed integer programming. The objective function of the optimization problem is:
[0055]
[0056] In the formula, Indicates whether model n wins the auction, represents the cost of purchasing the model, represents the download cost of model n, Indicates whether to deploy model n. An indicator variable indicating whether the current model is consistent with the model at the previous moment. represents the cost of holding model n, e t represents the cost of the service provider holding its own model, z t Indicates whether the service provider deploys its own model. represents the weight of model n when inferring data m, represents the weight of the service provider’s own model when reasoning about data m, represents the characteristic value of the data, Represents model n pairs of data The inference result, Represents the service provider's own model for data The inference result, Represents the true label of the data.
[0057] The constraints of the optimization problem include:
[0058] 1) Ensure that the number of deployed models is not less than the expected number:
[0059]
[0060] Where W represents the minimum number of models held.
[0061] 2) The number of models purchased cannot exceed the budget:
[0062]
[0063] In the formula, Q t Indicates the maximum auction purchase capacity.
[0064] 3) Weight normalization of the optimization problem:
[0065]
[0066] 4) Only deployed models have weights:
[0067]
[0068] 5) Only purchased models can be deployed:
[0069]
[0070] 6) All model providers meet fairness requirements
[0071]
[0072] In the formula, φ n represents the participation threshold of model n.
[0073] S2, solves the optimization problem constructed in S1 by designing a set of overall polynomial time algorithms for service providers;
[0074] like Figure 2 As shown, the polynomial time algorithm includes Algorithm 1 to Algorithm 5, and the specific steps for solving the optimization problem are:
[0075] Algorithm 1: Calculate the Lagrange multiplier by the gradient ascent method, and then minimize the Lagrange function according to the descent method to obtain the decision variable The fractional solution of .
[0076] Algorithm 2: Through the random rounding method, the Round to get an integer solution
[0077] Algorithm 3: Calculate the auction payment based on the necessary and sufficient conditions for the authenticity of the auction and individual rationality
[0078] Algorithm 4: Determine whether the accumulated model holding cost exceeds the predefined multiple of the model switching cost. If so, perform model switching, otherwise continue to hold the current model.
[0079] Algorithm 5: According to the exponential weighted formula and the loss of each model's current data inference, update the weight of each model when calculating the next data, and then perform a weighted combination of the inference results of all models.
[0080] S21, in each auction, given the model hosting decision, use Algorithm 1 to perform partial bid selection based on the alternating descent-ascent primal-dual steps for the reformulation that absorbs the long-term constraints into the objective through carefully designed proximal terms;
[0081] S22, using Algorithm 2, converts this fractional decision into a more specific integer bid selection in a random manner without violating the residual constraint;
[0082] S23, design Algorithm 3 to replace the Vickery-Clarke-Groves (VCG) bidding mechanism and calculate the payment for the bid based on the actual score decision and bid price and the imagined score decision with alternative bid prices;
[0083] S24, design Algorithm 4 to link repeated auctions over time and call Algorithms 1 and 2 to select and deploy models by comparing in real time the latest download cost of switching from the previous model to the current model with the cumulative hosting cost of keeping the current model since the last switching operation;
[0084] S25, design Algorithm 5, combine the inference results of the model in Algorithm 4 into a weighted sum, and form an integrated inference result for each data sample. At the same time, as new data samples arrive online, the weights are updated exponentially;
[0085] The specific implementation process of the algorithm is as follows: In each time slot, all model providers participating in the auction submit their bid values. Next, the service provider uses Algorithm 1 to select model providers, and the total auction budget cannot be exceeded. Then, the service provider uses Algorithm 2 to randomly round the fractional solution output by Algorithm 1 to obtain an integer solution without violating the instantaneous constraint. Next, the service provider uses Algorithm 3 to calculate the auction reward and pay it to the winning bidder. Then, the service provider uses Algorithm 4 to decide whether to change the model holding state at the current moment by comparing the conversion cost with the accumulated non-conversion cost. Finally, the service provider uses the model held by Algorithm 5 for online image classification and updates the weight of each held model online until the entire simulation time slot is completed.
[0086] S3: Based on the solution of the optimization problem in S2, the service provider purchases and deploys the AI model through an auction with the model provider in the model market;
[0087] The auction is conducted in each time slot of the considered time range T, such as Figure 3 As shown, the auction steps are:
[0088] S31, in each time slot t∈T, each model provider n Submit a bid in the format; is the bid price, i.e., the amount the model provider wants to charge for selling the provided model; is the decision function of the provided model; is an indicator function indicating whether the model at the current moment is the same as that at the previous moment;
[0089] S32, after collecting all bids, the service provider determines the values of the following variables:
[0090] (1) Whether each model provider wins the bidding is represented by in Indicates successful bidding. Indicates that the bid failed and the successful bidder will be paid
[0091] (2) Whether to download and deploy the model, use express, Indicates downloading the model, otherwise, does not download the model; if the same model has not been downloaded before, or the model provided by the model provider is different from the last time the model was downloaded from the model provider, the service provider downloads the model from the winning bidder's facility;
[0092] (3) Whether to deploy the model provider’s own model, represented by z t ∈{0,1}, where z t =1 means deployment, otherwise it means no deployment.
[0093] S4, in each time slot t∈T, after the auction phase is completed, the service provider deploys the AI model and adopts a model integration method to perform reasoning on the vehicle's image recognition request by combining the reasoning results of different models.
[0094] like Figure 4 As shown, data samples from vehicles Arrival, characterized by The service provider performs joint reasoning using each purchased AI model and its own model. The joint reasoning results are:
[0095]
[0096] in, is the weight of the purchased AI model n on the data sample m, is the weight of the service provider’s own model on data sample m, represents the characteristic value of the data, Represents model n pairs of data The inference result, Represents the service provider's own model for data The inference result, Represents the weighted inference result; the service provider updates the weights of all models corresponding to the next data sample m+1.
[0097] Example 2
[0098] In this embodiment, the transaction method of the present invention is specifically applied to the autonomous driving vehicle image recognition scenario to demonstrate the superiority of the transaction method.
[0099] In this implementation, Alibaba Cloud with 29 regions and 88 availability zones around the world is considered, and each region usually has multiple availability zones. A certain place is selected as the location of the service provider cloud, and all other regions and their 76 availability zones are used as the model provider's cloud (up to 64 availability zones are considered), where each availability zone corresponds to one model provider. Therefore, the geographical distance can be used to estimate the network latency as the model download cost. The electricity cost is used as the model hosting cost, that is, [2,7] cent / kWh, following ComEd's hourly real-time electricity price from January 15 to 21, 2023. The minimum number of auctions that each model provider can win is uniformly generated in [0,100], and the maximum number of models that the service provider can purchase from each auction is in [6,8]. The bid price is [5,18]$, which is consistent with the electricity consumption of the training model. Using the autonomous driving scene image recognition dataset, the proposed algorithm was applied to the autonomous driving image recognition scenario, achieving an accuracy of 75.60%, which is higher than other comparison algorithms, as shown in Table 1; it achieved the minimum social cost as well as sublinear regret and fitting, which is better than other comparison algorithms; even if the number of model providers increased to 64, the algorithm could be completed within 20 seconds, meeting the needs in reality.
[0100] Algorithm Name Inference Accuracy The present invention reduces its social cost Random 66.76% 70% Greedy 68.62% 37% DTEL+ 69.01% 35% DES+ 70.13% 46%
[0101] The method of the present invention may be implemented in hardware, firmware, or as software or computer code that may be stored in a recording medium (such as a CDROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded over a network and will be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that a computer, processor, microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, processor, or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown herein.
[0102] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.
Claims
1. An AI model trading method in an autonomous driving scenario, characterized in that: The following steps are involved: Considering the model hosting cost, model downloading cost, integrated reasoning loss, model purchase fee and model provider’s utility, the optimization problem of service providers purchasing AI models from the model market is constructed by minimizing social cost. Solving the optimization problem by designing a set of polynomial time algorithms for the service provider; Based on the solution of the optimization problem, the service provider conducts an auction with the model providers in the model market; After the auction is completed, the service provider deploys the AI model and uses a model integration approach to perform reasoning on the vehicle's image recognition request by combining the reasoning results of different models.
2. The AI model trading method in an autonomous driving scenario according to claim 1, characterized in that: The objective function of the optimization problem is: In the formula, Indicates whether model n wins the auction, represents the cost of purchasing the model, represents the download cost of model n, Indicates whether to deploy model n. An indicator variable indicating whether the current model is consistent with the model at the previous moment. represents the cost of holding model n, e t represents the cost of the service provider holding its own model, z t Indicates whether the service provider deploys its own model. represents the weight of model n when inferring data m, represents the weight of the service provider’s own model when reasoning about data m, represents the characteristic value of the data, Represents model n pairs of data The inference result is Represents the service provider's own model for data The inference result is Represents the true label of the data.
3. The AI model trading method in an autonomous driving scenario according to claim 2, characterized in that: The constraints of the optimization problem include: In the formula, W represents the minimum number of models held, Q t represents the maximum auction purchase capacity, φ n represents the participation threshold of model n.
4. The AI model trading method in an autonomous driving scenario according to claim 3, characterized in that: The polynomial time algorithm includes Algorithm 1 to Algorithm 5, and the steps of solving the optimization problem include: S21, in each auction, given the model hosting decision, use Algorithm 1 to perform partial bid selection based on the alternating descent-ascent primal-dual steps for the reformulation that absorbs the long-term constraints into the objective through carefully designed proximal terms; S22, using Algorithm 2, converts this fractional decision into a more specific integer bid selection in a random manner without violating the residual constraint; S23, design Algorithm 3 to replace the VCG bidding mechanism and calculate the payment for the bid based on the actual score decision and bid price and the envisioned score decision with alternative bid prices; S24, design Algorithm 4 to link repeated auctions over time and call Algorithms 1 and 2 to select and deploy models by comparing in real time the latest download cost of switching from the previous model to the current model with the cumulative hosting cost of keeping the current model since the last switching operation; S25, design Algorithm 5, combine the inference results of the model in Algorithm 4 into a weighted sum, and form an integrated inference result for each data sample. At the same time, as new data samples arrive online, the weights are updated exponentially.
5. The AI model trading method in an autonomous driving scenario according to claim 3, characterized in that: The specific steps of the auction are: S31, in each time slot t∈T, each model provider n Submit a bid in the format; is the bid price, i.e., the amount the model provider wants to charge for selling the provided model; is the decision function of the provided model; is an indicator function indicating whether the model at the current moment is the same as that at the previous moment; S32, after collecting all bids, the service provider determines the values of the following variables: (1) Whether each model provider wins the bidding is represented by in Indicates successful bidding. Indicates that the bid failed and the successful bidder will be paid (2) Whether to download and deploy the model, use express, Indicates downloading the model, otherwise, does not download the model; if the same model has not been downloaded before, or the model provided by the model provider is different from the last time the model was downloaded from the model provider, the service provider downloads the model from the winning bidder's facility; (3) Whether to deploy the model provider’s own model, represented by z t ∈{0,1}, where z t =1 means deployment, otherwise it means no deployment.
6. The AI model trading method in an autonomous driving scenario according to claim 1, characterized in that: The service provider performs joint reasoning using each purchased AI model and its own model. The joint reasoning results are: in, is the weight of the purchased AI model n on the data sample m, is the weight of the service provider’s own model on data sample m, represents the characteristic value of the data, Represents model n pairs of data The inference result is Represents the service provider's own model for data The inference result is Represents the weighted inference result; the service provider updates the weights of all models corresponding to the next data sample m+1.
7. An AI model trading system in an autonomous driving scenario, characterized in that: include: Optimization problem construction module: Considering the model hosting cost, model download cost, integrated reasoning loss, model purchase fee and model provider’s utility, the optimization problem of service providers purchasing AI models from the model market is constructed by minimizing social costs; Algorithm design module: solves the optimization problem by designing a set of polynomial time algorithms for service providers; Auction module: Based on the solution of the optimization problem, the service provider conducts an auction with the model providers in the model market; And, the reasoning module: After the auction is completed, the service provider deploys the AI model and adopts a model integration approach to perform reasoning on the vehicle's image recognition request by combining the reasoning results of different models.
8. A computer storage medium storing a readable program, characterized in that: When the program is running, it can execute the AI model trading method in an autonomous driving scenario as described in any one of claims 1 to 6.
9. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the AI model trading method in an autonomous driving scenario as described in any one of claims 1-6.
10. A computer program product comprising computer instructions, characterized in that: The computer instructions instruct the computing device to perform operations corresponding to the AI model trading method in an autonomous driving scenario as described in any one of claims 1-6.
