Edge collaborative computing method and device based on vehicle networking data trusted circulation
Patent Information
- Application Number
- CN202611191916.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-23
AI Technical Summary
这类方法较少考虑多个边缘节点共同覆盖下的多方协同计算问题,忽略了实际环境中边缘服务器因攻击或故障而成为恶意节点的安全风险
第一,设计了多边缘计算节点共同覆盖环境下的数据可信流通与任务协同计算架构,通过数据存证系统对各边缘服务器的计算结果进行存证并保证数据的一致性与可追溯性,能够防范协同计算中节点故障或恶意投毒后的结果篡改,保障协同计算安全。
Smart Images

Figure CN122970575A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle-to-everything (V2X) data sharing and edge computing, and particularly to an edge collaborative computing method and apparatus based on trusted flow of V2X data. Background Technology
[0002] Intelligent connected and autonomous vehicles perceive their surroundings through various sensors and provide intelligent application services. The realization of these applications requires high-performance computing processing of massive amounts of sensor data. Based on this massive sensor data, vehicles need to perform computationally intensive tasks such as image target recognition, point cloud target recognition, and multi-source perception fusion. These tasks involve large amounts of input data, high computational overhead, and strict real-time requirements. In existing technologies, vehicles typically prioritize processing these tasks through onboard computing units, but high-performance computing comes with significant energy consumption and heat dissipation pressure. Therefore, vehicles can migrate computing tasks to roadside edge servers to balance their energy consumption and range constraints, while ensuring timely task processing.
[0003] However, existing methods for data sharing and edge computing offloading in the Internet of Vehicles (IoV) typically assume that edge entities are completely trustworthy, directly transmitting private data such as vehicle location, speed, and sensor information, and using heuristic algorithms or reinforcement learning methods to make computation offloading decisions for individual edge nodes. These methods rarely consider the multi-party collaborative computing issues under the shared coverage of multiple edge nodes, ignoring the security risks of edge servers becoming malicious nodes due to attacks or malfunctions in real-world environments. Furthermore, the current independent operation of edge servers from different service providers, lacking a collaborative computing mechanism serving the same in-vehicle task, leads to underutilization of multi-server resources, limiting improvements in computational efficiency and resource utilization. Summary of the Invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, the present invention provides an edge collaborative computing method and device based on trusted data circulation in the Internet of Vehicles (IoV). Addressing the problems of lack of collaborative mechanisms between edge nodes of different edge service providers in the same area and the difficulty in fully utilizing multi-server resources in IoV deployment environments with high vehicle density, the invention subdivides computationally intensive on-vehicle tasks, constructs a trusted data circulation and collaborative computing scheme for multiple parties under multiple servers (vehicle-to-vehicle and vehicle-to-infrastructure), establishes a Markov decision process covering the optimization of multi-server collaborative computing latency, energy consumption, and trusted circulation system overhead, and proposes a multi-agent deep reinforcement learning multi-dimensional collaborative computing decision method. This improves the collaborative computing capabilities and resource utilization of multiple edge servers, while simultaneously utilizing a trusted data circulation system to achieve traceable and consistent evidence storage of task collaborative computing results.
[0005] To achieve the above objectives, one aspect of the present invention provides an edge collaborative computing method based on trusted data flow in the Internet of Vehicles (IoV), comprising the following steps: Based on the state information available to each user vehicle intelligent agent and data storage intelligent agent at the current moment, a state space for the vehicle-to-everything (V2X) edge collaborative computing system is constructed, and the local states of each user vehicle intelligent agent and data storage intelligent agent are determined respectively. The data storage intelligent agent is the centralized decision-making agent of the data storage system, used to configure the block parameters of the data storage system according to its operating state. The data storage system consists of roadside edge computing servers as blockchain sharing nodes. The V2X edge collaborative computing system includes user vehicles, service vehicles, and roadside edge computing servers. Based on the collaborative computation actions of each user vehicle intelligent agent and the parameter configuration actions of the data storage intelligent agent, the action space of the Markov decision process is constructed. Based on the collaborative computing parameters and data storage parameters under the current state, the instantaneous reward of the vehicle network edge collaborative computing system at a predetermined time is determined, and the cumulative reward of the vehicle network edge collaborative computing system is constructed using a discount factor to form the reward function of the Markov decision process. Based on the state space, action space and reward function, a collaborative computing strategy model is trained. After the model training converges, the user vehicle agent and the data storage agent input their respective local states into the trained collaborative computing strategy model and execute corresponding collaborative computing actions to complete edge collaborative computing based on the trusted flow of vehicle network data. The collaborative computing data generated after performing the collaborative computing action is packaged into a new block, and then the new block is written into the blockchain after consensus verification by each node in the data storage system based on the practical Byzantine fault-tolerant consensus mechanism, thereby realizing the on-chain storage of collaborative computing data.
[0006] Another aspect of the present invention provides an edge collaborative computing device based on trusted data flow in the Internet of Vehicles, comprising: The state space construction module is used to construct the state space of the vehicle-to-everything (V2X) edge collaborative computing system based on the state information available to each user vehicle intelligent agent and the data storage intelligent agent at the current moment, and to determine the local states of each user vehicle intelligent agent and the data storage intelligent agent respectively. The data storage intelligent agent is the centralized decision agent of the data storage system, used to configure the block parameters of the data storage system according to its operating state. The data storage system consists of roadside edge computing servers as blockchain sharing nodes. The V2X edge collaborative computing system includes user vehicles, service vehicles, and roadside edge computing servers. The action space construction module is used to construct the action space of the Markov decision process based on the collaborative computation actions of each user vehicle intelligent agent and the parameter configuration actions of the data storage intelligent agent. The reward function construction module is used to determine the instantaneous reward of the vehicle network edge collaborative computing system at a predetermined time based on the collaborative computing parameters and data storage parameters under the current state, and to construct the cumulative reward of the vehicle network edge collaborative computing system using a discount factor, so as to form the reward function of the Markov decision process. The strategy training and execution module is used to train a collaborative computing strategy model based on the state space, action space and reward function. After the model training converges, the user vehicle agent and the data storage agent input their respective local states into the trained collaborative computing strategy model and execute the corresponding collaborative computing actions to complete edge collaborative computing based on the trusted flow of vehicle network data. The data on-chain notarization module is used to package the collaborative computing data generated after the execution of the collaborative computing action into a new block, and then write the new block into the blockchain after consensus verification of the new block by each node in the data notarization system based on the practical Byzantine fault-tolerant consensus mechanism, thereby realizing the on-chain notarization of collaborative computing data.
[0007] The edge collaborative computing method and apparatus based on trusted data flow in the Internet of Vehicles provided by this invention have the following beneficial effects: First, a trusted data flow and collaborative task computing architecture was designed for an environment with multiple edge computing nodes. The computing results of each edge server are stored through a data storage system to ensure data consistency and traceability. This can prevent the results from being tampered with due to node failure or malicious poisoning in collaborative computing and ensure the security of collaborative computing.
[0008] Second, a Markov decision process was established that includes a multi-party task collaborative computing and a trusted data circulation system. By combining the latency and energy consumption of sub-task execution with the latency and throughput of the consensus mechanism of the data storage system, the collaborative computing decision for computationally intensive tasks in the Internet of Vehicles was optimized.
[0009] Third, a collaborative computing strategy for multi-vehicle computation-intensive tasks is formed based on multi-agent deep reinforcement learning methods to minimize the latency and energy consumption of collaborative computing. Attached Figure Description
[0010] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating an embodiment of an edge collaborative computing method based on trusted data flow in the Internet of Vehicles (IoV) provided in this application. Figure 1 ; Figure 2 This is a flowchart illustrating an embodiment of an edge collaborative computing method based on trusted data flow in the Internet of Vehicles (IoV) provided in this application. Figure 2 ; Figure 3 This is a logical schematic diagram of a vehicle-to-everything (V2X) edge collaborative computing system provided in one embodiment of this application; Figure 4 This is a schematic diagram of the structure of an edge collaborative computing device based on trusted data flow in the Internet of Vehicles provided in one embodiment of this application. Detailed Implementation
[0011] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0012] In this invention, unless otherwise expressly stated, the following terms have the following meanings: User vehicles: refer to intelligent vehicles that have computationally intensive tasks to perform and divide their own tasks into multiple sub-tasks for collaborative computing with other edge computing units.
[0013] Service vehicles: refer to intelligent vehicles equipped with redundant computing resources that provide computing services to the outside world during operation in order to make full use of resources.
[0014] Roadside edge computing server: refers to an edge computing node deployed on a base station or roadside unit to provide computing services to user vehicles.
[0015] User vehicle intelligent agent: refers to an intelligent agent that makes subtask offloading decisions based on local observation information, with each user vehicle as an independent decision-making unit.
[0016] Data storage system: refers to a decentralized data trust circulation system composed of edge computing servers on each side as blockchain sharing nodes, used for consensus storage of collaborative computing data.
[0017] Data storage agent: refers to the centralized decision-making agent of the data storage system, which is used to configure the block parameters of the data storage system according to the operating status of the data storage system.
[0018] Subtask: refers to the smallest decision unit after a user vehicle divides its computationally intensive tasks, characterized by data size, computational requirement parameters, execution period, and the ratio of computational results to input data.
[0019] Master Node: In a practical Byzantine fault-tolerant consensus mechanism, the leader node is randomly selected from the consensus nodes of the data storage system and is responsible for initiating consensus proposals.
[0020] Total consensus latency: refers to the total time that the data storage system takes from the start of the collection phase to the completion of the backhaul phase and the final on-chaining of the new block for a single new block.
[0021] Throughput: refers to the number of transactions successfully processed by the data storage system per unit of time.
[0022] Local computing: refers to the computing of sub-tasks performed by the user vehicle through its own onboard computing unit.
[0023] Offload to service vehicle computing: This refers to the user vehicle transmitting the data of the subtask to a designated service vehicle, where the service vehicle's redundant computing resources execute the subtask.
[0024] Offloading to roadside edge computing server for computation: This refers to the user vehicle transmitting the data of the subtask to a designated roadside edge computing server, which then executes the subtask.
[0025] The following combination Figure 1-3 This paper provides a detailed description of the edge collaborative computing method based on trusted data flow in the Internet of Vehicles provided by this invention.
[0026] like Figure 1 As shown, the vehicle-to-everything (V2X) edge collaborative computing system 100 includes three logical layers: user vehicle intelligent agent layer 110, data storage intelligent agent layer 120, and edge computing resource layer 130.
[0027] The user vehicle intelligent agent layer 110 contains multiple user vehicle intelligent agents 111, 112, ..., each corresponding to a user vehicle. The user vehicle intelligent agents interact with each other through the vehicle-to-everything (V2X) communication link. Each user vehicle intelligent agent is used to obtain the status information of its own vehicle, the status information of surrounding service vehicles, and the status information of the roadside edge computing server, and to make subtask offloading decisions based on local observation information.
[0028] The data storage intelligent agent layer 120 includes a data storage intelligent agent 121, which is deployed in parallel with each user vehicle intelligent agent 111, 112, ... to obtain the operating status of each data storage node in the data storage system and the total number of transactions currently pending in the system, and to decide on the block parameters of the data storage system. The block parameters include at least the number of transactions contained in a single block and the time interval for generating blocks.
[0029] The edge computing resource layer 130 includes multiple roadside edge computing servers 131, 132, ... and multiple service vehicles 141, 142, ... Each roadside edge computing server 131, 132, ... participates in consensus storage as a blockchain sharing node of the data storage system, and at the same time provides computing services to user vehicles; Each service vehicle 141, 142, ... is equipped with redundant computing resources to provide computing services to the outside world during driving.
[0030] In terms of logical interaction, each user vehicle intelligent agent 111, 112, ... sends the decided collaborative computing action to the corresponding computing node in the edge computing resource layer 130, triggering the corresponding computing node to execute sub-task computing; the data storage intelligent agent 121 distributes the decided block parameter configuration to each roadside edge computing server 131, 132, ... in the edge computing resource layer 130, triggering each roadside edge computing server 131, 132, ... to run the consensus mechanism according to the block parameter configuration. After each node in the edge computing resource layer 130 completes the collaborative computing task, it stores the collaborative computing data on the blockchain through the data storage system and feeds back the storage result to the data storage intelligent agent layer 120.
[0031] The above architecture enables a closed loop between collaborative computing decision-making and trusted data flow. Each layer interacts through standardized interfaces, realizing the decentralized and trusted operation of the vehicle-to-everything (V2X) edge collaborative computing system 100.
[0032] See Figure 2-3 The method provided by this invention includes the following steps: Step S101: Construct the state space and determine the local states.
[0033] This step is used to construct the state space of the vehicle-to-everything (V2X) edge collaborative computing system based on the state information that each user vehicle agent and data storage agent can obtain at the current moment, and to determine the local state of each user vehicle agent and data storage agent respectively.
[0034] In the trusted data flow and edge collaborative computing architecture of the Internet of Vehicles of this invention, the user vehicle divides its computationally intensive tasks into multiple sub-tasks and performs collaborative computing with the service vehicle and the roadside edge computing server. ( The system has multiple onboard subtasks that need to be executed in parallel, and these tasks are computed collaboratively with different external computing nodes. The user vehicle is connected to multiple roadside edge computing servers. The communication range is shared by all users and vehicles. The surrounding available service vehicles are .in, For the user's vehicle index number, Indicates user vehicle Surrounding One service vehicle, Indicates user vehicle The total number of available service vehicles in the vicinity. All roadside edge computing servers serve as shared nodes for trusted data flow, forming a data storage system.
[0035] Since the overall state space of the entire system is very complex, this invention treats the user vehicle and the data storage system as independent intelligent agents to analyze their own states. During training and decision-making, each intelligent agent only needs to perform task collaborative calculation and data storage decision-making based on the local states it observes.
[0036] The global state space of the entire system includes the distances between each user vehicle and its surrounding service vehicles, the distances between each user vehicle and the roadside edge computing server, the computing power of the service vehicles, the computing power of the roadside edge computing server, the computing power of the data storage nodes, and the total number of transactions currently pending processing. Based on this state information, the entire system is configured at any given time... The global state is represented as: The definitions of each state variable are as follows: Indicates user vehicle At any moment The set of spatial distances between it and its surrounding service vehicles; For the user's vehicle index number; For time indexing; Indicates user vehicle At any moment and its surroundings Available service vehicles Spatial distance between them; Indicates user vehicle The total number of available service vehicles in the surrounding area.
[0037] Indicates user vehicle At any moment The set of spatial distances between each roadside edge computing server; For the user's vehicle index number; For time indexing; Indicates the first One roadside edge computing server, This represents the total number of roadside edge computing servers. .
[0038] Indicates user vehicle The combined computing power of all surrounding service vehicles; For the user's vehicle index number; For time indexing; Indicates user vehicle Surrounding area Available service vehicles At any moment Computational power; Indicates user vehicle The total number of available service vehicles in the surrounding area. The unit of computing power is the number of floating-point operations per second.
[0039] Indicates time The combined computing power of each edge computing server on each roadside; For time indexing, Indicates the first Roadside edge computing server At any moment computing power Indicates the first One roadside edge computing server, This represents the total number of roadside edge computing servers. The unit of computing power is the number of floating-point operations per second.
[0040] Indicates time The combined computing power of each data storage node; For time indexing; Indicates the relationship with the first Roadside edge computing server The corresponding data storage node at time computing power Indicates the relationship with the first Roadside edge computing server The corresponding data storage node, This represents the total number of roadside edge computing servers, which is also the total number of data storage nodes. The unit of computing power is the number of floating-point operations per second.
[0041] This indicates the total number of transactions currently pending in the system.
[0042] Regarding the intelligent agent of the user vehicle, each user vehicle The local state is represented as: Regarding the data storage agent, the decision-making is only related to the number of sub-tasks in vehicle collaborative computing and the computing power of the data storage nodes. The local state of this data storage agent is represented as follows: By constructing the state space described above, the complex global state is decoupled into the local observations of each agent, reducing the dimensionality of the state space and making multi-agent reinforcement learning feasible for training and decision-making in the vehicle-to-everything (V2X) collaborative computing scenario.
[0043] This step decomposes the global state into the local states of each agent, so that each agent only needs to process local information related to its decision, which greatly reduces the complexity of the state space and provides a technical foundation for the application of multi-agent reinforcement learning in vehicle-to-everything (V2X) collaborative computing.
[0044] Step S102: Construct the action space of the Markov decision process.
[0045] This step constructs the action space of the Markov decision process based on the collaborative computation actions of each user vehicle agent and the parameter configuration actions of the data storage agent.
[0046] Specifically, the system's action space includes the collaborative computation actions of various user vehicle intelligent agents and the parameter configuration actions of the data storage intelligent agent. (The last sentence appears to be incomplete and unrelated to the preceding text.) The global action is represented as: The definitions of each action variable are as follows: For user vehicles The The collaborative computation actions of each subtask, and ; This indicates that the subtask is computed locally; This indicates that the subtask is transmitted to the surrounding service vehicles. Above calculation; This indicates that the subtask is transmitted to the roadside edge computing server. Above calculation; The number of transactions contained in a single block; The time interval for generating blocks; The total number of user vehicles; The total number of subtasks for each user vehicle at the current moment; The index number for the user's vehicle.
[0047] Based on this, user vehicles Actions of an independent intelligent agent are represented as follows: The actions of the data storage system as an independent intelligent agent are represented as follows: The aforementioned action space design enables user vehicles to independently offload each subtask decision to one of three computing methods: local, service vehicle, or roadside edge computing server, achieving collaborative computing across multiple edge nodes. Simultaneously, the data storage system can dynamically adjust block parameters to adapt to consensus efficiency requirements under varying load conditions.
[0048] This step defines the action space of each subtask as three selectable targets: local, service vehicle, and roadside edge computing server. This enables user vehicles to offload different subtasks to different computing nodes in parallel, achieving collaborative computing across multiple edge nodes and significantly improving resource utilization efficiency.
[0049] Step S103: Construct the reward function for the Markov decision process.
[0050] This step is used to determine the instantaneous reward of the vehicle-to-everything (V2X) edge collaborative computing system at a predetermined time based on the collaborative computing parameters and data storage parameters under the current state, and to construct the cumulative reward of the V2X edge collaborative computing system using a discount factor, so as to form the reward function of the Markov decision process.
[0051] Specifically, in a multi-edge collaborative computing environment based on trusted data flow in the Internet of Vehicles (IoV), collaborative computing decisions need to consider minimizing task execution latency and energy consumption, while simultaneously minimizing consensus latency and maximizing throughput of the data storage system. Based on this objective, the entire system will be monitored at all times... The instant reward is represented as: in, The number of user vehicles; The total number of subtasks for each user vehicle at the current moment; For user vehicle aggregation; For user vehicles A set of subtasks; For user vehicles A fleet of service vehicles in the surrounding area; This is a collection of roadside edge computing servers; This refers to the task execution delay under the current collaborative computing strategy; This represents the energy consumption for task execution under the current collaborative computing strategy. The total consensus latency of the data storage system; This is the upper limit for tolerance of consensus latency; The utility value calculated for consensus delay is lower as the consensus delay approaches the tolerance limit. For the throughput of the data storage system; , , and These are weighting coefficients for task execution latency, task execution energy consumption, consensus latency utility value, and throughput, used to adjust the importance of these four components in the reward.
[0052] For collaborative computing processes involving a large number of time slots, a discount factor is further employed. Accumulate instant rewards from multiple time slots into cumulative rewards: in, Indicates from the current moment The index offset of the time step counting forward to the future.
[0053] The design of this reward function embodies the core idea of multi-objective joint optimization in this invention. Task execution latency and energy consumption reflect the computational efficiency of collaborative computing, while consensus latency and throughput reflect the operational efficiency of the data storage system. By using a weighted summation method, the four optimization objectives are unified into a single reward function, enabling reinforcement learning training to simultaneously optimize both computational and storage efficiency, avoiding any trade-offs.
[0054] The reward function in this step incorporates computational latency and energy consumption, as well as consensus latency and throughput at the data storage level, into a single optimization objective through a four-factor weighted summation design. This ensures that the trained policy can balance computational efficiency with the efficiency and security of data storage. (Weight coefficients) , , and It provides system designers with flexible adjustment tools, allowing them to adjust the priority of various indicators according to the actual needs of different application scenarios, and has good scenario adaptability.
[0055] Step S104: Train the collaborative computing strategy model and perform collaborative computing.
[0056] This step trains a collaborative computing strategy model based on the state space, action space, and reward function. After the model training converges, the user vehicle agent and the data storage agent input their respective local states into the trained collaborative computing strategy model and execute corresponding collaborative computing actions to complete edge collaborative computing based on the trusted flow of vehicle network data.
[0057] Specifically, based on the Markov decision process constructed above, the data storage system and each user vehicle are regarded as independent intelligent agents of different categories to make decisions, and a multi-agent deep reinforcement learning method based on the Actor-Critic architecture is used to train the collaborative computing optimization strategy.
[0058] In Critic networks, based on Multi-edge collaborative computation rewards are used to approximate the value function as the current time step. The sum of discount rewards within the steps and The sum of the value functions of the states after each step: in, For Evaluation network for parameters on state Value estimate. This represents the time index of the current moment. Indicates from the current moment The index offset of the time step counting forward to the future.
[0059] Combining the advantage function, the Critic network parameters The update rule is expressed as: This update rule optimizes the value estimation accuracy of the evaluation network by minimizing the temporal difference error, enabling the evaluation network to more accurately assess the long-term returns of the current policy.
[0060] Combined with entropy regularization Parameters in the Actor network The update rule is expressed as: in, For The policy distribution output by the action network with parameters. The entropy of the policy distribution. Here is the entropy regularization coefficient. Action network parameters Operator for finding gradient It is the intelligent agent in the training steps Based on the current state The actions performed It is a policy distribution The entropy is used to measure the degree of randomness of the current strategy. The larger the entropy value, the stronger the exploratory nature of the strategy, and the smaller the entropy value, the more the strategy tends to make deterministic choices. In the above update rules, the first term is the policy gradient term, which is used to increase the probability of selecting high-value actions; the second term is the entropy regularization term, which is used to encourage policy exploration and prevent the policy from converging to a local optimum too early. The introduction of the entropy regularization term makes the training process more stable and the exploration more thorough.
[0061] During model training, each agent generates multiple threads for parallel policy training. Each thread synchronizes parameters with the global network and obtains an initial state. In each training step, it derives and executes actions based on the current policy to obtain the corresponding immediate reward. Each thread back-accumulates and updates the gradients of the action network and evaluation network based on the obtained immediate reward, and uploads its own gradients to the global network to update the global parameters. Based on the local gradients uploaded by each thread, the agent uniformly adjusts the parameters of the global network. and The policy trained by each agent is shared by multiple threads to improve the speed of policy convergence.
[0062] This invention employs a multi-agent Actor-Critic architecture, where each user vehicle and data storage system is an independent agent, making decisions based solely on local states. Multi-threaded parallel training accelerates convergence, making the algorithm feasible for large-scale vehicle-to-everything (V2X) applications. Specifically, the strategies trained by each agent are shared by multiple threads, improving convergence speed. The introduction of entropy regularization prevents premature convergence to local optima, enhancing the quality of the final strategy. Based on this weight update method, the agents of the user vehicle and data storage system obtain globally optimal decision weights through training and apply them to subsequent collaborative computation decisions, acquiring the optimal action for each state, thus achieving multi-edge collaborative computation decision-making.
[0063] Step S105: Data is uploaded to the blockchain for verification.
[0064] This step is used to package the collaborative computing data generated after performing the collaborative computing action into a new block, and then write the new block into the blockchain after the nodes in the data storage system perform consensus verification based on the practical Byzantine fault-tolerant consensus mechanism, thereby realizing the on-chain storage of collaborative computing data.
[0065] To prevent faulty nodes from causing incorrect task execution results or malicious nodes from tampering with the computation process and results data during collaborative computing, a data storage system is used to ensure the immutability and traceability of collaborative computing results. The data storage system is based on a practical Byzantine fault-tolerant consensus mechanism, implementing block storage of collaborative computing data and on-chain consensus. Specifically, it includes five stages: collection, allocation, interaction, confirmation, and feedback. The process of each stage is as follows: (1) Collection stage The collaborative computation data for each subtask is transmitted to a randomly selected master node in the data storage system. The master node further verifies these messages. Combining the transmission latency of this data with the computation latency of verifying signatures and authentication for each message, the latency of the acquisition phase is obtained. .
[0066] (2) Allocation phase The master node generates new blocks based on the collected data and sends them to all nodes in the data storage system except the master node for verification. Combining the block transmission delay, the signing and authentication delay of generated blocks, and the verification delay of received blocks, the delay in the allocation phase is obtained. .
[0067] (3) Interaction phase In the data storage system, all nodes except the master node generate verification results for the new block and send them to each other for cross-verification. The maximum number of malicious nodes in the data storage system is set to [value missing]. When the number of valid verification results exceeds The completion of the interaction phase is confirmed at that time. The delay of the interaction phase is obtained by combining the block transmission delay and the block verification and signing delay of each node. .
[0068] (4) Confirmation stage In the data storage system, each node other than the master node generates confirmation messages based on the verification results of the interaction phase and sends them to each other for secondary verification. Similarly, when the number of valid confirmation messages exceeds... The confirmation phase is determined to be complete at a certain time. The delay of the confirmation phase is obtained by combining the block transmission delay and the confirmation message signing delay of each node. .
[0069] (5) Backhaul stage In the data storage system, all nodes except the master node generate a final confirmation message and send it to the master node. The master node verifies the message after a certain period of time. After receiving the final confirmation message, the new block is uploaded to the blockchain. Combining the block transmission delay, the confirmation message generation delay of each node, and the master node verification delay, the delay of the backhaul phase is obtained. .
[0070] Total consensus latency of data storage system This is represented by the delays of the above five stages and the block generation interval. sum: Regarding system throughput, the throughput of a data storage system is the number of transactions successfully processed by the system per unit of time. The calculation of the number of transactions considers both block generation and the consensus process. In terms of block generation, throughput is the quotient of the total number of transactions in a round of collaborative computation and the time taken to upload them to the blockchain. Regarding the consensus process, during the switch between different master nodes, the last few blocks generated by the previous master node are ignored by the next master node due to propagation delays. Therefore, throughput... The value is determined by the quotient of the total number of transactions and the on-chain time during a single consensus process, and is adjusted based on the number of transactions corresponding to the ignored blocks when a master node switch causes tail blocks to be ignored. The throughput function of the data storage system is represented by the following: This indicates the number of transactions contained in a single block. This indicates the time interval for generating blocks.
[0071] This invention utilizes a practical Byzantine fault-tolerant consensus mechanism, requiring more than Consensus can only be achieved and the data uploaded to the blockchain when all nodes reach a consensus, even if there are at most [number missing] nodes. Even with the presence of malicious nodes, the correctness and consistency of the data can still be guaranteed. Meanwhile, the immutability of blockchain ensures the traceability of collaborative computing results. Therefore, decentralized data sharing effectively prevents attacks from malicious nodes on edge servers, ensures the traceability of computing services, and guarantees the secure and reliable flow of vehicle network data.
[0072] The following example illustrates the edge collaborative computing method and apparatus based on trusted data flow in the Internet of Vehicles provided by this invention through a specific application scenario.
[0073] Taking a scenario of intelligent connected vehicles platooning on a main road in a city as an example. This road section is approximately 2 kilometers long, and three roadside edge computing servers are deployed on both sides of the road, denoted as... , , The servers are interconnected via fiber optic cables and together form a data storage system, acting as shared blockchain nodes. There are four intelligent connected user vehicles on the road, designated as follows: , , , The vehicles are interconnected via LTE-V2X or 5G-V2X communication links. In addition, there are two service vehicles providing redundant computing resources on this section of road, designated as follows: , All user vehicles are within the shared communication coverage of the three roadside edge computing servers.
[0074] At the initial moment Each user vehicle generates computationally intensive tasks. (Based on user vehicles) For example, A computationally intensive task requiring multi-source sensor fusion was generated during the execution of a collaborative sensing task. The data scale of this task is... MB, Calculate the required parameters Period / byte, execution period ms, the ratio of the calculated result to the input data. . The task is divided into 3 sub-tasks. , , These correspond to three sub-task modules: image target recognition, point cloud target recognition, and multi-source perception fusion.
[0075] The system executes step S101, constructing the state space and determining the local states of each agent. (User vehicle) It was detected that it was in contact with surrounding service vehicles. , The distances are respectively m、 m, and the roadside edge computing server , , The distances are respectively m、 m、 m. Simultaneously acquire the computing power of the service vehicle. GFLOPS GFLOPS, the computing power of roadside edge computing servers GFLOPS GFLOPS GFLOPS, the computing power of data storage nodes GFLOPS GFLOPS GFLOPS, and the total number of transactions currently pending in the system. User vehicles This information is used to form its local state. .
[0076] The data storage agent acquires the computing power of each data storage node. GFLOPS GFLOPS GFLOPS and , constitute its local state .
[0077] The system executes step S102 to construct the action space. (User vehicle) The agent needs to select computational actions for each of the three subtasks. For example, the actions output by the agent through the policy network are: subtasks (Image target recognition) is offloaded to the roadside edge computing server. Calculation, denoted as Subtask (Point cloud target recognition) Unloaded to service vehicle Calculation, denoted as Subtask (Multi-source sensing fusion) is computed locally, denoted as Data storage intelligent agent output parameter configuration action. (A single block contains 100 transaction records) s (block generation interval is 2 seconds).
[0078] The system executes step S103, calculating the immediate reward. The system measures various performance metrics under the current collaborative computing strategy: task execution latency. milliseconds (ms) represent the energy consumption of task execution. J. Total consensus latency of the data storage system for a single new block. ms, the system's maximum tolerable latency ms, consensus latency utility value Throughput of the data storage system Strokes / second. Each weighting coefficient is set as follows: , , , The system calculates the time. Instant rewards .
[0079] The system executes step S104, where each agent performs collaborative computation according to the actions described above. (User vehicle) Subtasks Data is transmitted to the roadside edge computing server via a V2I communication link. Subtasks Data is transmitted to the service vehicle via a V2V communication link. Subtask The computation is performed locally on the vehicle's onboard computing unit. The three computing nodes execute their respective subtasks in parallel, completing the computation within a specified timeframe and transmitting the results back to the user's vehicle. Meanwhile, user vehicles , , Each system also executes its own subtask unloading decision according to its respective strategy. The data evidence storage system follows... and The configuration parameters of s are used to run the consensus service.
[0080] The system executes step S105 to perform data on-chain notarization. After each edge server completes its collaborative computing task, it uses the data notarization system to achieve consensus notarization of the task's computational data and results. Assume that at the current moment, the data notarization system contains... One malicious node (i.e., at most one node may be faulty or attacked). Roadside edge computing server. Completed subtask For example, The calculation results are sent to the data storage system.
[0081] During the data collection phase, The data is transmitted to a master node randomly selected from three roadside edge computing servers (assuming that in this round of consensus...). (Selected as the master node). Verify the received data to confirm that the data format is correct and the digital signature is valid, and record the latency during the data collection phase. ms.
[0082] During the allocation phase, The verified data is packaged into a new block along with other transactions awaiting notarization, and this block is sent to [the relevant authority / organization]. and Verify and record the delay during the allocation phase. ms.
[0083] During the interaction phase, and Each new block is verified separately, and verification results are generated. These results are then sent to each other for cross-verification. Since the number of valid verification results is 2(......... and (valid verification results) , satisfying more than Once the conditions are met, confirm the completion of the interaction phase and record the interaction phase delay. ms.
[0084] During the confirmation phase, and Based on the verification results of the interaction phase, confirmation messages are generated and sent to each other for secondary verification. The number of valid confirmation messages is 2, which satisfies the requirement of exceeding [a certain threshold]. Once the conditions for completion are met, the confirmation phase is deemed complete, and the confirmation phase delay is recorded. ms.
[0085] During the data return phase, and Generate a final confirmation message and send it to the master node. , Two verifications received (more than) After a valid final confirmation message is received, the new block will be uploaded to the blockchain, and the latency of the backhaul phase will be recorded. ms.
[0086] The new block has been successfully added to the blockchain, achieving immutable proof of the collaborative computation results. If it is necessary to trace the historical information of this collaborative computation task in the future, any node can query the computation data and results stored in this block from the blockchain, ensuring data consistency and traceability.
[0087] After 3-5 rounds of iterative training, the collaborative computing strategies of each user vehicle agent are continuously optimized. When new error samples or collaborative computing tasks are generated, the system can automatically repeat the above steps S101 to S105, forming a complete closed loop of perception-decision-execution-storage, realizing continuous, automated, and reliable collaborative computing for computationally intensive tasks in the Internet of Vehicles.
[0088] See Figure 4 Another embodiment of the present invention provides an edge collaborative computing device 200 based on trusted circulation of vehicle network data, including a state space construction module 201, an action space construction module 202, a reward function construction module 203, a policy training and execution module 204, and a data on-chain storage module 205. The edge collaborative computing device 200 based on trusted circulation of vehicle network data can execute the edge collaborative computing method based on trusted circulation of vehicle network data in the method embodiment.
[0089] Specifically, the edge collaborative computing device 200 based on trusted data flow in the Internet of Vehicles includes: The state space construction module 201 is used to construct the state space of the vehicle-to-everything (V2X) edge collaborative computing system based on the state information available to each user vehicle intelligent agent and the data storage intelligent agent at the current moment, and to determine the local states of each user vehicle intelligent agent and the data storage intelligent agent respectively. The data storage intelligent agent is the centralized decision agent of the data storage system, used to configure the block parameters of the data storage system according to its operating state. The data storage system consists of roadside edge computing servers as blockchain sharing nodes. The V2X edge collaborative computing system includes user vehicles, service vehicles, and roadside edge computing servers. Action space construction module 202 is used to construct the action space of Markov decision process based on the collaborative computation actions of each user vehicle intelligent agent and the parameter configuration actions of the data storage intelligent agent. The reward function construction module 203 is used to determine the instantaneous reward of the vehicle network edge collaborative computing system at a predetermined time based on the collaborative computing parameters and data storage parameters in the current state, and to construct the cumulative reward of the vehicle network edge collaborative computing system using a discount factor, so as to form the reward function of the Markov decision process. The strategy training and execution module 204 is used to train a collaborative computing strategy model based on the state space, action space and reward function. After the model training converges, the user vehicle agent and the data storage agent input their respective local states into the trained collaborative computing strategy model and execute the corresponding collaborative computing actions to complete edge collaborative computing based on the trusted flow of vehicle network data. The data on-chain notarization module 205 is used to package the collaborative computing data generated after the execution of the collaborative computing action into a new block, and write the new block into the blockchain after consensus verification of the new block by each node in the data notarization system based on the practical Byzantine fault-tolerant consensus mechanism, thereby realizing the on-chain notarization of collaborative computing data.
[0090] It should be noted that the edge collaborative computing device 200 based on trusted data circulation in the Internet of Vehicles provided in this embodiment, which can be used to execute the technical solutions of various method embodiments, has similar implementation principles and technical effects to the methods, and will not be repeated here.
[0091] The above description is merely a preferred embodiment of the present invention. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to the specific combination of the above-described technical features, but should also cover other technical solutions formed by any combination of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
Claims
1. An edge collaborative computing method based on trusted data flow in the Internet of Vehicles (IoV), characterized in that, Includes the following steps: Based on the state information available to each user vehicle intelligent agent and data storage intelligent agent at the current moment, a state space for the vehicle-to-everything (V2X) edge collaborative computing system is constructed, and the local states of each user vehicle intelligent agent and data storage intelligent agent are determined respectively. The data storage intelligent agent is the centralized decision-making agent of the data storage system, used to configure the block parameters of the data storage system according to its operating state. The data storage system consists of roadside edge computing servers as blockchain sharing nodes. The V2X edge collaborative computing system includes user vehicles, service vehicles, and roadside edge computing servers. Based on the collaborative computation actions of each user vehicle intelligent agent and the parameter configuration actions of the data storage intelligent agent, the action space of the Markov decision process is constructed. Based on the collaborative computing parameters and data storage parameters under the current state, the instantaneous reward of the vehicle network edge collaborative computing system at a predetermined time is determined, and the cumulative reward of the vehicle network edge collaborative computing system is constructed using a discount factor to form the reward function of the Markov decision process. Based on the state space, action space and reward function, a collaborative computing strategy model is trained. After the model training converges, the user vehicle agent and the data storage agent input their respective local states into the trained collaborative computing strategy model and execute corresponding collaborative computing actions to complete edge collaborative computing based on the trusted flow of vehicle network data. The collaborative computing data generated after performing the collaborative computing action is packaged into a new block, and then the new block is written into the blockchain after consensus verification by each node in the data storage system based on the practical Byzantine fault-tolerant consensus mechanism, thereby realizing the on-chain storage of collaborative computing data.
2. The edge collaborative computing method based on trusted data flow in the Internet of Vehicles (IoV) as described in claim 1, characterized in that, The step of determining the instant reward of the vehicle-to-everything (V2X) edge collaborative computing system at a predetermined time based on the collaborative computing parameters and data storage parameters under the current state includes: The instant reward is obtained by weighted summing of the task execution latency, task execution energy consumption, total consensus latency of the data storage system for a single new block, and throughput of the data storage system under the current collaborative computing strategy.
3. The edge collaborative computing method based on trusted data flow in the Internet of Vehicles (IoV) according to claim 2, characterized in that, The total consensus latency for a single new block in the data storage system is determined in the following way: The collaborative computing data to be uploaded to the blockchain for notarization is transmitted to the master node of the randomly selected data notarization system. The master node verifies the collaborative computing data, and the collection stage delay is obtained by combining the data transmission delay and the signature authentication delay. The master node packages the verified collaborative computing data into a new block and sends it to each node in the data storage system other than the master node for verification. The allocation stage delay is obtained by combining the block transmission delay, block signature authentication delay and receiving verification delay. In the data storage system, each node other than the master node generates a verification result for the new block and sends it to each other for cross-verification. When the number of valid verification results exceeds twice the maximum number of malicious nodes in the data storage system, the interaction phase is confirmed to be complete, and the interaction phase delay is obtained by combining the block transmission delay and the verification signature delay. In the data storage system, each node other than the master node generates a confirmation message based on the verification result of the interaction phase and sends it to each other for secondary verification. When the number of valid confirmation messages exceeds twice the maximum number of malicious nodes in the data storage system, the confirmation phase is determined to be completed. The confirmation phase delay is obtained by combining the block transmission delay and the confirmation message signature delay. In the data storage system, each node other than the master node generates a final confirmation message and sends it to the master node. After verifying more than twice the maximum number of malicious nodes in the data storage system, the master node puts the new block on the chain. The return transmission stage delay is obtained by combining the block transmission delay, the confirmation message generation delay and the master node verification delay. The sum of the acquisition phase delay, allocation phase delay, interaction phase delay, confirmation phase delay, and return phase delay is taken as the consensus delay.
4. The edge collaborative computing method based on trusted data flow in the Internet of Vehicles (IoV) according to claim 2, characterized in that, Also includes: The initial throughput of the data storage system is determined based on the quotient of the total number of transactions and the on-chain time during a single consensus process. When the tail block generated by the previous master node is ignored by the next master node due to the master node switch during the consensus process, the number of transactions corresponding to the ignored block is obtained, and the initial throughput is corrected according to the number of transactions corresponding to the ignored block to obtain the throughput of the data storage system.
5. The edge collaborative computing method based on trusted data flow in the Internet of Vehicles (IoV) according to claim 1, characterized in that, Also includes: User vehicles divide their computationally intensive tasks into multiple subtasks, each characterized by its data size, computational requirements, execution time, and the ratio of the computational result to the input data. Each subtask is treated as an independent decision-making unit, and the user vehicle agent determines the collaborative computing action for each subtask.
6. The edge collaborative computing method based on trusted data flow in the Internet of Vehicles (IoV) according to claim 5, characterized in that, The collaborative computing action is used to instruct the current user vehicle to compute a single subtask locally, offload it to a designated service vehicle for computation, or offload it to a designated roadside edge computing server for computation.
7. The edge collaborative computing method based on trusted data flow in the Internet of Vehicles (IoV) according to claim 1, characterized in that, The step of training the collaborative computation policy model based on the state space, action space, and reward function includes: A collaborative computing strategy model based on the Actor-Critic architecture is constructed, wherein the Actor-Critic architecture includes an action network and an evaluation network; During model training, the evaluation network approximates the value function based on the sum of the immediate rewards over multiple steps and the discounted state value function, and updates the evaluation network parameters in conjunction with the advantage function; the action network updates the action network parameters in conjunction with the entropy regularization term.
8. The edge collaborative computing method based on trusted data flow in the Internet of Vehicles (IoV) according to claim 7, characterized in that: During the training of the collaborative computing strategy model, each agent generates multiple threads to perform parallel strategy training. Each thread synchronizes parameters with the global network and obtains the initial state. In each training step, it derives and executes actions based on the current policy to obtain the corresponding immediate reward. Each thread updates the gradients of the action network and the evaluation network in reverse cumulative manner based on the immediate reward it receives, and uploads its own gradient to the global network to update the global parameters.
9. An edge collaborative computing device based on trusted data flow in the Internet of Vehicles, characterized in that, include: The state space construction module is used to construct the state space of the vehicle-to-everything (V2X) edge collaborative computing system based on the state information available to each user vehicle intelligent agent and the data storage intelligent agent at the current moment, and to determine the local states of each user vehicle intelligent agent and the data storage intelligent agent respectively. The data storage intelligent agent is the centralized decision agent of the data storage system, used to configure the block parameters of the data storage system according to its operating state. The data storage system consists of roadside edge computing servers as blockchain sharing nodes. The V2X edge collaborative computing system includes user vehicles, service vehicles, and roadside edge computing servers. The action space construction module is used to construct the action space of the Markov decision process based on the collaborative computation actions of each user vehicle intelligent agent and the parameter configuration actions of the data storage intelligent agent. The reward function construction module is used to determine the instantaneous reward of the vehicle network edge collaborative computing system at a predetermined time based on the collaborative computing parameters and data storage parameters under the current state, and to construct the cumulative reward of the vehicle network edge collaborative computing system using a discount factor, so as to form the reward function of the Markov decision process. The strategy training and execution module is used to train a collaborative computing strategy model based on the state space, action space and reward function. After the model training converges, the user vehicle agent and the data storage agent input their respective local states into the trained collaborative computing strategy model and execute the corresponding collaborative computing actions to complete edge collaborative computing based on the trusted flow of vehicle network data. The data on-chain notarization module is used to package the collaborative computing data generated after the execution of the collaborative computing action into a new block, and then write the new block into the blockchain after consensus verification of the new block by each node in the data notarization system based on the practical Byzantine fault-tolerant consensus mechanism, thereby realizing the on-chain notarization of collaborative computing data.
10. An edge collaborative computing device based on trusted data flow in the Internet of Vehicles (IoV) according to claim 9, characterized in that, The reward function construction module is further used for: The instant reward is obtained by weighted summing of the task execution latency, task execution energy consumption, total consensus latency of the data storage system for a single new block, and throughput of the data storage system under the current collaborative computing strategy.