Blockchain-based vehicle edge computing task offloading method, system and device

By adopting a blockchain-based task offloading method for vehicle edge computing, integrating vehicle and drone state vectors, generating decision instructions and ensuring data security, this approach solves the problems of resource utilization imbalance and privacy leakage in vehicle edge computing, and achieves efficient resource offloading and secure communication.

CN121463118BActive Publication Date: 2026-05-15INNER MONGOLIA UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INNER MONGOLIA UNIV OF TECH
Filing Date
2025-11-05
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In vehicle edge computing, existing technologies suffer from inefficient dynamic decision-making, unreliable node collaboration, and unbalanced resource utilization. Furthermore, there is a risk of privacy leakage during the drone computing offloading process.

Method used

A blockchain-based vehicle edge computing task offloading method is adopted. By integrating the state vectors of vehicles, service vehicles and drones, the method utilizes the correlation features to parallelly compute resources to offload and allocate action value and trajectory control action value, generate decision instructions, and ensure data security and privacy through blockchain technology.

Benefits of technology

It achieves efficient resource utilization and computational offloading, reduces computational overhead and latency, ensures secure communication between vehicles and drones, and improves system resource utilization and service reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121463118B_ABST
    Figure CN121463118B_ABST
Patent Text Reader

Abstract

The application provides a kind of based on blockchain's vehicle edge computing task unloading method, system and equipment, belong to the cross field of Internet of Vehicles and edge computing, this method includes: base station extracts the data state vector of request vehicle, service vehicle and unmanned aerial vehicle, and inputs state vector into BDQ network, extracts associated features and calculates three types of Q value of service vehicle unloading, unmanned aerial vehicle unloading and trajectory control;Based on Q value, select the optimal unloading object for each request vehicle, and match the optimal flight direction and time for the selected unmanned aerial vehicle, generate complete decision instruction;After base station broadcasts instruction, service vehicle and unmanned aerial vehicle receive and process task;After task completion, service vehicle packs task related data into transaction ciphertext through adjacent unmanned aerial vehicle, forms tamper-proof evidence through blockchain.The application realizes the cooperative optimization of task unloading and trajectory, combines blockchain to guarantee node trusted cooperation, effectively reduces task delay and node energy consumption, improves system resource utilization and service reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the intersection of vehicle networking and edge computing, and specifically relates to a method, system and device for offloading vehicle edge computing tasks based on blockchain. Background Technology

[0002] In the Internet of Vehicles (IoV), computing tasks for vehicle applications can be offloaded to Roadside Units (RSUs), Base Stations (BSs), and edge servers. Simultaneously, the vehicle's own storage, computing, and communication resources can serve as edge infrastructure for other users, giving rise to the new computing paradigm of Vehicle Edge Computing (VEC), achieving efficient resource utilization and optimized service delivery. However, when autonomous driving performs computationally demanding real-time tasks, such as video recognition monitoring of surrounding traffic and online route planning, the data processing speed and computing efficiency directly impact driving safety.

[0003] Base stations, constrained by geographical location and high deployment costs, are often idle during off-peak hours and struggle to cope with sudden surges in workload. Although some service vehicles possess computing resources, these resources are scarce during peak periods, making it difficult to support the additional load and thus hindering their ability to meet such challenges.

[0004] Due to their high mobility, ease of deployment, low cost, and small size, drones can be deployed as host edge servers to provide mobile edge computing services to users in congested fixed-ground VEC networks. Compared to traditional equipment such as fixed base stations, drones are more flexible, can overcome geographical limitations, and can address base station blind spots. However, the limited power capacity of drones presents new challenges. Therefore, energy-saving models are crucial. The frequent exchange of information and transfer of computing tasks between drones and mobile users poses a risk of privacy breaches in vehicular edge computing environments. During computation offloading, sensitive user data may be intercepted or misused. Therefore, effectively ensuring the security and privacy of the computation offloading process between users and drones in aerial computing scenarios remains an open and unresolved issue.

[0005] In summary, existing vehicle edge computing task offloading methods suffer from problems such as inefficient dynamic decision-making, unreliable node collaboration, unbalanced resource utilization, and information insecurity. Summary of the Invention

[0006] To address the aforementioned problems, this invention provides a blockchain-based method, system, and device for offloading vehicle edge computing tasks.

[0007] To achieve the above objectives, the present invention provides a blockchain-based method for offloading vehicle edge computing tasks, comprising:

[0008] The base station integrates all data from the task demand pool of each target requesting vehicle, the resource pool of each service vehicle, and the state pool of each drone into a state vector from the dimensions of location, task, resources, and constraints. The state vector includes: the real-time coordinates of all requesting vehicles, service vehicles, and drones; the task demand list of each requesting vehicle; the available storage resources, CPU computing frequency, and queue of unresolved tasks of each service vehicle and each drone; and the remaining battery power and blockchain reputation value of each drone.

[0009] The association features of the state vectors are extracted, and the resource unloading and allocation action value between each requesting vehicle and all service vehicles, as well as between each requesting vehicle and all drones, are calculated in parallel using these features. At the same time, the trajectory control action value of each drone with different flight directions and time combinations is calculated. Using the resource unloading and allocation action values ​​of each service vehicle, the resource unloading and allocation action values ​​of the drones, and the trajectory control action values, the service vehicle or drone with the highest action value is selected as the resource unloading target for each requesting vehicle. At the same time, the optimal flight direction and time for the selected drone are matched, and a complete decision instruction for each requesting vehicle is generated.

[0010] The base station receives the complete decision instruction and broadcasts it to the corresponding requesting vehicle, service vehicle, and drone. The service vehicle and drone then perform resource unloading for the target requesting vehicle.

[0011] Preferably, the task demand pool includes the real-time coordinates of each target requesting vehicle and a task demand list, wherein the task demand list includes: task demand code ID, task demand data size, and maximum latency time; the service vehicle resource pool includes available storage resources, CPU computing frequency, real-time coordinates, remaining battery power, and a queue of tasks to be resolved; and the drone status pool includes available storage resources, CPU computing frequency, real-time coordinates, remaining battery power, blockchain reputation value, and a queue of tasks to be resolved.

[0012] Preferably, the base station receives the complete decision instruction and broadcasts it to the corresponding requesting vehicle, service vehicle, and drone. The service vehicle and drone perform resource task offloading for the target requesting vehicle, specifically including: the target requesting vehicle directly sending the calculation task data to the selected service vehicle according to the complete decision instruction; the service vehicle processing the task using a FIFO strategy and returning the calculation result to the target requesting vehicle; the drone flying towards the target requesting vehicle according to the optimal flight direction and time, the target requesting vehicle sending the calculation task data to the arriving drone for processing, and the drone returning the result to the target requesting vehicle after calculation.

[0013] Preferably, after the service vehicle and the drone perform resource unloading for the target requesting vehicle, the system further includes:

[0014] The service vehicle and the drone respectively hash-encrypt the identity of the requesting vehicle and the calculation result. The service vehicle transmits the requesting vehicle's task requirement code ID, the requesting vehicle's hash identity, and the hash value of the calculation result to the drone with the highest blockchain reputation value according to the nearest principle. The drone packages the received encrypted data into a unified transaction ciphertext.

[0015] The transaction ciphertext is broadcast to the blockchain network by the drone node. Through the DPoS algorithm, the drone with the highest reputation value in the blockchain network will integrate the transaction ciphertext to generate a new block.

[0016] Other drone nodes in the blockchain network verify the new block. Once all drones reach a consensus, the new block is written into the historical blockchain, forming an immutable and permanent record.

[0017] At the same time, the service vehicles and drones will complete the status feedback to the base station, updating the resource status of each service vehicle resource pool and each drone status pool.

[0018] Preferably, the Branch Duel Q Network (BDQ) is used to generate complete decision instructions for each requesting vehicle, specifically including: the BDQ network generating a total reward prediction value, and using the total reward prediction value to generate decision instructions; after the decision instructions execute the task unloading, the BDQ network calculates the single-step reward based on the decision instructions and accumulates it into a total reward; the BDQ network calculates the total loss between the total reward prediction value and the actual single-step reward accumulated into a total reward value, and then minimizes the total loss through backpropagation to update the BDQ network parameters, obtaining the final optimized BDQ network; and using the optimized BDQ network, complete decision instructions for each requesting vehicle are generated.

[0019] Preferably, data interaction between the target requesting vehicle and the service vehicle is realized based on vehicle-to-vehicle (V2V) technology, and resource task unloading is performed for the target requesting vehicle.

[0020] Preferably, data interaction between the target requesting vehicle and the drone is achieved based on vehicle-to-drone (V2U) technology, and resource task unloading is performed for the target requesting vehicle.

[0021] This invention also provides a blockchain-based vehicle edge computing task offloading system, comprising:

[0022] The base station receiving information module is used by the base station to integrate all data from the task demand pool of each target requesting vehicle, the resource pool of each service vehicle, and the state pool of each drone into a state vector from the dimensions of location, task, resources, and constraints. The state vector includes: the real-time coordinates of all requesting vehicles, service vehicles, and drones; the task demand list of each requesting vehicle; the available storage resources, CPU computing frequency, and unresolved task queue of each service vehicle and each drone; and the remaining battery power and blockchain reputation value of each drone.

[0023] The network computing module is used to extract the correlation features of the state vectors, and to calculate in parallel the resource unloading and allocation action value between each requesting vehicle and all service vehicles, as well as the resource unloading and allocation action value between each requesting vehicle and all drones. At the same time, it calculates the trajectory control action value of each drone for different combinations of flight direction and time. Using the resource unloading and allocation action values ​​of each service vehicle, the resource unloading and allocation action values ​​of the drones, and the trajectory control action values, it selects the service vehicle or drone with the highest action value as the resource unloading target for each requesting vehicle, and matches the selected drone with the flight direction and time with the optimal action value, generating a complete decision instruction for each requesting vehicle.

[0024] The decision instruction application module is used by the base station to receive the complete decision instruction and broadcast it to the corresponding requesting vehicle, service vehicle and drone. The service vehicle and drone perform resource task unloading for the target requesting vehicle.

[0025] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement any of the steps in the blockchain-based vehicle edge computing task offloading method.

[0026] The blockchain-based vehicle edge computing task offloading method provided by this invention has the following beneficial effects:

[0027] This invention introduces multiple drone swarms as aerial cache nodes to address resource constraints in vehicular networks and meet the real-time data processing needs of high-computation scenarios. It utilizes the value of service vehicle resource offloading and allocation actions, drone resource offloading and allocation actions, and trajectory control actions to determine the relationship between the requesting vehicle, drone, and service vehicle, significantly reducing computational overhead while maintaining decision-making accuracy. By combining drone networks, vehicular networks, and blockchain technology, it ensures secure and private communication between vehicles and drones. The invention efficiently and securely ensures the completion of vehicle edge computing task offloading. It achieves collaborative optimization of task offloading and trajectory, and combines blockchain to ensure trusted node collaboration, effectively reducing task latency and node energy consumption, and improving the resource utilization and service reliability of the drone-assisted vehicle edge computing system. Attached Figure Description

[0028] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a flowchart of a blockchain-based vehicle edge computing task offloading method according to an embodiment of the present invention;

[0030] Figure 2 This is a flowchart of a blockchain-based drone-assisted VEC unloading scenario according to an embodiment of the present invention;

[0031] Figure 3 This is a flowchart of the blockchain consensus process according to an embodiment of the present invention;

[0032] Figure 4 This is a diagram of the BDQ network structure according to an embodiment of the present invention;

[0033] Figure 5 This is a comparison chart of the learning curves of the DQN algorithm in this embodiment of the invention.

[0034] Figure 6 This is a comparison chart of the average reward of the DQN algorithm in an embodiment of the present invention;

[0035] Figure 7 This is a trajectory control learning curve diagram according to an embodiment of the present invention;

[0036] Figure 8 This is a comparison chart of the average rewards of the trajectory control strategy in an embodiment of the present invention;

[0037] Figure 9 This is a comparison chart of service times for trajectory control strategies according to embodiments of the present invention;

[0038] Figure 10 This is a comparison chart of the average total energy consumption of the blockchain systems according to embodiments of the present invention;

[0039] Figure 11 This is a comparison chart of the average single-step latency of the blockchain system in an embodiment of the present invention. Detailed Implementation

[0040] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.

[0041] Existing technologies have explored the use of deep reinforcement learning to design efficient drone-assisted vehicle edge computing task offloading strategies. Under constraints of limited network bandwidth and limited drone power, the drone trajectory and task offloading strategy are jointly optimized. The main objective of the proposed strategy is to significantly reduce the system latency of the edge computing network. Existing technologies also introduce drones to address the VEC overload problem, formulating a novel online drone-assisted vehicle task offloading solution. This involves optimizing the long-term energy composition based on Lyapunov optimization techniques, and then finding a near-optimal drone-assisted offloading strategy based on Markov chains with Markov approximation optimization. Finally, to address the demands of vehicles in traffic congestion, existing technologies propose an optimal drone flight algorithm based on the traffic scene to minimize the energy costs of drone flight and turning.

[0042] Existing research has focused on solving the computational resource allocation problem in U-VEC, achieving efficient task offloading and scheduling. However, these studies have not considered optimizing the service time of UAV swarms, and have neglected the security issues of task data and transactions during the task offloading process.

[0043] Blockchain technology, through distributed storage and encryption algorithms, ensures data tamper-proofing and traceability, enhancing data security. Simultaneously, blockchain's consensus mechanism enables decentralized data processing, avoiding the risk of single points of failure. Combined with in-vehicle edge computing, blockchain can more effectively process vehicle data, improving the overall efficiency and security of transportation systems and providing strong support for the construction of intelligent transportation systems.

[0044] Existing technologies propose a blockchain-enabled in-vehicle edge computing framework that employs a two-layer verification process and is authorized by a permissioned blockchain to ensure data accuracy and integrity. A novel system utility function is designed to measure the framework's performance, and this function also serves as the basis for the permissioned blockchain consensus mechanism. Existing technologies apply blockchain to the cooperative task offloading of VECs, proposing a cooperative and secure handover framework with a consensus mechanism. A novel consensus mechanism is also proposed to ensure the synchronization and immutability of offloaded data during handover. Existing technologies propose a fully decentralized machine learning system that combines federated learning and blockchain to provide a private machine learning process for autonomous vehicles. The machine learning model is trained using local data from the autonomous vehicle, and then uploaded to a mobile edge computing node to obtain the optimal global model. Introducing blockchain technology into a drone-assisted in-vehicle edge computing network ensures the security and privacy of data offloading between users and drones during in-flight computing, providing stronger security guarantees for task offloading.

[0045] To address the aforementioned issues, this invention presents a blockchain-based drone-assisted vehicle-mounted edge computing task offloading method, and investigates the application and optimization of deep reinforcement learning in drone-assisted vehicle-mounted edge computing.

[0046] This invention provides a blockchain-based method for offloading vehicle edge computing tasks, specifically as follows: Figure 1 As shown, it includes:

[0047] S1. The base station integrates all data from the task demand pool of each target requesting vehicle, the resource pool of each service vehicle, and the state pool of each drone into a state vector from the dimensions of location, task, resources, and constraints. The state vector includes: the real-time coordinates of all requesting vehicles, service vehicles, and drones; the task demand list of each requesting vehicle; the available storage resources, CPU computing frequency, and queue of unresolved tasks of each service vehicle and drone; and the remaining battery power and blockchain reputation value of each drone.

[0048] The drone-assisted VEC offloading problem studied in this embodiment of the invention is based on a Manhattan grid model scenario of city modeling, which includes a base station, a drone equipped with an edge server, a task request vehicle, and a service vehicle. The overall scenario is as follows: Figure 2 As shown. Base station: The base station is used to collect task information from the task requesting vehicle, and resource information from the service vehicle and the drone.

[0049] Requesting vehicle: A vehicle that needs to send a service request to the base station when computing resources are insufficient. Service vehicle: A vehicle with available resources and willing to provide service. Drone: Each drone is equipped with an MEC server, which can act as both a computing node and a blockchain node, handling both computing and blockchain tasks simultaneously.

[0050] In this architecture, service vehicles and drones, acting as providers of edge computing resources, respond to task requests initiated by mobile users and perform corresponding computational operations. Upon completion of the task, the drone packages the task-related information and its computational results into a transaction record and uploads it to the blockchain network. Subsequently, multiple pre-selected blockchain nodes participate in consensus verification to ensure the validity of the transaction and the authenticity of the computational results. Once the transaction is verified, it is written to the blockchain and permanently stored. This process does not rely on third parties, significantly reducing trust costs and transaction latency, thereby improving the system's autonomy and operational efficiency.

[0051] S2. Extract the correlation features of the state vectors, and use the correlation features to calculate in parallel the resource unloading and allocation action value between each requesting vehicle and all service vehicles, and the resource unloading and allocation action value between each requesting vehicle and all drones. At the same time, calculate the trajectory control action value of each drone with different flight direction and time combinations. Using the resource unloading and allocation action value of each service vehicle, the resource unloading and allocation action value of the drones, and the trajectory control action value, select the service vehicle or drone with the highest action value as the resource unloading target for each requesting vehicle. At the same time, match the selected drone with the flight direction and time with the optimal action value, and generate a complete decision instruction for each requesting vehicle.

[0052] When a vehicle is unable to complete a task independently, it sends an assistance request to a nearby base station, containing information about the vehicle. The size of the computational task in time slot [t-1,t] and the maximum tolerable delay of the task .in The representative requested a car. Representative service vehicle, Representing drones, This represents the process of unloading from the requesting vehicle to the service vehicle. This represents the process of unloading from the requesting vehicle to the drone. The vehicles and drones providing the unloading service send relevant information to the base station, including available vehicles and resources. CPU frequency Available resources for drones CPU frequency The base station matches the service vehicles and drones based on the acquired attributes. Since the amount of data in the calculation results is very small, the transmission delay of the returned calculation results is not considered for the time being.

[0053] V2V offloading technology requests vehicle in time slot [t-1,t]. With service vehicle The transmission rate between them can be expressed as:

[0054] (1)

[0055] Where B is the channel bandwidth. It is the transmission power of the mission request vehicle. It is channel gain. This indicates the distance between the mission requesting vehicle and the mission service vehicle. This represents the path loss index. It is noise power. Therefore, a request is made regarding the vehicle. With service vehicle The transmission delay between them can be expressed as:

[0056] (2)

[0057] in, This indicates the size of the task, therefore a request is made to the vehicle. With service vehicle The energy consumption for transmission between them is:

[0058] (3)

[0059] In time slot [t-1, t], request the vehicle With service vehicle The computational delay between them can be expressed as:

[0060] (4)

[0061] in, This represents the number of CPU cycles required for the service vehicle to compute a 1-bit task. This refers to the calculation frequency of the service vehicle. Therefore, a vehicle request is made. With service vehicle The calculated energy consumption between them is:

[0062] (5)

[0063] in, This refers to the unit of energy consumption calculation. We assume that multiple tasks may be unloaded onto a vehicle within each time slot, and each task is processed in a First-In-First-Out (FIFO) manner. If a new task arrives at an empty queue, it will be processed immediately. If the queue is not empty, the newly arrived task must wait for all previous tasks to be processed before it can be processed. In time slot [t-1,t], the vehicle... The queue latency required for the computation task is given by the following formula:

[0064] (6)

[0065] Therefore, the task request vehicle With mission provision vehicle The total delay between them can be expressed as:

[0066] (7)

[0067] Task Request Vehicle With mission provision vehicle The total energy consumption can be expressed as:

[0068] (8)

[0069] V2U unloading, assuming the vehicle The instantaneous position of the coordinates in the horizontal plane at time t can be expressed as: ={ , Drones The instantaneous position of the object in the horizontal plane at time t is denoted as: ={ , The drone's flight altitude is fixed at H. Therefore, the drone With vehicles The distance at time t is defined as follows:

[0070] (9)

[0071] Because drones fly at high altitudes, they can avoid obstacles and reach the optimal position to establish a communication link with vehicles. This is based on line-of-sight (LoS) communication. With vehicles The channel gain between them can be expressed as:

[0072] (10)

[0073] in, Represents the channel power gain, in time slot [t-1,t], for vehicles drones The transmission rate between them can be expressed as:

[0074] (11)

[0075] Where B is the channel bandwidth. It is the transmission power of the mission request vehicle. This is noise power. Therefore, the transmission delay can be expressed as:

[0076] (12)

[0077] in, This indicates the size of the task, therefore a request is made to the vehicle. With drones The energy consumption for transmission between them is:

[0078] (13)

[0079] In time slot [t-1, t], request the vehicle With drones The computational delay between them can be expressed as:

[0080] (14)

[0081] Among them, This represents the number of CPU cycles required for a drone to compute a 1-bit task. This refers to the drone's computing frequency. Therefore, a request is made regarding the vehicle... With drones The calculated energy consumption between them is:

[0082] (15)

[0083] in, This refers to the CPU frequency of the drone server. This refers to the effective capacitance coefficient of the server on the drone. We assume that multiple tasks may be offloaded to the drone within each time slot, and each task is processed in a FIFO manner. If a new task arrives in an empty queue, it will be processed immediately. If the queue is not empty, the newly arrived task must wait for all previous tasks to be processed before it can be processed. In time slot [t-1, t], the vehicle... The queue latency required for the computation task is given by the following formula:

[0084] (16)

[0085] Therefore, the task request vehicle With drones The total delay between them can be expressed as:

[0086] (17)

[0087] Task Request Vehicle With drones The total energy consumption can be expressed as:

[0088] (18)

[0089] The mobile energy consumption model for unmanned aerial vehicles (UAVs) mainly divides the energy consumption of UAVs into two parts: hovering energy consumption and flight energy consumption. In this embodiment of the invention, the energy consumption of the UAV during wireless transmission is ignored because its impact on other energy consumption factors is relatively small.

[0090] 1) Hovering energy consumption model

[0091] In this system, the UAV maintains a constant altitude of H throughout the entire operation. Hovering energy consumption refers to the energy consumed by the UAV when it hovers stably at a fixed altitude. Therefore, the UAV serves the vehicle within time slot [t-1,t]. The hovering energy consumption is expressed as:

[0092] (19)

[0093] in, This refers to the hovering energy consumption of a drone per unit of time. This indicates the hovering time per unit of time.

[0094] 2) Horizontal flight energy consumption model

[0095] Flight energy consumption refers to the energy consumed by a UAV moving horizontally at a constant altitude H. The UAV's flight speed during the time interval [t-1,t] is... Flight time is The energy consumption of a drone flight can be expressed as:

[0096] (20)

[0097] Where M represents the weight of the drone.

[0098] In this invention, which involves the processing of vehicle and drone resource information, mission information, and transaction information, blockchain technology is introduced to ensure data security. Blockchain possesses characteristics such as decentralization, traceability, and tamper-proofing, effectively preventing data from being maliciously modified or forged.

[0099] First, the system uses a hash algorithm to convert the identity information of the requesting user into a hash value, which serves as their unique identifier. Because hash algorithms are irreversible, blockchain nodes cannot reconstruct the original identity information, effectively protecting user privacy. Second, the operation process on the blockchain platform is highly transparent and traceable. All processing steps of computational tasks are recorded on the chain and are verifiable, avoiding the risk of nodes leaking user task data during execution, thereby enhancing the system's security and trustworthiness.

[0100] The blockchain consensus process is as follows Figure 3 As shown. First, the requesting user needs to encrypt their information and offload the computational task to a service vehicle or drone. Second, the relevant vehicle or drone processes the computational task and packages it into a transaction. Then, the selected blockchain master node generates a block and performs consensus verification on other blockchain nodes. After consensus is reached, the block is added to the blockchain system to become an immutable part. To avoid blockchain nodes competing for significant computing resources, we use the Delegated Proof-of-Stake (DPoS) algorithm to select block processors. The reputation of a blockchain node depends primarily on its past performance in executing blockchain tasks.

[0101] In the block generation process, assume that block processor j is selected as the current block processor for time slot [t-1, t]. The latency consumed by block processor j in generating a block can be expressed as:

[0102] ; (twenty one)

[0103] in, Let [t-1, t] be the transaction size for time slot [t-1, t], where Hash() is a hash function that converts computation tasks and results into hash values ​​to save storage space for the drone, and k represents the block committee node. The calculation results of the committee nodes, It is the calculation result. This indicates the corresponding encrypted file. This represents the CPU cycles required for block producer j to process each bit of data in the [t-1,t] time slot. This represents the CPU cycles required to generate a new block. Therefore, the energy consumption for generating a new block is:

[0104] ; (twenty two)

[0105] The consensus process requires block verification before adding a newly generated block to the blockchain to achieve control over the entire blockchain. For block attributes, we represent the block size in the [t-1, t] time slot as... . This can represent the process from block processor j to block processor j. The transmission rate. Therefore, the maximum transmission delay from block processor j to other block processors can be expressed as:

[0106] ; (twenty three)

[0107] This indicates the path from block processor (drone) j to (drone). Therefore, the energy consumption for block transmission is:

[0108] ; (twenty four)

[0109] in, This indicates the drone's transmission power.

[0110] Block verification is required after the block transmission process is completed. Therefore, the verification time can be expressed as:

[0111] (25)

[0112] in, The number of CPU cycles required for the block verification process, therefore, the energy consumed by block verification is:

[0113] (26)

[0114] Therefore, the total delay of the block process is:

[0115] (27)

[0116] Here, blockchain represents the blockchain technology. The total energy consumption of the block process is:

[0117] (28)

[0118] The embodiments of this invention aim to minimize energy consumption in order to maximize system utility. The problem can be expressed as follows:

[0119] (29)

[0120] (29a)

[0121] (29b)

[0122] (29c)

[0123] (29d)

[0124] (29e)

[0125] (29f)

[0126] Where P represents the reward for completing the task. and This represents the energy consumption of the vehicle and drone providing task offloading services at time t. Represents the energy consumption of the blockchain. 29a and 29b stipulate that the available resources of the vehicle or drone providing the unloading service must be greater than or equal to the size of all unloading tasks selected for it. 29c and 29d guarantee that when a task-requesting vehicle selects a vehicle or drone for unloading, the sum of the transmission latency, computation latency, queue latency, and blockchain task latency of all assigned tasks does not exceed the maximum tolerable latency. 29e specifies… and It must be a binary variable, and 29f specifies the safe distance between drones.

[0127] A task offloading algorithm based on deep reinforcement learning is established, and a Markov decision process is constructed. The state space is the initial two-dimensional position of the vehicle and the drone. , The cache resource size required by the task request vehicle and the maximum tolerable latency matrix of the task. =[ , The task service vehicle can provide a cache size and CPU clock frequency matrix. =[ , The cache size and CPU clock frequency matrix that can be provided for service drones. =[ , Minimum remaining energy in a drone swarm The reputation value R of a drone swarm is defined as follows:

[0128] (30)

[0129] Action space: This refers to whether the vehicle is selected as a service vehicle. This indicates that the value can be {0, 1}. (Using...) This indicates whether the drone has been selected as a service drone, with values ​​ranging from {0, 1}. The drone's horizontal flight direction and flight time are represented by a vector. The representation is defined as follows:

[0130] (31)

[0131] Reward function: The reward function is defined as follows:

[0132] (32)

[0133] The optimal goal is to maximize long-term utility; therefore, the total reward is defined as:

[0134] (33)

[0135] Because the system maximizes the drone's survival time through trajectory control, therefore... This makes later rewards equally important.

[0136] To address the problem of dimensionality explosion in discrete action space, Branching-Dueling-Q Networks (BDQ) are used. BDQ separates the neural network output into 22 branches, thus reducing the dimensionality of the discrete action space. Reduced to This allows neural networks to use fewer hidden layers, reducing the training complexity and cost of high-dimensional discrete action spaces, thus enabling better training and resulting in superior behavioral strategies. The BDQ network structure is as follows: Figure 4 As shown.

[0137] In the BDQ task offloading algorithm, the 22 action branches use a shared decision module for state value estimation. After passing through the shared decision module, 23 outputs are obtained, namely: … and Then... and … Add and output … Then according to … Choosing between service vehicles, drones, and drone mobility decisions.

[0138] When training the neural network, this embodiment of the invention defines the loss function of BDQ as the expected value of the cross-branch mean absolute TD error function:

[0139] (34)

[0140] Where D represents the experience replay pool. It represents the state, action, reward, and next state. This represents the target value for TD. To optimize BDQ performance, this embodiment of the invention uses the average Q-value of all behavioral branches to calculate the target value:

[0141] (35)

[0142] The optimal BDQ can be achieved by averaging the Q values ​​of each branch. . The Q-value of the current network is composed of the state estimate and the corresponding branch action advantage function:

[0143] (36)

[0144]

[0145] The flowchart of the BDQ-based UAV-assisted U-VEC unloading algorithm is shown in Algorithm 1. First, the parameters of the master Q-network and the target network are initialized. An ε-greedy strategy is used to balance exploration and utilization, and a multi-branch action space is constructed, with each branch corresponding to a requesting vehicle or UAV. During environmental interaction, at each time step, the agent selects a branch action based on the current state and receives a reward, the next state, and a round-end flag. The data is stored in the replay buffer in the form of a sequence. During the training phase, m batches of samples are randomly sampled from this buffer, and the Q-value of each branch is calculated. The Q-function of each action branch is then calculated using the advantage function and the state value function. Finally, the target Q-values ​​of all branches are averaged to obtain a unified target value, thereby enhancing the collaborative learning ability among branches. The total loss function is composed of the average TD error of each branch. During training, the parameters of the main network are periodically synchronized to the target network until the task is completed or the termination condition is met.

[0146] The number of requesting and service vehicles is 15, and the number of drones is 7. During peak periods, the service vehicles can provide resources of [50, 150] MB, and the drones can provide resources of [500, 1000] MB. The resources required for the task proposed by the requesting vehicle and the maximum tolerable transmission delay are 100 MB and 5 seconds, respectively. The channel bandwidth is 10 MHz. Noise power... mW. Other parameters are shown in Table 1:

[0147] Table 1 Main parameters of the experiment

[0148]

[0149] S3. The base station receives the complete decision instruction and broadcasts it to the corresponding requesting vehicle, service vehicle, and drone. The service vehicle and drone perform resource task unloading for the target requesting vehicle.

[0150] To verify the effectiveness of the proposed algorithm, randomized algorithms and DQN algorithms were selected as baseline methods for comparison. With 15 request vehicles, 15 service vehicles, and 7 drones, the action space increased dramatically. Since DQN cannot handle this, the problem scale is reduced to a dimension that DQN can handle, involving only 2 task requesting vehicles, 2 service vehicles, and 3 drones, thus narrowing the action space to... The learning performance of these algorithms is as follows: Figure 5 and Figure 6 As shown, the reward value of the random algorithm fluctuates around -7912, indicating that it failed to achieve effective learning. The DQN algorithm converges after about 225 epochs, with an average reward of 8808. In contrast, the BDQ algorithm shows a faster convergence speed, stabilizing after about 200 epochs. It alleviates the dimensionality explosion problem and avoids inter-branch interference by independently estimating the Q-value for each action dimension, thus achieving better learning performance with an average reward of 9328. Compared with DQN, BDQ reduces training time by 12.5% ​​and improves system utility by 5.89%.

[0151] To evaluate the effectiveness of UAV movement strategies under the BDQ framework, we conducted a comparative study of trajectory control mechanisms and random movement. UAVs lacking trajectory control often fail to efficiently reach their target service locations. Furthermore, the high-energy-consuming movements performed by UAVs without planning lead to rapid energy depletion, frequently causing premature round termination and reducing overall system performance.

[0152] like Figure 7 , Figure 8 and Figure 9 As shown, the introduction of trajectory control strategy significantly improves the system's performance across multiple metrics. Figure 7In the study, the learning curve shows that BDQ with trajectory control consistently outperforms random movement strategies in terms of round reward accumulation. Figure 8 This improvement was quantified: the average reward for drones under trajectory control reached 166,780, while random movement only yielded 148,078, representing a 12.62% increase in system utility. Furthermore, Figure 9 The average number of service steps increased from 524 to 599, indicating a 14.31% increase in the drone's runtime before running out of energy.

[0153] like Figure 10 and Figure 11 As shown, a comparative analysis of blockchain performance overhead was conducted from two dimensions: energy consumption and latency. Figure 10 The average total energy consumption is shown, with the energy consumption of the task unloading part being 89298, while the energy consumption of the blockchain task is only 5196, for a total energy consumption of 94594. It is evident that the additional energy consumption brought by blockchain is relatively small, accounting for a limited proportion of the overall energy consumption. Figure 11 The comparison results of average single-step latency are presented. The average single-step latency for task unloading is 14.58, while the single-step latency for blockchain operations is only 0.021, with an overall latency of 14.601. The results show that the introduction of blockchain has a negligible impact on latency and does not significantly burden the overall real-time performance of the system. In summary, the blockchain mechanism, while ensuring data security and traceability, introduces only low energy consumption and latency overhead, verifying its feasibility and efficiency in UAV-assisted vehicle edge computing scenarios.

[0154] This invention addresses the problem of computational resource constraints caused by complex environments and high-concurrency tasks by proposing a UAV-assisted vehicle-mounted edge computing method. By combining different vehicle attributes and resources, and UAV resources and location, the problem is abstracted into a Markov decision process. Offloading decisions and UAV trajectory control aim to maximize system utility. The BDQ algorithm is used to solve the problem of dimensional explosion in high-dimensional action space. A secure aerial computing architecture is also constructed, integrating VEC and blockchain technologies into the UAV network to effectively ensure the security and privacy of computation offloading between the UAV and the user. Future work will consider modeling the three-dimensional movement direction of the UAV.

[0155] The main contribution of the embodiments of the present invention is as follows:

[0156] 1. Multiple drone swarms were introduced as aerial cache nodes to address resource constraints in vehicular networks and meet the real-time data processing needs of high-computation scenarios. We jointly optimized drone flight trajectories and task offloading strategies, while considering drone battery limitations and safe distances between drones. The goal was to maximize the overall system utility while extending the service duration of the drone swarm.

[0157] 2. Traditional Deep Q-Networks (DQNs) suffer from the curse of dimensionality when processing high-dimensional discrete action spaces, leading to an exponential increase in computational complexity. To address this issue, Branching Deep Q-Networks (BDQ) are employed, which decompose the Q-value function into multiple branches, each corresponding to a sub-action space. This architecture significantly reduces computational overhead while maintaining decision accuracy. Simulation results show that, compared to DQN, BDQ reduces training time by 12.5% ​​and improves system utility by 5.89%, where Q-values ​​represent action values.

[0158] 3. A secure aerial computing architecture is proposed, combining drone networks, vehicular networks, and blockchain technology to ensure secure and private communication between vehicles and drones. In this architecture, drones act not only as edge computing nodes but also as blockchain nodes, enabling them to perform both computational and blockchain-related tasks simultaneously.

[0159] 4. Compared to vehicle-mounted edge computing that relies on fixed infrastructure, drone-assisted vehicle-mounted edge computing can overcome the limitations of traditional base stations and roadside units in terms of deployment flexibility, geographical location restrictions, and coverage, significantly improving network computing efficiency and user experience.

[0160] Based on the same inventive concept, this invention also provides a blockchain-based vehicle edge computing task offloading system, comprising:

[0161] The base station receiving information module is used by the base station to integrate all data from the task demand pool of each target requesting vehicle, the resource pool of each service vehicle, and the state pool of each drone into a state vector from the dimensions of location, task, resources, and constraints. The state vector includes: the real-time coordinates of all requesting vehicles, service vehicles, and drones; the task demand list of each requesting vehicle; the available storage resources, CPU computing frequency, and unresolved task queue of each service vehicle and each drone; and the remaining battery power and blockchain reputation value of each drone.

[0162] The network computing module is used to extract the correlation features of the state vectors, and to calculate in parallel the resource unloading and allocation action value between each requesting vehicle and all service vehicles, as well as the resource unloading and allocation action value between each requesting vehicle and all drones. At the same time, it calculates the trajectory control action value of each drone for different combinations of flight direction and time. Using the resource unloading and allocation action values ​​of each service vehicle, the resource unloading and allocation action values ​​of the drones, and the trajectory control action values, it selects the service vehicle or drone with the highest action value as the resource unloading target for each requesting vehicle, and matches the selected drone with the flight direction and time with the optimal action value, generating a complete decision instruction for each requesting vehicle.

[0163] The decision instruction application module is used by the base station to receive the complete decision instruction and broadcast it to the corresponding requesting vehicle, service vehicle and drone. The service vehicle and drone perform resource task unloading for the target requesting vehicle.

[0164] This invention also provides a computer device. At the hardware level, the computer device includes a processor, an internal bus, a network interface, memory, and non-volatile storage, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile storage into the memory and then runs it to implement the blockchain-based vehicle edge computing task offloading method provided above.

[0165] Specific limitations regarding the computing system for the blockchain-based vehicle edge computing task offloading method can be found in the limitations described above, and will not be repeated here. Each module in the aforementioned vehicle edge computing task offloading system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0166] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. Furthermore, the above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A blockchain-based method for offloading vehicle edge computing tasks, characterized in that, include: The base station integrates all data from the task demand pool of each target requesting vehicle, the resource pool of each service vehicle, and the state pool of each drone into a state vector from the dimensions of location, task, resources, and constraints. The state vector includes: the real-time coordinates of all requesting vehicles, service vehicles, and drones; the task demand list of each requesting vehicle; the available storage resources, CPU computing frequency, and queue of unresolved tasks of each service vehicle and each drone; and the remaining battery power and blockchain reputation value of each drone. The state vector is input into a preset Branch Duel Q Network (BDQ), which includes a shared decision module and multiple action branches. These action branches include: a resource offloading and allocation action branch between each requesting vehicle and all service vehicles; a resource offloading and allocation action branch between each requesting vehicle and all drones; and trajectory control action branches for different combinations of flight directions and times for each drone. The shared decision module extracts the correlation features of the state vector and estimates the state values ​​of these features, outputting the estimated state values ​​and the corresponding action advantage function values ​​for each action branch. The multiple action branches calculate the action value of each branch based on the estimated state values ​​and the action advantage function values. Based on the action values ​​of each action branch, the service vehicle or drone with the highest action value is selected as the resource offloading target for each requesting vehicle. Simultaneously, the selected drone is matched with the optimal flight direction and time for the action value, thereby generating a complete decision instruction for each requesting vehicle. The base station receives the complete decision instruction and broadcasts it to the corresponding requesting vehicle, service vehicle, and drone. The service vehicle and drone then perform resource unloading for the target requesting vehicle. The expression for calculating the action value of each of the multiple action branches based on the state estimate and the action advantage function value is as follows: ; in, This indicates that branch d performs an action in state s. The value of the action, This represents the state estimate. This represents the state vector at the current moment. This indicates that branch d performs an action in state s. Action advantage function value, This indicates the action currently selected in branch d. This represents the set of all possible actions in the d-th action branch. This represents the total number of selectable actions in branch d. Describes any optional action in branch d and .

2. The method for offloading vehicle edge computing tasks based on blockchain according to claim 1, characterized in that, The task demand pool includes the real-time coordinates of each target requesting vehicle and a task demand list. The task demand list includes: task demand code ID, task demand data size, and maximum latency. The service vehicle resource pool includes available storage resources, CPU computing frequency, real-time coordinates, remaining battery power, and a queue of unresolved tasks. The drone status pool includes available storage resources, CPU computing frequency, real-time coordinates, remaining battery power, blockchain reputation value, and a queue of unresolved tasks.

3. The method for offloading vehicle edge computing tasks based on blockchain according to claim 1, characterized in that, The base station receives the complete decision instruction and broadcasts it to the corresponding requesting vehicle, service vehicle, and drone. The service vehicle and drone perform resource task offloading for the target requesting vehicle, specifically including: the target requesting vehicle directly sends the calculation task data to the selected service vehicle according to the complete decision instruction; the service vehicle processes the task using a first-in-first-out strategy and returns the calculation result to the target requesting vehicle; the drone flies to the target requesting vehicle according to the optimal flight direction and time, the target requesting vehicle sends the calculation task data to the arriving drone for processing, and the drone returns the result to the target requesting vehicle after calculation.

4. The method for offloading vehicle edge computing tasks based on blockchain according to claim 1, characterized in that, After the service vehicle and drone perform resource unloading for the target requesting vehicle, the following also includes: The service vehicle and the drone respectively hash-encrypt the identity of the requesting vehicle and the calculation result. The service vehicle transmits the requesting vehicle's task requirement code ID, the requesting vehicle's hash identity, and the hash value of the calculation result to the drone with the highest blockchain reputation value according to the nearest principle. The drone packages the received encrypted data into a unified transaction ciphertext. The ciphertext of the transaction is broadcast to the blockchain network by the drone node. The drone with the highest reputation value is elected as the block processor in the blockchain network. The block processor integrates the ciphertext of the transaction to generate a new block. Other drone nodes in the blockchain network verify the new block. Once all drones reach a consensus, the new block is written into the historical blockchain, forming an immutable and permanent record. At the same time, the service vehicles and drones will complete the status feedback to the base station, updating the resource status of each service vehicle resource pool and each drone status pool.

5. The method for offloading vehicle edge computing tasks based on blockchain according to claim 1, characterized in that, Based on vehicle-to-vehicle (V2V) technology, data interaction is achieved between the target requesting vehicle and the service vehicle, and resource task unloading is performed for the target requesting vehicle.

6. The method for offloading vehicle edge computing tasks based on blockchain according to claim 1, characterized in that, Based on vehicle-to-drone (V2U) technology, data interaction is achieved between the target requesting vehicle and the drone, and resource task unloading is performed for the target requesting vehicle.

7. A system for implementing the blockchain-based vehicle edge computing task offloading method as described in claim 1, characterized in that, include: The base station receiving information module is used by the base station to integrate all data from the task demand pool of each target requesting vehicle, the resource pool of each service vehicle, and the state pool of each drone into a state vector from the dimensions of location, task, resources, and constraints. The state vector includes: the real-time coordinates of all requesting vehicles, service vehicles, and drones; the task demand list of each requesting vehicle; the available storage resources, CPU computing frequency, and queue of unresolved tasks of each service vehicle and each drone; and the remaining battery power and blockchain reputation value of each drone. The network computing module is used to extract the correlation features of the state vectors, and use the correlation features to calculate in parallel the resource unloading and allocation action value between each requesting vehicle and all service vehicles, as well as the resource unloading and allocation action value between each requesting vehicle and all drones. At the same time, it calculates the trajectory control action value of each drone for different flight direction and time combinations. Using the resource unloading and allocation action value of each service vehicle, the resource unloading and allocation action value of the drones, and the trajectory control action value, it selects the service vehicle or drone with the highest action value as the resource unloading target for each requesting vehicle, and matches the selected drone with the flight direction and time with the optimal action value, generating a complete decision instruction for each requesting vehicle. The decision instruction application module is used by the base station to receive the complete decision instruction and broadcast it to the corresponding requesting vehicle, service vehicle and drone. The service vehicle and drone perform resource task unloading for the target requesting vehicle.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.