CN116668987A - Side chain-based internet of vehicles data sharing method and system - Google Patents

Side chain-based internet of vehicles data sharing method and system Download PDF

Info

Publication number
CN116668987A
CN116668987A CN202310673988.7A CN202310673988A CN116668987A CN 116668987 A CN116668987 A CN 116668987A CN 202310673988 A CN202310673988 A CN 202310673988A CN 116668987 A CN116668987 A CN 116668987A
Authority
CN
China
Prior art keywords
chain
node
consensus
vehicles
cross
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310673988.7A
Other languages
Chinese (zh)
Other versions
CN116668987B (en
Inventor
徐志刚
蔡立森
董新华
韩洪木
邹珺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hubei University of Technology
Original Assignee
Hubei University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hubei University of Technology filed Critical Hubei University of Technology
Priority to CN202310673988.7A priority Critical patent/CN116668987B/en
Publication of CN116668987A publication Critical patent/CN116668987A/en
Application granted granted Critical
Publication of CN116668987B publication Critical patent/CN116668987B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1059Inter-group management mechanisms, e.g. splitting, merging or interconnection of groups
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/44Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for communication between vehicles and infrastructures, e.g. vehicle-to-cloud [V2C] or vehicle-to-home [V2H]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Traffic Control Systems (AREA)

Abstract

The embodiment of the invention discloses a vehicle networking data sharing method based on a side chain technology, which comprises the following steps: the coverage area of each base station is an Internet of vehicles domain, and the base station, the road side unit and the vehicle-mounted unit are used as nodes in the coverage area of each base station to construct an Internet of vehicles side chain of an Internet of vehicles alliance chain; constructing a main chain of a alliance chain of the Internet of vehicles by taking all base stations positioned in different Internet of vehicles domains as nodes, wherein all base stations on the main chain are taken as main chain consensus nodes to store identity authentication information, node scores and cross-chain transaction information of on-board units and Road Side Units (RSUs) on all side chains; based on the node scores of the distance and the credibility, the cross-chain consensus is implemented on the side chains of the Internet of vehicles, and the cross-chain transaction among the vehicles in each side chain of the Internet of vehicles is completed. By changing the single chain of the traditional block chain into a plurality of side chains in parallel, the storage pressure and communication cost of the chain are effectively reduced, the storage capacity of the system is enlarged, and the data sharing efficiency of the Internet of vehicles across regions is improved.

Description

Side chain-based internet of vehicles data sharing method and system
Technical Field
The invention relates to the technical field of blockchains and Internet of vehicles, in particular to an Internet of vehicles data sharing method and system based on a side chain technology.
Background
Intelligent car networking is a network that provides wireless communications between a vehicle and infrastructure, and between vehicles. With the development of automatic driving car technology and 5G networks, the perception and communication capabilities of vehicles are rapidly improved. Based on these basic technology capabilities, vehicles are able to generate and collect traffic information and actively share this information with other vehicles and Road Side Units (RSUs) in the intelligent vehicle networking. The sharing of data between vehicles in a traffic network enables immediate response to traffic accidents and thereby creates a safe and efficient traffic management system.
However, information sharing between vehicles may also cause traffic confusion due to incorrect information misleading the vehicles. Therefore, there is a need for a vehicle information trust model that examines the trustworthiness of a vehicle while considering vehicle attribute information and protecting vehicle privacy.
In the conventional internet of vehicles, the running vehicles need to share own data, such as speed, position, identity, etc., to surrounding vehicles in order to achieve the purpose of safe driving. In addition, when the vehicle runs in the internet of vehicles in different areas, identity registration needs to be submitted to the internet of vehicles system in the area to acquire the authority of data sharing, and therefore the vehicle is required to frequently visit a road side unit to perform identity registration in the running process, and the vehicle can only perform data sharing by uploading own information. However, with the increase of network-connected vehicles, data to be shared grows exponentially, so that the pressure of road side units is increased more and more, and the cross-domain data sharing efficiency of the Internet of vehicles is low.
Meanwhile, under a single blockchain, the problem that the throughput of authentication is low and different blockchains cannot authenticate each other exists; the block chains have the problems of distrust, large inter-chain communication delay and low bandwidth. Therefore, there is a need for improvements to existing car networking blockchain architectures to increase car networking security and to increase vehicle authentication and information sharing efficiency.
Disclosure of Invention
The invention aims to provide a safe and efficient data sharing method and system for the Internet of vehicles based on a side chain technology, and an Internet of vehicles block chain based on a main-side chain architecture is provided, wherein an alliance chain main chain is built on a base station, alliance chain side chains are built on Internet of vehicles equipment in different base station coverage areas, so that each side chain can run in parallel, throughput on the chain is improved, time delay is reduced, and in addition, an Internet of vehicles node cross-chain transaction is realized by arranging a cross-chain consensus algorithm on the chain, so that vehicles in different side chains can share data.
In order to achieve the above object, the technical solution of the embodiment of the present invention is:
a side-chain-based internet of vehicles data sharing method, the method comprising:
s1: initializing an Internet of vehicles system, and respectively constructing an Internet of vehicles side chain of an Internet of vehicles alliance chain by taking a base station, a road side unit and a vehicle unit as nodes in the coverage area of each base station;
S2, constructing a main chain of a vehicle networking alliance chain by taking all base stations positioned in different vehicle networking domains as nodes, and taking all base stations on the main chain as main chain consensus nodes to store identity authentication information, node scores and cross-chain transaction information of vehicle-mounted units and Road Side Units (RSUs) on all side chains;
s3, based on node scoring of the distance and the credibility, implementing cross-chain consensus on the side chains of the Internet of vehicles, enabling each side chain to finish the consensus request in parallel, and finishing cross-chain transaction among vehicles in each Internet of vehicles;
wherein, preferably, the consensus in the side chains is jointly completed by the following nodes:
and the routing node is used as the routing node of each side chain by the base station, and updates the vehicle information in the side chain to the main chain so as to realize cross-domain authentication, data request and cross-chain transaction.
The master node is selected by a road side unit RSU in the Internet of vehicles through node scoring based on distance and credibility to become the master node so as to submit a side chain internal consensus request and send a hash value authenticated in the side chain to the routing node;
and the consensus node is used for achieving the consensus of the transaction and maintaining a decentralised public account book of a side chain to which the consensus node belongs, and is formed by selecting a vehicle-mounted unit and a road side unit RSU in the area through scoring based on the distance and the credibility.
Preferably, the specific steps of implementing cross-chain consensus on the side chain of the internet of vehicles based on the node scores of the distance and the credibility are as follows:
s3.1, initializing all nodes, dividing the nodes into a routing node set, a main node set, a consensus node set and a candidate node set according to node scores, wherein,
the routing node set is used for forwarding the cross-link transaction, forming a condition for the subsequent cross-link transaction, and the base station is used as a routing node of each side chain;
the master node set SP is used for submitting a side chain internal consensus request, sending a hash value of the in-chain authentication to a routing node, and forming a master node by a side chain internal road side unit RSU through node scoring election based on distance and credibility;
the consensus node Set ConsensusNodeSet (SC) is used for achieving consensus and maintaining in-chain contents of different side chains, and the in-vehicle units and the road side units RSU in the side chains become consensus nodes through node scoring election based on distance and credibility.
The method comprises the steps that RSU nodes with higher scores are selected as nodes in a main node set, wherein the main node set is contained in a consensus node set, namely SP epsilon SC;
the candidate node set Candida nodeSet is used for receiving account book update information sent by the master node, but does not participate in the consensus process;
S3.2, selecting a main node based on the node score of the distance and the credibility;
s3.3, the client of the block chain service initiating request sends a transaction message to the master node, and the transaction is eliminatedThe format of the message is<REQUEST,n,t,sig(t)>Cross-chain transaction format is<REQUEST,c,CHTP,Sig i (CHTP)>;
S3.4, when the master node receives the request from the client, the master node enters a pre-preparation stage, and broadcasts the message<PRE-PREPARE,n,v,h,t,P i ,Sig i (t)>To a consensus node, broadcast if cross-chain transaction<PRE-PREPARE,c,v,h,CHTP,Sig i (CHTP)>Where n represents this is an in-chain transaction, c represents this is a cross-chain transaction, v is pbft view number, h is block height, t is transaction summary, P i Representing master node, sig i The CHTP is a cross-chain transaction general data structure;
s3.4, when the common node receives the message to verify the message, if the common node verifies that a pre-preparation message is passed, the common node enters a preparation stage, and broadcasts the preparation message to other common nodes in the common node set SC, wherein the preparation message is in the format of<PREPARE,n,v,h,t,B i ,Sig i (t)>If the cross-link message format is<PREPARE,c,v,h,CHTP,B i ,Sig i (CHTP)>Wherein B is i Is the node that sends the prepare message;
s3.6, if the common node enters the submitting stage, the common node sends a submitting message to the master node, wherein the format of the submitting message is as follows<COMMIT,n,v,h,t,B i ,Sig i (t)>If it is a cross-link message, it is in the form of <PREPARE,c,v,h,CHTP,B i ,Sig i (CHTP)>If the message is a cross-link message, the message is submitted to the master node and is also submitted to the routing node;
s3.7, when the master node receives the excessWhen the same submitted message is obtained, adding the transaction into a blockchain, and providing the consensus result for all nodes to perform data synchronization; if the master node times out without receiving +.>The same confirmation message is viewedThe round of consensus fails and the master node is handed over.
The whole cross-link data sharing flow uses digital signature and hash verification to ensure that data in the cross-link process is not tampered and forged.
Preferably, the primary node also updates the reputation value once at the end of each round of consensus.
Preferably, the method further comprises:
s3.8, if the routing node receives the cross-chain transaction, the routing node executes a supervisor algorithm to inquire the consensus result from all the consensus nodes, and the consensus node set is used as a supervisor to send the submitted information of the consensus to the routing node, if the submitted information exceeds the submitted informationThe individual nodes provide consistent commit messages, then determine that the master node provided the correct information, and if there are not enough nodes to provide consistent messages, then determine that the master node provided incorrect information, punish the master node and reselect the master node.
Preferably, the method further comprises:
and S3.9, when a new node is added in the side chain, the new node directly enters the candidate node, does not participate in consensus, but participates in data synchronization, and only the next updating is performed, the new node has the opportunity to enter the consensus group.
Furthermore, in order to realize quick and efficient consensus, the embodiment of the invention provides a reputation computing method based on distance and reputation, which preferentially selects the node with high network centrality and high reputation as a main node based on node scoring, wherein the node with lower reputation does not participate in consensus, only takes charge of receiving consensus results, gives excitation to the nodes participating in consensus, reduces reputation scoring of malicious nodes, and thus maintains a high-efficiency network. The reputation and centrality of each node are calculated by the master node at the end of each round of consensus and the node score is updated once.
According to the embodiment of the invention, the node scoring calculation based on the distance and the credibility is used, and the node scoring is used for dividing the consensus node set and the candidate node set, so that the nodes participating in the consensus are more suitable for the environment of the Internet of vehicles, the rapid and efficient consensus is realized, the throughput of the Internet of vehicles is further improved, and the safety of the Internet of vehicles is also improved.
The node scoring calculation based on the credibility comprises the following specific steps:
S4.1, calculating availabilityWherein Avg is the average value of the corresponding scores of the previous round, U i Normalized to [0,1]A value in between; normalization formula is +.>
Where α+β+γ=1, and α, β, γ∈ (0, 1), ui is normalized to a value between [0,1], i.e., α, β, γ∈ (0, 1);
s4.2, calculating the credibility Cre, wherein the credibility represents whether the node changes the client message; initializing the reliability to 1, subtracting 0.1 from the reliability whenever a node sends an erroneous summary, and once this index reaches a threshold (e.g., 0), the node is added to the malicious node set and can no longer participate in consensus;
s4.2, calculating reputation score R i =Cre i *θ(U i );
Setting 3 thresholds theta from small to large 1 ,θ 2 ,θ 3 The credibility is divided into 4 credit grades, the specific value of 3 thresholds can be divided according to the actual safety requirement of the side chain of the internet of vehicles,
when R is i Belonging to [0, theta ] 1 ]When the reputation level is an invalid node set, the participation in the consensus algorithm is not allowed, and the information is not received;
when R is i Belonging to [ theta ] 12 ]When the reputation level is the candidate node set, account book update information sent by the main node can be received, but the account book update information does not participate in the consensus process;
when R is i Belonging to [ theta ] 23 ]When the reputation level is a consensus node set, a consensus algorithm can be executed as a consensus node;
When R is i Belonging to [ theta ] 3 ,1]When the reputation level is the main node set, the common node can be used as the common node to execute the common algorithm and compete for the main node.
Preferably, the method further comprises:
s4.4, when each round of consensus is finished, the main node carries out rewarding distribution on nodes in the consensus node set according to the credit score, and the method specifically comprises the following steps:
calculation of prize allocation weights:
assuming that K consensus nodes currently participate in consensus, the reputation score of each consensus node is R i I=1, 2, …, K; the reward of each consensus node is respectively distributed with weight Q i I=1, 2, …, the rewards obtained by each account are distributed evenly according to the ratio of the credit value of the node to the sum of the credit values of all nodes, and the calculation formula is as follows:
wherein ,the sum of reputation scores for all consensus nodes.
Preferably, the method further comprises:
s5: when a vehicle-mounted unit which is not connected with the network enters an area A of a certain side chain, the vehicle-mounted unit needs to apply for registration to the side chain of the vehicle network to which the area A belongs, after receiving a registration request, a node which is closest to the side chain in the side chain inquires the identity authentication information of the vehicle from the main chain, whether the vehicle-mounted unit is registered in the alliance chain is judged, if the vehicle-mounted unit is not registered, binding the identity information of the vehicle is executed, the vehicle is registered in a vehicle network system, the identity information is generated, and then a consensus contract is executed to store the vehicle information on the alliance block chain; if the vehicle information is queried in the main chain, registering the vehicle as a candidate node of the side chain, carrying out consensus with other vehicles in the side chain, and calling service in the side chain; the area A is an area covered by the same Internet of vehicles base station, and road side units, base stations and vehicle-mounted units in the area A form a alliance chain side chain;
Preferably, the method further comprises:
s6: in order to support the credible verification and reliable transfer of transactions between side chains, the embodiment of the invention realizes a Cross-link transmission protocol CHTP (Cross-Blockch ainTransferProtocol) based on a relay chain, and a CHTP data structure standardizes a set of main data fields of a Cross-link message based on generality and flexibility, wherein the data structure is as follows<From,To,S id ,Index,Tim eout,Version,Timestamp,Signature content ,Confirm>
Wherein the From and To fields represent unique ID identifications of a source vehicle in the source chain and a target vehicle in the destination chain, respectively, the ID identifications being generated by the relay chain when the side chains are registered with the relay chain;
index represents a cross-chain transaction serial number generated by dynamically incrementing a side-chain cross-chain contract one by one, for specifying a unique cross-chain transaction Index;
timestamp represents a Timestamp;
signature represents the private key Signature of the transaction initiating node, and the relay chain stores the public key pairs of all nodes;
version is the Version number of CHTP protocol, which is convenient for later upgrade and Version control;
content is transaction specific Content;
confirms is a confirmation identifier that represents whether the transaction was successful.
The base station can be used as a relay chain node and a cross-link slave node, and the cross-link transaction processing flow is as shown in fig. 3:
s6.1, a consensus initiating side chain A initiates a cross-link transaction c1, a cross-link is thrown by a cross-link event of which a node needs to monitor the side chain, the ordering of the cross-link transaction is ensured according to Index, and when Index new >Index last +1, indicating that there is a lost cross-chain transaction request, the Index needs to be re-requested by the routing node to the side-chain master node last +1 Cross-chain transaction message, index last Serial number, index, of the cross-chain transaction representing the last successful processing of the side chain new A sequence number representing the latest cross-chain transaction request;
s6.2, cross-Link routing node R a Submitting the cross-chain transaction c1 to the relay chain after verifying that the cross-chain transaction c1 is true;
s6.3, the relay chain performs consensus verification on whether the node signature in the cross-chain transaction c1 is correct or not and whether the corresponding cross-chain verification rule on the side chain is met or not;
s6.4, the relay chain judges whether the target chain service Sid of the cross-chain transaction c1 is in a side chain service list managed by the relay chain, if so, the relay chain passes through a routing node R of the target chain b Submitting the transaction to a destination chain B, wherein the destination chain B carries out consensus on the cross-chain transaction c1 and then executes the consensus;
s6.5, after the target chain B finishes the transaction, returning a successful receipt to the relay chain, returning the receipt of the successful transaction of c1 to the initiating chain A by the relay chain, ending the transaction, and retransmitting the message if the main node of the chain A does not receive the transaction receipt after overtime.
On the other hand, the embodiment of the invention also provides a side chain-based internet of vehicles data sharing system, which comprises: base station, road side unit and vehicle unit, wherein,
The coverage area of each base station is an Internet of vehicles domain, and the base station, the road side unit and the vehicle-mounted unit are used as nodes in the coverage area of each base station to construct an Internet of vehicles side chain of an Internet of vehicles alliance chain;
constructing a main chain of a alliance chain of the Internet of vehicles by taking all base stations positioned in different Internet of vehicles domains as nodes, wherein all base stations on the main chain are taken as main chain consensus nodes to store identity authentication information, node scores and cross-chain transaction information of on-board units and Road Side Units (RSUs) on all side chains;
based on the node scoring of the distance and the credibility, implementing the cross-chain consensus on the side chains of the Internet of vehicles, so that each side chain can finish the consensus request in parallel, and the cross-chain transaction among vehicles in each side chain of the Internet of vehicles can be finished.
Compared with the existing block chain-based internet of vehicles technology, the method and the system not only improve the data sharing efficiency of the internet of vehicles across regions, but also can improve the throughput of the block chain, reduce time delay, improve the safety of the internet of vehicles and strengthen the reliability of an internet of vehicles system.
The embodiment of the invention has the beneficial effects that:
(1) By introducing the blockchain architecture in the Internet of vehicles domains in different areas, the traceability and the non-falsifiability of communication data are realized by utilizing the decentralization advantage of the blockchain, and the safety of the Internet of vehicles system is improved;
(2) The vehicle information is synchronized in the vehicle networking in different areas by utilizing the cross-link technology, so that the vehicle can share data with the vehicle in the area without repeated registration when the vehicle runs in other areas, the vehicle in the vehicle networking can be well supported to pass through authentication and communication in different areas in high-speed movement, and the cross-domain data sharing efficiency of the vehicle networking is improved.
(3) The method has the advantages that the side chains of the Internet of vehicles alliance chains constructed by the base station are introduced in the Internet of vehicles system innovatively, all the side chains run in parallel, the problems that the throughput of authentication is low, different block chains cannot authenticate each other and the bandwidth is low in a single block chain are solved, and the throughput and the availability of the Internet of vehicles system are improved.
(4) And the distance and credibility-based consensus node selection is used for realizing rapid and efficient consensus, so that the communication time delay of the Internet of vehicles is further reduced, and the safety of the Internet of vehicles is improved.
Drawings
FIG. 1 is a system model diagram of side-chain-based Internet of vehicles data sharing in an embodiment of the invention;
FIG. 2 is a consensus flow chart of a side-chain-based Internet of vehicles data sharing method in an embodiment of the present invention;
fig. 3 is a flowchart of cross-chain data sharing in the side-chain-based internet of vehicles data sharing method according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below in connection with the following composite and specific examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1-3, in order to achieve the above object, the technical solution of the embodiment of the present invention is:
the side chain-based internet of vehicles data sharing method, wherein equipment in the internet of vehicles comprises a road side unit (RSU, roadSideUnit), a base station (BSU, baseStationUnit), a vehicle-mounted unit (OBU, onBoardUnit) and the like, and the method comprises the following specific steps:
s1: the method comprises the steps that a base station initializes an Internet of vehicles system, a road side unit and IoV equipment are used as nodes in the coverage area of each base station to construct an Internet of vehicles alliance chain side chain, the nodes in the Internet of vehicles side chain are composed of the road side unit of the area and a vehicle-mounted unit running in the Internet of vehicles domain, and only the nodes authenticated by the Internet of vehicles side chain can participate in consensus and data sharing;
dividing the Internet of vehicles domain according to the signal coverage of each base station, wherein each Internet of vehicles domain comprises an Internet of vehicles side chain and a base station, and the Internet of vehicles side chain consists of a plurality of road side units and a plurality of Internet of vehicles (IOV, internetof Vehicle) devices in the Internet of vehicles domain; the size of the Internet of vehicles domain is the coverage of the base station in the domain.
S2, constructing a main chain of a alliance chain of the Internet of vehicles by taking all base stations positioned in different Internet of vehicles domains as nodes, and taking all base stations on the main chain as main chain consensus nodes to store identity authentication information, node scores and cross-chain transaction information of on-board units and Road Side Units (RSUs) on all side chains;
the main chain is mainly and uniformly managed by the centralized management unit, so that the safety of the privacy information of the vehicle is ensured.
And S3, implementing cross-chain consensus on the side chains of the Internet of vehicles based on the credibility of the distance and the credit, so that each side chain can finish the consensus request in parallel, and independently finish the cross-chain transaction among vehicles in each Internet of vehicles.
The consensus in the side chains is done jointly by several nodes:
and the routing node is used as the routing node of each side chain by the base station, and updates the vehicle information in the side chain to the main chain so as to realize cross-domain authentication, data request and cross-chain transaction.
The master node is selected by a road side unit in the Internet of vehicles to be the master node through the credibility based on the distance and the credibility so as to submit a side chain internal consensus request and send a hash value authenticated in the side chain to the routing node;
and the consensus node is used for achieving the consensus of the transaction and maintaining the decentralized public account book of the side chain, and is formed by selecting the on-board units and the RSU in the area through the credibility based on the distance and the credit.
As shown in fig. 2, the specific steps of implementing cross-chain consensus on the side chain of the internet of vehicles based on the credibility of the distance and the credit are as follows:
s3.1, initializing all nodes, dividing the nodes into a routing node set, a main node set, a consensus node set and a candidate node set according to reputation scores, wherein,
the routing node set is used for forwarding the cross-link transaction, forming a condition for the subsequent cross-link transaction, and the base station is used as a routing node of each side chain;
the master node set SP is used for submitting a side chain internal consensus request, sending a hash value of in-chain authentication to the routing node, and forming the master node by the side chain RSU through reputation election based on distance and reputation;
the consensus node Set ConsensusNodeSet (SC) is used for achieving consensus and maintaining in-chain contents of different side chains, and a vehicle-mounted unit and an RSU in the region become consensus nodes through reputation election based on distance and reputation;
and selecting the RSU node with higher score as a node in the main node set. Wherein the master node set is contained in the consensus node set, namely SP e SC;
and the candidate node set Candida nodeSet is used for receiving the account book update information sent by the master node, but does not participate in the consensus process.
If there are N nodes in the system, the maximum number of the bayer pattern nodes is allowed to be f, and the number of the consensus nodes must satisfy CN more than or equal to 3f+1 to ensure that the system can reach an agreement in any situation, where CN is the number of the consensus nodes, the main node set is composed of RSUs in side chains, and each side chain executes its own cross-domain consensus algorithm.
S3.2, selecting a master node based on the node scores of the distance and the reputation;
the selection strategy of the master node is to select the master node according to the node scoring rank in the master node set, namely, the node with high network centrality and high credibility can be preferentially selected as the master node based on the node scoring calculation of the distance and the credibility, so that the safety and the high efficiency of the consensus process are ensured.
In order to avoid efficiency reduction caused by frequent switching of the master node, the master node is not reselected at the beginning of each consensus, but the creditworthiness of other nodes exceeds that of the current master node, or the master node overtime, the master node is selected;
s3.3, the client of the block chain service initiating request sends a transaction message to the master node, wherein the format of the transaction message is as follows<REQUEST,n,t,sig(t)>Cross-chain transaction format is<REQUEST,c,CHTP,Sig i (CHTP)>;
S3.4, when the master node receives the request from the client, the master node enters a pre-preparation stage, and broadcasts the message <PRE-PREPARE,n,v,h,t,P i ,Sig i (t)>To a consensus node, broadcast if cross-chain transaction<PRE-PREPARE,c,v,h,CHTP,Sig i (CHTP)>Where n represents this is an in-chain transaction, c represents this is a cross-chain transaction, v is pbft view number, h is block height, t is transaction summary, P i Representing master node, sig i The CHTP is a cross-chain transaction general data structure;
s3.4, when the common node receives the message to verify the message, if the common node verifies that a pre-preparation message is passed, the common node enters a preparation stage, and broadcasts the preparation message to other common nodes in the common node set SC, wherein the preparation message is in the format of<PREPARE,n,v,h,t,B i ,Sig i (t)>If the cross-link message format is<PREPARE,c,v,h,CHTP,B i ,Sig i (CHTP)>Wherein B is i Is the node that sends the prepare message;
when the consensus node receives the message to verify the message, the specific content of the verification is as follows: verifying whether the current view number is consistent with v, verifying whether the signature is correct, verifying whether the source of the message is a master node under the current view number, and after verification, enabling the consensus node to enter a preparation stage;
when the preparation message is sent from the consensus node, it will also receive the preparation messages broadcast by other consensus nodes and verify, set the number of consensus nodes in the consensus node set SC as N, if it is received If the verification is passed, the pre message from different nodes enters a submitting stage;
s3.6, if the common node enters the submitting stage, the common node sends a submitting message to the master node, wherein the format of the submitting message is as follows<COMMIT,n,v,h,t,B i ,Sig i (t)>If it is a cross-link message, it is in the form of<PREPARE,c,v,h,CHTP,B i ,Sig i (CHTP)>If the message is a cross-link message, the message is submitted to the master node and is also submitted to the routing node;
s3.7, when the master node receives the excessWhen the same submitted message is obtained, adding the transaction into a blockchain, and providing the consensus result for all nodes to perform data synchronization; if the master node times out without receiving +.>The same acknowledgement message is regarded as the failure of the round of consensus, and the master node is switched.
The whole cross-link data sharing flow uses digital signature and hash verification to ensure that data in the cross-link process is not tampered and forged.
Preferably, the primary node also updates the reputation value once at the end of each round of consensus.
Preferably, the method further comprises:
s3.8, if the routing node receives the cross-chain transaction, the routing node executes a supervisor algorithm to inquire the consensus result from all the consensus nodes, and the consensus node set is used as a supervisor to send the submitted information of the consensus to the routing node, if the submitted information exceeds the submitted information The individual nodes provide consistent commit messages, then determine that the master node provided the correct information, and if there are not enough nodes to provide consistent messages, then determine that the master node provided incorrect information, punish the master node and reselect the master node.
Preferably, the method further comprises:
and S3.9, when a new node is added in the side chain, the new node directly enters the candidate node, does not participate in consensus, but participates in data synchronization, and only the next updating is performed, the new node has the opportunity to enter the consensus group.
Furthermore, in order to realize quick and efficient consensus, the embodiment of the invention provides a reputation computing method based on distance and reputation, which preferentially selects the node with high network centrality and high reputation as a main node based on node scoring, wherein the node with lower reputation does not participate in consensus, only takes charge of receiving consensus results, gives excitation to the nodes participating in consensus, reduces reputation scoring of malicious nodes, and thus maintains a high-efficiency network. The reputation and centrality of each node are calculated by the master node at the end of each round of consensus and the node score is updated once.
According to the embodiment of the invention, the node scoring calculation based on the distance and the credibility is used, and the node scoring is used for dividing the consensus node set and the candidate node set, so that the nodes participating in the consensus are more suitable for the environment of the Internet of vehicles, the rapid and efficient consensus is realized, the throughput of the Internet of vehicles is further improved, and the safety of the Internet of vehicles is also improved.
The specific steps of the credit calculation are as follows:
s4.1 calculating availabilityWherein Avg is the average value of the corresponding scores of the previous round, U i Normalized to [0,1]A value in between; normalization formula is +.>
Where α+β+γ=1, and α, β, γ∈ (0, 1), ui is normalized to a value between [0,1], i.e., α, β, γ∈ (0, 1);
alpha, beta, gamma can be dynamically set according to side chain conditions managed by each base station, alpha represents importance weight for intra-chain transaction throughput, beta represents importance weight for intra-chain node distance, and gamma represents importance weight for intra-chain transaction delay.
In an actual Internet of vehicles environment, dynamic weight distribution is carried out on influence factors of preselected indexes according to the importance of throughput, node distance and time delay. If the internet of vehicles network is very dense, high computational power and enough communication resources must be guaranteed to perform consensus tasks, throughput and latency are very important, and the weights of γ and α should be greater than β. If the number of nodes where the master node is located is very sparse, a larger beta value should be set to avoid the master node being placed at the edge of the Internet of vehicles domain.
S4.2, calculating the credibility Cre, wherein the credibility represents whether the node changes the client message; initializing the reliability to 1, subtracting 0.1 from the reliability whenever a node sends an erroneous summary, and once this index reaches a threshold (e.g., 0), the node is added to the malicious node set and can no longer participate in consensus;
S4.3, calculating reputation score R i =Cre i *θ(U i );
Setting 3 thresholds theta from small to large 1 ,θ 2 ,θ 3 The credibility is divided into 4 credit grades, the specific value of 3 thresholds can be divided according to the actual safety requirement of the side chain of the internet of vehicles,
when R is i Belonging to [0, theta ] 1 ]When the reputation level is an invalid node set, the participation in the consensus algorithm is not allowed, and the information is not received;
when R is i Belonging to [ theta ] 12 ]When the reputation level is the candidate node set, account book update information sent by the main node can be received, but the account book update information does not participate in the consensus process;
when R is i Belonging to [ theta ] 23 ]When the reputation level is a consensus node set, a consensus algorithm can be executed as a consensus node;
when R is i Belonging to [ theta ] 3 ,1]When the reputation level is the main node set, the common node can be used as the common node to execute the common algorithm and compete for the main node.
Preferably, the method further comprises:
s4.4, when each round of consensus is finished, the master node performs rewarding distribution on nodes in the consensus node set according to the credit score,
calculation of prize allocation weights:
assuming that K consensus nodes currently participate in consensus, the reputation score of each consensus node is R i I=1, 2, …, K; the reward of each consensus node is respectively distributed with weight Q i I=1, 2, …, the rewards obtained by each account are distributed evenly according to the ratio of the credit value of the node to the sum of the credit values of all nodes, and the calculation formula is as follows:
wherein ,the sum of reputation scores for all consensus nodes. For example, when the ratio of the selected prize distribution weights of the consensus nodes Q1, Q2, Q3 and Q4 is 5:3:1:1, the consensus prize is 10 tokens, and the prizes respectively obtained by Q1, Q2, Q3 and Q4 are 5 tokens, 3 tokens, 1 token and 1 token, respectively. How much a specific consensus rewards is can be defined by the network administrator according to the actual situation.
Preferably, the embodiment of the present invention further provides computing power, communication power and centrality computation of the node, where the computing power, the communication power and the centrality computation are as follows:
calculating a transaction processing number Cou that can be executed by the node in a unit time, wherein the transaction processing number is used for representing the calculation capability of the node for verifying data in a consensus algorithm;
calculating communication time delay Te, wherein the communication time delay is used for representing communication capacity of the nodes participating in consensus;
the communication delay also reflects the data transmission rate and the communication range of the node in unit time, and the main node is generally considered to have the capability of effectively communicating with all the consensus nodes of the area;
calculating node centrality Po: wherein />Representing the distance from the node to other nodes, the closer the distance is, the higher the Po is;
for a node to be closer to other nodes, its centrality is higher, and a point with high centrality indicates that it is also centered in the network, the centered node can improve communication efficiency and stability.
Preferably, the method further comprises:
s5: when a vehicle-mounted unit which is not connected with the network enters an area A of a certain side chain, the vehicle-mounted unit needs to apply for registration to the side chain of the vehicle network to which the area A belongs, after receiving a registration request, a node which is closest to the side chain in the side chain inquires the identity authentication information of the vehicle from the main chain, whether the vehicle-mounted unit is registered in the alliance chain is judged, if the vehicle-mounted unit is not registered, binding the identity information of the vehicle is executed, the vehicle is registered in a vehicle network system, the identity information is generated, and then a consensus contract is executed to store the vehicle information on the alliance block chain; if the vehicle information is queried in the main chain, registering the vehicle as a candidate node of the side chain, carrying out consensus with other vehicles in the side chain, and calling service in the side chain; the area A is an area covered by the same Internet of vehicles base station, and road side units, base stations and vehicle-mounted units in the area A form a alliance chain side chain;
preferably, the method comprises the steps of,
s6: in order to support the trusted verification and reliable transfer of transactions between various side chains, the embodiment of the invention realizes a relay chain-based cross-chain transmission protocol CHTP (Cross-Blockch ainTransferProtocol), the CHTP data structure normalizes the main data fields of a set of cross-chain messages based on generality and flexibility, and the data structure is that <From,To,S id ,Index,Tim eout,Version,Timestamp,Signature content ,Confirm>
Wherein the From and To fields represent unique ID identifications of a source vehicle in the source chain and a target vehicle in the destination chain, respectively, the ID identifications being generated by the relay chain when the side chains are registered with the relay chain;
index represents a cross-chain transaction serial number generated by dynamically incrementing a side-chain cross-chain contract one by one, for specifying a unique cross-chain transaction Index;
timestamp represents a Timestamp;
signature represents the private key Signature of the transaction initiating node, and the relay chain stores the public key pairs of all nodes;
version is the Version number of CHTP protocol, which is convenient for later upgrade and Version control;
content is transaction specific Content;
confirms is a confirmation identifier that represents whether the transaction was successful.
The base station can be used as a relay chain node and a cross-link slave node, and the cross-link transaction processing flow is as shown in fig. 3:
s6.1, a consensus initiating side chain A initiates a cross-link transaction c1, a cross-link is thrown by a cross-link event of which a node needs to monitor the side chain, the ordering of the cross-link transaction is ensured according to Index, and when Index new >Index last +1, indicating that there is a lost cross-chain transaction request, the Index needs to be re-requested by the routing node to the side-chain master node last +1 Cross-chain transaction message, index last Serial number, index, of the cross-chain transaction representing the last successful processing of the side chain new A sequence number representing the latest cross-chain transaction request;
s6.2, cross-Link routing node R a Submitting the cross-chain transaction c1 to the relay chain after verifying that the cross-chain transaction c1 is true;
s6.3, the relay chain performs consensus verification on whether the node signature in the cross-chain transaction c1 is correct or not and whether the corresponding cross-chain verification rule on the side chain is met or not;
s6.4, the relay chain judges whether the target chain service Sid of the cross-chain transaction c1 is in a side chain service list managed by the relay chain, if so, the relay chain passes through a routing node R of the target chain b Submitting the transaction to a destination chain B, wherein the destination chain B carries out consensus on the cross-chain transaction c1 and then executes the consensus;
s6.5, after the target chain B finishes the transaction, returning a successful receipt to the relay chain, returning the receipt of the successful transaction of c1 to the initiating chain A by the relay chain, ending the transaction, and retransmitting the message if the main node of the chain A does not receive the transaction receipt after overtime.
On the other hand, as shown in fig. 1, the embodiment of the invention further provides a side-chain-based internet of vehicles data sharing system, which comprises: base station, road side unit and vehicle unit, wherein,
the coverage area of each base station is an Internet of vehicles domain, and the base station, the road side unit and the vehicle-mounted unit are used as nodes in the coverage area of each base station to construct an Internet of vehicles side chain of an Internet of vehicles alliance chain;
Constructing a main chain of a alliance chain of the Internet of vehicles by taking all base stations positioned in different Internet of vehicles domains as nodes, wherein all base stations on the main chain are taken as main chain consensus nodes to store identity authentication information, node scores and cross-chain transaction information of on-board units and Road Side Units (RSUs) on all side chains;
based on the node scoring of the distance and the credibility, implementing the cross-chain consensus on the side chains of the Internet of vehicles, so that each side chain can finish the consensus request in parallel, and the cross-chain transaction among vehicles in each side chain of the Internet of vehicles can be finished.
Compared with the existing block chain-based internet of vehicles technology, the method and the system not only improve the data sharing efficiency of the internet of vehicles across regions, but also can improve the throughput of the block chain, reduce time delay, improve the safety of the internet of vehicles and strengthen the reliability of an internet of vehicles system.
The embodiment of the invention has the beneficial effects that:
(1) By introducing the blockchain architecture in the Internet of vehicles domains in different areas, the traceability and the non-falsifiability of communication data are realized by utilizing the decentralization advantage of the blockchain, and the safety of the Internet of vehicles system is improved;
(2) The vehicle information is synchronized in the vehicle networking in different areas by utilizing the cross-link technology, so that the vehicle can share data with the vehicle in the area without repeated registration when the vehicle runs in other areas, the vehicle in the vehicle networking can be well supported to pass through authentication and communication in different areas in high-speed movement, and the cross-domain data sharing efficiency of the vehicle networking is improved.
(3) The method has the advantages that the side chains of the Internet of vehicles alliance chains constructed by the base station are introduced in the Internet of vehicles system innovatively, all the side chains run in parallel, the problems that the throughput of authentication is low, different block chains cannot authenticate each other and the bandwidth is low in a single block chain are solved, and the throughput and the availability of the Internet of vehicles system are improved.
(4) And the distance and credibility-based consensus node selection is used for realizing rapid and efficient consensus, so that the communication time delay of the Internet of vehicles is further reduced, and the safety of the Internet of vehicles is improved.
The side chain routing nodes are the base stations for managing the side chains, the routing nodes with different side chains are arranged on the main chain, when a call request from the side chains is received, the final destination of the request is determined through a call target field in a request packet, then the corresponding routing nodes are selected to complete the forwarding of the request, and finally one-time cross-chain call is completed.
While the present invention has been described in detail with reference to the drawings, the present invention is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present invention within the knowledge of those skilled in the art.

Claims (10)

1. The side chain-based internet of vehicles data sharing method is characterized by comprising the following steps of:
S1: initializing an Internet of vehicles system, wherein the coverage area of each base station is an Internet of vehicles domain, and an Internet of vehicles side chain of an Internet of vehicles alliance chain is built by taking a base station, a road side unit and an on-board unit as nodes in the coverage area of each base station;
s2, constructing a main chain of a alliance chain of the Internet of vehicles by taking all base stations positioned in different Internet of vehicles domains as nodes, and taking all base stations on the main chain as main chain consensus nodes to store identity authentication information, node scores and cross-chain transaction information of on-board units and Road Side Units (RSUs) on all side chains;
and S3, based on the node scores of the distance and the credibility, implementing cross-chain consensus on the side chains of the Internet of vehicles, so that each side chain can finish the consensus request in parallel, and the cross-chain transaction among vehicles in each side chain of the Internet of vehicles can be finished.
2. The side-chain-based internet of vehicles data sharing method of claim 1, wherein the node implementing cross-chain consensus on the side-chain of the internet of vehicles specifically comprises:
the routing node is used as the routing node of each side chain by the base station, and the vehicle information in the side chain is updated to the main chain so as to realize cross-domain authentication, data request and cross-chain transaction;
the master node is formed by a road side unit RSU in the Internet of vehicles through a node with highest scoring and electing score based on the distance and the credibility, so as to submit a side chain internal consensus request and send a hash value authenticated in the side chain to the routing node;
And the consensus node is used for achieving the consensus of the transaction and maintaining a decentralised public account book of a side chain to which the consensus node belongs, and the consensus node obtains a consensus node set by all vehicle-mounted units and Road Side Units (RSUs) in the area through nodes with higher scoring scores based on the distance and the credibility.
3. The side-chain-based internet of vehicles data sharing method of claim 2, wherein the specific steps of implementing cross-chain consensus on the side-chain of the internet of vehicles are as follows:
s3.1, initializing all nodes, and dividing the nodes into a routing node set, a main node set and a consensus node set according to node scores;
s3.2, selecting a main node based on the node score of the distance and the credibility;
s3.3. zoneThe client of the block chain service initiation request sends a transaction message to the master node, wherein the format of the transaction message is as follows<REQUEST,n,t,sig(t)>Cross-chain transaction format is<REQUEST,c,CHTP,Sig i (CHTP)>;
S3.4, when the master node receives the request from the client, the master node enters a pre-preparation stage, and broadcasts the message<PRE-PREPARE,n,v,h,t,P i ,Sig i (t)>To a consensus node, broadcast if cross-chain transaction<PRE-PREPARE,c,v,h,CHTP,Sig i (CHTP)>Where n represents this is an in-chain transaction, c represents this is a cross-chain transaction, v is pbft view number, h is block height, t is transaction summary, P i Representing master node, sig i The CHTP is a cross-chain transaction general data structure;
s3.4, when the common node receives the message to verify the message, if the common node verifies that a pre-preparation message is passed, the common node enters a preparation stage, and broadcasts the preparation message to other common nodes in the common node set SC, wherein the preparation message is in the format of<PREPARE,n,v,h,t,B i ,Sig i (t)>If the cross-link message format is<PREPARE,c,v,h,CHTP,B i ,Sig i (CHTP)>Wherein B is i Is the node that sends the prepare message;
s3.6, if the common node enters the submitting stage, the common node sends a submitting message to the master node, wherein the format of the submitting message is as follows<COMMIT,n,v,h,t,B i ,Sig i (t)>If it is a cross-link message, it is in the form of<PREPARE,c,v,h,CHTP,B i ,Sig i (CHTP)>If the message is a cross-link message, the message is submitted to the master node and is also submitted to the routing node;
s3.7, when the master node receives the excessWhen the same submitted message is obtained, adding the transaction into a blockchain, and providing the consensus result for all nodes to perform data synchronization; if the master node times out without receiving +.>The same acknowledgement message is regarded as the failure of the round of consensus, and the master node is switched.
4. The side-chain based internet of vehicles data sharing method of claim 3, wherein the method further comprises:
S3.8, if the routing node receives the cross-chain transaction, the routing node executes a supervisor algorithm to inquire the consensus result from all the consensus nodes, and the consensus node set is used as a supervisor to send the submitted information of the consensus to the routing node, if the submitted information exceeds the submitted informationThe individual nodes provide consistent commit messages, then determine that the master node provided the correct information, and if there are not enough nodes to provide consistent messages, then determine that the master node provided incorrect information, punish the master node and reselect the master node.
5. The side-chain based internet of vehicles data sharing method of claim 4, further comprising:
and S3.9, when a new node is added in the side chain, the new node directly enters the candidate node, does not participate in consensus, but participates in data synchronization, and only the next updating is performed, the new node has the opportunity to enter the consensus group.
6. The side-chain-based internet of vehicles data sharing method of claim 2, wherein the node score calculation based on the credibility comprises the following specific steps:
s4.1, calculating availabilityWherein Avg is the average value of the corresponding scores of the previous round, U i Normalized to [0,1]A value in between; normalization formula is +.>
Wherein α+β+γ=1, and α, β, γ∈ (0, 1), ui is normalized to a value between [0,1], i.e., α, β, γ∈ (0, 1);
S4.2, calculating the credibility Cre, wherein the credibility represents whether the node changes the client message;
s4.3, calculating a reputation score R i =Cre i *θ(U i );
Setting 3 thresholds theta from small to large 1 ,θ 2 ,θ 3 The creditworthiness is divided into 4 credit grades, the specific value of 3 thresholds is divided according to the safety requirement of the side chain of the internet of vehicles,
when R is i Belonging to [0, theta ] 1 ]When the reputation level is an invalid node set, the reputation level does not participate in a consensus algorithm or receive information;
when R is i Belonging to [ theta ] 1 ,θ 2 ]When the reputation level is the candidate node set, account book update information sent by the main node is received, but the account book update information does not participate in the consensus process;
when R is i Belonging to [ theta ] 2 ,θ 3 ]When the reputation level is the consensus node set, executing a consensus algorithm as a consensus node;
when R is i Belonging to [ theta ] 3 ,1]And when the reputation level is the main node set, executing a consensus algorithm as a consensus node and competing for the main node.
7. The side-chain based internet of vehicles data sharing method of claim 6, further comprising:
s4.4, when each round of consensus is finished, the main node carries out rewarding distribution on nodes in the consensus node set according to the credit score, and the method specifically comprises the following steps:
calculation of prize allocation weights:
assuming that K consensus nodes currently participate in consensus, the reputation score of each consensus node is R i I=1, 2, …, K; the reward of each consensus node is respectively distributed with weight Q i I=1, 2, …, the rewards earned by each account are based on the reputation value of the node and all knotsThe average distribution of the ratio of the sum of the credit values of the points is calculated by the following formula:
wherein ,the sum of reputation scores for all consensus nodes.
8. The side-chain-based internet of vehicles data sharing method according to claim 1, wherein inter-vehicle cross-chain transactions in each side-chain of the internet of vehicles are transmitted based on a relay-chain cross-chain transmission protocol CHTP, and the CHTP data structure is<From,To,S id ,Index,Timeout,Version,Timestamp,Signature content ,Confirm>
Wherein the From and To fields represent unique ID identifications of the source vehicle in the source side chain and the target vehicle in the destination side chain, respectively, the ID identifications being generated by the relay chain when the side chain is registered with the relay chain;
index represents a cross-chain transaction serial number generated by dynamically incrementing a side-chain cross-chain contract one by one, for specifying a unique cross-chain transaction Index;
timestamp represents a Timestamp;
signature represents the private key Signature of the transaction initiating node, and the relay chain stores the public key pairs of all nodes;
version is the Version number of CHTP protocol, which is convenient for later upgrade and Version control;
content is transaction specific Content;
Confirms is a confirmation identifier that represents whether the transaction was successful.
9. The side-chain based internet of vehicles data sharing method of claim 8, wherein the inter-vehicle cross-chain transactions in each of the side-chain of internet of vehicles specifically comprise:
s6.1, consensus initiationSide chain A initiates a cross-link transaction c1, the cross-link is thrown by a node monitoring the cross-link event of the side chain, and the transaction is regarded as Index new >Index last +1, indicating that there is a loss of cross-link transaction request, requesting Index from the cross-link slave node back to the side-chain master node last +1 Cross-chain transaction message, where Index last Serial number, index, of the cross-chain transaction representing the last successful processing of the side chain new A sequence number representing the latest cross-link transaction request, wherein the base station is used as a cross-link routing node;
s6.2, cross-Link routing node R a Submitting the cross-chain transaction c1 to the relay chain after verifying that the cross-chain transaction c1 is true;
s6.3, the relay chain performs consensus verification on whether the node signature in the cross-chain transaction c1 is correct or not and whether the corresponding cross-chain verification rule on the side chain is met or not, and if the verification is not passed, a failed receipt is returned to the initiating chain;
s6.4, the relay chain judges whether the target chain service Sid of the cross-chain transaction c1 is in a side chain service list managed by the relay chain, if so, the relay chain passes through a routing node R of the target chain b Submitting the transaction to a destination chain B, wherein the destination chain B carries out consensus on the cross-chain transaction c1 and then executes the consensus;
s6.5, after the target chain B finishes the transaction, returning a successful receipt to the relay chain, returning the receipt of the successful transaction of c1 to the initiating chain A by the relay chain, ending the transaction, and retransmitting the message if the main node of the chain A does not receive the transaction receipt after overtime.
10. A side-chain based internet of vehicles data sharing system, the system comprising: base station, road side unit and vehicle unit, wherein,
the coverage area of each base station is an Internet of vehicles domain, and the base station, the road side unit and the vehicle-mounted unit are used as nodes in the coverage area of each base station to construct an Internet of vehicles side chain of an Internet of vehicles alliance chain;
constructing a main chain of a alliance chain of the Internet of vehicles by taking all base stations positioned in different Internet of vehicles domains as nodes, wherein all base stations on the main chain are taken as main chain consensus nodes to store identity authentication information, node scores and cross-chain transaction information of on-board units and Road Side Units (RSUs) on all side chains;
based on the node scoring of the distance and the credibility, implementing the cross-chain consensus on the side chains of the Internet of vehicles, so that each side chain can finish the consensus request in parallel, and the cross-chain transaction among vehicles in each side chain of the Internet of vehicles can be finished.
CN202310673988.7A 2023-06-07 2023-06-07 Side chain-based internet of vehicles data sharing method and system Active CN116668987B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310673988.7A CN116668987B (en) 2023-06-07 2023-06-07 Side chain-based internet of vehicles data sharing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310673988.7A CN116668987B (en) 2023-06-07 2023-06-07 Side chain-based internet of vehicles data sharing method and system

Publications (2)

Publication Number Publication Date
CN116668987A true CN116668987A (en) 2023-08-29
CN116668987B CN116668987B (en) 2024-02-02

Family

ID=87725855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310673988.7A Active CN116668987B (en) 2023-06-07 2023-06-07 Side chain-based internet of vehicles data sharing method and system

Country Status (1)

Country Link
CN (1) CN116668987B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117527834A (en) * 2024-01-04 2024-02-06 成都理工大学 Improved PBFT consensus method based on reputation scoring mechanism

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110648134A (en) * 2019-08-27 2020-01-03 广东工业大学 System and method for sharing short-distance data of Internet of vehicles users based on block chain
CN110784346A (en) * 2019-10-18 2020-02-11 深圳供电局有限公司 Reputation value-based PBFT consensus system and method
CN112153608A (en) * 2020-09-24 2020-12-29 南通大学 Vehicle networking cross-domain authentication method based on side chain technology trust model
CN114663091A (en) * 2022-03-25 2022-06-24 上海电力大学 Power transaction method based on multi-chain block chain architecture
CN114980023A (en) * 2022-06-02 2022-08-30 昆明理工大学 Internet of vehicles data sharing method based on cross-chain technology
CN115378604A (en) * 2022-08-11 2022-11-22 重庆邮电大学 Identity authentication method of edge computing terminal equipment based on credit value mechanism
CN116055579A (en) * 2022-11-25 2023-05-02 上海交通大学 Multi-alliance chain crossing method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110648134A (en) * 2019-08-27 2020-01-03 广东工业大学 System and method for sharing short-distance data of Internet of vehicles users based on block chain
CN110784346A (en) * 2019-10-18 2020-02-11 深圳供电局有限公司 Reputation value-based PBFT consensus system and method
CN112153608A (en) * 2020-09-24 2020-12-29 南通大学 Vehicle networking cross-domain authentication method based on side chain technology trust model
CN114663091A (en) * 2022-03-25 2022-06-24 上海电力大学 Power transaction method based on multi-chain block chain architecture
CN114980023A (en) * 2022-06-02 2022-08-30 昆明理工大学 Internet of vehicles data sharing method based on cross-chain technology
CN115378604A (en) * 2022-08-11 2022-11-22 重庆邮电大学 Identity authentication method of edge computing terminal equipment based on credit value mechanism
CN116055579A (en) * 2022-11-25 2023-05-02 上海交通大学 Multi-alliance chain crossing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
冶英杰: "面向联盟链的通用跨链技术研究与实现", CNKI, pages 1 - 50 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117527834A (en) * 2024-01-04 2024-02-06 成都理工大学 Improved PBFT consensus method based on reputation scoring mechanism
CN117527834B (en) * 2024-01-04 2024-03-26 成都理工大学 Improved PBFT consensus method based on reputation scoring mechanism

Also Published As

Publication number Publication date
CN116668987B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
CN111601258B (en) Vehicle networking node data safety communication method based on block chain
Wang et al. Challenges and solutions in autonomous driving: A blockchain approach
CN109816995B (en) Intelligent traffic signal lamp safety dynamic regulation and control method based on alliance block chain technology
CN109547527B (en) Partition quick consensus method based on credit mechanism in block chain
CN107580048B (en) VANETs position privacy protection system and method based on virtual Mix-zone
CN109447795B (en) Byzantine consensus method supporting rapid achievement of final confirmation
CN111262860B (en) Identity authentication method and device in cross-link mode
CN116668987B (en) Side chain-based internet of vehicles data sharing method and system
CN104702418B (en) A kind of vehicle identity authentication method for dividing equally RSU calculation amounts
CN107634837A (en) The efficient message authentication method of car networking based on edge calculations
CN106572088B (en) A kind of vehicular ad hoc network assumed name transform method based on Virtual User
Chaurasia et al. Trust computation in VANETs
JP2012503915A (en) Distributing authentication functions within mobile networks
CN111582843A (en) Block chain privacy transaction method based on aggregated signature
CN109688111A (en) A kind of vehicle identification Verification System and method adapting to V2X communication
CN113422805A (en) Fragment consensus method based on verifiable random function
CN115499129A (en) Multimode trust cross-chain consensus method, system, medium, equipment and terminal
CN112672321B (en) Relay vehicle selection method and device
CN108833074A (en) The Verification System and method of vehicle self-organizing network based on homomorphic cryptography
KR102418647B1 (en) Method for sharing traffic information in autonomous driving
CN114912137A (en) Vehicle reputation determination method and device based on vehicle running state information
CN114553472B (en) Authentication method, authentication device, electronic equipment and storage medium
Vieira et al. Safeguarding Cooperative Maneuver Information with Practical Byzantine Fault Tolerance
Ahn et al. Secure Vehicle Communications Using Proof-of-Nonce Blockchain
Molina-Gil et al. Reputation lists and groups to promote cooperation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant