A Method, Device, Medium and Product for Balancing Offloading Tasks in a Vehicle Networking

By building a multi-chain blockchain system and credit model, the problems of insecurity and malicious attacks in IoV node transactions are solved, and the quality and security of Internet of Things communications are improved, and load balancing and credit constraints are effectively preventing malicious behavior.

CN119668887BActive Publication Date: 2025-07-08YUNNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510199514.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-07-08
Estimated Expiration
2045-02-24

AI Technical Summary

Technical Problem

In the existing intelligent transportation system, the period of IoV node transaction processing communication requests and data synchronization expands, malicious IoT devices spread false data, resulting in unsafe communication, and the block cache problem of blockchain in the ITS environment is not fully considered, and there is a lack of systematic solutions to malicious node attacks.

Method used

Build a trading network, deploy edge transaction information chain and beta distributed credit value model at edge nodes, deploy global reputation chain and weight credit value model at fog nodes, and design a multi-chain blockchain system to handle different types of task requests by verifying the correctness of device reputation value and task labels, update the blockchain record table and uninstalling the task, and design a multi-chain blockchain system to handle different types of task requests.

Benefits of technology

Improve the quality and security of IoT communications, constrain malicious behavior through load balancing and credit models, ensure transaction integrity and privacy, and reduce network latency and storage pressure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668887B_ABST
    Figure CN119668887B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, medium and product for balancing offloading tasks in a vehicle networking, which relates to the technical fields of vehicle networking defense attacks and offloading tasks. The method includes: building a trading network according to the vehicle networking; deploying an edge trading information chain and a beta distribution credit value model at the edge device corresponding to each edge node; deploying a global reputation chain and a weight credit value model at the 5G base station corresponding to each fog node; when there is a device in the current edge layer sending a task request to an edge node, if the reputation value of the device received by the light node is greater than the device reputation value threshold, updating the first record table of the blockchain and sending the task request to the corresponding fog node; otherwise, offloading the task request. By setting up a trading network and a blockchain, the present invention can improve the communication quality and security of the Internet of Things.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle networking defense against attacks and offloading tasks, and particularly to a method, device, medium and product for balancing offloading tasks in vehicle networking. Background Art

[0002] In an Intelligent Transportation System (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 enhancing people's quality of life. Due to its characteristics such as immutability and transaction transparency, blockchain technology has solved major security risks in the single point of 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 (such as vehicle scheduling, traffic signal control, vehicle edge computing, secure transaction issues in IoV, ETC parking toll).

[0003] However, with the addition of a large number of IoT devices to IoV, the cycle of IoV node transactions for processing communication requests and data synchronization has been continuously extended. Some malicious IoT devices make the communication and data transmission processes insecure by spreading false data information. 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] Existing intelligent transportation systems do not fully consider the block caching problem of blockchain in the ITS environment; in IoV, the complex intelligent transportation environment requires further guarantee of the privacy and security of task offloading; security issues such as attacks by malicious nodes in the ITS network environment have not been systematically considered. Summary of the Invention

[0005] The purpose of the present invention is to provide a method, device, medium and product for balancing offloading tasks in vehicle networking, which can improve the communication quality and security of the Internet of Things.

[0006] To achieve the above purpose, the present invention provides the following solutions:

[0007] In a first aspect, the present application provides a method for balancing offloading tasks in vehicle networking, including:

[0008] Construct an edge node layer with intelligent vehicles and basic Internet of Things devices in the vehicle networking as edge nodes, construct a fog node layer with 5G base stations in the vehicle networking as fog nodes, and build a trading network with the cloud server in the vehicle networking as the cloud layer; the edge node corresponding to the intelligent vehicle is a full node; the edge node corresponding to the basic Internet of Things device is a light node;

[0009] Deploy an edge transaction information chain and a beta distribution credit value model at the edge device corresponding to each edge node;

[0010] Deploy a global reputation chain and a weight credit value model at the 5G base station corresponding to each fog node;

[0011] 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 label in the task request;

[0012] When the verification is passed, query the device reputation value of the device sending the task request;

[0013] 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;

[0014] When the device reputation value is less than or equal to the device reputation value threshold, unload the task request.

[0015] Optionally, the method further includes:

[0016] 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 label in the task request;

[0017] When the verification is passed, query the device reputation value of the device sending the task request;

[0018] When the device reputation value is greater than the device reputation value threshold, update the first record table of the blockchain;

[0019] Obtain the category label of the task request;

[0020] When the category label is a long-term task, send the task request to the corresponding fog node;

[0021] When the category label is a short-term task, process the task request according to the updated first record table of the blockchain;

[0022] When the device reputation value is less than or equal to the device reputation value threshold, unload the task request.

[0023] Optionally, the method further includes:

[0024] When the fog node receives a task request, obtain the processing status label of the task request;

[0025] When the processing status label is "unprocessed", update the second blockchain record table based on the first blockchain record table;

[0026] Obtain the category label of the task request;

[0027] When the category label is a long-term task, send the task request to the cloud layer;

[0028] When the category label is a short-term task, send the task request to the full node.

[0029] Optionally, after sending the task request to the cloud layer, it further includes:

[0030] The cloud layer processes the task corresponding to the task request, modifies the processing status label of the task request to "processed", and returns the task request to the fog node.

[0031] Optionally, after sending the task request to the full node, it further includes:

[0032] The full node processes the task corresponding to the task request, modifies the processing status label of the task request to "processed", and returns the task request to the fog node.

[0033] Optionally, the method further includes:

[0034] When the processing status label is "processed", update the third blockchain record table based on the first blockchain record table and the second blockchain record table; the third blockchain record table is used to describe the reputation values of all devices;

[0035] Send the updated third blockchain record table to the global reputation chain corresponding to all fog nodes.

[0036] In a second aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the vehicle networking offloading task balancing method.

[0037] In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the vehicle networking offloading task balancing method.

[0038] In a fourth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the vehicle networking offloading task balancing method.

[0039] According to the specific embodiments provided by the present invention, the technical solutions disclosed in this application have the following technical effects:

[0040] A vehicle networking offloading task balancing method, device, medium and product provided by the present invention designs a trading network and a blockchain network; in the trading network, fog nodes are responsible for collecting and forwarding requests from Internet of Things devices through multilateral cooperation, enabling different types of offloading tasks to be processed by different nodes, and achieving load balancing in transaction task processing. In the blockchain network, two credit models are designed to constrain various types of malicious behaviors. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0042] Figure 1 It is a schematic flowchart of a vehicle networking offloading task balancing method provided for Embodiment 1 of the present invention;

[0043] Figure 2 It is a blockchain-supported cloud-edge trading architecture provided for Embodiment 1 of the present invention;

[0044] Figure 3 It is a blockchain trading network diagram provided for Embodiment 1 of the present invention;

[0045] Figure 4 It is a blockchain model structure diagram provided for Embodiment 1 of the present invention;

[0046] Figure 5 It is a single-chain multi-chain blockchain throughput schematic diagram provided for Embodiment 1 of the present invention;

[0047] Figure 6 It is a single-chain multi-chain blockchain latency schematic diagram provided for Embodiment 1 of the present invention;

[0048] Figure 7 It is a first schematic diagram of short-term transaction consensus performance test provided for Embodiment 1 of the present invention;

[0049] Figure 8 It is a second schematic diagram of short-term transaction consensus performance test provided for Embodiment 1 of the present invention;

[0050] Figure 9 It is a third schematic diagram of short-term transaction consensus performance test provided for Embodiment 1 of the present invention;

[0051] Figure 10The fourth schematic diagram of the short-term transaction consensus performance test provided in Embodiment 1 of the present invention;

[0052] Figure 11 The schematic diagram of the impact of the lazy behavior of the fog node on the reputation value provided in Embodiment 1 of the present invention;

[0053] Figure 12 The impact of the lazy behavior of the edge node on the reputation value provided in Embodiment 1 of the present invention

[0054] Figure 13 The schematic diagram of the impact of the malicious behavior of the edge node on the entire area provided in Embodiment 1 of the present invention;

[0055] Figure 14 The first schematic diagram of the case analysis provided in Embodiment 1 of the present invention;

[0056] Figure 15 The second schematic diagram of the case analysis provided in Embodiment 1 of the present invention. Detailed implementation manners

[0057] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0058] The purpose of the present invention is to provide a method, device, medium and product for balancing offloading tasks in a vehicle-to-everything network, which can improve the communication quality and security of the Internet of Things.

[0059] To make the above objects, features and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.

[0060] Embodiment 1

[0061] As Figure 1 shown, a method for balancing offloading tasks in a vehicle-to-everything network in this embodiment includes:

[0062] Step 101: Construct an edge node layer with intelligent vehicles and basic Internet of Things devices in the vehicle-to-everything network as edge nodes, construct a fog node layer with 5G base stations in the vehicle-to-everything network as fog nodes, and construct a cloud layer with cloud servers in the vehicle-to-everything network to build a trading network. The edge node corresponding to the intelligent vehicle is a full node. The edge node corresponding to the basic Internet of Things device is a light node.

[0063] Step 102: Deploy an edge transaction information chain and a beta distribution credit value model at the edge device corresponding to each edge node.

[0064] Step 103: Deploy a global reputation chain and a weight credit value model at each fog node corresponding 5G base station.

[0065] Step 104: When there is a device in the current edge layer sending a task request to an edge node, the light node receiving the task request verifies the correctness of the request label in the task request.

[0066] Step 105: When the verification passes, query the device reputation value of the device sending the task request.

[0067] Step 106: When the device reputation value is greater than the device reputation value threshold, update the first blockchain record table and send the task request to the corresponding fog node.

[0068] Step 107: When the device reputation value is less than or equal to the device reputation value threshold, unload the task request.

[0069] Step 108: When there is a device in the current edge layer sending a task request to an edge node, the full node receiving the task request verifies the correctness of the request label in the task request.

[0070] Step 109: When the verification passes, query the device reputation value of the device sending the task request.

[0071] Step 1010: When the device reputation value is greater than the device reputation value threshold, update the first blockchain record table.

[0072] Step 1011: Obtain the category label of the task request.

[0073] Step 1012: When the category label is a long-term task, send the task request to the corresponding fog node.

[0074] Step 1013: When the category label is a short-term task, process the task request according to the updated first blockchain record table.

[0075] Step 1014: When the device reputation value is less than or equal to the device reputation value threshold, unload the task request.

[0076] Step 1015: When the fog node receives the task request, obtain the processing status label of the task request.

[0077] Step 1016: When the processing status label is "unprocessed", update the second blockchain record table based on the first blockchain record table.

[0078] Step 1017: Obtain the category label of the task request.

[0079] Step 1018: When the category label is a long-term task, send the task request to the cloud layer. 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.

[0080] Step 1019: When the category label is a short-term task, send the task request 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.

[0081] Step 1020: When the processing status label is "processing completed", update the blockchain third record table based on the blockchain first record table and the blockchain second record table. The blockchain third record table is used to describe the reputation values of all devices.

[0082] Step 1021: Send the updated blockchain third record table to the global reputation chain corresponding to all fog nodes.

[0083] Vehicular fog computing based on fog computing and telematics can provide location awareness and latency-sensitive services to in-vehicle terminal users. In vehicular fog computing, the Road Side Unit (RSU) is usually regarded as part of the fog server, provides communication functions, and is widely deployed in different regions. As an important part of vehicular fog computing, the RSU can respond to vehicle requests at the network edge, greatly reducing network latency and saving transmission bandwidth. The computing architecture of IoV based on fog computing is as Figure 2 shown. 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.

[0084] To address the growing bandwidth requirements, latency, scalability, and security issues in vehicle-to-everything (V2X) transactions, an efficient distributed secure fog computing architecture is proposed. This invention will discuss the proposed architecture, the structure of the blockchain transaction network, the blockchain storage structure, and the design of the reputation model.

[0085] The cloud-edge-fog computing architecture model proposed in this invention in the IoV environment is as Figure 2 shown. The computing architecture model has three layers.

[0086] Edge node layer: In the edge layer, this invention defines two types of nodes:

[0087] Full node: The full node consists of intelligent vehicles with relatively good computing power. It can monitor tasks in the IoV environment at the edge layer, analyze and make decisions on short-term tasks, and finally upload the transaction results to the blockchain. Therefore, it can directly communicate with the blockchain network.

[0088] Light node: The light node consists of basic Internet of Things devices such as ordinary vehicles and surveillance cameras. Due to their limited computing power, in the computing architecture of the present invention, the light node only needs to monitor the requests of surrounding vehicles, people, and devices, and then forward the requests to the fog node for processing.

[0089] Fog node layer: With the advent of the 5G era, 5G base stations can support high data rate, low latency, and high-reliability V2X communication. Therefore, in the fog layer, the present invention uses 5G base stations to form fog nodes. As Figure 3 shown, the fog node is responsible for controlling the request flow. In the middle layer, the fog node classifies and sorts the requests from the light nodes in the edge layer and forwards them to the cloud layer for subsequent calculations; the processing results of the 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, leveraging the advantages of fog computing as a buffer layer and utilizing the computing resources of the edge and the cloud to make the offloading of IoT tasks based on the blockchain more secure and reliable.

[0090] Cloud layer: In the cloud layer, it mainly analyzes and makes decisions on the long-term requests uploaded by the fog nodes, and returns the decision results to the fog nodes.

[0091] The blockchain transaction model proposed by the present invention is as Figure 3 shown. In order to black-box the transaction process and reduce the storage pressure on the blockchain to a certain extent, the present invention designs two networks:

[0092] Consortium blockchain network: The members of the consortium blockchain consist of a certificate authority, a traffic authority, and fog nodes.

[0093] Transaction network: The transaction network consists of the cloud layer, fog nodes, and edge nodes.

[0094] The transaction process is as follows:

[0095] The certificate authority and the traffic authority issue authentication certificates to the fog nodes. New members need to pass the authentication and have certificates before they can join the consortium blockchain. After passing the authentication, the fog nodes need to elect a leader through a consensus algorithm and synchronize the ledger data within a cycle.

[0096] The transaction network operates in the IoV environment. The requesting device sends task requests to the surrounding nodes in the V2X mode. The leader node will review the requests and then issue a one-time certificate to the edge node for processing this task.

[0097] The leader node classifies tasks and offloads tasks according to the labels of the tasks. After all tasks are completed, the task processing results are sorted and uploaded to the consortium blockchain ledger, and finally synchronized to all fog nodes through Raft.

[0098] To make full use of the advantages of cloud-edge-fog computing in the IoV environment, the present invention designs a two-layer blockchain system: divided into a global vehicle reputation chain and an edge transaction information chain, as Figure 4 shown. The focus of transactions in the edge layer is to ensure the security and credibility of transactions, and at the same time encourage more vehicles to join the transaction network. The focus of transactions in the fog layer is to establish a complete blockchain ledger, that is, to ensure that the transaction ledgers of each fog node can be stored completely and ensure the traceability of all transactions.

[0099] Edge transaction information chain: The edge transaction information chain is deployed on edge devices and is used to store the transaction information of all edge nodes (vehicles, RSUs, etc.) within the management scope of the fog node (the network set of all edge nodes registered by this fog node). Here, the transaction information refers to the transaction data generated in the Internet of Things environment, such as vehicle collision warnings, traffic accidents, traffic jams, 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 label, it is necessary to find a fog node. The public key encrypts the transaction content and the life cycle value.

[0100] Global reputation chain: The global reputation chain is deployed on 5G base stations (fog nodes) and stores the credit values of the entire system, including a series of devices such as fog nodes, light nodes, and full nodes, and records information such as the timestamp of each transaction.

[0101] To ensure the consistency of the blockchain, each edge chain will submit the results to the fog node (such as Figure 4 Fog_M in) at the end of its respective life cycle. The fog node is responsible for integrating all the received results into a block and broadcasting it to other fog nodes, thereby achieving data consistency.

[0102] The present invention designs a node management mechanism based on credit value to handle the behaviors of all nodes, and establishes two different credit value models to better cope with different levels of credit value. In the fog layer, a weight-based method is used to set the credit value to improve the relative importance of fog node behaviors (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, making it difficult to classify and define them. Beta distribution is a probability distribution commonly used to quantify the uncertainty of parameters in a binomial distribution. When calculating the credit value of edge nodes, beta distribution takes into account two key factors: rating score and number of ratings.

[0103] In the fog node layer, each fog node has a maximum range that 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:

[0104] (1).

[0105] Where, is the weight of positive behavior, is the weight of 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 perform positive behavior. is the reputation score of the fog node, which consists of two parts:

[0106] is the positive behavior score of the fog node, and its definition is as follows:

[0107] (2).

[0108] Where, is the total number of transaction volumes obtained locally by this node within a period of time; is the total number of transaction volumes received and forwarded by this node within a period of time. (i = 1, 2, ……, n) is the basic processing efficiency set for each node, and positive behavior is defined as: being elected as a guarantee node, and the transaction volume within the W range shows an increasing trend.

[0109] is the negative behavior score of the fog node, and its definition is as follows:

[0110] (3).

[0111] Where, is the total number of negative behaviors (k = 1, 2, ……, n), is the negative behavior probability, which defines two major categories of negative behaviors of fog nodes. is the quantity of two types of negative behaviors, and uses weights to weigh the severity of negative behaviors.

[0112] (4).

[0113] In the design of the present invention, network latency behavior will cause the negative behavior score of the node to linearly decrease, and then exponentially decrease after dropping to a certain threshold; other malicious behaviors will cause the negative behavior score of the node to exponentially decrease. is set according to the total trustworthiness of the current area of the fog node (the network space within the registration range of the fog node), and is dynamically changing, and can predict the malicious behavior of the node to a certain extent.

[0114] Edge node layer: The trust of vehicles is represented by the beta distribution between relevant trust systems. According to the relationship between the beta distribution and the exponential distribution, the calculation formula for vehicle trust is derived. The present invention assumes that the number of interactions between vehicles is α + β times, where α and β represent successful and unsuccessful interaction models respectively as follows, where P represents the probability of successful interaction. Then, vehicle Vx maintains the reputation distribution of vehicle Vy, marked as Rx-y.

[0115] In the edge layer, the trust relationship between edge devices can be represented by the beta distribution. Set α + β as the number of interactions of vehicles, α as the number of successes, β as the number of failures, and P as the probability of successful interaction. The reputation value model for edge device scoring based on the beta distribution is:

[0116] (5).

[0117] As shown in formula (5), is the probability distribution of the reputation of edge device E i . Define the maximum value of as the trust score of the vehicle and prove the credibility of the formula. Therefore, the maximum value of the reputation distribution is the trust score, and the trust score is defined as:

[0118] (6).

[0119] Finally, formula (6) is used as the model for edge device E i to score edge device E j . is the score of edge device E i for edge device E j ; is the score of edge device E i for edge device Ej 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:

[0120] (7).

[0121] 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 of edge device reputation calculation. YesE j The reputation value of the k-1th transaction.

[0122] 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:

[0123] (8).

[0124] 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.

[0125] Reputation-driven cloud-fog edge multilateral collaborative task computing solution:

[0126] 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.

[0127] Table 1 Main symbol table.

[0128]

[0129] At the edge layer, the device making the request V i You need to request Qi 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.

[0130] 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.

[0131] 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.

[0132] Table 2 Edge unloading solution table.

[0133]

[0134] Table 3 Fog offloading solution table.

[0135]

[0136] Table 4 Blockchain information table 。

[0137]

[0138] Table 5 Blockchain information table 。

[0139]

[0140] Table 6 Blockchain information table 。

[0141]

[0142] The vehicle-mounted fog short-term transaction consensus mechanism supported by blockchain. After more Internet of Things devices join the blockchain network, the consensus cycle will increase. Design a short-term transaction consensus mechanism that supports other nodes to conduct transactions first under the premise that nodes with high reputation values act as guarantors. After the transaction is completed, if no abnormal data appears, the guaranteeing node 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 ensure that a large number of vehicle networking transactions can be completely synchronized to the blockchain ledger through the designed mechanism.

[0143] In the edge layer of the proposed framework, in order to prevent the situation that a large number of IoT devices flood into the transaction network and cause the transaction ledger to not be synchronized in time, a short-term transaction consensus mechanism for the edge layer is designed to achieve the consistency of the blockchain ledger through dynamic guarantee node selection and RAFT-based transaction verification.

[0144] The first step, dynamic guarantee node selection: First, determine the range of nodes that can act as guarantee nodes. Each edge layer peer node regularly checks the historical transactions in the block through the smart contract and calculates the credit values of all nodes according to the historical behavior records. In this step, peer nodes with malicious behaviors in the domain resulting in low credit values will be excluded from the scope of participating in the second-step consensus. According to the credit values of different domains, select the domains with credit values higher than a certain threshold, and select the gateway nodes in these domains as the orderer nodes. This process will be triggered periodically to achieve the dynamic selection of the orderer nodes. In addition, the present invention also proposes corresponding countermeasures for different risk levels.

[0145] As shown in Table 7, the present invention achieves this by setting 、 and Three thresholds are used to 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 gateway nodes within the domain with a credit value greater than to become subscribers. As the risk level gradually increases, the architecture will take more stringent measures to enhance security and robustness, such as prohibiting edge gateway nodes from providing subscription services and modifying the access control policies of high-risk domain IIoT devices.

[0146] Step 2: RAFT-based transaction verification: After submitting a transaction proposal, each edge node must verify whether each transaction in the new block is endorsed by all the 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. During this process, the RAFT algorithm is used to reach a consensus to ensure the consistency of the ledger data of each edge gateway.

[0147] Table 7 Threshold changes and their impacts.

[0148]

[0149] Experimental verification.

[0150] Such as Figures 5 to 15 , the overall performance of the evaluation framework of the present invention, the impact of the multi-chain structure and the single-chain structure on the blockchain load, the impact of short-term transaction consensus on some regions, and the security and availability of the reputation value-based management mechanism are evaluated. Since the application scenario of the system is oriented to IoV, in order to be closer to the actual situation, 3 Raspberry Pi 4Bs are used at the edge layer nodes to simulate. The processor of the Raspberry Pi 4B is 64-bit 1.5GHz, the memory is 8 GB, 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 is simulated using a server, which is equipped with a 64-bit Intel Xeon 2.3GHz processor, 32 GB of RAM, and a Linux operating system. The fog layer nodes are simulated using a server with a 64-bit AMD A10-7400P 2.5GHz processor, 12 GB of RAM, and a Linux operating system.

[0151] Experiment 1: The blockchain performance of the proposed framework.

[0152] To verify the feasibility of the proposed framework in terms of transaction performance, the present invention tests the blockchain performance of the proposed framework (including transaction submission, forwarding, etc.) by deploying blockchain nodes on servers, PCs, and Raspberry Pi. Specifically, the present invention tests and analyzes the transaction throughput and communication latency of cloud layer nodes, fog layer nodes, and edge nodes. The detailed analysis is as follows.

[0153] Cloud layer: The initialization parameters of the cloud server include the maximum transaction block, transaction latency, maximum number of nodes, and the size of the maximum request packet.

[0154] Fog layer: The initialization data block in the fog server contains fog node identifiers , initial reputation values , and key pairs of fog nodes , as well as interaction blocks . Among them = , is a temporary key, is the edge node 's initial threshold, is the total number of registered nodes within the edge node.

[0155] Edge layer: The initialization data block in the edge node includes edge node identifiers , light node identifiers , full node identifiers , key pairs of edge nodes , and interaction blocks . Among them = , is the short-term transaction consensus label identifier, is the survival period identifier.

[0156] Single-chain and multi-chain performance comparison: To prove that in the proposed framework, the performance of the multi-chain is better than that of the single-chain, the present invention makes a comparison under two criteria: throughput and transaction latency. When the transaction arrival rate is 90, the throughput is the highest when the blockchain block size is set to 100. It can be seen that when the block size is (50 - 200), the overall throughput of the multi-chain is higher than that of the single-chain. The overall latency of generating blocks in the multi-chain is less than that of the single-chain, but there is communication latency during cross-chain. Generally speaking, the advantage of the multi-chain is that it separates the storage focus of the fog layer and the edge layer, and its performance is better than that of the single-chain.

[0157] Experiment 2: Efficiency of short-term transaction consensus.

[0158] Comparison of short-term transaction consensus time with different numbers of nodes.

[0159] The present invention conducts experiments on the short-term transaction consensus mechanism in the proposed framework. As discussed in Section V, the present invention sets up 4 different edge regions (Regions 1 to 4), and three risk levels (Basic, Medium, High) are set in each region for comparison. Affected by the experimental equipment, the maximum number of nodes in this experiment is set to 80. The specific settings for each region are as follows:

[0160] Region 1: A total of 50 nodes are set in this region. Half of the nodes send task requests, some nodes only participate in listening and do not perform any processing, and the remaining nodes respond to the 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.

[0161] Region 2: A total of 60 nodes are set in this region. Half of the nodes send task requests, some nodes only participate in listening and do not perform any processing, and the remaining nodes respond to the 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.

[0162] Region 3: A total of 70 nodes are set in this region. Half of the nodes send task requests, and the remaining nodes respond to the requests. A mechanism for dynamically adjusting the threshold of the risk level is added, and the experiment is terminated when the total number of transactions reaches 2000.

[0163] Region 4: A total of 80 nodes are set in this region. The nodes send task requests, and the remaining nodes respond to the requests. A mechanism for dynamically adjusting the threshold of the risk level is added, and the experiment is terminated when the total number of transactions reaches 2000.

[0164] The experimental results prove that when the number of nodes is 200, the method proposed by the present invention has the best effect. Short-term transaction consensus can improve the synchronization time of the blockchain ledger to a certain extent. At the same time, using the short-term transaction consensus mechanism can accommodate more nodes. Dynamically adjusting the threshold is more suitable for the complex environment of IoV. It will be based on the node behavior in the current fog node region, and the node behavior will also affect the ledger synchronization time in this fog node region.

[0165] Experiment 3: Trusted transaction management based on credit value.

[0166] Table 8 Parameter setting table.

[0167]

[0168] The parameter settings are shown in Table 8. The present invention sets different parameters to ensure the trustworthiness of the transaction process. In the view of the present invention, a record without any malicious behavior records is called an honest node, and the malicious behavior of the honest node has the greatest impact on the proposed framework. Specifically, the present invention discusses the fog nodes and edge nodes separately:

[0169] Fog layer node:

[0170] Honest node network latency: As a node of the global chain, when it performs lazy behavior for the first time, its reputation value decreases slightly because of the parameters obtained from Equation (3). For the first case. When the subsequent cumulative execution of lazy behavior reaches , its decline is more approaching an exponential level. In a specific situation, the impact brought by a few network latencies can be acceptable, but if it is always in a network latency 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.

[0171] Honest node performing 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 degree brought by malicious behavior is very high, and the reputation value will decrease exponentially. After subsequent execution of malicious behavior, it will cause the reputation threshold of the region to decrease. At this time, the members of the consortium chain need to vote to kick this node out of the global chain, otherwise the efficiency of the entire trading network will decrease.

[0172] Edge node:

[0173] Honest node performing malicious behavior: When a newly joined node in the network performs malicious behavior for the first time, the lower the score of it by the surrounding nodes, the faster its reputation value will decrease. After frequently performing malicious behavior, its reputation value drops to a negative value, and the threshold of the entire region will rise, affecting the communication efficiency of this region.

[0174] Therefore, the surrounding nodes should give a very low score to such nodes that will frequently perform malicious behavior, so that the number of times of its malicious behavior execution will decrease. Unless it starts to stop performing malicious behavior, otherwise it will not be able to join the trading network.

[0175] It can be seen that the reputation mechanism proposed by the present invention is very sensitive to malicious behavior, can effectively curb the execution of malicious behavior, and make the entire trading network more credible.

[0176] The present invention proves through testing that the proposed framework has availability. The present invention will simulate a real environment to further verify the effectiveness, applicability and scalability of the framework.

[0177] The team of this invention uses Beidou satellites to accurately obtain the positioning information and trajectory information of vehicles. Specifically, this invention uses the real vehicle data provided by Beidou satellites (including vehicle longitude, latitude, and trajectory, etc.), and converts the data format into the Sumo grid format. Then, this invention imports the data into the Veins simulator, uses Sumo to generate the vehicle movement process, and simulates the network communication process in Omnet++. Finally, this invention defines some vehicle behaviors (such as vehicles rating each other), and applies the data to the proposed framework to verify the practicability and feasibility of the framework.

[0178] This 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 Internet of Things devices through multilateral collaboration, enabling different types of offloading tasks to be processed by different nodes, and achieving load balancing in transaction task processing. In the blockchain network, two credit models are designed to constrain various types of malicious behaviors. In addition, the multi-chain structure of the global chain and the edge chain ensures the integrity of Internet of Things transaction information and improves the performance of the blockchain at the same time. Experimental results show that the proposed solution can improve the performance by about 20%. This invention proposes a short-term consensus transaction mechanism, enabling the Raft mechanism to be used in the case of multiple nodes. Short-term consensus transactions are achieved while ensuring high-credit-value nodes, shortening the consensus period after a transaction request, and further motivating high-credit-value Internet of Things devices to join the Internet of Things communication network, thereby improving the communication quality of the Internet of Things; This 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.

[0179] Embodiment 2

[0180] A computer device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the computer program to implement a vehicle networking offloading task balancing method in Embodiment 1.

[0181] Embodiment 3

[0182] A computer-readable storage medium stores a computer program thereon. When the computer program is executed by a processor, it implements a vehicle networking offloading task balancing method in Embodiment 1.

[0183] Embodiment 4

[0184] A computer program product includes a computer program. When the computer program is executed by a processor, it implements a vehicle networking offloading task balancing method in Embodiment 1.

[0185] In the present invention, specific examples are used to illustrate the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A method for balancing offloading tasks in a vehicle networking, characterized in that, Including: Construct an edge node layer with intelligent vehicles and basic Internet of Things devices in the vehicle network as edge nodes, a fog node layer with 5G base stations in the vehicle network as fog nodes, and a cloud layer with cloud servers in the vehicle network to build a trading network; the edge nodes corresponding to the intelligent vehicles are full nodes; the edge nodes corresponding to the basic Internet of Things devices are light nodes; Deploy an edge transaction information chain and a beta distribution credit value model at the edge device corresponding to each edge node; The structure of the edge transaction information chain includes: 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; the edge transaction information chain is used to store the transaction information of all edge nodes within the management scope of the fog node; the transaction information includes the network set of all edge nodes registered with the corresponding fog node; the transaction information is transaction data generated in the Internet of Things environment; the transaction data generated in the Internet of Things environment includes: vehicle collision warning data, traffic accident data, traffic congestion data, and road warning data; The beta distribution credit value model is used to determine the reputation value of device transactions; The beta distribution credit value model is: ; ; ; Among them, is the edge device E i probability distribution of reputation; α is the number of successful times, β is the number of failed times, and p is the probability of successful interaction; is the edge device E i for the edge device E j score; is the edge device E i for the edge device E j number of successful interactions; is the edge device E i for the edge device E j number of failed interactions; is E j reputation value of the k-th transaction, N is the total number of devices that score E j ; is the weight for calculating the edge device reputation value; is E j reputation value of the (k - 1)-th transaction; V i is the device that makes the request; Deploy a global reputation chain and a weighted credit value model at the 5G base station corresponding to each fog node; the global reputation chain is used to store the credit values of fog nodes, light nodes, and full nodes in the entire system, and record the timestamp information of each transaction; The weighted credit value model is used to determine the reputation value of fog nodes; The weighted credit value model is: ; ; ; ; Among them, is the reputation value of the fog node, is the weight of positive behavior, is the positive behavior score of the fog node; is the weight of negative behavior, and + = 1; is the negative behavior score of the fog node; is the total number of transaction volumes obtained locally by the node within a period of time; is the total number of forwarded transaction volumes received by the secondary node within a period of time; is the basic processing efficiency set for each node; is the total number of negative behaviors, represents the weight for weighing the severity of negative behaviors with a value of 0 or 1; is the negative behavior probability, and are the quantities of two types of negative behaviors, is the weight for weighing the severity of negative behaviors; represents the node; 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 label in the task request; When the 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, update the first blockchain record table and send the task request to the corresponding fog node; When the device reputation value is less than or equal to the device reputation value threshold, unload the task request.

2. The vehicle networking offloading task balancing method according to claim 1, wherein The method further includes: 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 label in the task request; When the 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, update the first blockchain record table; Obtain the category label of the task request; When the category label is a long-term task, send the task request to the corresponding fog node; When the category label is a short-term task, process the task request according to the updated first blockchain record table; When the device reputation value is less than or equal to the device reputation value threshold, unload the task request.

3. The vehicle networking offloading task balancing method according to claim 1, characterized in that, The method further includes: When the fog node receives a task request, obtain the processing status label of the task request; When the processing status label is "unprocessed", update the second blockchain record table based on the first blockchain record table; Obtain the category label of the task request; When the category label is a long-term task, send the task request to the cloud layer; When the category label is a short-term task, send the task request to the full node.

4. The vehicle networking offloading task balancing method according to claim 3, characterized in that After sending the task request to the cloud layer, it 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 offloading tasks in an Internet of Vehicles according to claim 3, wherein After sending the task request to the full node, it 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.

6. The vehicle networking offloading task balancing method according to claim 3, characterized in that, The method further includes: When the processing status label is "processing completed", based on the blockchain first record table and the blockchain second record table, update the blockchain third record table; the blockchain third record table is used to describe the reputation values of all devices; Send the updated blockchain third record table to the global reputation chain corresponding to all fog nodes.

7. A computer device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement a vehicle networking offloading task balancing method 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 the processor, it implements a vehicle networking offloading task balancing method according to any one of claims 1-6.

9. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements a vehicle networking offloading task balancing method according to any one of claims 1-6.

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