A traffic data resource sharing method and system based on blockchain technology
Through blockchain technology and hybrid consensus mechanism, combined with searchable proxy re-encryption technology, the problem of poor data privacy protection and traceability in traditional traffic data resource sharing is solved, and the security guarantee and efficient query of data sharing is realized, ensuring data transparency and immutability.
Patent Information
- Application Number
- CN202111493094.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-08
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2041-12-08
AI Technical Summary
During the traditional transportation data resource sharing process, data privacy protection is weak, data traceability is poor, business coordination is poor, and security guarantees are lacking in data transmission.
Adopt blockchain technology to ensure data security through encryption and hybrid consensus mechanisms, use the consensus mechanism combined with alliance blockchain and DPoS and DNBFT for data management, realize data immutability and transparency, and use searchable proxy to re-interpret the data. Encryption technology performs data sharing and query.
In the traffic data resource sharing scenario, data sharing is securely guaranteed, data transparency and immutability are ensured, data user access efficiency is improved, and data plaintext privacy is protected.
Smart Images

Figure CN114205136B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a traffic data resource sharing method and system based on blockchain technology. Background Art
[0002] The core content of transportation informatization construction is to share information resources, take business data as the core, build databases, and effectively develop and apply related systems, including the transmission, exchange and sharing of data resources.
[0003] There is a contradiction between data security and sharing in the traditional traffic data resource sharing process. In the process of sharing traffic data resources, data privacy protection is weak, data traceability is poor, and business collaboration is poor. There is no way to ensure the security of data transmission.
[0004] As a popular technology, blockchain technology is becoming the forefront of global technology applications, involving many fields such as digital finance, supply chain management, Internet of Things, smart manufacturing and public services. Blockchain technology uses a block chain data structure to store and verify data, uses a distributed node consensus algorithm to generate trusted data and update it in real time, uses cryptography to provide security for data transmission and access, and can use automated script code to form smart contracts for programming and data operations. It is a new distributed infrastructure and technology paradigm.
[0005] Furthermore, as a reliable, secure and increasingly mature distributed ledger database, blockchain is different from the central ledger in that it performs "distributed accounting" through the unique ledgers of all users. In this case, the complete ledger will be owned by every participant, so that no individual can tamper with, terminate or reverse it. Anyone who wants to transfer money must inform all participants to ensure complete transparency.
[0006] Many studies have shown that the application of blockchain technology to data sharing in a cloud environment has a theoretical basis and actual project development cases. Therefore, in response to a series of problems existing in the above-mentioned traditional traffic data resource sharing model, such as data privacy protection, data traceability, business collaboration, cross-institutional trust, and traffic data sovereignty, it is of great significance to use blockchain technology to achieve the sharing of traffic data resources and build a traffic data resource sharing blockchain model that abandons a centralized unified data center, has transaction traceability, and prevents data tampering. Summary of the invention
[0007] In response to the above problems, the present invention provides a traffic data resource sharing method and system based on blockchain technology. In the traffic data resource sharing scenario, by combining blockchain technology, the security of traffic data resource sharing is enhanced, thereby achieving security protection for data sharing.
[0008] To achieve the above objectives, the present invention provides a traffic data resource sharing method based on blockchain technology, comprising:
[0009] The access requester requests relevant data resources from the traffic data collector and provider in the blockchain network;
[0010] Traffic data collectors and providers encrypt relevant data resources and send ciphertext and keys to the data management alliance node group;
[0011] The data management alliance node group reaches a consensus on the ciphertext through a hybrid consensus mechanism and broadcasts the ciphertext to the blockchain network;
[0012] After the data management alliance node group verifies the request and the integrity of the ciphertext, it uploads the ciphertext to the blockchain for storage;
[0013] The access requester obtains the key and accesses the ciphertext through the blockchain network to obtain relevant data resources.
[0014] As a further improvement of the present invention, the blockchain network adopts a consortium blockchain, and a hybrid consensus mechanism is used in the consortium blockchain to select multiple consortium nodes to form a data management consortium node group.
[0015] As a further improvement of the present invention, the traffic data collector and provider encrypts the relevant data resources, including:
[0016] Use one-to-many attribute-based encryption or re-encrypt the ciphertext using an attribute proxy for the access requester.
[0017] As a further improvement of the present invention, the data management alliance node group reaches a consensus on the ciphertext through a hybrid consensus mechanism and broadcasts the ciphertext to the blockchain network; including:
[0018] If the ciphertext is a proxy re-encrypted ciphertext for the access requester, the accounting node in the data management alliance node group will first proxy re-encrypt the ciphertext, and the data management alliance node group will then reach a consensus on the ciphertext, and finally the accounting node will broadcast the ciphertext;
[0019] If the ciphertext is a one-to-many attribute-based encrypted ciphertext, the data management alliance node group will first reach a consensus on the ciphertext, and then the accounting node will broadcast the ciphertext.
[0020] As a further improvement of the present invention, attribute proxy re-encryption includes:
[0021] Initialize the relevant data resources to generate key pairs;
[0022] Generate a re-encryption key based on the key pair;
[0023] Use the key to encrypt and re-encrypt the ciphertext, generate an index, record keyword-related information, and generate a search token.
[0024] As a further improvement of the present invention, the hybrid consensus mechanism adopts a consensus mechanism combining DPoS and DNBFT. DPoS classifies alliance nodes so that each node performs its own duties; DNBFT improves the fault tolerance in the system.
[0025] As a further improvement of the present invention, DPoS classifies alliance nodes into different levels, including:
[0026] The alliance nodes are divided into ordinary participating nodes, verification nodes and representative nodes;
[0027] Common participating nodes include traffic data collectors and providers, access requesters, and managers. Managers are responsible for monitoring and operating the data and sharing process;
[0028] Verification nodes verify the integrity and validity of data;
[0029] The representative node broadcasts the data information and stores the data in the blockchain.
[0030] As a further improvement of the present invention, the data management alliance node group verifies and authenticates new alliance nodes that apply to join the blockchain network through a hybrid consensus mechanism, and only those who pass the verification can join the blockchain network;
[0031] The data management alliance node group discovers malicious nodes in the blockchain network through a hybrid consensus mechanism, removes the malicious nodes from the blockchain network through a hybrid consensus mechanism, and maintains the stability of the blockchain network through an improved Byzantine fault-tolerant algorithm.
[0032] As a further improvement of the present invention, the access requester obtains the key and accesses the ciphertext through the blockchain network to obtain relevant data resources; including:
[0033] The blockchain network obtains the ciphertext and sends feedback information to the access requester;
[0034] The access requester accesses the ciphertext according to the ciphertext address and key in the feedback information and obtains relevant data resources.
[0035] The present invention also provides a traffic data resource sharing system based on blockchain technology, including: an application layer, a blockchain service provider layer, a network layer and a data layer are set corresponding to the infrastructure of the blockchain, the blockchain service provider layer is provided with an access control mechanism module, a hybrid consensus mechanism module and a smart contract module, and the network layer includes all alliance nodes;
[0036] Application layer, used for:
[0037] Software information for configuring the blockchain network;
[0038] Add system management contracts and API libraries based on conventional communication protocols and transmission protocols;
[0039] Access control mechanism module, used to:
[0040] When an access requester requests relevant data resources from traffic data collectors and providers in the blockchain network, verify the data access rights of the access requester;
[0041] Hybrid consensus mechanism for:
[0042] Classify alliance nodes;
[0043] Elect data management alliance node group in alliance nodes;
[0044] Verifying and authenticating the new node;
[0045] Eliminate malicious nodes;
[0046] Smart contract module for:
[0047] Verify and authenticate blockchain data;
[0048] The network layer is used to:
[0049] Each alliance node initiates traffic data resource requests, execution requests, and verification requests;
[0050] Data layer, used for:
[0051] Through chain storage structure, data storage structure, Merkle tree, timestamp, hash algorithm and asymmetric encryption technology, the blockchain network is provided with tamper-proof, traceable and highly secure data storage.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] In the scenario of sharing traffic data resources, by combining blockchain technology, the sharing of traffic data resources can ensure stronger security, transparency of data interaction and non-tamperability, thus achieving security protection for data sharing.
[0054] The hybrid consensus mechanism that combines DPoS and DNBFT, on the one hand, realizes the grading of traffic nodes, so that each performs its duties and maintains the safe operation of the system, while providing fault tolerance and being able to expel malicious nodes through voting and add new nodes.
[0055] Attribute-based keyword-searchable re-encryption methods enable data sharing, tracking, and quick retrieval by users.
[0056] The blockchain sharing solution with searchable proxy re-encryption can effectively solve the problems of data privacy leakage and fast query in traditional blockchain, and can more specifically adapt to the sharing of traffic information resources with large data volumes and frequent interactions. Proxy re-encryption technology can realize data sharing between data owners and multiple data users. Secondly, through the inverted index structure constructed by searchable symmetric encryption, the binary search algorithm can use keyword search tokens to quickly query the keywords of the data, which improves the access efficiency of data users while also protecting the privacy of the data plaintext. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A flow chart of a traffic data resource sharing method based on blockchain technology disclosed in an embodiment of the present invention;
[0058] Figure 2 A schematic diagram of a traffic data resource sharing system based on blockchain technology disclosed in an embodiment of the present invention;
[0059] Figure 3 A diagram showing a traffic data resource sharing process based on blockchain technology disclosed in an embodiment of the present invention;
[0060] Figure 4 A detailed flow chart of a traffic data resource sharing process based on blockchain technology disclosed in an embodiment of the present invention;
[0061] Figure 5 A schematic diagram of a blockchain chain structure in a blockchain network disclosed in an embodiment of the present invention;
[0062] Figure 6 A schematic diagram of a Merkle tree structure for storing traffic data disclosed in an embodiment of the present invention;
[0063] Figure 7 A schematic diagram of an Order block and a traffic information transaction sheet disclosed in an embodiment of the present invention;
[0064] Figure 8 A schematic diagram of a data storage architecture of a traffic data resource sharing system based on blockchain technology disclosed in an embodiment of the present invention;
[0065] Fig. 9This is a schematic diagram of the architecture of a traffic data resource sharing system based on blockchain technology disclosed in an embodiment of the present invention;
[0066] Fig.10 A schematic diagram of a blockchain model of a traffic information resource data privacy protection system based on searchable proxy re-encryption disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0068] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0069] like Figure 1 , 3 As shown in , 4, and 9, the present invention provides a traffic data resource sharing method based on blockchain technology, which mainly involves an access requester, a traffic data collector and provider (information owner), a data management alliance node group (traffic agency alliance service group), a blockchain network, and a blockchain chain storage structure. The process includes:
[0070] S1. The access requester requests relevant data resources from the traffic data collector and provider (information owner) in the blockchain network;
[0071] in,
[0072] Access requesters include a range of units or departments that need to use traffic information;
[0073] The collectors and providers of traffic data include transportation departments and agencies;
[0074] The blockchain network adopts a consortium blockchain, in which a hybrid consensus mechanism is used to select multiple consortium nodes to form a data management consortium node group.
[0075] S2. Traffic data collectors and providers encrypt relevant data resources and send ciphertext and keys to the data management alliance node group;
[0076] in,
[0077] Traffic data collectors and providers encrypt data and can customize attribute-based access sharing structures, namely access policies, to achieve fine-grained access control. Based on the CP-ABE (ciphertext policy attribute based encryption) access control mechanism and proxy re-addition technology, users can achieve one-to-many or one-to-one access sharing, which improves the flexibility of access control; if users want to access shared data, they must use the personalized access control policy specified by the information owner. After obtaining the corresponding permissions, they can obtain the key and obtain the encrypted file, which improves the security of access control.
[0078] Therefore, one-to-many attribute-based encryption of ciphertext or re-encryption of ciphertext using attribute proxy for access requester can be adopted;
[0079] Attribute proxy re-encryption includes: initializing the key pair for relevant data resources; generating a re-encryption key based on the key pair; using the key to encrypt and re-encrypt the ciphertext, generate an index, record keyword-related information, and generate a search token.
[0080] S3, the data management alliance node group reaches a consensus on the ciphertext through a hybrid consensus mechanism and broadcasts the ciphertext to the blockchain network;
[0081] in,
[0082] If the ciphertext is a proxy re-encrypted ciphertext for the access requester, the accounting node in the data management alliance node group will first proxy re-encrypt the ciphertext, and the data management alliance node group will then reach a consensus on the ciphertext, and finally the accounting node will broadcast the ciphertext;
[0083] If the ciphertext is a one-to-many attribute-based encrypted ciphertext, the data management alliance node group will first reach a consensus on the ciphertext, and then the accounting node will broadcast the ciphertext.
[0084] That is, the hybrid consensus mechanism uses the data management alliance node group to reach a consensus on the verification and storage of the data sharing process, avoiding the management model involving third-party institutions; the traffic blockchain access control mechanism mainly uses attribute encryption to ensure the security of the authorization and sharing process of traffic data; the relevant detection mechanism is designed using self-made programmable smart contracts, and conducts relevant standard tests, which is conducive to the mutual conversion of shared data and realizes barrier-free sharing.
[0085] Furthermore,
[0086] The hybrid consensus mechanism adopts a consensus mechanism that combines DPoS and DNBFT. DPoS classifies alliance nodes so that each node has its own responsibilities; DNBFT improves the fault tolerance of the system.
[0087] Specifically,
[0088] The alliance nodes are divided into ordinary participating nodes, verification nodes and representative nodes;
[0089] Common participating nodes include traffic data collectors and providers, access requesters, and managers. Managers are responsible for monitoring and operating the data and sharing process, and providing fault tolerance when problems occur;
[0090] Verification nodes verify the integrity and validity of data;
[0091] The representative node broadcasts the data information and stores the data in the blockchain;
[0092] Verification nodes and representative nodes have high requirements for the level of informatization, and need to have high credibility and strong computing power, so that the blockchain system can operate more efficiently. Therefore, in the selection of verification nodes and representative nodes, a hybrid consensus algorithm will be used to select from more authoritative traffic information agencies and local traffic-related departments to form a traffic data alliance node group.
[0093] S4. After the data management alliance node group verifies the request and the integrity of the ciphertext, it uploads the ciphertext to the blockchain for storage;
[0094] S5. The access requester obtains the key and accesses the ciphertext through the blockchain network to obtain relevant data resources.
[0095] in,
[0096] The blockchain network obtains the ciphertext and sends feedback information to the access requester;
[0097] The access requester accesses the ciphertext according to the ciphertext address and key in the feedback information and obtains relevant data resources.
[0098] In this application, the data management alliance node group uses a hybrid consensus mechanism to inspect and authenticate new alliance nodes that apply to join the blockchain network. Only those who pass the verification can join the blockchain network.
[0099] The data management alliance node group discovers malicious nodes in the blockchain network through a hybrid consensus mechanism, removes the malicious nodes from the blockchain network through a hybrid consensus mechanism, and maintains the stability of the blockchain network through an improved Byzantine fault-tolerant algorithm.
[0100] like Figure 2As shown, the present invention also provides a traffic data resource sharing system based on blockchain technology, including: an application layer, a blockchain service provider layer, a network layer and a data layer are set corresponding to the infrastructure of the blockchain, the blockchain service provider layer is provided with an access control mechanism module, a hybrid consensus mechanism module and a smart contract module, and the network layer includes all alliance nodes;
[0101] Application layer, used for:
[0102] Configured with the software modules required for integration of blockchain network application platform;
[0103] Add system management contracts and API libraries based on conventional communication protocols and transmission protocols;
[0104] Access control mechanism module, used to:
[0105] The conditions for access requesters are constrained, and attribute encryption is used to ensure the security of the authorization and sharing process of traffic data; when the access requester requests relevant data resources from the traffic data collector and provider in the blockchain network, the data access rights of the access requester are verified, and users without data access rights are isolated to ensure the privacy and security of information resource sharing in the traffic blockchain system.
[0106] Hybrid consensus mechanism for:
[0107] Classify alliance nodes;
[0108] Elect data management alliance node group in alliance nodes;
[0109] Verifying and authenticating the new node;
[0110] Eliminate malicious nodes, maintain the operation of the entire blockchain system, and improve the efficiency of system operation;
[0111] Smart contract module for:
[0112] Smart contracts implemented with automated code can automatically and autonomously verify and authenticate blockchain data;
[0113] The network layer is used to:
[0114] Each alliance node initiates traffic data resource requests, execution requests, and verification requests;
[0115] Data layer, used for:
[0116] As the bottom layer of the blockchain architecture, it provides tamper-proof, traceable, and highly secure data storage for the blockchain network through chain storage structure, data storage structure, Merkle tree, timestamp, hash algorithm, and asymmetric encryption technology.
[0117] like Figure 5 , 6 ,7, and 8, the storage and management process of blockchain data resources mainly involves: ,traffic blockchain, traffic information sheet, and traffic data storage structure;
[0118] like Figure 5 As shown in the figure, the traffic blockchain is a chain structure composed of many traffic blocks in a linear manner. The block header mainly consists of four parts, including the hash value held by the previous block, the Mekle tree root hash value, the random number generated by the traffic block, and the timestamp. The parent hash and the current block are connected to form a chain structure of storage blocks; the Merkle tree root hash value exists as the overall hash of the block body in the current block, such as Figure 6 As shown in the figure, the Merkle root is generated by hashing the Order block; the random number represents the proof part generated by the node when the corresponding block is successfully mined. The block body consists of the number of Order blocks, the hash value of the Order block, and the digital signature involved when the block node is generated. The Order block stores the information transaction order collectively; the hash value of the Order block is used to verify the validity of the transaction; the digital signature involved in generating the block node is to ensure the smooth implementation of the accountability system, so as to ensure the verification of the transaction block by other nodes.
[0119] like Figure 7 As shown, the Order block collectively stores several traffic information sheets and their hash values. The transaction sheet is obtained by hashing the type and content of the transaction, the timestamp, and the public key of the transaction generator (initiator), providing reliable tamper-proofing. The hash value of the transaction sheet serves as the index of the complete transaction sheet to achieve fast search. The type of the transaction sheet identifies the type of transaction. The content of the transaction sheet is the content stored in the transaction sheet. The timestamp is the time recorded when the transaction sheet is generated. The generator's public key and the digital signature of the transaction sheet confirm the responsible party of the transaction sheet to ensure that the traffic block can be traceable.
[0120] like Figure 8 As shown in the figure, the storage structure of traffic data mainly consists of structured data and unstructured data. Structured data refers to information related to numerical values and text. These data are added to the transaction form and the information is directly stored in the local database. For unstructured data, you only need to add the hash value of the data to the transaction form in order to use it as an identifier for data retrieval and verification. Similarly, after adding it to the transaction form, it is stored in the database. When a shared transaction occurs, the hash value of the transaction form will be stored in the Order block, and then the block generator will add it to the traffic block to facilitate access by other nodes.
[0121] The hybrid consensus mechanism in the present invention has the following specific calculation process:
[0122] (1) Initialization: Use OpenSSL to generate an EC_KEY using the identifier of the elliptic curve. The curve equation used is defined as G, and n is the order of the curve equation G. The EC_KEY generated in this way already contains the parameters of the elliptic curve. Otherwise, you need to manually set EC_GROUP. Then call EC_KEY_generate_key to generate the private key d and the public key Q.
[0123] (2) When N (node) receives the user's request to upload traffic data, it immediately verifies the legitimacy of the traffic data uploaded by the user. If it is legitimate, the data is digitally named, and then the public key, upload time, and hash value of the data summary provided by the user are recorded in the memory according to the storage structure of the traffic transaction form and stored in the Order block. When the number of Order blocks reaches ten, N node calculates the final Merkle root hash value based on the Merkle tree of the stored traffic data and stores the value in the block header of the new block; if the verification is not legitimate, the data to be uploaded is directly discarded.
[0124] (3) After a certain time interval Δt, N sends a consensus message IN to all nodes except itself, and I N =<preprepare consensus,b,Order,S> . Among them, b is the block information to be propagated, Order =<H(Digest(data)),Qi,Time> It consists of the hash value of the summary of the shared information data, the public key Qi of user i and the timestamp Time. S is the signature of the representative node on the consensus message. The specific process of the signature is described as follows:
[0125] 1) The representative node N selects an arbitrary random number k, k∈[1,n-1], and calculates it through the equation kG=(x1,y1), r=x1modn.
[0126] 2) If r=0, return to the initial step and reselect the random number k.
[0127] 3) Calculate s = k -1 (SHA1(I N )+dr)modn, the output represents the signature S=(r,s) of the message IN by node N.
[0128] (4) The verification node V must first verify the validity of the signature S of the representative node N on IN. The calculation of the verification process is as follows:
[0129] w=s -1 modn
[0130] u1=SHA1(I R )wmodn
[0131] u2=rwmodn
[0132] X=u1G+u2Q
[0133] By judging whether the equation X=(x1, y1) is true, if it is not true, it means that the signature is invalid. If it is true, the next calculation is performed: v=x1modn
[0134] By judging whether the values of v and r are the same, if they are the same, the signature is valid, otherwise, the signature is invalid.
[0135] (5) After verifying the validity of IN's signature, other verification nodes Oi in the secondary node send a message IOi to N to confirm the consensus. Oi = <Commit Consensus,b i , S Oi >, i∈{0, 1, 2, ..., N1-1}. Where bi refers to the block information of the new block forwarded by Oi, SOi is the signature of Oi to IOi, and the signature process is calculated as follows:
[0136] 1) Node Oi selects a random number ki and performs the following calculation:
[0137] k i G=(x j ,y j ), r i =x j modn
[0138] If ri=0, return to 1) and reselect a random number.
[0139] Calculate S Oi =k -1 (SHA(I Oi )+d Oi r i )modn, the output represents the signature SOi=(ri, SOi) of the message IOi by the node Oi.
[0140] (6) When N receives the confirmed consensus messages from 2f+1 different nodes, it will send a verification message to the verification node V. In order to reduce the time to reach a consensus, this paper adopts the method of signature message aggregation, that is, aggregating signature messages into a signature message SO, which can effectively reduce the verification time and thus improve the time efficiency of consensus.
[0141] (7) Node V verifies the validity of the aggregated signature message SO. The specific process is described as follows:
[0142] Input system parameters D = (q, FR, a, b, G, n, h), identity list GO and public key list QO of other nodes Oi, and signature list SO.
[0143] By calculation
[0144] K i G OI =(x j ,y j )
[0145] R i =x j modn
[0146] S Oi =k -1 (SHA(I Oi )+d Oi r i )modn
[0147] verify Is it true? If so, the signature is valid.
[0148] (8) If the verification is passed, N considers that the consensus of the block has been reached, enters the passed state, and packages the passed transactions in the block and converts them into an irreversible fixed block. This round of consensus is completed. N deletes the Order in the local memory. When entering the next interval time, if the consensus has not been reached, the consensus process is abandoned and the packaged blocks of this round are discarded. The system recalculates N, and the current representative node N starts a new round of consensus.
[0149] Example:
[0150] like Figure 4 As shown, the traffic data resource sharing process based on blockchain technology in this application mainly consists of six stages: access request initiation, file encryption, consensus completion, transaction verification, file upload and decryption download.
[0151] Specifically, the access sharing process is as follows:
[0152] (1) Access request initiation: Through the blockchain network, the access requester, such as user A, initiates access to the traffic information data of the information owner, such as a certain transportation department B.
[0153] (2) File encryption: When information owner B receives an access request from user A, it will encrypt the access control structure and plain text of the information prepared in advance. At this time, information owner B can choose the encryption method. There are two methods: one is a one-to-many attribute-based encryption ciphertext, and the other is to re-encrypt the ciphertext of user A's attribute proxy. After completing the above process, the encrypted ciphertext is finally sent to the transportation agency alliance server.
[0154] (3) Consensus completed: After receiving B's ciphertext, the transport agency alliance server group will further judge it to determine whether the ciphertext is a one-to-one or one-to-many encrypted ciphertext. If the ciphertext is a one-to-one attribute proxy re-encrypted ciphertext, the accounting node generated by the transport agency alliance server group needs to proxy re-encrypt the ciphertext and broadcast the proxy re-encrypted ciphertext after reaching a consensus; if the ciphertext is a one-to-many attribute encrypted ciphertext, the accounting node will directly broadcast the ciphertext after reaching a consensus.
[0155] (4) Transaction verification: The nodes of the transportation agency alliance group verify the integrity of the transaction and data.
[0156] (5) File upload: After verification, the proxy re-encrypts the ciphertext and the accounting node stores it on the chain.
[0157] (6) File decryption and download: When the broadcast transaction is received by the blockchain network, the blockchain network will send feedback to the blockchain node to remind the access request node user. After that, user A can access the ciphertext on the chain.
[0158] like Fig.10 As shown in the figure, a traffic data resource sharing system based on searchable proxy re-encryption is proposed, in which the main participating entities are: data owners, data users, external databases and miners;
[0159] The data owner is each transportation department, agency, etc. The data owner uses the proxy re-encryption technology to encrypt the data, extract the keywords {w1, w2, ..., w3} of the data, and generate a keyword index;
[0160] The data owner forms a transaction and broadcasts it to the blockchain network. After the traffic data alliance group node group verifies that it is correct, it adds the transaction to the block;
[0161] Data users are open to all users who apply for access and use of traffic data resources. Users have their own keys and request access to data. First, they initiate a transaction to the blockchain (with an additional search token). After the traffic alliance group node verifies that the search token and the index match successfully, it sends the file location and the proxy re-encryption key to the user, and then the user requests the data ciphertext from the external database;
[0162] The external database stores the encrypted original data. Miners are nodes in the traffic alliance group. They verify transactions and verify whether the index matches the search token. If the conditions are met, the data storage location and the proxy re-encryption key are sent to the user.
[0163] In the access sharing process, for the scenario where user A requests to access the traffic information of a traffic department B, an algorithm is constructed based on the searchable proxy re-encryption access control mechanism. The specific solution includes the following steps:
[0164] (1) Initialization phase: (GP, PK, MSK) <- Setup(k, U), given the system security parameter k and the set of all system attributes U, generate the public parameter GP, the system public key PK and the system master key MSK.
[0165] (2) Key generation phase: ((PK A , S.K. A ), (PK B , S.K. B ))<-KeyGen(PK,MSK,S A , S B ), input the system's public key PK, system master key MSK, and the attribute set S of A and B A , S B And S A , Generate A's public-private key pair (PK A , S.K. A ) and B's public-private key pair (PK B , S.K. B ).
[0166] (3) Re-encryption key generation phase: ReKey (SK A , S A ,(M',p'),GP,PK B )<->rk B->A , enter B's private key SK B , attribute set S B , access to the shared structure (M', p'), the system's public parameters GP and user A's public key PK A , generate the proxy re-encryption key rk B->A .
[0167] (4) Encrypted ciphertext: CT B <-E(m,(M',p'),GP,PK A ), input the shared information plaintext m, access shared structure (M', p'), system public parameter GP and proxy re-encryption key rk A->B , generate encrypted ciphertext CTA . At the same time, keywords of the shared information plaintext are extracted.
[0168] (5) Re-encrypted ciphertext: CT A <-RE(PK, GP, CT B , rk B->A ), enter the system public key PK, system public parameter GP, encrypted ciphertext CT B and the proxy re-encryption key rk B->A , the current representative node generates the proxy re-encrypted ciphertext CT A After re-encryption, the data is stored in an external server, which stores the data in the LOC m Sent to data owner B.
[0169] (6) Index generation I<-E(PK, GP, w i ), the data owner B collects the key words of the data w={w1,w2,…,w n}, input key PK, output encryption index I = (I1, I2, ... I n ). Data owner B creates a new transaction, attaches index I to the transaction and broadcasts the transaction to the blockchain system. Transactions with indexes are the same as ordinary transactions in the blockchain and are added to the block after being verified by the traffic alliance group nodes.
[0170] (7) Search token generation TK<-TokenGen(MK, GP, w i ), user A builds a search token, generates a transaction, attaches the search token to the trader and sends it to the surrounding miner nodes, that is, the traffic alliance group nodes for verification.
[0171] (8) Test {0, 1}<-Test(I, TK, GP). After the traffic alliance group node receives the search token TK submitted by user A, it now performs index matching in its own stored blockchain copy.
[0172] (9) Query (TK, I, GP) -> E (LOC m ) or terminate, using the keyword's search token and encrypted index, the blockchain's alliance group nodes execute a binary search algorithm and return the storage location of the encrypted file.
[0173] (10) Ciphertext decryption: m<-D(PK, CT B , S.K. B ), enter the system public key PK, encrypted ciphertext CT B And the data owner B's private key SK B , generate inscription information m.
[0174] (11) Re-encryption and decryption: m<-RD(CTA , S.K. A ), enter the proxy re-encrypted ciphertext CT B And visitor A's private key SK A , generate plaintext information m.
[0175] Advantages of the present invention:
[0176] In the scenario of sharing traffic data resources, by combining blockchain technology, the sharing of traffic data resources can ensure stronger security, transparency of data interaction and non-tamperability, thus achieving security protection for data sharing.
[0177] The hybrid consensus mechanism that combines DPoS and DNBFT, on the one hand, realizes the grading of traffic nodes, so that each performs its duties and maintains the safe operation of the system, while providing fault tolerance and being able to expel malicious nodes through voting and add new nodes.
[0178] Attribute-based keyword-searchable re-encryption methods enable data sharing, tracking, and quick retrieval by users.
[0179] The blockchain sharing solution with searchable proxy re-encryption can effectively solve the problems of data privacy leakage and fast query in traditional blockchain, and can more specifically adapt to the sharing of traffic information resources with large data volumes and frequent interactions. Proxy re-encryption technology can realize data sharing between data owners and multiple data users. Secondly, through the inverted index structure constructed by searchable symmetric encryption, the binary search algorithm can use keyword search tokens to quickly query the keywords of the data, which improves the access efficiency of data users while also protecting the privacy of the data plaintext.
[0180] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A traffic data resource sharing method based on blockchain technology, characterized in that: Includes steps: The access requester requests the relevant data resources from the traffic data collector and provider in the blockchain network, including initiating a transaction, in which a search token is attached; The traffic data collector and provider encrypts the relevant data resources, including: using one-to-many attribute-based encrypted ciphertext or using attribute proxy re-encryption ciphertext for the access requester, and sending the ciphertext and key to the data management alliance node group; wherein, the traffic data collector and provider uses searchable proxy re-encryption to encrypt the relevant data resources, and extracts keywords from the data to generate a keyword index; the data management alliance node group reaches a consensus on the ciphertext through a hybrid consensus mechanism, and broadcasts the ciphertext to the blockchain network; including: if the ciphertext is an attribute proxy re-encryption ciphertext for the access requester, the accounting node in the data management alliance node group first performs proxy re-encryption on the ciphertext, the data management alliance node group then reaches a consensus on the ciphertext, and finally the accounting node broadcasts the ciphertext; After verifying the integrity of the request and the ciphertext, the data management alliance node group uploads the ciphertext to the blockchain for storage, wherein the data management alliance node group executes a binary search algorithm through an inverted index structure constructed by searchable symmetric encryption, uses the search token to quickly query the keyword index of the data, and after verifying that the search token successfully matches the keyword index, sends the location of the ciphertext to the access requester; The access requester obtains the key and accesses the ciphertext through the blockchain network to obtain relevant data resources.
2. The method according to claim 1, characterized in that: The blockchain network adopts a consortium blockchain, and a hybrid consensus mechanism is used in the consortium blockchain to select multiple consortium nodes to form the data management consortium node group.
3. The method according to claim 1, characterized in that: The data management alliance node group reaches a consensus on the ciphertext through a hybrid consensus mechanism and broadcasts the ciphertext to the blockchain network; including: If the ciphertext is a one-to-many attribute-based encrypted ciphertext, the data management alliance node group first reaches a consensus on the ciphertext, and then the accounting node broadcasts the ciphertext.
4. The method according to claim 1, characterized in that: The attribute proxy re-encryption includes: Initialize the relevant data resources to generate key pairs; Generate a re-encryption key based on the key pair; Use the key to encrypt and re-encrypt the ciphertext, generate an index, record keyword-related information, and generate a search token.
5. The method according to claim 1, characterized in that: The hybrid consensus mechanism adopts a consensus mechanism that combines DPoS and DNBFT. The DPoS classifies alliance nodes so that each node performs its own duties; the DNBFT improves the fault tolerance of the system.
6. The method according to claim 5, characterized in that: The DPoS classifies alliance nodes into different levels, including: The alliance nodes are divided into ordinary participating nodes, verification nodes and representative nodes; The common participating nodes include the traffic data collector and provider, access requester and manager, and the manager is responsible for monitoring and operating the data and sharing process; The verification node verifies the integrity and validity of the data; The representative node broadcasts the data information and stores the data in the blockchain.
7. The method according to claim 1, characterized in that: The data management alliance node group verifies and authenticates new alliance nodes that apply to join the blockchain network through the hybrid consensus mechanism, and only those who pass the verification can join the blockchain network; The data management alliance node group discovers malicious nodes in the blockchain network through the hybrid consensus mechanism, removes the malicious nodes from the blockchain network through the hybrid consensus mechanism, and maintains the stability of the blockchain network through the improved Byzantine fault tolerance algorithm.
8. The method according to claim 1, characterized in that: The access requester obtains the key and accesses the ciphertext through the blockchain network to obtain relevant data resources; including: The blockchain network obtains the ciphertext and sends feedback information to the access requester; The access requester accesses the ciphertext according to the ciphertext address and key in the feedback information and obtains relevant data resources.
9. A system for implementing the traffic data resource sharing method according to any one of claims 1 to 8, characterized in that: include: The application layer, blockchain service provider layer, network layer and data layer are set up corresponding to the basic architecture of the blockchain. The blockchain service provider layer is provided with an access control mechanism module, a hybrid consensus mechanism module and a smart contract module. The network layer includes all alliance nodes; The application layer is used to: Software information for configuring the blockchain network; Add system management contracts and API libraries based on conventional communication protocols and transmission protocols; The access control mechanism module is used to: When an access requester requests relevant data resources from a traffic data collector and provider in a blockchain network, verify the data access rights of the access requester; The hybrid consensus mechanism is used to: Classify alliance nodes; Selecting the data management alliance node group from among the alliance nodes; Verify and authenticate new nodes; Eliminate malicious nodes; The smart contract module is used to: Verifying and authenticating the blockchain data; The network layer is used to: Each alliance node initiates traffic data resource requests, execution requests, and verification requests; The data layer is used to: Through chain storage structure, data storage structure, Merkle tree, timestamp, hash algorithm and asymmetric encryption technology, the blockchain network is provided with tamper-proof, traceable and highly secure data storage.
