Internet of vehicles unloading task balancing method and device, medium and product
By building a multi-layer architecture and deploying a credit model in the Internet of Vehicles system, the problems of extended transaction processing cycles of IoV nodes and insecure data transmission are solved, the balance and security of task offloading are achieved, and the quality and security of Internet of Things communication are improved.
Patent Information
- Application Number
- CN202510199514.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2045-02-24
AI Technical Summary
The existing intelligent transportation system has failed to effectively solve security problems such as extended transaction processing cycle of IoV nodes, insecure data transmission, and malicious node attacks in the application of blockchain technology.
By building a transaction network connected to the Internet of Vehicles, using the multi-layer architecture of edge nodes, fog nodes and cloud servers, the edge transaction information chain, beta distribution credit value model, global reputation chain and weight credit value model are deployed to realize task request verification, reputation value query and blockchain record updates, ensuring the balance and security of task offloading.
The quality and security of IoT communications are improved, and through the design of multi-layer architecture and credit model, the balance of task processing load and the constraints of malicious behavior are achieved, enhancing the overall security of the IoV system.
Smart Images

Figure CN119668887A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle networking attack defense and offloading tasks, and in particular to a vehicle networking offloading task balancing method, device, medium and product. Background Art
[0002] In Intelligent Transportation Systems (ITS), Internet of Vehicles (IoV) node transactions are used to implement large-scale communication requests and data synchronization. Through IoV node transactions, road safety and traffic efficiency have been effectively improved, thereby improving people's quality of life. Blockchain technology, due to its characteristics such as immutability and transaction transparency, solves the major security risks of single point failure of cloud servers. At the same time, the integration of blockchain technology in ITS has also received considerable attention. Some researchers have proposed different solutions for various ITS scenarios (e.g., vehicle scheduling, traffic signal control, vehicle edge computing, secure transaction issues in IoV, ETC parking fees).
[0003] However, as a large number of IoT devices join the IoV, the cycle of IoV node transaction processing communication requests and data synchronization is constantly expanding. Some malicious IoT devices spread false data information to make the communication and data transmission process unsafe. Using only single-chain blockchain technology cannot guarantee the integrity of the data transmission process and the security of private data storage. Some researchers have introduced edge computing (EC), but relying solely on EC to process data near the data source may cause delays and failures.
[0004] The existing intelligent transportation system has not fully considered the block caching problem of blockchain in the ITS environment; in IoV, the complex intelligent transportation environment needs to further ensure the privacy and security of task offloading; and there is no systematic consideration of security issues such as attacks from malicious nodes in the ITS network environment. Summary of the invention
[0005] The purpose of the present invention is to provide a method, device, medium and product for balancing unloading tasks in an Internet of Vehicles, which can improve the communication quality and security of the Internet of Things.
[0006] To achieve the above object, the present invention provides the following solutions: In a first aspect, the present application provides a method for balancing unloading tasks in an Internet of Vehicles, including: The edge node layer is constructed with the smart vehicles and basic IoT devices in the Internet of Vehicles as edge nodes, the fog node layer is constructed with the 5G base stations in the Internet of Vehicles as fog nodes, and the transaction network is constructed with the cloud servers in the Internet of Vehicles as the cloud layer; the edge nodes corresponding to the smart vehicles are full nodes; the edge nodes corresponding to the basic IoT devices are light nodes; Deploy an edge transaction information chain and a Beta distribution credit value model at an edge device corresponding to each edge node; Deploy a global reputation chain and a weighted credit value model at a 5G base station corresponding to each of the fog nodes; When a device in the current edge layer sends a task request to an edge node, the light node that receives the task request verifies the correctness of the request tag in the task request; When verification is passed, query the device reputation value of the device that sent the task request; When the device reputation value is greater than the device reputation value threshold, updating the first blockchain record table and sending the task request to the corresponding fog node; When the device reputation value is less than or equal to a device reputation value threshold, the task request is uninstalled.
[0007] Optionally, the method further comprises: When a device in the current edge layer sends a task request to an edge node, the full node that receives the task request verifies the correctness of the request tag in the task request; When verification is passed, query the device reputation value of the device that sent the task request; When the device reputation value is greater than the device reputation value threshold, updating the first blockchain record table; Get the category label of the task request; When the category label is a long-term task, sending the task request to a corresponding fog node; When the category label is a short-term task, processing the task request according to the updated blockchain first record table; When the device reputation value is less than or equal to a device reputation value threshold, the task request is uninstalled.
[0008] Optionally, the method further comprises: When the fog node receives the task request, it obtains the processing status tag of the task request; When the processing status label is “unprocessed”, updating the second blockchain record table based on the first blockchain record table; Get the category label of the task request; When the category label is a long-term task, sending the task request to the cloud layer; When the category label is a short-term task, the task request is sent to the full node.
[0009] Optionally, after sending the task request to the cloud layer, the method further includes: The cloud layer processes the task corresponding to the task request, modifies the processing status label of the task request to "processing completed", and returns the task request to the fog node.
[0010] Optionally, after sending the task request to the full node, the method further includes: The full node processes the task corresponding to the task request, modifies the processing status label of the task request to "processing completed", and returns the task request to the fog node.
[0011] Optionally, the method further comprises: When the processing status label is "processing completed", based on the first blockchain record table and the second blockchain record table, the third blockchain record table is updated; the third blockchain record table is used to describe the reputation values of all devices; The updated blockchain third record table is sent to the global reputation chain corresponding to all fog nodes.
[0012] In a second aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for balancing unloading tasks in an Internet of Vehicles.
[0013] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for balancing unloading tasks in an Internet of Vehicles.
[0014] In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for balancing unloading tasks in an Internet of Vehicles.
[0015] According to the specific embodiments provided by the present invention, the technical solution disclosed in this application has the following technical effects: The present invention provides a vehicle networking unloading task balancing method, device, medium and product, which designs a transaction network and a blockchain network; in the transaction network, fog nodes are responsible for collecting and forwarding requests from IoT devices through multilateral collaboration, so that different types of unloading tasks are handled by different nodes, so that the transaction task processing load is balanced. In the blockchain network, two credit models are designed to constrain various types of malicious behaviors. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 A schematic diagram of a flow chart of a method for balancing unloading tasks in an Internet of Vehicles provided in Embodiment 1 of the present invention; Figure 2 The cloud-fog edge transaction architecture supported by blockchain provided in Example 1 of the present invention; Figure 3 A blockchain transaction network diagram provided in Example 1 of the present invention; Figure 4 A block chain model structure diagram provided in Example 1 of the present invention; Figure 5 A schematic diagram of the throughput of a single-chain or multi-chain blockchain provided in Example 1 of the present invention; Figure 6 A schematic diagram of single-chain and multi-chain blockchain delay provided in Example 1 of the present invention; Figure 7 A first schematic diagram of a short-term transaction consensus performance test provided by Example 1 of the present invention; Figure 8 A second schematic diagram of a short-term transaction consensus performance test provided by Embodiment 1 of the present invention; Fig. 9 A third schematic diagram of a short-term transaction consensus performance test provided by Example 1 of the present invention; Fig.10 A fourth schematic diagram of a short-term transaction consensus performance test provided by Example 1 of the present invention; Fig.11 Schematic diagram of the impact of lazy behavior of fog nodes on reputation value provided in Example 1 of the present invention; Fig.12 The impact of edge node laziness behavior on reputation value provided in Example 1 of the present invention Fig.13 A schematic diagram showing the impact of malicious behavior of edge nodes on the entire area provided in Example 1 of the present invention; Fig.14 A first schematic diagram of a case analysis provided in Example 1 of the present invention; Fig.15 This is a second schematic diagram of a case analysis provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] The purpose of the present invention is to provide a method, device, medium and product for balancing unloading tasks in an Internet of Vehicles, which can improve the communication quality and security of the Internet of Things.
[0020] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] Example 1 like Figure 1 As shown, a method for balancing unloading tasks in an Internet of Vehicles in this embodiment includes: Step 101: Build an edge node layer with smart vehicles and basic IoT devices in the Internet of Vehicles as edge nodes, build a fog node layer with 5G base stations in the Internet of Vehicles as fog nodes, and build a transaction network with cloud servers in the Internet of Vehicles as cloud layers. The edge nodes corresponding to smart vehicles are full nodes. The edge nodes corresponding to basic IoT devices are light nodes.
[0022] Step 102: Deploy an edge transaction information chain and a Beta distribution credit value model at the edge device corresponding to each edge node.
[0023] Step 103: Deploy a global reputation chain and a weighted credit value model at the 5G base station corresponding to each fog node.
[0024] Step 104: When a device in the current edge layer sends a task request to an edge node, the light node that receives the task request verifies the correctness of the request tag in the task request.
[0025] Step 105: When the verification is successful, query the device reputation value of the device that sent the task request.
[0026] Step 106: When the device reputation value is greater than the device reputation value threshold, update the first record table of the blockchain and send the task request to the corresponding fog node.
[0027] Step 107: When the device reputation value is less than or equal to the device reputation value threshold, uninstall the task request.
[0028] Step 108: When a device in the current edge layer sends a task request to an edge node, the full node that receives the task request verifies the correctness of the request tag in the task request.
[0029] Step 109: When the verification is passed, query the device reputation value of the device that sent the task request.
[0030] Step 1010: When the device reputation value is greater than the device reputation value threshold, update the first record table of the blockchain.
[0031] Step 1011: Get the category label of the task request.
[0032] Step 1012: When the category label is a long-term task, the task request is sent to the corresponding fog node.
[0033] Step 1013: When the category tag is a short-term task, the task request is processed according to the updated blockchain first record table.
[0034] Step 1014: when the device reputation value is less than or equal to the device reputation value threshold, uninstall the task request.
[0035] Step 1015: When the fog node receives the task request, it obtains the processing status tag of the task request.
[0036] Step 1016: When the processing status label is "unprocessed", the blockchain second record table is updated based on the blockchain first record table.
[0037] Step 1017: Get the category label of the task request.
[0038] Step 1018: When the category tag is a long-term task, the task request is sent to the cloud layer. The cloud layer processes the task corresponding to the task request, modifies the processing status tag of the task request to "processing completed", and returns the task request to the fog node.
[0039] Step 1019: When the category label is a short-term task, the task request is sent to the full node. The full node processes the task corresponding to the task request, modifies the processing status label of the task request to "processing completed", and returns the task request to the fog node.
[0040] Step 1020: When the processing status label is "processing completed", based on the first blockchain record table and the second blockchain record table, the third blockchain record table is updated. The third blockchain record table is used to describe the reputation values of all devices.
[0041] Step 1021: Send the updated blockchain third record table to the global reputation chain corresponding to all fog nodes.
[0042] In-vehicle fog computing based on fog computing and telematics can provide location-aware and delay-sensitive services to in-vehicle terminal users. In in-vehicle fog computing, roadside units (RSUs) are usually regarded as part of fog servers, providing communication functions and widely deployed in different regions. As an important part of in-vehicle fog computing, RSUs can respond to vehicle requests at the edge of the network, greatly reducing network latency and saving transmission bandwidth. The computing architecture of IoV based on fog computing is as follows: Figure 2 As shown in the figure. By using fog computing and EC, the amount of data transmitted between devices and the cloud can be effectively reduced, and data analysis and knowledge generation on the data source can be supported. Therefore, fog computing can provide an option for traffic information acquisition and processing in IoV node transactions.
[0043] In order to solve the increasing bandwidth demand, latency, scalability and security issues in IoV transactions, an efficient distributed secure fog computing architecture is proposed. This paper will discuss the proposed architecture, the structure of the blockchain transaction network, the blockchain storage structure and the design of the reputation model.
[0044] The cloud-fog-edge computing architecture model proposed in this invention in an IoV environment is as follows: Figure 2 As shown in the figure, the computing architecture model consists of three layers.
[0045] Edge node layer: In the edge layer, the present invention defines two types of nodes: Full node: A full node is composed of smart vehicles. Smart vehicles have good computing power. They can monitor tasks in the IoV environment at the edge layer, analyze and make decisions on short-term tasks, and finally upload transaction results to the blockchain. Therefore, it can directly communicate with the blockchain network.
[0046] Light node: Light nodes are composed of basic IoT devices such as ordinary vehicles and surveillance cameras. Due to their limited computing power, in the computing architecture of the present invention, light nodes only need to monitor requests from surrounding vehicles, people, and devices, and then transfer the requests to fog nodes for processing.
[0047] Fog node layer: With the advent of the 5G era, 5G base stations can support V2X communications with high data rates, low latency, and high reliability. Therefore, in the fog layer, the present invention uses 5G base stations to form fog nodes. Figure 3 As shown in the figure, fog nodes are responsible for controlling the request flow. In the middle layer, fog nodes classify and organize requests from light nodes in the edge layer and forward them to the cloud layer for subsequent calculations; the processing results of full nodes in the edge layer and the output results of the cloud layer are uploaded to the blockchain. The blockchain network is composed of fog nodes, which takes advantage of fog computing as a buffer layer and utilizes computing resources at the edge and cloud to make blockchain-based IoT task offloading more secure and reliable.
[0048] Cloud layer: In the cloud layer, long-term requests uploaded by fog nodes are analyzed and decided, and the decision results are returned to the fog nodes.
[0049] The blockchain transaction model proposed by the present invention is as follows: Figure 3 In order to blackbox the transaction process and reduce the storage pressure of the blockchain to a certain extent, the present invention designs two networks: Consortium chain network: The members of the consortium chain are composed of certificate authorities, traffic authorities, and fog nodes.
[0050] Transaction network: The transaction network consists of cloud layer, fog nodes and edge nodes.
[0051] The transaction process is as follows: The certificate authority and traffic authority issue authentication certificates to fog nodes. New members need to pass the authentication and have the certificate before they can join the alliance chain. After the authentication, the fog node needs to elect a leader through the consensus algorithm and synchronize the ledger data within a cycle.
[0052] The transaction network is carried out in an IoV environment, and the requesting device sends a task request to the surrounding nodes in the V2X mode. The leader node reviews the request and then issues a one-time certificate to the edge node that handles this task.
[0053] The leader node classifies the tasks and offloads them according to their labels. After all tasks are completed, the task processing results are sorted and uploaded to the alliance chain ledger, and finally synchronized to all fog nodes through Raft.
[0054] In order to fully utilize the advantages of cloud-edge-fog computing in the IoV environment, the present invention designs a two-layer blockchain system: a global vehicle reputation chain and an edge transaction information chain, such as Figure 4 As shown in the figure, the transaction focus of the edge layer is to ensure the security and credibility of the transaction, and at the same time encourage more vehicles to join the transaction network. The transaction focus of the fog layer is to establish a complete blockchain ledger, that is, to ensure that the transaction ledger of each fog node can be fully stored and the traceability of all transactions is guaranteed.
[0055] Edge transaction information chain: The edge transaction information chain is deployed on the edge device and is used to store the transaction information of all edge nodes (vehicles, RSUs, etc.) within the management range of the fog node (the network set of all edge nodes registered by the fog node). The transaction information here refers to the transaction data generated in the Internet of Things environment, such as vehicle collision warnings, traffic accidents, traffic congestion, road warnings, etc. The structure of the edge information transaction chain is the hash value of the previous blockchain, the hash value of the current block, the registered fog node number, the timestamp, and the digital signature of the transaction. In addition, the present invention also designs the information content transmitted together with the global vehicle credit chain, including the public key of the edge device. The edge information transaction chain records the credit value of the transaction object after a transaction. If there is a short-term consensus tag, it is necessary to find the fog node. The public key encrypts the transaction content and the life cycle value.
[0056] Global reputation chain: The global reputation chain is deployed on 5G base stations (fog nodes) to store the credit value of the entire system, including a series of devices such as fog nodes, optical nodes, and full nodes, and record information such as the timestamp of each transaction.
[0057] To ensure the consistency of the blockchain, each edge chain will submit the results to the fog node (such as Figure 4 The fog node is responsible for integrating all received results into a block and broadcasting it to other fog nodes to achieve data consistency.
[0058] The present invention designs a node management mechanism based on credit value to handle the behavior of all nodes, and establishes two different credit value models to better cope with different levels of credit values. In the fog layer, a weight-based method is used to set the credit value to increase the relative importance of fog node behavior (positive and negative) in the overall credit value. In the edge layer, a credit value model based on Beta distribution is used to set the credit value. The edge layer is closer to the request side, and there are more malicious behaviors, which are difficult to classify and define. Beta distribution is a probability distribution, which is usually used to quantify the uncertainty of parameters in binomial distribution. When calculating the credit value of edge nodes, Beta distribution takes into account two key factors: rating score and number of ratings.
[0059] At the fog node layer, each fog node has a maximum range in which it can be registered, that is, the maximum range that a 5G base station can access is W. A trust score model is established, and the model is as follows: (1).
[0060] in, is the weight of positive behavior, is the weight of the negative behavior, and + =1, the smart contract will dynamically adjust the weight value according to the behavior of the fog node to encourage the node to take positive actions. is the reputation score of the fog node, which consists of two parts: is the positive behavior score of the fog node, which is defined as follows: (2).
[0061] in, It is the total number of transactions obtained locally by this node within a period of time; It is the total number of forwarded transactions received by the secondary node within a period of time. (i=1, 2, …, n) is the basic processing efficiency set for each node, defining positive behavior: being elected as a guarantee node, and the number of transactions in the W range is increasing.
[0062] is the negative behavior score of the fog node, which is defined as follows: (3).
[0063] in, is the total number of negative behaviors (k=1, 2, …, n), is the probability of negative behavior, defining two categories of negative behaviors of fog nodes. is the number of negative behaviors in two categories, and the weights to weigh the severity of the negative behavior.
[0064] (4).
[0065] In the design of the present invention, the network delay behavior will make the node The negative behavior score decreases linearly, and then decreases exponentially after reaching a certain threshold; other malicious behaviors will make the node The negative behavior scores dropped exponentially. It is set based on the total trustworthiness of the fog node’s current region (the network space within the fog node’s registration range), and It changes dynamically and can predict node malicious behavior to a certain extent.
[0066] Edge node layer: The trust of a vehicle is represented by the beta distribution between related trust systems. Based on the relationship between the beta distribution and the exponential distribution, the calculation formula for the trust of a vehicle is derived. The present invention assumes that the number of interactions between vehicles is α+β times, where α and β represent successful interactions and unsuccessful interactions, respectively. The model is as follows, where P represents the probability of successful interaction. Then, vehicle Vx maintains the reputation distribution of vehicle Vy, marked as Rx-y.
[0067] In the edge layer, the trust relationship between edge devices can be represented by the beta distribution. Let α+β be the number of interactions of the vehicle, α is the number of successes, β is the number of failures, and P is the probability of successful interaction. The edge device scoring reputation value model based on the beta distribution is: (5).
[0068] As shown in formula (5), It is the edge device E i The probability distribution of reputation will be The maximum value of is defined as the trust score of the vehicle and proves the credibility of the formula. Therefore, the maximum value of the reputation distribution is the trust score, which is defined as: (6).
[0069] Finally, formula (6) is used as the edge device E i For edge devices E j Scoring model. For edge devices E i For edge devices E j score; For edge devices E i For edge devices E j The number of successful interactions; For edge devices E i For edge devices E j The number of failed interactions; according to E j The performance of the most recent transaction process ultimately concluded that the edge device E j Reputation score: (7).
[0070] in, YesE j The reputation value of the kth transaction, N is the value of E j The total number of devices rated, It is the weight for calculating the reputation value of the edge device. YesE j The reputation value of the k-1th transaction.
[0071] In addition, before conducting short-term consensus transactions in the Internet of Vehicles, the comprehensive index K will be calculated in advance. The calculation formula is as follows: (8).
[0072] in, For edge nodes With fog nodes The comprehensive index of is an edge node, It is a fog node. is the reputation score of the fog node, yes The network distance from the current location to the fog node. The K value is used to select the best fog node as the node for submitting transactions, which can save costs to the greatest extent.
[0073] Reputation-driven cloud-fog edge multilateral collaborative task computing solution: This paper also proposes a cloud-fog-edge multilateral collaborative computing scheme driven by reputation value based on blockchain. In the proposed framework, the scheme is used to respond to transaction requests in the Internet of Vehicles and process them according to the request type. Specifically, task requests are first divided into two categories: long-term tasks (LT) and short-term tasks (ST) so that subsequent nodes can process task requests. The main symbols are shown in Table 1.
[0074] Table 1 Main symbol table.
[0075]
[0076] At the edge layer, the device making the request V i You need to request Q i Label the requested task and calculate the K value of formula (8) (i.e. C Tem ), and then to the surrounding edge nodes E i Send a request to the edge node Receive Q i After that, V i Q i Correctness of labels, if it is a light node Receive the request, First query V i The reputation value is determined to be above the threshold After updating the table Then put Q i Forward to the corresponding node; if it is a full node Receive Q i , Will first query V i K value C Tem , determine that it is higher than Post Update , then according to the table In the process, the surrounding edge nodes will use formula (4) to score this transaction and calculate the result. Synchronize to the edge chain.
[0077] Fog Node Update the table after receiving a request from an edge node , and then decided to Q i Offload to the cloud or , cloud and After processing the request, the result is returned to , According to the table and table Content update table ,at last, Will table Recorded on the global blockchain, and the reputation values of all devices in the process are updated, The reputation values of all devices are recorded, and the process is shown in Table 2 Algorithm 1.
[0078] The edge nodes will be based on the table The edge chain is maintained by the fog node according to the content of the table. and table The global ledger is updated with the content of , and the process is shown in Algorithm 2 in Table 3.
[0079] Table 2 Edge unloading solution table.
[0080]
[0081] Table 3 Fog unloading scheme table.
[0082]
[0083] Table 4 Blockchain information table .
[0084]
[0085] Table 5 Blockchain information table .
[0086]
[0087] Table 6 Blockchain information table .
[0088]
[0089] Blockchain-supported consensus mechanism for short-term transactions in vehicle fog. As more IoT devices join the blockchain network, the cycle of reaching consensus will increase. A short-term transaction consensus mechanism is designed. Under the premise of a node with a high reputation as a guarantee, other nodes are supported to make transactions first. After the transaction is completed, if there is no abnormal data, the node that makes the guarantee will be rewarded, and then the entire process will be written into the global chain. This section will introduce the short-term transaction consensus mechanism in the proposed framework, and the designed mechanism will ensure that a large number of vehicle network transactions can be fully synchronized to the blockchain ledger.
[0090] In the edge layer of the proposed framework, in order to prevent a large number of IoT devices from flooding into the transaction network and causing the transaction ledger to be unable to be synchronized in time, a short-term transaction consensus mechanism for the edge layer is designed to achieve blockchain ledger consistency through dynamic guarantee node selection and RAFT-based transaction verification.
[0091] The first step is dynamic guarantee node selection: first determine the scope of guarantee nodes. Each edge layer peer node uses a smart contract to regularly check historical transactions in the block and calculate the credit value of all nodes based on historical behavior records. In this step, peer nodes with low credit values due to malicious behavior in the domain will be excluded from participating in the second step of consensus. According to the credit values of different domains, domains with credit values higher than a certain threshold are screened out, and gateway nodes in these domains are selected as orderer nodes. This process will be triggered periodically to achieve dynamic selection of orderer nodes. In addition, the present invention also proposes corresponding countermeasures for different risk levels.
[0092] As shown in Table 7, the present invention sets , and The three thresholds divide the domain credit value into three risk levels. The specific values of the three thresholds can be determined according to the actual security requirements of Iov. When the risk level is low, the framework will dynamically select the domain with a credit value greater than As the risk level increases, the architecture will take stricter measures to enhance security and robustness, such as prohibiting edge gateway nodes from providing subscription services and modifying access control policies for high-risk domain IIoT devices.
[0093] The second step is RAFT-based transaction verification: After submitting a transaction proposal, each edge node must verify that each transaction in the new block is endorsed by all necessary peer nodes specified in the endorsement policy. In addition, they must also check whether the specific transaction results from the required peers are the same. After verifying the endorsement, the trusted users selected in the previous step classify and package the submitted transactions. In this process, consensus is reached using the RAFT algorithm to ensure that the ledger data of each edge gateway is consistent.
[0094] Table 7 Threshold changes and their impacts.
[0095]
[0096] Experimental verification.
[0097] like Figures 5 to 15, the overall performance of the evaluation framework of the present invention, the impact of multi-chain structure and single-chain structure on blockchain load, the impact of short-term transaction consensus on some areas, and the security and availability of the management mechanism based on reputation value are evaluated. Since the application scenario of the system is oriented to IoV, in order to be closer to the actual situation, the edge layer nodes are simulated using three Raspberry Pi 4Bs, the processor of Raspberry Pi 4B is 64-bit 1.5GHz, the memory is 8GB, and the Linux operating system is Ubuntu 18.04. One of them simulates a light node and the other two simulate full nodes. The cloud layer uses a server simulation, which is equipped with a 64-bit Intel Xeon 2.3GHz processor, 32GB RAM and Linux operating system. The fog layer node uses a server simulation with a 64-bit AMD A10-7400P 2.5GHz processor, 12GB RAM and Linux operating system.
[0098] Experiment 1: Blockchain performance of the proposed framework.
[0099] In order to verify the feasibility of the proposed framework in terms of transaction performance, the present invention tests the blockchain performance (including transaction submission, forwarding, etc.) of the proposed framework by deploying blockchain nodes on the server, PC, and Raspberry Pi. Specifically, the present invention tests and analyzes the transaction throughput and communication delay of cloud layer, fog layer nodes, and edge nodes. The detailed analysis is as follows.
[0100] Cloud layer: Cloud server initialization parameters include the maximum transaction block, transaction delay, maximum number of nodes, and maximum request packet size.
[0101] Fog layer: The initialization data block in the fog server contains the fog node identifier , initial reputation value , and the key pair of the fog node , and the interaction blocks .in = , is a temporary key, For edge nodes The initial threshold value of The total number of registered nodes in the edge node.
[0102] Edge layer: Initialization data block in edge node includes edge node identifier , light node identifier , full node identifier , the key pair of the edge node , and interactive blocks ,in = , is a short-term transaction consensus tag identifier, Is the lifecycle identifier.
[0103] Comparison of single-chain and multi-chain performance: In order to prove that the performance of multi-chain is better than that of single-chain in the proposed framework, the present invention compares the throughput and transaction delay. When the transaction arrival rate is 90, the throughput of setting the blockchain block size to 100 is the highest. It can be seen that when the block size is (50-200), the overall throughput of multi-chain is higher than that of single-chain. The overall delay of multi-chain block generation is less than that of single chain, but there is communication delay when crossing chains. In general, the advantage of multi-chain is that the storage focus of fog layer and edge layer is separated, and the performance is better than that of single chain.
[0104] Experiment 2: Efficiency of short-term transaction consensus.
[0105] Comparison of short-term transaction consensus time with different numbers of nodes.
[0106] This paper experiments on the short-term transaction consensus mechanism in the proposed framework. As discussed in Section V, this paper sets up 4 different edge regions (Regions 1 to 4), and each region sets three risk levels (Basic, Medium, High) for comparison. Affected by the experimental equipment, the maximum number of nodes in this experiment is set to 80. The specific settings of each region are as follows: Area 1: A total of 50 nodes are set in this area, half of which send task requests, some nodes only participate in listening without doing any processing, and the remaining nodes respond to requests. The threshold of the risk level is set to a fixed value, and the experiment is terminated when the total number of transactions reaches 2000.
[0107] Area 2: A total of 60 nodes are set in this area, half of which send task requests, some nodes only participate in listening without doing any processing, and the remaining nodes respond to requests. The threshold of the risk level is set to a fixed value, and the experiment is terminated when the total number of transactions reaches 2000.
[0108] Area 3: A total of 70 nodes are set up in this area, half of which send task requests and the remaining nodes respond to the requests. A threshold mechanism for dynamically adjusting the risk level is added. When the total number of transactions reaches 2,000, the experiment is terminated.
[0109] Area 4: A total of 80 nodes are set up in this area, among which the node sends out task requests and the remaining nodes respond to the requests. A threshold mechanism for dynamically adjusting the risk level is added. When the total number of transactions reaches 2,000, the experiment is terminated.
[0110] Experimental results show that the method proposed in the present invention works best when the number of nodes is 200. Short-term transaction consensus can improve the synchronization time of blockchain ledgers to a certain extent. At the same time, the use of short-term transaction consensus mechanism can accommodate more nodes. Dynamic adjustment of thresholds is more suitable for complex environments of IoV. It will be based on the node behavior in the current fog node area. The node behavior will also affect the ledger synchronization time in this fog node area.
[0111] Experiment 3: Trusted transaction management based on credit value.
[0112] Table 8 Parameter setting table.
[0113]
[0114] The parameter settings are shown in Table 8. The present invention sets different parameters to ensure the credibility of the transaction process. In the view of the present invention, a node without any malicious behavior record is called an honest node. The malicious behavior of the honest node has the greatest impact on the proposed framework. Specifically, the present invention divides fog nodes and edge nodes into separate discussions: Fog layer node: Honest Node Network Delay: As a node in the global chain, its reputation value decreases slightly when it performs lazy behavior for the first time, because the parameter obtained from equation (3) This is the first case. In the subsequent lazy behavior, the accumulated , it decreases more towards exponential level. In specific cases, the impact of a few network delays is acceptable, but if the network delay is always in a state, it will affect the operation of the entire framework. At the same time, the scoring probability of the edge layer will decrease as the malicious behavior of the fog node increases.
[0115] Honest nodes perform malicious behavior: As an honest node, after performing malicious behavior for the first time, its reputation value drops from a positive value to a negative value. As can be seen from equation (4), the penalty for malicious behavior is very high, and the reputation value will decrease exponentially. After performing malicious behavior in the future, it will cause the reputation threshold of the region to drop. At this time, the members of the alliance chain need to vote to kick this node out of the global chain, otherwise the efficiency of the entire transaction network will decrease.
[0116] Edge Nodes: Honest nodes perform malicious behavior: When a newly joined node performs its first malicious behavior, the lower the score given to it by the surrounding nodes, the faster its reputation value will drop. After frequently performing malicious behaviors, its reputation value drops to a negative value, and the threshold of the entire area will rise, affecting the communication efficiency of this area.
[0117] Therefore, the surrounding nodes will give a low score to such nodes that frequently perform malicious behaviors, so that the number of times it performs malicious behaviors will decrease. Unless it starts to stop performing malicious behaviors, it will not be able to join the transaction network.
[0118] It can be seen that the reputation mechanism proposed in the present invention is very sensitive to malicious behavior, and can effectively curb the execution of malicious behavior, making the entire transaction network more credible.
[0119] The present invention proves the availability of the proposed framework through testing. The present invention will simulate the real environment to further verify the effectiveness, applicability and scalability of the framework.
[0120] The team of the present invention uses Beidou satellites to accurately grasp the positioning information and trajectory information of vehicles. Specifically, the present invention uses real vehicle data (including vehicle latitude and longitude and trajectory, etc.) provided by Beidou satellites and converts the data format into Sumo grid format. Then, the present invention imports the data into the Veins simulator, uses Sumo to generate the vehicle motion process, and simulates the network communication process in Omnet++. Finally, the present invention defines some vehicle behaviors (such as vehicles scoring each other) and applies the data to the proposed framework to verify the practicality and feasibility of the framework.
[0121] The present invention proposes a blockchain transaction architecture based on cloud-fog-edge collaboration. A transaction network and a blockchain network are designed. In the transaction network, fog nodes are responsible for collecting and forwarding requests from IoT devices through multilateral collaboration, so that different types of offload tasks are handled by different nodes, so that the transaction task processing load is balanced. In the blockchain network, two credit models are designed to constrain various types of malicious behaviors. In addition, the multi-chain structure using global chains and edge chains ensures the integrity of IoT transaction information and improves blockchain performance. Experimental results show that the proposed solution can improve performance by about 20%. The present invention proposes a short-term consensus transaction mechanism, which enables the Raft mechanism to be used in the case of multiple nodes. Short-term consensus transactions are achieved while ensuring high-credit nodes, shortening the consensus period after the transaction request, and further encouraging IoT devices with high credit values to join the IoT communication network, thereby improving the communication quality of the IoT; The present invention simulates and analyzes the behavior of the proposed model according to various performance measurement indicators to evaluate its feasibility and performance overhead compared with the core model. The evaluation results show the efficiency and effectiveness of the proposed model compared with the core model.
[0122] Example 2 A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for balancing unloading tasks in an Internet of Vehicles in Example 1.
[0123] Example 3 A computer-readable storage medium stores a computer program, which, when executed by a processor, implements a method for balancing unloading tasks in an Internet of Vehicles in Example 1.
[0124] Example 4 A computer program product includes a computer program, which, when executed by a processor, implements a method for balancing unloading tasks in an Internet of Vehicles in Example 1.
[0125] The present invention uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the method and core ideas of the present invention. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for balancing unloading tasks in a vehicle network, characterized in that: include: The edge node layer is constructed with the smart vehicles and basic IoT devices in the Internet of Vehicles as edge nodes, the fog node layer is constructed with the 5G base stations in the Internet of Vehicles as fog nodes, and the transaction network is constructed with the cloud servers in the Internet of Vehicles as the cloud layer; the edge nodes corresponding to the smart vehicles are full nodes; the edge nodes corresponding to the basic IoT devices are light nodes; Deploy an edge transaction information chain and a Beta distribution credit value model at an edge device corresponding to each edge node; Deploy a global reputation chain and a weighted credit value model at a 5G base station corresponding to each of the fog nodes; When a device in the current edge layer sends a task request to an edge node, the light node that receives the task request verifies the correctness of the request tag in the task request; When verification is passed, query the device reputation value of the device that sent the task request; When the device reputation value is greater than the device reputation value threshold, updating the first blockchain record table and sending the task request to the corresponding fog node; When the device reputation value is less than or equal to a device reputation value threshold, the task request is uninstalled.
2. A method for balancing unloading tasks in an Internet of Vehicles according to claim 1, characterized in that: The method further comprises: When a device in the current edge layer sends a task request to an edge node, the full node that receives the task request verifies the correctness of the request tag in the task request; When verification is passed, query the device reputation value of the device that sent the task request; When the device reputation value is greater than the device reputation value threshold, updating the first blockchain record table; Get the category label of the task request; When the category label is a long-term task, sending the task request to a corresponding fog node; When the category label is a short-term task, processing the task request according to the updated blockchain first record table; When the device reputation value is less than or equal to a device reputation value threshold, the task request is uninstalled.
3. The method for balancing unloading tasks in an Internet of Vehicles according to claim 1, characterized in that: The method further comprises: When the fog node receives the task request, it obtains the processing status tag of the task request; When the processing status label is "unprocessed", updating the second blockchain record table based on the first blockchain record table; Get the category label of the task request; When the category label is a long-term task, sending the task request to the cloud layer; When the category label is a short-term task, the task request is sent to the full node.
4. A method for balancing unloading tasks in an Internet of Vehicles according to claim 3, characterized in that: After sending the task request to the cloud layer, the method further includes: The cloud layer processes the task corresponding to the task request, modifies the processing status label of the task request to "processing completed", and returns the task request to the fog node.
5. The method for balancing unloading tasks in a vehicle network according to claim 3, characterized in that: After sending the task request to the full node, it also includes: The full node processes the task corresponding to the task request, modifies the processing status label of the task request to "processing completed", and returns the task request to the fog node.
6. A method for balancing unloading tasks in an Internet of Vehicles according to claim 3, characterized in that: The method further comprises: When the processing status label is "processing completed", based on the first blockchain record table and the second blockchain record table, the third blockchain record table is updated; the third blockchain record table is used to describe the reputation value of all devices; The updated blockchain third record table is sent to the global reputation chain corresponding to all fog nodes.
7. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for balancing unloading tasks in an Internet of Vehicles according to any one of claims 1-6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a method for balancing unloading tasks in an Internet of Vehicles according to any one of claims 1 to 6 is implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, a method for balancing unloading tasks in an Internet of Vehicles according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Internet of Things security access control method based on blockchain and fog node reputation
CN113381975A
Task scheduling method for starting double block chains in cloud and mist collaborative environment
CN115442370A
Space-air-ground integrated vehicle networking task unloading method based on alliance chain and DRL
CN117651049A
Zero-trust Internet of Vehicles cooperative computing method based on block chain
CN119484521A
Cited By
Privacy computing task scheduling method and system based on block chain
CN120276866A
A privacy computing task scheduling method and system based on blockchain
CN120276866B