A vehicle computing resource allocation system based on distributed offloading algorithm

Through blockchain technology and federated learning, dynamic vehicle clusters are constructed to achieve efficient allocation and scheduling of vehicle computing resources, solve the dynamic adaptability and privacy protection issues of task offloading in the Internet of Vehicles, and optimize computing efficiency and energy consumption.

CN118449977BActive Publication Date: 2024-09-03SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410919671.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-09-03
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

Existing vehicle task offloading solutions are difficult to adapt to highly dynamic Internet of Vehicles scenarios, ignore vehicle activity patterns and task characteristics, and fail to effectively protect vehicle data privacy, resulting in low computing efficiency and high latency.

Method used

A distributed offloading algorithm based on blockchain technology is used to build a dynamic vehicle cluster through vehicle cluster networking, federated learning and privacy protection mechanisms to achieve intelligent hierarchical offloading of tasks and efficient scheduling of resources to ensure data privacy.

Benefits of technology

It achieves efficient allocation and scheduling of vehicle computing resources, dynamically adapts to the vehicle environment, reduces ineffective calculations, optimizes energy consumption, and ensures data privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118449977B
    Figure CN118449977B
Patent Text Reader

Abstract

The present invention discloses a vehicle-computer computing resource allocation system based on a distributed unloading algorithm, which relates to the field of vehicle networking and edge computing technology, including an on-board data acquisition module, a vehicle cluster networking module, an unloading algorithm model training module, an intelligent unloading decision module, a resource pool construction and scheduling module, and a distributed unloading computing module, wherein the vehicle cluster networking module is based on blockchain technology to build a dynamic vehicle cluster and a distributed hierarchical unloading framework; the unloading algorithm model training module receives vehicle cluster information, and collaboratively trains a distributed unloading algorithm model in the vehicle cluster through a federated learning method; the intelligent unloading decision module receives the distributed unloading algorithm model and deploys it to each vehicle, and autonomously hierarchically decides on task unloading in combination with vehicle cluster information and local context information. The present invention constructs an on-board edge cloud resource pool by using a method combining federated learning and blockchain technology to achieve efficient allocation and scheduling of vehicle computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Vehicles and edge computing technology, and in particular to a vehicle-computer computing resource allocation system and system based on a distributed offloading algorithm. Background Art

[0002] With the rise of emerging applications such as autonomous driving and intelligent networking, vehicle systems are facing increasingly complex computing tasks, with higher and higher requirements for computing power and real-time performance. Traditional vehicle computing units can no longer meet these requirements due to limited hardware resources. Although cloud computing centers have powerful computing capabilities, they are limited by remote physical locations and dynamic network environments, making it difficult to meet key mission requirements such as low latency and high reliability.

[0003] In recent years, with the development of mobile edge computing technology, people have proposed to offload complex vehicle tasks to nearby edge servers or remote cloud through vehicle-side cloud collaboration. However, existing offloading solutions have some shortcomings: first, most of them are based on fixed communication topology structures and are difficult to adapt to highly dynamic vehicle networking scenarios; second, they lack consideration of diverse factors such as vehicle activity patterns and task characteristics, and cannot flexibly adapt to different scenario requirements; third, most solutions ignore the importance of vehicle data privacy protection, which may lead to sensitive information leakage. Summary of the invention

[0004] In view of the problems existing in the existing unloading solutions, the present invention is proposed.

[0005] Therefore, the problem to be solved by the present invention is how to make full use of the distributed computing resources in the Internet of Vehicles, realize the intelligent hierarchical offloading of vehicle-mounted tasks, improve computing efficiency, and at the same time protect data privacy and dynamically adapt to the network environment.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In the first aspect, an embodiment of the present invention provides a vehicle-computer computing resource allocation system based on a distributed offloading algorithm, which includes an on-board data acquisition module, which collects vehicle operation status data, task workload data, location data, road environment data and communication neighbor information; a vehicle cluster networking module, which builds a dynamic vehicle cluster based on blockchain technology, builds a distributed hierarchical offloading framework, and sends the vehicle cluster information to the offloading algorithm model training module, the intelligent offloading decision module, and the resource pool construction and scheduling module; an offloading algorithm model training module, which receives vehicle cluster information, and collaboratively trains a distributed offloading algorithm model within the vehicle cluster through a federated learning method, and transmits the trained model to the intelligent offloading decision module; an intelligent offloading decision module, which receives the distributed offloading algorithm model and deploys it to each vehicle, and autonomously makes hierarchical decisions on task offloading based on the vehicle cluster information and local context information. The tasks to be offloaded are sent to the privacy protection module, and according to the feedback of the calculation results, the distributed offloading algorithm model is collaboratively updated and the offloading strategy is adaptively adjusted; the privacy protection module receives the tasks to be offloaded, uses the federated adversarial training encryption algorithm for privacy protection encryption, and transmits the encrypted task data to the distributed offloading calculation module; the resource pool construction and scheduling module receives the vehicle cluster information, builds the vehicle edge cloud resource pool based on the blockchain consensus, and sends the available resource information to the distributed offloading calculation module for scheduling; the distributed offloading calculation module receives the encrypted task data and the available resource information, uses the encrypted calculation and the trusted execution environment, performs the distributed offloading calculation on the scheduled resource target for the encrypted task, and feeds the calculation result back to the model optimization module; the model optimization module receives the distributed calculation result and decrypts it, and feeds the decrypted result back to the intelligent offloading decision module.

[0008] As a preferred solution of the vehicle-computer computing resource allocation system based on the distributed offloading algorithm described in the present invention, the processing flow of the vehicle cluster networking module is as follows: the vehicle automatically collects its own static attributes and dynamic attributes, and broadcasts the collected information to surrounding vehicles through wireless communication technology; using the consensus mechanism of the blockchain, the vehicles mutually verify the authenticity of the static attributes, establish a preliminary trust relationship, and form a trusted vehicle set; based on the dynamic attributes of the vehicles and their changing trends, predict and evaluate the relative motion patterns between vehicles, determine the vehicle pairs or groups that may remain relatively stationary or move in coordination in the future, and form a dynamic vehicle cluster; for the identified vehicle pairs or groups, use the key exchange protocol to establish an end-to-end secure communication link under the supervision of the blockchain; the trusted vehicle set is layered according to the vehicle's computing power, remaining power, and task requirements, and a distributed on-board layer, proximal edge layer, and distal cloud layer are constructed to form a distributed layered offloading framework.

[0009] As a preferred solution of the vehicle computing resource allocation system based on the distributed offloading algorithm described in the present invention, the processing flow of the offloading algorithm model training module is as follows: receiving the vehicle cluster information cluster from the vehicle cluster networking module info ; Design the initial structure and parameter θ0 of the distributed offloading algorithm model M, and set the initial model The broadcast is sent to all vehicles in the vehicle cluster; vehicle i is based on its own running status information state i 、Task features i and vehicle cluster information cluster info , using the current model Make an uninstall decision and obtain a binary output i and multi-value output level i , and obtain the actual uninstall decision label y i and target layer label , binary output i Used to decide whether to uninstall, multi-value output level i Used to determine where to uninstall; according to the output output i 、level i and the actual label y i , Calculate local loss Loss i and local model gradient , and adding differential privacy noise to get ; For the noise-protected gradient Perform quantization and sparse processing to obtain a local sparse gradient vector , to reduce the amount of data that needs to be transmitted; local sparse gradient Perform encryption protection to obtain encrypted gradient , upload it to the training server; the training server collects the encrypted gradients uploaded by all vehicles , using homomorphic encryption technology to perform gradient aggregation operations and obtain the global gradient , where M represents the total number of vehicles, Represents an aggregation operation, represents the encrypted gradient uploaded by the i-th vehicle; the training server decrypts the global gradient , and get the final gradient , using the gradient Update the distributed offloading algorithm model parameters to ,in Represents the dynamically adjusted learning rate; the updated model Broadcast back to all vehicles in the vehicle cluster; repeat the training process until the model converges or reaches the preset training rounds, and send the final trained distributed unloading algorithm model M to the intelligent unloading decision module.

[0010] As a preferred solution of the vehicle computing resource allocation system based on the distributed unloading algorithm described in the present invention, the local loss Loss i The calculation formula is as follows:

[0011]

[0012] in,

[0013]

[0014]

[0015] Among them, output i Represents the binary output result, level i Indicates multi-value output results, Loss i represents the local loss, L output Represents binary output output i The loss, L level Indicates multi-value output level i The loss, y i Indicates the actual uninstall decision label. represents the actual target layer label, K represents the number of unloaded target layers, and k represents the intermediate variable.

[0016] Local model gradients The specific formula is as follows:

[0017]

[0018] Among them, Loss i represents local loss, represents the model parameters;

[0019] Adding differential privacy noise gives , the specific formula is as follows:

[0020]

[0021] in, represents the local model gradient, represents Gaussian noise, represents the noise disturbance level, S represents the sensitivity of the gradient, n represents the size of the vehicle cluster, Represents the model gradient after noise protection.

[0022] As a preferred solution of the vehicle-computer computing resource allocation system based on the distributed unloading algorithm described in the present invention, the processing flow of the intelligent unloading decision module is as follows: the intelligent unloading decision module receives the distributed unloading algorithm model M sent by the unloading algorithm model training module, and deploys it to the intelligent unloading agent of each vehicle in the vehicle cluster; the intelligent unloading agent of vehicle i continuously obtains the operating status information state of this vehicle i and task features task i , and receive the vehicle cluster information cluster sent by the vehicle cluster networking module info ; Set state i 、task i and cluster info Input to the distributed offloading algorithm model M to obtain the offloading decision output i and level i ; Output according to the binary output result in the uninstall decision i , the intelligent uninstall agent determines whether the task needs to be uninstalled: if output i =0, indicating local execution without uninstallation; if output i =1, indicating that uninstallation is required. i Select the target layer to uninstall, where level i =1Unload to vehicle layer, level i =2Unload to the near edge layer, level i =3 Offload to the remote cloud layer; set the task feature task to be offloaded i Send to the privacy protection module to obtain encryption tasks ,Will Send to the distributed offloading computing module for execution.

[0023] As a preferred solution of the vehicle computing resource allocation system based on the distributed offloading algorithm described in the present invention, the workflow of the resource pool construction and scheduling module is as follows: establish an identity authentication mechanism for resource pool members based on blockchain technology, and use the encrypted signature method to verify the legitimacy of each node identity ID; use the smart contract on the blockchain to record and store the static and dynamic attributes of each node, and update the chain immediately when the node attributes change; design a resource pool consensus mechanism based on voting weights, and all legal nodes can participate in voting decisions; calculate the voting weight of each node , if the sum of all node weights If the value is greater than the preset threshold, the current decision is passed; otherwise, the current decision is rejected. For different types of resources, corresponding resource sub-pools are constructed, and virtualization and software-defined technologies are used to abstract and cut each resource to form a reconfigurable resource unit to form a flexible and reconfigurable vehicle-mounted edge cloud resource pool. For the constructed vehicle-mounted edge cloud resource pool, an autonomous scheduling strategy based on task characteristics and node attributes is designed to assign tasks to suitable nodes for execution.

[0024] As a preferred solution of the vehicle computing resource allocation system based on the distributed offloading algorithm described in the present invention, the design scheme of the autonomous scheduling strategy is as follows: define the task feature vector and the node attribute vector; design the matching score function Score between the task feature vector and the node attribute vector to quantify the degree of adaptation of assigning a task to a node; for each task to be assigned, calculate its matching score with all nodes, sort them from high to low according to the score, and select the top N nodes with the highest scores to form a candidate node set; in the candidate node set, assign tasks according to the following rules: if there is a node that meets the real-time requirements of the task, the task is assigned to this node first; if there are multiple nodes that meet the requirements, select the node with the most abundant computing resources from them; if all candidate nodes do not meet the real-time requirements, select the node with the lowest latency; if a task cannot be assigned to any node, the task is temporarily stored in the waiting queue and reallocated after the node resources are released; during the task execution process, the node resource status is continuously monitored. Once it is found that the resource utilization rate of the original assigned node exceeds the preset high water mark threshold, the dynamic migration mechanism of the task is triggered, and the task is dynamically migrated to other nodes with abundant resources for execution.

[0025] In the second aspect, an embodiment of the present invention provides a vehicle-computer computing resource allocation method based on a distributed offloading algorithm, which includes the vehicle collecting its own vehicle operation status data, task workload data, location data, road environment data and communication neighbor information; constructing a dynamic vehicle cluster based on blockchain technology, determining a secure communication link between vehicles, and constructing a distributed hierarchical offloading computing framework; collaboratively training a distributed offloading algorithm model within the vehicle cluster through a federated learning method; deploying the distributed offloading algorithm model obtained by collaborative training to the intelligent offloading agent of each vehicle, and the agent autonomously and hierarchically decides whether the task needs to be offloaded and selects a suitable offloading target layer based on the acquired vehicle cluster information and local context information; encrypting the task feature data and model parameters to be offloaded with privacy protection using a federated adversarial training encryption algorithm; constructing an on-board edge cloud resource pool based on blockchain consensus, and autonomously scheduling and sharing all available resources; using encrypted computing technology and a trusted execution environment to perform offloading computing on the encrypted task data at the selected offloading target layer; summarizing the distributed computing results and feeding them back to the on-board intelligent offloading agent after decryption, and the agent collaboratively updates the distributed offloading algorithm model based on the actual offloading delay and energy consumption.

[0026] The beneficial effects of the present invention are as follows: the present invention constructs an on-board edge cloud resource pool by using a method combining federated learning and blockchain technology to achieve efficient allocation and scheduling of vehicle computing resources. The use of federated adversarial training and homomorphic encryption technology ensures that the privacy of individual data is protected during data processing and model training. The dynamic decision-making mechanism makes the entire system more flexible and adaptive, and can effectively cope with highly dynamically changing vehicle environments. Through precise resource scheduling and optimized unloading strategies, the present invention can effectively reduce invalid or excessive computing task execution, thereby optimizing energy consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0028] Figure 1 This is a flow chart of the system module interaction of the vehicle computing resource allocation system based on the distributed offloading algorithm.

[0029] Figure 2 This is the intelligent unloading decision flow chart of the vehicle computing resource allocation system based on the distributed unloading algorithm. DETAILED DESCRIPTION

[0030] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0031] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0032] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0033] Example 1

[0034] Reference Figure 1~Figure 2 , which is the first embodiment of the present invention, and provides a vehicle computing resource allocation system based on a distributed offloading algorithm, comprising:

[0035] The on-board data acquisition module collects vehicle operating status data (such as location, speed, direction, remaining power, etc.), task workload data (such as task calculation complexity, data volume, latency requirements), location data, road environment data, and communication neighbor information.

[0036] The vehicle cluster networking module builds dynamic vehicle clusters based on blockchain technology, builds a distributed hierarchical unloading framework, and sends vehicle cluster information to the unloading algorithm model training module, intelligent unloading decision module, resource pool construction and scheduling module.

[0037] Specifically, the processing flow of the vehicle cluster networking module is as follows: vehicle i automatically collects its static attributes (such as identity ID, computing and storage resources, etc.) and dynamic attributes (such as location, speed, direction, current task load of the vehicle, etc.), and broadcasts the collected information to surrounding vehicles through wireless communication technology; using the consensus mechanism of the blockchain, vehicles mutually verify the authenticity of static attributes, establish a preliminary trust relationship, and form a trusted vehicle set; based on the dynamic attributes of the vehicles and their changing trends, predict and evaluate the relative motion patterns between vehicles, determine the vehicle pairs or groups that may remain relatively stationary or move in coordination in the future, and form a dynamic vehicle cluster; for the identified vehicle pairs or groups, use the key exchange protocol to establish an end-to-end secure communication link under the supervision of the blockchain; the trusted vehicle set is layered according to the vehicle's computing power, remaining power, and task requirements, and a distributed on-board layer, near-end edge layer, and remote cloud layer are constructed to form a distributed layered offloading framework.

[0038] It should be noted that the trusted vehicle set is layered according to the vehicle's computing power, remaining power and task requirements: if a vehicle has weak computing power, low remaining power, and high task computational complexity, the vehicle is classified into the remote cloud layer; if a vehicle has average computing power, medium remaining power, and medium task computational complexity, the vehicle is classified into the proximal edge layer; if a vehicle has strong computing power, high remaining power, and low task computational complexity, the vehicle is classified into the vehicle-mounted layer.

[0039] Preferably, the present invention combines blockchain and vehicle dynamic properties to build a dynamic trusted vehicle cluster in a mobile environment, which is no longer restricted by fixed communication topology; and based on the prediction of vehicle motion patterns, actively establishes end-to-end secure links to support efficient mobile communications; integrates on-board, edge, and cloud resources to build a layered virtualized resource pool, breaking through the traditional vertical offloading framework, and can effectively support subsequent distributed offloading calculations.

[0040] The unloading algorithm model training module receives vehicle cluster information, collaboratively trains the distributed unloading algorithm model within the vehicle cluster through the federated learning method, and transmits the trained model to the intelligent unloading decision module.

[0041] Specifically, the processing flow of the offloading algorithm model training module is as follows: receiving the vehicle cluster information cluster from the vehicle cluster networking module info ; Design the initial structure and parameter θ0 of the distributed offloading algorithm model M; The broadcast is sent to all vehicles in the vehicle cluster; each vehicle i is based on its own running state information state i 、Task features i and vehicle cluster information cluster info , using the current model Make an uninstall decision and obtain a binary output i (to determine whether uninstallation is required) and level i (Determine the uninstall target layer) and obtain the actual uninstall decision label y i and target layer label , binary output i Used to decide whether to uninstall, multi-value output level i Used to determine where to uninstall; according to the output output i 、level i and the actual label y i , Calculate local loss Loss i and local model gradient , and adding differential privacy noise to get , the specific formula is as follows:

[0042]

[0043] in,

[0044]

[0045]

[0046] also,

[0047]

[0048]

[0049] Among them, output i Represents the binary output result, level iRepresents the multi-value output result (corresponding to the probability distribution of K unloading target layers), Loss i represents the local loss, L output Represents binary output output i The loss, L level Indicates multi-value output level i The loss, y i Indicates the actual uninstall decision label (0 / 1 scalar, indicating whether uninstallation is actually required), Represents the actual target layer label (One-Hot encoding vector, such as represents the actual unloading to the vehicle-mounted layer), K represents the number of unloading target layers (3 in the present invention), represents the local model gradient, represents the model gradient after noise protection, represents Gaussian noise, represents the noise disturbance level, S represents the sensitivity of the gradient, n represents the size of the vehicle cluster, and k represents the intermediate variable.

[0050] Furthermore, the noise-protected gradient Perform quantization and sparse processing to obtain a local sparse gradient vector , to reduce the amount of data that needs to be transmitted; local sparse gradient Perform encryption protection to obtain encrypted gradient , upload it to the training server; the training server collects the encrypted gradients uploaded by all vehicles , using homomorphic encryption technology to perform gradient aggregation operations and obtain the global gradient , where M represents the total number of vehicles, Represents an aggregation operation, represents the encrypted gradient uploaded by the i-th vehicle; the training server decrypts the global gradient , and get the final gradient , using the gradient Update the distributed offloading algorithm model parameters to ,in Represents the dynamically adjusted learning rate; the updated model Broadcast back to all vehicles in the vehicle cluster; repeat the training process until the model converges or reaches the preset training rounds, and send the final trained distributed unloading algorithm model M to the intelligent unloading decision module.

[0051] It should be noted that the structure of the distributed offloading algorithm model M is: , where state i represents the current running status information of the i-th vehicle (such as position, speed, direction, remaining power, etc.), task irepresents the current task characteristics of the i-th vehicle (such as computational complexity, data volume, latency requirements, etc.), cluster info represents vehicle cluster information (such as distribution of neighboring vehicles, resource status, etc.), θ represents the set of trainable parameters of the model, where output is a binary output of 0 or 1, indicating whether unloading is required, and level is a multi-valued output of 1, 2, or 3, indicating unloading to the vehicle layer, the proximal edge layer, and the distal cloud layer, respectively.

[0052] Preferably, a federated learning framework is used, and the model is trained on the vehicle side to protect the privacy of vehicle data, and differential privacy noise is added to further enhance privacy protection. Gradient quantization and sparsification techniques are used to reduce the amount of data uploaded from the vehicle to the server, reducing network communication overhead. Homomorphic encryption technology enables the training server to directly aggregate encrypted gradients without decryption, improving security. The distributed training framework utilizes the computing power of the vehicle cluster and improves the efficiency of model training. The end-cloud collaborative model architecture can make full use of the computing resources on the vehicle, edge, and cloud to make task offloading decisions.

[0053] The intelligent unloading decision module receives the distributed unloading algorithm model and deploys it to each vehicle. It also autonomously makes hierarchical decisions on task unloading based on vehicle cluster information and local context information, and sends the tasks to be unloaded to the privacy protection module. Based on the feedback of the calculation results, it collaboratively updates the distributed unloading algorithm model and adaptively adjusts the unloading strategy.

[0054] Specifically, the processing flow of the intelligent unloading decision module is as follows: The intelligent unloading decision module receives the distributed unloading algorithm model M sent by the unloading algorithm model training module, and deploys it to the intelligent unloading agent of each vehicle in the vehicle cluster; the intelligent unloading agent of vehicle i continuously obtains the operating status information state of this vehicle i and task features task i , and receive the vehicle cluster information cluster sent by the vehicle cluster networking module info ; Set state i 、task i and cluster info Input to the distributed offloading algorithm model M to obtain the offloading decision output i and level i ; Output according to the binary output result i , the intelligent uninstall agent determines whether the task needs to be uninstalled: if output i =0, indicating local execution without uninstallation; if output i =1, indicating that uninstallation is required. i Select the target layer to uninstall, where level i=1Unload to vehicle layer, level i =2Unload to the near edge layer, level i =3 Offload to the remote cloud layer; set the task feature task to be offloaded i Send to the privacy protection module to obtain encryption tasks ,Will Send to the distributed offloading computing module for execution.

[0055] The privacy protection module receives the tasks to be offloaded, uses the federated adversarial training encryption algorithm to perform privacy protection encryption, and transmits the encrypted task data to the distributed offloading computing module.

[0056] The resource pool construction and scheduling module receives vehicle cluster information, builds an on-board edge cloud resource pool based on blockchain consensus, and sends the available resource information to the distributed offloading computing module for scheduling.

[0057] Specifically, the workflow of the resource pool construction and scheduling module is as follows: establish an identity authentication mechanism for resource pool members based on blockchain technology, and use encrypted signature methods to verify the legitimacy of each node's identity ID; use smart contracts on the blockchain to record and store the static and dynamic attributes of each node, and update the chain immediately when the node attributes change; design a resource pool consensus mechanism based on voting weights, so that all legal nodes can participate in voting decisions; calculate the voting weight of each node , if the sum of all node weights If the value is greater than the preset threshold, the current decision is passed; otherwise, the current decision is rejected. For different types of resources (such as CPU, GPU, memory, etc.), corresponding resource sub-pools are constructed, and virtualization and software-defined technologies are used to abstract and cut each resource to form a reconfigurable resource unit to form a flexible and reconfigurable vehicle-mounted edge cloud resource pool. For the constructed vehicle-mounted edge cloud resource pool, an autonomous scheduling strategy based on task characteristics (real-time requirements, computing power requirements, etc.) and node attributes (resource status, delay distance, etc.) is designed to assign tasks to suitable nodes for execution.

[0058] It should be noted that the design of the autonomous scheduling strategy is as follows: define the task feature vector and the node attribute vector; design the matching score function Score between the task feature vector and the node attribute vector to quantify the degree of adaptation of assigning a task to a node; for each task to be assigned, calculate its matching score with all nodes, sort them from high to low by score, and select the top N nodes with the highest scores to form a candidate node set; in the candidate node set, assign tasks according to the following rules: if there is a node that meets the real-time requirements of the task, the task is assigned to this node first; if there are multiple nodes that meet the requirements, select the node with the most abundant computing resources from them; if all candidate nodes do not meet the real-time requirements, select the node with the lowest latency; if a task cannot be assigned to any node (such as the resource pool is under too much pressure), the task is temporarily stored in the waiting queue and reallocated after the node resources are released; during the task execution process, the node resource status is continuously monitored. Once it is found that the resource utilization of the original assigned node exceeds the preset high water mark threshold, the dynamic migration mechanism of the task is triggered, and the task is dynamically migrated to other nodes with abundant resources for execution.

[0059] It should be noted that the voting weight of each node The specific formula is as follows:

[0060]

[0061] in, represents the historical contribution parameter of node i, Represents the currently available resource parameters of node i, represents the delay distance parameter between node i and the request task, Represents the weighting coefficients of different parameters.

[0062] Preferably, the specific formula of the matching score function Score is as follows:

[0063]

[0064] in, represents the task feature vector, represents n attributes corresponding to task features, represents the weight coefficient of the i-th feature, Represents the similarity scoring function between the ith feature and the attribute (determined by the type of feature).

[0065] For example, for a Boolean feature with a value of 0 / 1, the similarity scoring function is defined as:

[0066]

[0067] For numerical features, the similarity scoring function is defined as:

[0068]

[0069] in, represents the i-th numerical feature of the task, represents the i-th corresponding attribute of the node, Represents the absolute difference between the task feature and the node attribute, indicating Indicates taking and The maximum value of .

[0070] Optimally, the autonomous scheduling strategy design step can autonomously schedule tasks to appropriate nodes based on task characteristics and node attributes by establishing a matching scoring mechanism and allocation rules, giving priority to ensuring the real-time and computing power requirements of key tasks, and secondary consideration of factors such as node distance. It also supports dynamic load migration to cope with changes in node pressure.

[0071] The distributed offloading computing module receives the encrypted task data and available resource information, uses encrypted computing and a trusted execution environment to perform distributed offloading computing on the encrypted task on the scheduled resource target, and feeds the computing results back to the model optimization module.

[0072] Specifically, the processing flow of the distributed offloading computing module is as follows: receiving encrypted task data from the privacy protection module and available resource information from the resource pool construction and scheduling module; according to the task characteristics and resource status, the resource scheduling strategy will encrypt the task Schedule to a suitable computing node (on-board node, edge node or cloud node) for execution; the selected computing node uses the trusted execution environment TEE to build a secure isolated execution environment; in the trusted execution environment, homomorphic encryption technology is used to encrypt the task Perform calculations to obtain encrypted calculation results ; Encrypt the result Return to the model optimization module, the model optimization module decrypts it and obtains the final result Result i .

[0073] The model optimization module receives and decrypts the distributed computing results, and feeds the decrypted results back to the intelligent unloading decision module.

[0074] Furthermore, the present embodiment also provides a method for allocating vehicle computing resources based on a distributed offloading algorithm, including the vehicle collecting its own vehicle operation status data, task workload data, location data, road environment data, and communication neighbor information; constructing a dynamic vehicle cluster based on blockchain technology, determining a secure communication link between vehicles, and constructing a distributed hierarchical offloading computing framework; collaboratively training a distributed offloading algorithm model within the vehicle cluster through a federated learning method; deploying the distributed offloading algorithm model obtained through collaborative training to the intelligent offloading agent of each vehicle, the agent autonomously and hierarchically decides whether the task needs to be offloaded based on the acquired vehicle cluster information and local context information, and selects a suitable offloading target layer; the task feature data and model parameters to be offloaded are encrypted for privacy protection using a federated adversarial training encryption algorithm; constructing an on-board edge cloud resource pool based on blockchain consensus, autonomously scheduling and sharing all available resources; using encrypted computing technology and a trusted execution environment to perform offloading computing on the encrypted task data at the selected offloading target layer; summarizing the distributed computing results and feeding them back to the on-board intelligent offloading agent after decryption, and the agent collaboratively updates the distributed offloading algorithm model based on the actual offloading delay and energy consumption.

[0075] In summary, the present invention uses a method combining federated learning and blockchain technology to build an on-board edge cloud resource pool to achieve efficient allocation and scheduling of vehicle computing resources. The use of federated adversarial training and homomorphic encryption technology ensures that the privacy of individual data is protected during data processing and model training. The dynamic decision-making mechanism makes the entire system more flexible and adaptive, and can effectively cope with highly dynamically changing vehicle environments. Through precise resource scheduling and optimized unloading strategies, the present invention can effectively reduce invalid or excessive computing task execution, thereby optimizing energy consumption.

[0076] Example 2

[0077] Reference Figure 1~Figure 2 This is the second embodiment of the present invention. This embodiment provides a vehicle computing resource allocation system based on a distributed unloading algorithm. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0078] Specifically, the simulation experiment set up a dynamic vehicle cluster consisting of 100 vehicles, including 20 high-performance autonomous taxis, 50 standard passenger cars and 30 low-power electric vehicles, representing edge layer, vehicle layer and cloud layer nodes respectively. The experiment considered three typical vehicle tasks: autonomous driving perception, speech recognition and road condition analysis, and set their parameters such as computing amount, data volume and real-time requirements to simulate actual application scenarios.

[0079] Furthermore, the on-board data acquisition module collects the status of each vehicle, the vehicle cluster networking module uses blockchain technology to verify the identity, and divides 50 vehicles into a dynamic cluster according to dynamic attributes; the vehicles in the cluster are divided into 20 edge layer vehicles, 60 on-board layer vehicles and 20 cloud layer vehicles; the offloading algorithm training module performs federated learning in the cluster and trains an offloading decision model M with an accuracy of 94%; the intelligent offloading decision module deploys M to each vehicle, and when a new task appears, the agent inputs local information to obtain the offloading decision; the resource pool module schedules the tasks to be offloaded to the edge layer or cloud layer according to the strategy, and the privacy protection module encrypts the task data; the distributed offloading calculation module performs encrypted calculations in the TEE of the edge or cloud node, and the model optimization module decrypts the results and feeds back.

[0080] Furthermore, through 30 rounds of simulation experiments, the following key data were obtained: the average resource utilization rate of 80 vehicles in the vehicle layer and edge layer was 87%, the average resource utilization rate of 20 vehicles in the cloud layer was 92%, and the average latency of 100 tasks was 165ms. Compared with the traditional method, the resource utilization rate was increased by 35% and the latency was reduced by 62%. The energy efficiency ratio of this solution is 0.9, which is better than the existing solution. Considering the cost, if the cloud resources are outsourced, 52% of the expenses can be saved each year.

[0081] Specifically, the comparison indicators between the method of the present invention and the traditional method are shown in Table 1.

[0082] Table 1 Comparison indexes of the method of the present invention and the traditional method

[0083]

[0084] Preferably, Table 1 lists the comparison between the method of the present invention and the traditional cloud offloading method in terms of six key indicators, namely resource utilization, latency, privacy protection, dynamic adaptability, energy efficiency ratio and cost-effectiveness ratio. It can be seen that the method of the present invention is significantly superior to the traditional method in terms of indicators such as resource utilization, latency, privacy protection level, dynamic adaptability and energy efficiency ratio.

[0085] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A vehicle computing resource allocation system based on a distributed offloading algorithm, characterized in that: include, The vehicle data collection module collects vehicle operation status data, task workload data, location data, road environment data, and communication neighbor information; The vehicle cluster networking module builds dynamic vehicle clusters based on blockchain technology, builds a distributed hierarchical unloading framework, and sends vehicle cluster information to the unloading algorithm model training module, intelligent unloading decision module, resource pool construction and scheduling module; The unloading algorithm model training module receives the vehicle cluster information, collaboratively trains the distributed unloading algorithm model in the vehicle cluster through the federated learning method, and transmits the trained model to the intelligent unloading decision module; The intelligent unloading decision module receives the distributed unloading algorithm model and deploys it to each vehicle. It also autonomously makes hierarchical decisions on task unloading based on vehicle cluster information and local context information, sends the tasks to be unloaded to the privacy protection module, and collaboratively updates the distributed unloading algorithm model and adaptively adjusts the unloading strategy based on the feedback of the calculation results. The privacy protection module receives the tasks to be offloaded, uses the federated adversarial training encryption algorithm to perform privacy protection encryption, and transmits the encrypted task data to the distributed offloading computing module; The resource pool construction and scheduling module receives vehicle cluster information, builds an on-board edge cloud resource pool based on blockchain consensus, and sends available resource information to the distributed offloading computing module for scheduling; The distributed offloading computing module receives the encrypted task data and available resource information, uses the encrypted computing and trusted execution environment to perform distributed offloading computing on the scheduled resource targets for the encrypted tasks, and feeds back the computing results to the model optimization module; A model optimization module receives and decrypts the distributed computing results, and feeds back the decrypted results to the intelligent unloading decision module; The processing flow of the unloading algorithm model training module is as follows: Receive vehicle cluster information cluster from the vehicle cluster networking module info ; Design the initial structure and parameter θ0 of the distributed offloading algorithm model M. The broadcast is sent to all vehicles in the vehicle cluster; Vehicle i is based on its own running state information state i 、Task features i and vehicle cluster information cluster info , using the current model Make an uninstall decision and obtain a binary output i and multi-value output level i , and obtain the actual uninstall decision label y i and target layer label , binary output i Used to decide whether to uninstall, multi-value output level i Used to decide where to uninstall; According to the output i 、level i and the actual label y i , Calculate local loss Loss i and local model gradient , and adding differential privacy noise to get ; For the noise-protected gradient Perform quantization and sparse processing to obtain a local sparse gradient vector , to reduce the amount of data that needs to be transmitted; The local sparse gradient Perform encryption protection to obtain encrypted gradient , upload it to the training server; The training server collects the encrypted gradients uploaded by all vehicles , using homomorphic encryption technology to perform gradient aggregation operations and obtain the global gradient , where M represents the total number of vehicles, Represents an aggregation operation, represents the encrypted gradient uploaded by the i-th vehicle; Training server decrypts global gradients , and get the final gradient , using the gradient Update the distributed offloading algorithm model parameters to ,in Represents the dynamically adjusted learning rate; The updated model Broadcast back to all vehicles in the vehicle cluster; The training process is repeated until the model converges or reaches the preset training rounds, and the final trained distributed offloading algorithm model M is sent to the intelligent offloading decision module.

2. The vehicle computing resource allocation system based on the distributed offloading algorithm according to claim 1, characterized in that: The processing flow of the vehicle cluster networking module is as follows: The vehicle automatically collects its own static and dynamic attributes and broadcasts the collected information to surrounding vehicles through wireless communication technology; Using the consensus mechanism of blockchain, vehicles can mutually verify the authenticity of static attributes, establish a preliminary trust relationship, and form a collection of trusted vehicles; Based on the dynamic properties of vehicles and their changing trends, the relative movement patterns between vehicles are predicted and evaluated, and the vehicle pairs or groups that are likely to remain relatively stationary or move in coordination in the future are determined to form dynamic vehicle clusters; For the identified vehicle pairs or groups, a key exchange protocol is used to establish an end-to-end secure communication link under the supervision of the blockchain; The trusted vehicle collection is layered according to the vehicle's computing power, remaining power, and mission requirements to build a distributed on-board layer, proximal edge layer, and remote cloud layer to form a distributed layered offloading framework.

3. The vehicle computing resource allocation system based on the distributed offloading algorithm as claimed in claim 1, characterized in that: The local loss Loss i The calculation formula is as follows: in, Among them, output i Represents the binary output result, level i Indicates multi-value output results, Loss i represents the local loss, L output Represents binary output output i The loss, L level Indicates multi-value output level i The loss, y i Indicates the actual uninstall decision label. represents the actual target layer label, K represents the number of unloaded target layers, and k represents the intermediate variable; The local model gradient The specific formula is as follows: Among them, Loss i represents local loss, represents the model parameters; The addition of differential privacy noise yields , the specific formula is as follows: in, represents the local model gradient, represents Gaussian noise, represents the noise disturbance level, S represents the sensitivity of the gradient, n represents the size of the vehicle cluster, Represents the model gradient after noise protection.

4. The vehicle computing resource allocation system based on the distributed offloading algorithm as claimed in claim 1, characterized in that: The processing flow of the intelligent uninstallation decision module is as follows: The intelligent unloading decision module receives the distributed unloading algorithm model M sent by the unloading algorithm model training module, and deploys it to the intelligent unloading agent of each vehicle in the vehicle cluster; The intelligent unloading agent of vehicle i continuously obtains the running status information of this vehicle state i and task features task i , and receive the vehicle cluster information cluster sent by the vehicle cluster networking module info ; The state i 、task i and cluster info Input to the distributed offloading algorithm model M to obtain the offloading decision output i and level i ; According to the binary output result in the uninstall decision i , the intelligent uninstall agent determines whether the task needs to be uninstalled: If output i =0, means local execution, no need to uninstall; If output i =1, indicating that uninstallation is required. i Select the target layer to uninstall. Among them level i =1Unload to vehicle layer, level i =2Unload to the near edge layer, level i =3 Offload to the remote cloud layer; The task feature task to be uninstalled i Send to the privacy protection module to obtain encryption tasks ,Will Send to the distributed offloading computing module for execution.

5. The vehicle computing resource allocation system based on the distributed offloading algorithm as claimed in claim 1, characterized in that: The workflow of the resource pool construction and scheduling module is as follows: Establish an identity authentication mechanism for resource pool members based on blockchain technology, and use encrypted signature methods to verify the legitimacy of each node's identity ID; Using smart contracts on the blockchain, the static and dynamic properties of each node are recorded and stored, and when the node properties change, they are immediately updated on the chain; Design a resource pool consensus mechanism based on voting weights, so that all legitimate nodes can participate in voting decisions; Calculate the voting weight of each node , if the sum of all node weights If it is greater than the preset threshold, the current decision is passed, otherwise it is rejected; For different types of resources, corresponding resource sub-pools are constructed, and virtualization and software-defined technologies are used to abstract and segment each resource to form reconfigurable resource units to form a flexible and reconfigurable vehicle-mounted edge cloud resource pool; For the established in-vehicle edge cloud resource pool, an autonomous scheduling strategy based on task characteristics and node attributes is designed to assign tasks to suitable nodes for execution.

6. The vehicle computing resource allocation system based on the distributed offloading algorithm as claimed in claim 5, characterized in that: The design of the autonomous scheduling strategy is as follows: Define task feature vector and node attribute vector; Design a matching score function Score between the task feature vector and the node attribute vector to quantify the degree of suitability of assigning a task to a node; For each task to be assigned, calculate its matching score with all nodes, sort them from high to low, and select the top N nodes with the highest scores to form the candidate node set; In the candidate node set, tasks are assigned according to the following rules: If there is a node that meets the real-time requirements of the task, the task will be assigned to this node first; If there are multiple nodes that meet the requirements, the node with the most abundant computing resources will be selected; If all candidate nodes do not meet the real-time requirements, the node with the lowest latency is selected; If a task cannot be assigned to any node, it will be temporarily stored in the waiting queue and will be reallocated after node resources are released; During the task execution process, the node resource status is continuously monitored. Once the resource utilization of the original assigned node is found to exceed the preset high water mark threshold, the dynamic migration mechanism of the task is triggered, and the task is dynamically migrated to other nodes with surplus resources for execution.

7. A vehicle computer computing resource allocation method based on a distributed offloading algorithm, based on the vehicle computer computing resource allocation system based on a distributed offloading algorithm according to any one of claims 1 to 6, characterized in that: Also includes, The vehicle collects data on its operating status, task workload, location, road environment, and communication neighbor information; Build dynamic vehicle clusters based on blockchain technology, determine secure communication links between vehicles, and build a distributed hierarchical offloading computing framework; The distributed unloading algorithm model is collaboratively trained within the vehicle cluster through a federated learning method; The distributed unloading algorithm model obtained through collaborative training is deployed to the intelligent unloading agent of each vehicle. The agent combines the acquired vehicle cluster information and local context information to autonomously make hierarchical decisions on whether the task needs to be unloaded and select the appropriate unloading target layer. The task feature data and model parameters to be offloaded are encrypted with privacy protection using the federated adversarial training encryption algorithm; Build an in-vehicle edge cloud resource pool based on blockchain consensus to autonomously schedule and share all available resources; Using encryption computing technology and a trusted execution environment, offload computing of encrypted task data is performed at the selected offload target layer; The distributed computing results are summarized and fed back to the on-board intelligent unloading agent after decryption. The agent collaboratively updates the distributed unloading algorithm model based on the actual unloading delay and energy consumption.